Reviewers: rossberg,

Message:
An early patch.  It works for "this", e.g.:

$ out/x64.debug/d8 --print_scopes -e this
global { // (0, 4)
  // scope has trivial outer context
  // 1 stack slots
  // temporary vars:
  TEMPORARY .result;  // local[0]
  // local vars:
  DYNAMIC_GLOBAL this;  //
}

But eval('foo') doesn't work because ResolvePossiblyDirectSloppyEval() does a scope->Lookup("this") at compile-time, and the "this" binding isn't lexically visible in the scope tree, because declarative scopes from other script contexts
aren't statically resolveable.  But, it should be possible to also fix
ResolvePossiblyDirectBlabla in this CL too, because the badness from
https://codereview.chromium.org/1097283003/#msg41 shouldn't affect us any more.

Description:
Add script context with context-allocated "const this"

R=rossb...@chromium.org
LOG=N
BUG=498811

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

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

Affected files (+118, -4 lines):
  M src/bootstrapper.cc
  M src/objects.h
  M src/scopeinfo.cc
  M src/scopes.h
  M src/snapshot/snapshot-common.cc


--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to