-
-
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] - Feature arrays with empty elements #1870
Conversation
Test262 conformance changesVM implementation
Fixed tests (140):
|
Benchmark for d17ec3cClick to view benchmark
|
I would switch the naming from |
ce41659
to
f136b6c
Compare
Codecov Report
@@ Coverage Diff @@
## main #1870 +/- ##
==========================================
- Coverage 46.67% 46.65% -0.02%
==========================================
Files 204 204
Lines 16701 16706 +5
==========================================
- Hits 7796 7795 -1
- Misses 8905 8911 +6
Continue to review full report at Codecov.
|
Benchmark for b67ce04Click to view benchmark
|
f136b6c
to
ac95fc3
Compare
Benchmark for f4c6996Click to view benchmark
|
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 very good! thanks! :)
bors r+ |
This PR adds support for arrays with empty elements e.g. `["", false, , , ]`. Before we were filling the empty places with `undefined`, but this is wrong according to [spec](https://tc39.es/ecma262/#sec-runtime-semantics-arrayaccumulation) there shouldn't be undefined with a index at that place, instead only `length` is incremented. So `[,,,].length == 3` and operations like `[,,,,].indexOf(undefined) == -1`, `[,,,,].lastIndexOf(undefined) == -1` etc.
Pull request successfully merged into main. Build succeeded: |
This PR adds support for arrays with empty elements e.g.
["", false, , , ]
. Before we were filling the empty places withundefined
, but this is wrong according to spec there shouldn't be undefined with a index at that place, instead onlylength
is incremented. So[,,,].length == 3
and operations like[,,,,].indexOf(undefined) == -1
,[,,,,].lastIndexOf(undefined) == -1
etc.