|
Implement ES5 erratum: global declarations shadow inherited properties.
I also discovered that our treatment of const declarations is inconsistent
when inside a global eval under 'with' (i.e., when created by
DeclareContextSlots). That is,
var x;
eval("const x = 9")
and
var x;
eval("with({}) const x = 9")
differ (the former assigns 9, the latter throws). This appears to be an
oversight from earlier changes to our const semantics (the latter shouldn't
throw either). Fixing this is a separate issue, though (and one that doesn't
seem quite worthwhile).
R=mstarzinger@chromium.org
BUG= v8:1991, 80591
TEST=
Committed: https://code.google.com/p/v8/source/detail?r=11333
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+99 lines, -82 lines) |
Patch |
|
M |
src/contexts.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/objects.cc
|
View
|
|
2 chunks |
+0 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/parser.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/runtime.cc
|
View
|
|
5 chunks |
+34 lines, -38 lines |
4 comments
|
Download
|
|
M |
test/cctest/test-api.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
2 comments
|
Download
|
|
M |
test/cctest/test-decls.cc
|
View
|
|
4 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/declare-locally.js
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/mjsunit.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/mjsunit/regress/regress-1119.js
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/regress/regress-115452.js
|
View
|
|
1 chunk |
+6 lines, -7 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/regress/regress-1170.js
|
View
|
|
1 chunk |
+43 lines, -19 lines |
0 comments
|
Download
|
Total messages: 3 (0 generated)
|