Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES6 Number APIs #574

Merged
merged 13 commits into from
Jan 2, 2019
Merged

ES6 Number APIs #574

merged 13 commits into from
Jan 2, 2019

Conversation

lahma
Copy link
Collaborator

@lahma lahma commented Dec 29, 2018

  • quite a lot of work as missing Dtoa functionality now ported to finally fix the issues with toPrecision (ToPrecision() not being evaluated as expected #459)
  • the Dtoa code is intentionally C style syntax for it to be easier to diff with v8 code base, so maybe we can be less strict about stylistic issues
  • converted builder to be simpler to follow v8 code base and moved formatting to prototype
  • unified string builder pool to work like other pools, sharing dtoa builder instance via engine, like pools
  • new tests included & passing

@lahma lahma added the es6 label Dec 29, 2018
@lahma lahma force-pushed the es6-number branch 3 times, most recently from d32d2fc to 94e3251 Compare December 29, 2018 21:43
@lahma lahma changed the title WIP ES6 Number APIs ES6 Number APIs Dec 29, 2018
@lahma lahma force-pushed the es6-number branch 3 times, most recently from e0e62bf to a4f536a Compare December 30, 2018 10:45
@sebastienros
Copy link
Owner

I wonder if we can do better with the SB pool. Now we need to pass (and have) the engine for most type conversions because of it. First question, do we really need a pool of instance, or just one reusable instance, as in "are there recursive calls" that will issue multiple SBs?

Should/could the SBs be shared by all Jint engines, using a static pool? I assume it matters in a server scenario only where concurrency is more an issue, but at the same time it could also be an improvement as all threads could reuse the same SB overtime. Another option would be to have a static pool of SB pools, to reduce concurrency by reusing the pools across engine instances.

@lahma lahma force-pushed the es6-number branch 3 times, most recently from 9a5317d to 374b40c Compare January 1, 2019 11:27
@lahma
Copy link
Collaborator Author

lahma commented Jan 1, 2019

I've added ConcurrentObjectPool which is the same pool with proper Interlocked support, so now StringBuilderPool is a global pool and API changes including new engine parameter reverted. I think that finding optimal non-concurrent pool might a separate task.

@sebastienros sebastienros merged commit 1f8d87a into sebastienros:dev Jan 2, 2019
@lahma lahma deleted the es6-number branch January 2, 2019 20:52
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.

None yet

2 participants