https://codereview.chromium.org/1235153006/diff/20001/src/parser.cc
File src/parser.cc (right):
https://codereview.chromium.org/1235153006/diff/20001/src/parser.cc#newcode4333
src/parser.cc:4333: // let <rest_params> = [];
On 2015/07/15 11:36:32, caitp wrote:
On 2015/07/15 11:32:11, Michael Starzinger wrote:
> Just throwing this out there, not saying we should do this (now):
>
> Would it be a valid desugaring to pre-allocate the array to the
correct length
> and then use ordinary [[Put]] operations to populate it? Or am I
missing some
> JavaScript magic that makes this observable? Basically have
something like the
> following:
>
> let <rest_length> = %_ArgumentsLength() - <rest_index>;
> let <rest_params> = new $PremordialArray(<rest_length>);
> for (int i = 0; i < <rest_length>; ++i) {
> <rest_params>[i] = %_Arguments(i + <rest_index>);
> }
>
> Again, not intended to be actionable feedback right now, just a
question.
I don't think there's any problem doing it that way
Awesome. Thanks! In that case I would be fine with this CL's approach as
it is, knowing we have the option available to go into that direction in
the future.
https://codereview.chromium.org/1235153006/
--
--
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.