|
Test for var declarations in eval which conflict with let
Previously, name conflicts between var and let declarations were only
made into exceptions if they were visible at parse-time. This patch adds
runtime checks so that sloppy-mode direct eval can't introduce conflicting
var declarations. The change is implemented by traversing the scope chain
when a direct eval introduces a var declaration to look for conflicting
let declarations, up to the function boundary.
BUG= v8:4454
R=adamk
LOG=Y
Committed: https://crrev.com/d515e5138d30ab5b2a79e4cac99fcc5ca8d8991b
Cr-Commit-Position: refs/heads/master@{#31211}
Total comments: 9
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+404 lines, -73 lines) |
Patch |
|
M |
src/contexts.h
|
View
|
1
|
1 chunk |
+7 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/contexts.cc
|
View
|
|
2 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/arm/full-codegen-arm.cc
|
View
|
1
|
2 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/arm64/full-codegen-arm64.cc
|
View
|
1
|
2 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/ia32/full-codegen-ia32.cc
|
View
|
1
2
|
2 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/mips/full-codegen-mips.cc
|
View
|
1
2
3
|
2 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/mips64/full-codegen-mips64.cc
|
View
|
1
2
3
|
2 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/ppc/full-codegen-ppc.cc
|
View
|
1
2
|
2 chunks |
+8 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/x64/full-codegen-x64.cc
|
View
|
1
|
2 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/x87/full-codegen-x87.cc
|
View
|
1
|
2 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/parser.cc
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/property-details.h
|
View
|
1
2
|
1 chunk |
+16 lines, -11 lines |
0 comments
|
Download
|
|
M |
src/runtime/runtime.h
|
View
|
1
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
src/runtime/runtime-scopes.cc
|
View
|
1
2
3
4
|
2 chunks |
+20 lines, -15 lines |
0 comments
|
Download
|
|
M |
src/variables.h
|
View
|
1
|
3 chunks |
+15 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/variables.cc
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
A |
test/mjsunit/harmony/block-eval-var-over-legacy-const.js
|
View
|
1
|
1 chunk |
+109 lines, -0 lines |
0 comments
|
Download
|
|
A |
test/mjsunit/harmony/block-eval-var-over-let.js
|
View
|
1
|
1 chunk |
+191 lines, -0 lines |
0 comments
|
Download
|
Total messages: 34 (13 generated)
|