Skip to content

Conversation

@duongnhn
Copy link
Contributor

@duongnhn duongnhn commented Oct 30, 2018

{
byteCodeGenerator->StartStatement(pnode);
const Js::OpCode op = (pnode->nop == knopDecPost) ? Js::OpCode::Sub_A : Js::OpCode::Add_A;
bool isESBigIntEnabled = byteCodeGenerator->GetScriptContext()->GetConfig()->IsESBigIntEnabled();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

if BigInt is considered, we generate different bytecode for post increment/decrement. Instead of: convert to number and add 1 to it, we convert value to numeric and increment it.

@duongnhn duongnhn requested a review from rajatd October 30, 2018 02:54
Copy link
Contributor

@boingoing boingoing left a comment

Choose a reason for hiding this comment

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

LGTM

@duongnhn duongnhn force-pushed the user/duongn/bigint_inc_post branch 4 times, most recently from 739a952 to 14a5522 Compare November 1, 2018 08:06
@duongnhn duongnhn force-pushed the user/duongn/bigint_inc_post branch from 14a5522 to b2ee6c7 Compare November 1, 2018 23:28
@chakrabot chakrabot merged commit b2ee6c7 into chakra-core:master Nov 2, 2018
chakrabot pushed a commit that referenced this pull request Nov 2, 2018
Merge pull request #5806 from duongnhn:user/duongn/bigint_inc_post

- change incr, decr post to use incr and decr without conversion instead of add_a, dec_a
- change conv_num (to number) to use conv_numeric (to numeroc) according to https://tc39.github.io/proposal-bigint/#sec-tonumeric
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants