Fixed TF nits.
I realized that this patch actually excludes arrow functions from
has_this_declaration, so it fixes this scoping for arrow functions, and
therefore needs tests for that. We will also be able to remove the
uses_this /
inner_uses_this flags from Scope; dunno whether to do here or in a followup.
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);
On 2015/04/22 11:17:53, Michael Starzinger wrote:
On 2015/04/22 10:59:21, Michael Starzinger wrote:
> 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
Or alternatively pass the patched_receiver as an argument to
AstGraphBuilder::BuildLocalFunctionContext, that might be even
cleaner.
A bit squirrely, but done.
https://codereview.chromium.org/1097283003/diff/60001/src/compiler/ast-graph-builder.cc#newcode2157
src/compiler/ast-graph-builder.cc:2157: // once
ResolvePossibleDirectEval changes.
On 2015/04/22 10:59:21, Michael Starzinger wrote:
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. :)
Yes I think so, and the second return value from
ResolvePossibleDirectEval would also go away, methinks :)
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.