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

Implement BigInt #5440

Open
kfarnung opened this Issue Jul 10, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@kfarnung
Copy link
Member

kfarnung commented Jul 10, 2018

BigInt support is currently at Stage 3: https://github.com/tc39/proposal-bigint

Node is starting to take a dependency on it: https://github.com/nodejs/node/pulls?q=is:pr+bigint
There's currently an N-API change in PR: nodejs/node#21226

@liminzhu liminzhu changed the title Support for BigInt Implement BigInt Jul 12, 2018

chakrabot pushed a commit that referenced this issue Oct 17, 2018

[MERGE #5706 @duongnhn] Implement stage 3 proposal BigInt (init and c…
…omparison with signed BigInt)

Merge pull request #5706 from duongnhn:user/duongn/bigint

The BigInt proposal (https://github.com/tc39/proposal-bigint) is in stage 3. With this PR, we can initialize signed BigInt literal or use BigInt constructor and do comparisons among BigInt types. This is missing a bunch of things but the code change keep growing so I would like to lay some foundation and move forward.

What I have done:
- (Flag) ESBigInt is set to false by default
- (Scan and Parser) token and parse node for BigInt literal
- (Library) Create JavascriptBigInt and JavascriptBigIntObject with basic functions.
- (JavascriptBigInt) Convert from decimal digit chars to an array of uint32 digits (where we store BigInt)
and compare between 2 BigInts
- (Test) create test for init, comparisons, global BigInt object.

TODOs:
- resize memory dynamically. Currently it uses a fixed space for BigInt which is against arbitrary precision.
- other operators and conversion.
- tagged bigint
- JIT
- etc

Part of #5440

chakrabot added a commit to nodejs/node-chakracore that referenced this issue Oct 18, 2018

deps: update ChakraCore to Microsoft/ChakraCore@eeba684
[MERGE #5706 @duongnhn] Implement stage 3 proposal BigInt (init and comparison with signed BigInt)

Merge pull request #5706 from duongnhn:user/duongn/bigint

The BigInt proposal (https://github.com/tc39/proposal-bigint) is in stage 3. With this PR, we can initialize signed BigInt literal or use BigInt constructor and do comparisons among BigInt types. This is missing a bunch of things but the code change keep growing so I would like to lay some foundation and move forward.

What I have done:
- (Flag) ESBigInt is set to false by default
- (Scan and Parser) token and parse node for BigInt literal
- (Library) Create JavascriptBigInt and JavascriptBigIntObject with basic functions.
- (JavascriptBigInt) Convert from decimal digit chars to an array of uint32 digits (where we store BigInt)
and compare between 2 BigInts
- (Test) create test for init, comparisons, global BigInt object.

TODOs:
- resize memory dynamically. Currently it uses a fixed space for BigInt which is against arbitrary precision.
- other operators and conversion.
- tagged bigint
- JIT
- etc

Part of Microsoft/ChakraCore#5440

Reviewed-By: chakrabot <chakrabot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.