-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
[Merged by Bors] - Added a bit more integer operation consistency to ByteDataBlock creation #2272
Conversation
Test262 conformance changesVM implementation
|
Codecov Report
@@ Coverage Diff @@
## main #2272 +/- ##
=======================================
Coverage 41.33% 41.33%
=======================================
Files 234 234
Lines 22019 22019
=======================================
Hits 9101 9101
Misses 12918 12918
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good change.
Regarding the interer sizes, I think we should open an issue for that and investigate what other engines do or if we can find any guidance in spec discussions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
bors r+ |
…ion (#2272) This Pull Request fixes a potential overflow when trying to convert a `u64` into a `usize` and then trying to create a byte data block. Related to this, we seem to be using a `u64` and `i64` as a general approach for an "integer", but ECMAScript doesn't have bounds for them, so they could be as big as infinite. Should we use `u128` and `i128` to have a bigger range? This would add a performance penalty, though, and we don't have 128-bit platforms usually, so the benefit would probably be minimal, at least when trying to allocate.
Pull request successfully merged into main. Build succeeded: |
This Pull Request fixes a potential overflow when trying to convert a
u64
into ausize
and then trying to create a byte data block.Related to this, we seem to be using a
u64
andi64
as a general approach for an "integer", but ECMAScript doesn't have bounds for them, so they could be as big as infinite. Should we useu128
andi128
to have a bigger range?This would add a performance penalty, though, and we don't have 128-bit platforms usually, so the benefit would probably be minimal, at least when trying to allocate.