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

Normative: Fixed bug in NumberBitwiseOp #1956

Merged
merged 1 commit into from
Apr 22, 2020

Conversation

jhnaldo
Copy link
Contributor

@jhnaldo jhnaldo commented Apr 19, 2020

In the previous version ES2019, The Evaluation of binary bitwise operators utilize ToInt32 for both left and right expressions. However, the current version apply ToInt32 for only the left number value but use ToUint32 for the right number value in NumberBitwiseOp. I think it breaks the backward compatibility thus I revised the semantics of NumberBitwiseOp to use ToInt32 for both left and right number values.

@ljharb ljharb requested review from littledan and caiolima April 19, 2020 06:33
Copy link
Member

@michaelficarra michaelficarra left a comment

Choose a reason for hiding this comment

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

Confirmed against http://ecma-international.org/ecma-262/10.0/index.html#sec-binary-bitwise-operators-runtime-semantics-evaluation. Looks like it was probably a copy/paste mistake from the bitwise shift operator algorithm steps.

@michaelficarra michaelficarra added editor call to be discussed in the next editor call es2020 spec bug labels Apr 20, 2020
@ljharb ljharb requested review from syg, bakkot and a team April 22, 2020 21:38
@ljharb ljharb self-assigned this Apr 22, 2020
@ljharb ljharb added normative change Affects behavior required to correctly evaluate some ECMAScript source text and removed editor call to be discussed in the next editor call labels Apr 22, 2020
@ljharb ljharb force-pushed the bug-in-numberbitwiseop branch from 3471f70 to c6fc823 Compare April 22, 2020 21:56
@ljharb ljharb merged commit c6fc823 into tc39:master Apr 22, 2020
ljharb pushed a commit that referenced this pull request May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
normative change Affects behavior required to correctly evaluate some ECMAScript source text spec bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants