Uploaded new patch. PTAL.
On 2014/09/30 16:01:36, wingo wrote:
Some comments.
https://codereview.chromium.org/553413002/diff/60001/src/harmony-array.js
File src/harmony-array.js (right):
https://codereview.chromium.org/553413002/diff/60001/src/harmony-array.js#newcode30
src/harmony-array.js:30: thisArg = %GetDefaultthisArg(predicate) ||
thisArg;
Typo. Did these tests pass for you? :)
Actually not :) Now I doubled checked test were passing and launched a git
cl
try.
https://codereview.chromium.org/553413002/diff/60001/src/harmony-array.js#newcode32
src/harmony-array.js:32: var needs_wrapper =
SHOULD_CREATE_WRAPPER(predicate,
thisArg);
Here we are adding a test; SHOULD_CREATE_WRAPPER looks like this:
macro SHOULD_CREATE_WRAPPER(functionName, receiver) =
(!IS_NULL_OR_UNDEFINED(rec
eiver) && !IS_SPEC_OBJECT(receiver) &&
%IsSloppyModeFunction(functionName));
so we're adding the duplicate IS_NULL_OR_UNDEFINED check, and if the
thisArg
was
initialized in the previous if to the global object then we also go to the
!IS_SPEC_OBJECT case. Probably this needs_wrapper initialization should
be in
an else{}.
https://codereview.chromium.org/553413002/diff/60001/src/harmony-array.js#newcode67
src/harmony-array.js:67: var needs_wrapper =
SHOULD_CREATE_WRAPPER(predicate,
thisArg);
same here and in similar places in the patch
Right, the result of GetDefaultReceiver is either undefined (strict mode)
or an
object, in neither case will be necessary to create an object (needs_wrapper
will be false).
https://codereview.chromium.org/553413002/diff/60001/test/mjsunit/es6/collections.js
File test/mjsunit/es6/collections.js (right):
https://codereview.chromium.org/553413002/diff/60001/test/mjsunit/es6/collections.js#newcode698
test/mjsunit/es6/collections.js:698: // Create a new object in each
function
call when receiver is a primitive value.
80 characters here and in other places in the tests
Acknowledge.
https://codereview.chromium.org/553413002/
--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.