Skip to content

Conversation

@pulpdrew
Copy link
Contributor

Completes #1059

  • I've read the contributing guidelines

readDecimalFloat(): f64 {
// TODO: numeric separators (parseFloat can't handle these)
var text = this.source.text;
var pos = this.pos;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This local variable pos was added in #1376 , but made using a helper function awkward. I could either:

  • leave things how I have them now
  • use a local pos and do this.pos = pos before each call to the helper and pos = this.pos after each call to the helper
  • eliminate the helper function and just inline it all in this function.
  • pass a start argument into the helper (but that still leaves the problem of returning the end position, since I am already using the return value for indicating whether a separator is present).

Thoughts?

Copy link
Member

@MaxGraey MaxGraey Jul 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's caching this.pos is made some thing little complicated but it's speedup self-bootstrap version of AS. I suggest leave all as is because that cacheing most significant only for unsafeNext which changes really rarely. Other methods can leave as is for simplicity

@dcodeIO dcodeIO merged commit 8941652 into AssemblyScript:master Jul 13, 2020
@dcodeIO
Copy link
Member

dcodeIO commented Jul 13, 2020

Thank you! :)

@pulpdrew pulpdrew deleted the float-separators branch July 13, 2020 19:33
@github-actions
Copy link

🎉 This PR is included in version 0.13.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants