On 2014/12/13 10:42:49, Dmitry Lomov (chromium) wrote:
Other than comment below looks good, but I think one more important thing
to
look at is proto chain walk in concat
Interestingly, for (simple) arrays, data properties in the prototype chain
seem
to work perfectly well, but accessor properties do not --- different from
SpiderMonkey. Haven't tested this for more interesting element types, but it
seems like an issue that probably should be showing up in ES5's test262.
I'll
send another CL for those.
https://codereview.chromium.org/799853003/diff/1/src/runtime/runtime-array.cc
File src/runtime/runtime-array.cc (right):
https://codereview.chromium.org/799853003/diff/1/src/runtime/runtime-array.cc#newcode464
src/runtime/runtime-array.cc:464: // TODO(caitp): ToLength(Get(receiver,
"length")) should be a single op.
On 2014/12/13 02:00:47, caitp wrote:
> I'm not sure how big of a problem this is, but it seems simpler to just
call
the
> JS implementation of ToLength() rather than write it in C++. The
perf-impact
> should only affect uses of Symbol.isConcatSpreadable, so it probably
won't
> matter much in most cases.
You should handle simple cases in C++ here (e.g. when val is already a
number,
just convert directly without calling into JS)
Done.. This is still slow if length is a negative value, and incorrect if
length
2^32, but I'm a bit iffy about adding support for big ints just yet.
https://codereview.chromium.org/799853003/
--
--
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.