On 2015/09/04 16:46:58, Michael Starzinger wrote:
https://codereview.chromium.org/1291693004/diff/180001/src/compiler/bytecode-graph-builder.cc
File src/compiler/bytecode-graph-builder.cc (right):
https://codereview.chromium.org/1291693004/diff/180001/src/compiler/bytecode-graph-builder.cc#newcode46
src/compiler/bytecode-graph-builder.cc:46: const Operator* receiver_op =
common()->Parameter(-1, nullptr);
Something is highly fishy here. Parameter(0) should refer to the receiver.
Essentially if you call "x.f(a,b,c)", then ...
Parameter(0) == x // Receiver
Parameter(1) == a // 1st arg
Parameter(2) == b // 2nd arg
Parameter(3) == c // 3rd arg
Parameter(4) == f.context // Context
Parameter(-1) == f // Closure
Anything else would surprise me if it'd work.
Yeah, I think I was wrong here. I was confused by the comment in
ASTGraphBuilder
which says:
// Bind all parameter variables. The parameter indices are shifted by 1
// (receiver is parameter index -1 but environment index 0).
From this comment it sounds like the reciever is -1, but I guess what it is
actually saying is that the reciever is '0' and all other parameters are
shifted
up by one because of it. Could we fix the comment?
https://codereview.chromium.org/1291693004/
--
--
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.