Reviewers: ,

Message:
This is a WIP to resolve "this" using the normal variable resolution mechanism. It passes all tests except those involving turbofan. It shouldn't introduce a functional change. A patch to make arrow functions not declare this will be a
small followup.

Some notes:

* Only a few tests fail with TF enabled, and only one compiler test. Probably
the compiler test is the easiest way to reproduce:

tools/run-tests.py --arch-and-mode=x64.release test-run-jscalls/EvalCall

 * Just x64 for now

 * Probably we will be able to clean up ResolvePossiblyDirectEvalCall to not
pass the receiver to the eval stub, since after this patch, eval doesn't declare
a "this" binding.  In that way the "LookupThis()" method of Scope might be a
temporary hack.

Some thoughts regarding TF would be appreciated.  TIA :)

Description:
Resolve references to "this" the same way as normal variables

Make the parser handle references to "this" as unresolved variables, so the
same logic as for the rest of function parameters is used for the receiver.
Minor additions to the code generation handle copying the receiver to the
context, along with the rest of the function parameters.

Based on work by Adrian Perez de Castro <[email protected]>.

BUG=
LOG=N

Please review this at https://codereview.chromium.org/1097283003/

Base URL: https://chromium.googlesource.com/v8/v8@master

Affected files (+133, -54 lines):
  M src/compiler/ast-graph-builder.cc
  M src/contexts.cc
  M src/heap/heap.h
  M src/parser.cc
  M src/runtime/runtime-debug.cc
  M src/runtime/runtime-scopes.cc
  M src/scopeinfo.cc
  M src/scopes.h
  M src/scopes.cc
  M src/variables.cc
  M src/x64/full-codegen-x64.cc
  M src/x64/lithium-codegen-x64.cc
  M test/mjsunit/debug-scopes.js


--
--
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.

Reply via email to