Looking good, I like this a lot more now. Just one more suggestion. :)
https://codereview.chromium.org/1097283003/diff/20001/src/compiler/ast-graph-builder.cc
File src/compiler/ast-graph-builder.cc (right):
https://codereview.chromium.org/1097283003/diff/20001/src/compiler/ast-graph-builder.cc#newcode646
src/compiler/ast-graph-builder.cc:646: if (variable->is_this()) {
On 2015/04/22 08:04:00, wingo wrote:
On 2015/04/21 18:13:44, Michael Starzinger wrote:
> AFAICT, this is only needed for patching the receiver to the global
proxy in
the
> method prologue. Please don't "extend" Environment::Bind this way,
but rather
> adapt BuildPatchReceiverToGlobalProxy accordingly.
I had tried to do that, but I couldn't get at
environment->values()->at(0), as
it's private. I realize this is an awful hack and something different
should go
in :) I guess common()->Parameter(0) is the thing to use, then?
Yes, I think for patching purposes Parameter(0) is always correct.
https://codereview.chromium.org/1097283003/diff/60001/src/compiler/ast-graph-builder.cc
File src/compiler/ast-graph-builder.cc (right):
https://codereview.chromium.org/1097283003/diff/60001/src/compiler/ast-graph-builder.cc#newcode475
src/compiler/ast-graph-builder.cc:475: Node* patched_receiver =
BuildPatchReceiverToGlobalProxy(original_receiver);
Instead of having two call-sites of BuildPatchReceiverToGlobalProxy,
could we instead add a "Node* function_receiver_" field to the
AstGraphBuilder? That would allow us to ...
- initially set that field to Parameter(0) unconditionally
- conditionally patch it if scope->has_this_declaration()
- use that field in AstGraphBuilder::BuildLocalFunctionContext
https://codereview.chromium.org/1097283003/diff/60001/src/compiler/ast-graph-builder.cc#newcode2157
src/compiler/ast-graph-builder.cc:2157: // once
ResolvePossibleDirectEval changes.
Does this mean that the "receiver" input to ResolvePossibleDirectEval
will disappear completely? That would be awesome then, and I can totally
live with this TODO then. :)
https://codereview.chromium.org/1097283003/
--
--
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.