Yes, per spec, this test is now wrong. I wondered at first why this was
changed,
but it seems to be related to allowing Strings to have lengths up to 2^53-1
in
ES6. This particular bit of spec text dates to rev20 of ES6:
https://bugs.ecmascript.org/show_bug.cgi?id=1858
http://wiki.ecmascript.org/lib/exe/fetch.php?id=harmony%3Aspecification_drafts&cache=cache&media=harmony:working_draft_ecma-262_edition_6_10-28-13-rev20markup.pdf
Firefox doesn't currently implement it this way, though. And for positive
limits, I doubt any engine will be able to produce varying results, since it
would require allocating a string with length > 2^32.
It seems to me this change has a slightly higher chance of breaking existing
code than most other ToUint32 -> ToLength changes in the spec, since the
passed-in argument isn't the "length" property of any object. I'm not sure
the
risk is worth the reward (passing one test262 test). But it's also such a
small
thing that wrapping it with a flag seems hardly worth the effort. I'm
curious
for rossberg's thoughts on the matter of minor spec incompatibilities like
this
one.
https://codereview.chromium.org/1226143009/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.