On 2015/01/22 01:42:22, caitp wrote:
So, there's only one problem left really, that I can see.
The generated code seems to always try to use the rest index of the first
function with rest parameters, for instance:
```
function a(...args) {
if (args.length !== 3) throw "wrong length (a)!";
return JSON.stringify(args);
}
function b(a, ...args) {
if (args.length !== 2) throw "wrong length (b)!";
return JSON.stringify(args);
}
print(a(1,2,3)); // works as expected
print(b(1,2,3)); // throws, because `b` thinks that its rest index is
still 0,
when really it should be 1
```
I'm not sure what the cause for this is, since during code generation the
stub
seems to be invoked with the right index each time.
I've added new tests to try and figure this out and make sure it doesn't
break
again
of course, the issue is that the code stub is cached, and always looked up
with
an identical key... fixed by encoding rest_index in minor_key_. All tests
passing :>
https://codereview.chromium.org/816913003/
--
--
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.