On 2014/09/05 19:09:47, caitp wrote:
On 2014/09/05 18:04:54, arv wrote:
>
https://codereview.chromium.org/363833006/diff/250001/src/harmony-array.js
> File src/harmony-array.js (right):
>
>
https://codereview.chromium.org/363833006/diff/250001/src/harmony-array.js#newcode126
> src/harmony-array.js:126: // ES6, draft 07-18-14, section 22.1.2.1
> 08-24 is the latest atm
>
>
https://codereview.chromium.org/363833006/diff/250001/src/harmony-array.js#newcode154
> src/harmony-array.js:154: A = IS_SPEC_FUNCTION(C) ? new C() : [];
> extra whitespace here
>
>
https://codereview.chromium.org/363833006/diff/250001/src/harmony-array.js#newcode173
> src/harmony-array.js:173: A = IS_SPEC_FUNCTION(C) ? new C() : [];
> This should be:
>
> A = IS_SPEC_FUNCTION(C) ? new C(len) : new $Array(len);
>
> Please add a test for this case too.
>
>
https://codereview.chromium.org/363833006/diff/250001/test/mjsunit/harmony/array-from-generators.js
> File test/mjsunit/harmony/array-from-generators.js (right):
>
>
https://codereview.chromium.org/363833006/diff/250001/test/mjsunit/harmony/array-from-generators.js#newcode22
> test/mjsunit/harmony/array-from-generators.js:22: function* generator()
{
> Move this up, before the first usage.
>
>
https://codereview.chromium.org/363833006/diff/250001/test/mjsunit/harmony/array-from.js
> File test/mjsunit/harmony/array-from.js (right):
>
>
https://codereview.chromium.org/363833006/diff/250001/test/mjsunit/harmony/array-from.js#newcode11
> test/mjsunit/harmony/array-from.js:11:
> assertArrayLikeEquals(Array.from.call(thisArg, [], undefined), [],
constructor);
> long line here and elsewhere
Thanks, updated... I'm still a bit unsure if the semantics for calling
`mapfn`
are supposed to be identical to the ES262 methods which behave similarly
(the
code was originally copied from ArrayMap). It looks like the spec is
pretty
specific about "If thisArg was supplied, let T be thisArg; else let T be
undefined.". Is it just because the rest of the logic lives in [[Call]]
rather
than in these algorithms, or is it rather that harmony is supposed to
ignore
strict mode vs sloppy mode etc
I believe the spec describes what should happen with [[Call]] of a sloppy
function when passed undefined/null and that the code you have is how we
need to
do it in V8 when we use %_CallFunction.
https://codereview.chromium.org/363833006/
--
--
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.