|
Remove support for legacy const, part 1
Now that ES2015 const has shipped, in Chrome 49, legacy const declarations
are no more. This lets us remove a bunch of code from many parts of the
codebase.
In this patch, I remove parser support for generating legacy const variables
from const declarations. This also removes the special "illegal declaration"
bit from Scope, which has ripples into all compiler backends.
Also gone are any tests which relied on legacy const declarations.
Note that we do still generate a Variable in mode CONST_LEGACY in one case:
function name bindings in sloppy mode. The likely fix there is to add a new
Variable::Kind for this case and handle it appropriately for stores in each
backend, but I leave that for a later patch to make this one completely
subtractive.
Committed: https://crrev.com/ed18aa65ea9247a0940fe6b8890962e49c765c03
Cr-Commit-Position: refs/heads/master@{#35002}
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+299 lines, -2459 lines) |
Patch |
|
M |
src/ast/ast-numbering.cc
|
View
|
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/ast/scopes.h
|
View
|
|
2 chunks |
+1 line, -17 lines |
0 comments
|
Download
|
|
M |
src/ast/scopes.cc
|
View
|
|
3 chunks |
+0 lines, -17 lines |
0 comments
|
Download
|
|
M |
src/bailout-reason.h
|
View
|
1
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
src/compiler.cc
|
View
|
1
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/compiler/ast-graph-builder.cc
|
View
|
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/flag-definitions.h
|
View
|
1
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/arm/full-codegen-arm.cc
|
View
|
|
1 chunk |
+30 lines, -32 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/arm64/full-codegen-arm64.cc
|
View
|
|
1 chunk |
+27 lines, -31 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/full-codegen.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/full-codegen.cc
|
View
|
|
1 chunk |
+0 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/ia32/full-codegen-ia32.cc
|
View
|
|
1 chunk |
+29 lines, -31 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/mips/full-codegen-mips.cc
|
View
|
|
1 chunk |
+27 lines, -28 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/mips64/full-codegen-mips64.cc
|
View
|
|
1 chunk |
+28 lines, -30 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/ppc/full-codegen-ppc.cc
|
View
|
|
1 chunk |
+25 lines, -30 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/s390/full-codegen-s390.cc
|
View
|
|
1 chunk |
+25 lines, -30 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/x64/full-codegen-x64.cc
|
View
|
|
1 chunk |
+23 lines, -24 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/x87/full-codegen-x87.cc
|
View
|
1
|
1 chunk |
+29 lines, -31 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-generator.cc
|
View
|
|
1 chunk |
+0 lines, -8 lines |
0 comments
|
Download
|
|
M |
src/parsing/parser.cc
|
View
|
|
5 chunks |
+3 lines, -26 lines |
0 comments
|
Download
|
|
M |
src/parsing/parser-base.h
|
View
|
1
|
4 chunks |
+1 line, -5 lines |
0 comments
|
Download
|
|
M |
src/parsing/preparser.cc
|
View
|
|
2 chunks |
+1 line, -11 lines |
0 comments
|
Download
|
|
M |
test/cctest/compiler/test-run-bytecode-graph-builder.cc
|
View
|
1
|
2 chunks |
+0 lines, -60 lines |
0 comments
|
Download
|
|
M |
test/cctest/compiler/test-run-jsops.cc
|
View
|
|
1 chunk |
+0 lines, -11 lines |
0 comments
|
Download
|
|
M |
test/cctest/compiler/test-run-variables.cc
|
View
|
|
4 chunks |
+0 lines, -24 lines |
0 comments
|
Download
|
|
D |
test/cctest/interpreter/bytecode_expectations/IllegalRedeclaration.golden
|
View
|
|
1 chunk |
+0 lines, -31 lines |
0 comments
|
Download
|
|
D |
test/cctest/interpreter/bytecode_expectations/LegacyConstVariable.golden
|
View
|
1
|
1 chunk |
+0 lines, -118 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/generate-bytecode-expectations.cc
|
View
|
|
9 chunks |
+0 lines, -11 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/test-bytecode-generator.cc
|
View
|
|
2 chunks |
+0 lines, -41 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/test-interpreter.cc
|
View
|
1
|
2 chunks |
+0 lines, -56 lines |
0 comments
|
Download
|
|
M |
test/cctest/test-decls.cc
|
View
|
|
13 chunks |
+0 lines, -90 lines |
0 comments
|
Download
|
|
M |
test/cctest/test-parsing.cc
|
View
|
|
12 chunks |
+13 lines, -69 lines |
0 comments
|
Download
|
|
M |
test/message/const-decl-no-init-sloppy.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/message/no-legacy-const.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/message/no-legacy-const-2.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/message/no-legacy-const-3.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
D |
test/mjsunit/compiler/regress-96989.js
|
View
|
|
1 chunk |
+0 lines, -43 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/compiler/regress-const.js
|
View
|
|
3 chunks |
+2 lines, -3 lines |
0 comments
|
Download
|
|
D |
test/mjsunit/const.js
|
View
|
|
1 chunk |
+0 lines, -72 lines |
0 comments
|
Download
|
|
D |
test/mjsunit/const-declaration.js
|
View
|
|
1 chunk |
+0 lines, -173 lines |
0 comments
|
Download
|
|
D |
test/mjsunit/const-eval-init.js
|
View
|
|
1 chunk |
+0 lines, -118 lines |
0 comments
|
Download
|
|
D |
test/mjsunit/const-redecl.js
|
View
|
|
1 chunk |
+0 lines, -228 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/constant-folding.js
|
View
|
|
2 chunks |
+0 lines, -7 lines |
0 comments
|
Download
|
|
D |
test/mjsunit/debug-evaluate-const.js
|
View
|
|
1 chunk |
+0 lines, -118 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/declare-locally.js
|
View
|
|
1 chunk |
+1 line, -7 lines |
0 comments
|
Download
|
|
D |
test/mjsunit/es6/block-eval-var-over-legacy-const.js
|
View
|
|
1 chunk |
+0 lines, -86 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/es6/block-let-contextual-sloppy.js
|
View
|
|
2 chunks |
+2 lines, -9 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/es6/completion.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
D |
test/mjsunit/global-const-var-conflicts.js
|
View
|
|
1 chunk |
+0 lines, -62 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/block-conflicts-sloppy.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/block-const-assign-sloppy.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/block-eval-var-over-let.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/block-for-sloppy.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/block-leave-sloppy.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/block-let-crankshaft-sloppy.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/block-let-declaration-sloppy.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/block-let-semantics-sloppy.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/block-scoping-sloppy.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/block-scoping-top-level-sloppy.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/block-sloppy-function.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/regress/regress-4482.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/mjsunit/parallel-optimize-disabled.js
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/property-load-across-eval.js
|
View
|
|
2 chunks |
+0 lines, -38 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/regress/regress-1178598.js
|
View
|
|
1 chunk |
+0 lines, -19 lines |
0 comments
|
Download
|
|
D |
test/mjsunit/regress/regress-1182832.js
|
View
|
|
1 chunk |
+0 lines, -40 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/regress/regress-1199637.js
|
View
|
|
5 chunks |
+9 lines, -10 lines |
0 comments
|
Download
|
|
D |
test/mjsunit/regress/regress-1201933.js
|
View
|
|
1 chunk |
+0 lines, -42 lines |
0 comments
|
Download
|
|
D |
test/mjsunit/regress/regress-1207276.js
|
View
|
|
1 chunk |
+0 lines, -38 lines |
0 comments
|
Download
|
|
D |
test/mjsunit/regress/regress-1213575.js
|
View
|
|
1 chunk |
+0 lines, -42 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/regress/regress-186.js
|
View
|
|
3 chunks |
+0 lines, -12 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/regress/regress-3138.js
|
View
|
|
2 chunks |
+0 lines, -12 lines |
0 comments
|
Download
|
|
D |
test/mjsunit/regress/regress-436896.js
|
View
|
|
1 chunk |
+0 lines, -17 lines |
0 comments
|
Download
|
|
D |
test/mjsunit/regress/regress-4576.js
|
View
|
|
1 chunk |
+0 lines, -12 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/regress/regress-4693.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
D |
test/mjsunit/regress/regress-641.js
|
View
|
|
1 chunk |
+0 lines, -37 lines |
0 comments
|
Download
|
|
D |
test/mjsunit/regress/regress-799761.js
|
View
|
|
1 chunk |
+0 lines, -94 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/regress/regress-88591.js
|
View
|
|
2 chunks |
+2 lines, -4 lines |
0 comments
|
Download
|
|
D |
test/mjsunit/regress/regress-debugger-redirect.js
|
View
|
|
1 chunk |
+0 lines, -37 lines |
0 comments
|
Download
|
|
D |
test/mjsunit/regress/regress-handle-illegal-redeclaration.js
|
View
|
|
1 chunk |
+0 lines, -15 lines |
0 comments
|
Download
|
|
D |
test/webkit/const-without-initializer.js
|
View
|
|
1 chunk |
+0 lines, -36 lines |
0 comments
|
Download
|
|
D |
test/webkit/const-without-initializer-expected.txt
|
View
|
|
1 chunk |
+0 lines, -34 lines |
0 comments
|
Download
|
|
D |
test/webkit/constant-count.js
|
View
|
|
1 chunk |
+0 lines, -47 lines |
0 comments
|
Download
|
|
D |
test/webkit/constant-count-expected.txt
|
View
|
|
1 chunk |
+0 lines, -34 lines |
0 comments
|
Download
|
Total messages: 14 (6 generated)
|