-
Notifications
You must be signed in to change notification settings - Fork 859
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
Support ES2019 Array.prototype.flatMap #1372
Conversation
please run spotlessApply to have the code in the correct layout |
Thanks for the PR; do you see any chance to get array-like-objects.js also passing - i think i have seen some code already dealing with array-like objects.... |
Array-like objects already work to some degree. There are four total test files:
Of those, the base and poisoned length fail, and the others pass. I'll see if I can spot why. Poisoned length fails due to not supporting |
@midgleyc build failed org.mozilla.javascript.tests.MozillaSuiteTest > runMozillaTest[6550, js=testsrc/tests/js1_5/Regress/regress-89443.js, opt=9] STANDARD_ERROR |
Two tests fail: regress-89443 and regress-98901, both with Stack Overflows. Unfortunately, when I run them alone (in Java 17) they both pass. Any idea why they might be failing on GitHub? |
bb792b1
to
90d3b44
Compare
I rebased and the issue went away. |
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.
Others look good. Thanks!
case Id_flat_map: | ||
return js_flat_map(cx, scope, thisObj, args); |
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.
case Id_flat_map: | |
return js_flat_map(cx, scope, thisObj, args); | |
case Id_flatMap: | |
return js_flatMap(cx, scope, thisObj, args); |
I want the case to be the same as other method names.
rhino/src/org/mozilla/javascript/NativeArray.java
Lines 430 to 431 in 90d3b44
case Id_lastIndexOf: | |
return js_lastIndexOf(cx, scope, thisObj, args); |
Looks good. Thanks for working on this! |
Closes #949.
I followed what I did in #1313 but for flatMap this time.