|
Block scoped const variables.
This implements block scoped 'const' declared variables in harmony mode. They
have a temporal dead zone semantics similar to 'let' bindings, i.e. accessing
uninitialized 'const' bindings in throws a ReferenceError.
As for 'let' bindings, the semantics of 'const' bindings in global scope is not
correctly implemented yet. Furthermore assignments to 'const's are silently
ignored. Another CL will introduce treatment of those assignments as early
errors.
Committed: http://code.google.com/p/v8/source/detail?r=9764
Total comments: 2
Total comments: 7
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+395 lines, -111 lines) |
Patch |
|
M |
src/arm/full-codegen-arm.cc
|
View
|
1
2
3
|
10 chunks |
+27 lines, -12 lines |
0 comments
|
Download
|
|
M |
src/ast.h
|
View
|
1
2
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
|
M |
src/contexts.h
|
View
|
1
2
|
1 chunk |
+30 lines, -11 lines |
0 comments
|
Download
|
|
M |
src/contexts.cc
|
View
|
1
2
3
|
4 chunks |
+10 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/full-codegen.cc
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/hydrogen.cc
|
View
|
1
2
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
src/ia32/full-codegen-ia32.cc
|
View
|
1
2
3
|
10 chunks |
+28 lines, -13 lines |
0 comments
|
Download
|
|
M |
src/messages.js
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/objects.h
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/parser.h
|
View
|
1
2
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
src/parser.cc
|
View
|
1
2
|
14 chunks |
+63 lines, -24 lines |
0 comments
|
Download
|
|
M |
src/preparser.cc
|
View
|
1
2
3
|
3 chunks |
+26 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/runtime.cc
|
View
|
1
2
3
|
1 chunk |
+20 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/scopeinfo.cc
|
View
|
1
2
|
2 chunks |
+11 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/scopes.h
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/scopes.cc
|
View
|
1
2
|
3 chunks |
+7 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/token.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/v8globals.h
|
View
|
1
2
|
1 chunk |
+5 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/variables.h
|
View
|
1
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/variables.cc
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/x64/full-codegen-x64.cc
|
View
|
1
2
3
|
10 chunks |
+30 lines, -14 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/block-conflicts.js
|
View
|
1
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/block-let-declaration.js
|
View
|
1
|
3 chunks |
+30 lines, -2 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/block-let-semantics.js
|
View
|
1
|
4 chunks |
+27 lines, -1 line |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/block-scoping.js
|
View
|
1
|
9 chunks |
+50 lines, -4 lines |
0 comments
|
Download
|
Total messages: 7 (0 generated)
|