[strong] Check strong mode free variables against the global object.
authormarja <marja@chromium.org>
Tue, 24 Mar 2015 16:46:53 +0000 (09:46 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 24 Mar 2015 16:46:59 +0000 (16:46 +0000)
commitcb7279da811f7add2f2f6a3bfbf0528834354fa3
tree0245bc53f12a8b2967a8cfc4383b48a6631126a2
parentbb880058f6499510cff12d98dc7d524d35d769cb
[strong] Check strong mode free variables against the global object.

Gather references to unbound variables where the reference (VariableProxy) is
inside strong mode. Check them against the global object when a script is bound
to a context (during compilation).

This CL only checks unbound variables which are not inside lazy functions - TBD
how do we solve that; alternatives: add developer mode which disables laziness /
do the check whenever lazy functions are really compiled.

BUG=v8:3956
LOG=N

Review URL: https://codereview.chromium.org/1005063002

Cr-Commit-Position: refs/heads/master@{#27422}
13 files changed:
src/api.cc
src/messages.js
src/objects.h
src/parser.cc
src/pending-compilation-error-handler.cc
src/pending-compilation-error-handler.h
src/scopeinfo.cc
src/scopes.cc
src/scopes.h
src/variables.cc
src/variables.h
test/cctest/test-parsing.cc
test/mjsunit/strong/declaration-after-use.js