|
[parser] partially revert "use-strict directives in function body affect init block"
TC39 agreed to disallow "use strict" directives in function body when
non-simple parameter lists are used.
This patch reorganizes code to desugar non-simple parameters before the
function body itself is parsed, now that the old requirement is
unnecessary.
Also throws when language mode directives occur in functions with non-simple functions,
and reorganizes a number of tests to make them make sense in the new directive-free
world.
There is a lot of cleanup needed, so initial patch is uploaded just for seeing the
diff clearly.
BUG=
LOG=N
R=rossberg, adamk
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+352 lines, -122 lines) |
Patch |
|
M |
src/expression-classifier.h
|
View
|
|
3 chunks |
+26 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/messages.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/parser.cc
|
View
|
|
6 chunks |
+28 lines, -15 lines |
0 comments
|
Download
|
|
M |
src/preparse-data.h
|
View
|
|
7 chunks |
+10 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/preparser.h
|
View
|
|
8 chunks |
+27 lines, -11 lines |
0 comments
|
Download
|
|
M |
src/preparser.cc
|
View
|
|
5 chunks |
+28 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/scopes.h
|
View
|
|
1 chunk |
+16 lines, -1 line |
0 comments
|
Download
|
|
M |
test/cctest/test-parsing.cc
|
View
|
|
1 chunk |
+74 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/arrow-rest-params.js
|
View
|
|
1 chunk |
+11 lines, -9 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/destructuring.js
|
View
|
|
10 chunks |
+76 lines, -40 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/rest-params.js
|
View
|
|
2 chunks |
+12 lines, -10 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/spread-call-super-property.js
|
View
|
|
1 chunk |
+18 lines, -7 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/strong/destructuring.js
|
View
|
|
2 chunks |
+8 lines, -2 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/strong/function-arity.js
|
View
|
|
6 chunks |
+14 lines, -10 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/strong/literals.js
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|