|
Allocate block-scoped global bindings to global context.
- The global object has a reference to the current global scope chain.
Running a script adds to the chain if it contains global lexical declarations.
- Scripts are executed relative to a global, not a native context.
- Harmony let and const bindings are allocated to the innermost global context;
var and function still live on the global object.
(Lexical bindings are not reflected on the global object at all,
but that will probably change later using accessors, as for modules.)
- Compilation of scripts now needs a (global) context (previously only eval did).
- The global scope chain represents one logical scope, so collision tests take
the chain into account.
R=svenpanne@chromium.org
BUG=
Committed: https://code.google.com/p/v8/source/detail?r=12398
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+147 lines, -111 lines) |
Patch |
|
M |
src/api.cc
|
View
|
|
4 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/bootstrapper.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/bootstrapper.cc
|
View
|
|
3 chunks |
+10 lines, -11 lines |
0 comments
|
Download
|
|
M |
src/compiler.h
|
View
|
|
4 chunks |
+7 lines, -8 lines |
0 comments
|
Download
|
|
M |
src/compiler.cc
|
View
|
|
4 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
|
M |
src/heap.cc
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/isolate.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
src/isolate.cc
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/objects.h
|
View
|
|
2 chunks |
+5 lines, -1 line |
0 comments
|
Download
|
|
M |
src/objects.cc
|
View
|
|
1 chunk |
+4 lines, -6 lines |
2 comments
|
Download
|
|
M |
src/objects-inl.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/parser.cc
|
View
|
|
5 chunks |
+51 lines, -39 lines |
2 comments
|
Download
|
|
M |
src/rewriter.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/runtime.cc
|
View
|
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
|
M |
src/scopes.cc
|
View
|
|
4 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
|
M |
src/variables.h
|
View
|
|
2 chunks |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/variables.cc
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
test/cctest/test-decls.cc
|
View
|
|
3 chunks |
+27 lines, -21 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/block-conflicts.js
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
Total messages: 3 (0 generated)
|