v8/test/message
littledan 7e113c47b7 Prohibit let in lexical bindings
This patch prohibits lexical bindings from being called 'let', even in
sloppy mode, following the ES2015 specification. The change affects
multiple cases of lexical bindings, including simple let/const declarations
and both kinds of for loops. var and legacy const bindings still permit
the name to be let, including in destructuring cases. Tests are added to
verify, though some cases are commented out since they led to (pre-existing)
crashes.

BUG=v8:4403
R=adamk
LOG=Y

Review URL: https://codereview.chromium.org/1371263003

Cr-Commit-Position: refs/heads/master@{#31115}
2015-10-05 20:29:22 +00:00
..
regress Use baseline code to compute message locations. 2015-09-08 14:14:59 +00:00
arrow-bare-rest-param.js Remove --harmony-arrow-functions flag 2015-09-30 19:50:40 +00:00
arrow-bare-rest-param.out Support rest parameters in arrow functions 2015-06-10 16:11:31 +00:00
arrow-formal-parameters.js Remove --harmony-arrow-functions flag 2015-09-30 19:50:40 +00:00
arrow-formal-parameters.out Remove --harmony-arrow-functions flag 2015-09-30 19:50:40 +00:00
arrow-missing.js Remove --harmony-arrow-functions flag 2015-09-30 19:50:40 +00:00
arrow-missing.out Parse arrow functions at proper precedence level 2015-08-26 09:36:45 +00:00
arrow-param-after-rest-2.js Remove --harmony-arrow-functions flag 2015-09-30 19:50:40 +00:00
arrow-param-after-rest-2.out Support rest parameters in arrow functions 2015-06-10 16:11:31 +00:00
arrow-param-after-rest.js Remove --harmony-arrow-functions flag 2015-09-30 19:50:40 +00:00
arrow-param-after-rest.out Support rest parameters in arrow functions 2015-06-10 16:11:31 +00:00
arrow-strict-eval-bare-parameter.js Remove --harmony-arrow-functions flag 2015-09-30 19:50:40 +00:00
arrow-strict-eval-bare-parameter.out Remove --harmony-arrow-functions flag 2015-09-30 19:50:40 +00:00
arrow-two-rest-params.js Remove --harmony-arrow-functions flag 2015-09-30 19:50:40 +00:00
arrow-two-rest-params.out Support rest parameters in arrow functions 2015-06-10 16:11:31 +00:00
class-constructor-accessor.js [es6] Remove harmony-classes flag 2015-06-26 21:16:58 +00:00
class-constructor-accessor.out [parser] better error message for generator constructors 2015-03-06 16:54:39 +00:00
class-constructor-generator.js [es6] Remove harmony-classes flag 2015-06-26 21:16:58 +00:00
class-constructor-generator.out [parser] better error message for generator constructors 2015-03-06 16:54:39 +00:00
destructuring-modify-const.js [destructuring] More tests for object literal pattern 2015-05-18 20:14:51 +00:00
destructuring-modify-const.out [destructuring] More tests for object literal pattern 2015-05-18 20:14:51 +00:00
export-duplicate-as.js Teach ModuleDescriptor about basic local exports 2015-02-19 20:15:13 +00:00
export-duplicate-as.out Teach ModuleDescriptor about basic local exports 2015-02-19 20:15:13 +00:00
export-duplicate-default.js Teach ModuleDescriptor about basic local exports 2015-02-19 20:15:13 +00:00
export-duplicate-default.out Teach ModuleDescriptor about basic local exports 2015-02-19 20:15:13 +00:00
export-duplicate.js Teach ModuleDescriptor about basic local exports 2015-02-19 20:15:13 +00:00
export-duplicate.out Teach ModuleDescriptor about basic local exports 2015-02-19 20:15:13 +00:00
for-in-let-loop-initializers-strict.js [es6] emit error when for-in loop declarations are initialized in strict mode 2015-04-07 19:28:42 +00:00
for-in-let-loop-initializers-strict.out [es6] emit error when for-in loop declarations are initialized in strict mode 2015-04-07 19:28:42 +00:00
for-in-loop-initializers-strict.js [es6] emit error when for-in loop declarations are initialized in strict mode 2015-04-07 19:28:42 +00:00
for-in-loop-initializers-strict.out [es6] emit error when for-in loop declarations are initialized in strict mode 2015-04-07 19:28:42 +00:00
for-loop-invalid-lhs.js Align PreParser for loop early error-checking with Parser 2015-08-13 19:11:10 +00:00
for-loop-invalid-lhs.out [parser] make kInvalidLhsInFor a SyntaxError 2015-08-15 17:57:16 +00:00
for-of-let-loop-initializers.js [es6] emit error when for-in loop declarations are initialized in strict mode 2015-04-07 19:28:42 +00:00
for-of-let-loop-initializers.out [es6] emit error when for-in loop declarations are initialized in strict mode 2015-04-07 19:28:42 +00:00
for-of-loop-initializers-sloppy.js [es6] emit error when for-in loop declarations are initialized in strict mode 2015-04-07 19:28:42 +00:00
for-of-loop-initializers-sloppy.out [es6] emit error when for-in loop declarations are initialized in strict mode 2015-04-07 19:28:42 +00:00
for-of-loop-initializers-strict.js [es6] emit error when for-in loop declarations are initialized in strict mode 2015-04-07 19:28:42 +00:00
for-of-loop-initializers-strict.out [es6] emit error when for-in loop declarations are initialized in strict mode 2015-04-07 19:28:42 +00:00
formal-parameters-bad-rest.js Factor formal argument parsing into ParserBase 2015-04-21 11:09:34 +00:00
formal-parameters-bad-rest.out Factor formal argument parsing into ParserBase 2015-04-21 11:09:34 +00:00
formal-parameters-strict-body.js Factor formal argument parsing into ParserBase 2015-04-21 11:09:34 +00:00
formal-parameters-strict-body.out Factor formal argument parsing into ParserBase 2015-04-21 11:09:34 +00:00
formal-parameters-trailing-comma.js Factor formal argument parsing into ParserBase 2015-04-21 11:09:34 +00:00
formal-parameters-trailing-comma.out Factor formal argument parsing into ParserBase 2015-04-21 11:09:34 +00:00
import-as-eval.js Simplify error message logic in ParseImportNames 2015-02-25 19:40:54 +00:00
import-as-eval.out Simplify error message logic in ParseImportNames 2015-02-25 19:40:54 +00:00
import-as-redeclaration.js Re-introduce ImportDeclaration to the parser 2015-02-26 18:41:04 +00:00
import-as-redeclaration.out Re-introduce ImportDeclaration to the parser 2015-02-26 18:41:04 +00:00
import-as-reserved-word.js Simplify error message logic in ParseImportNames 2015-02-25 19:40:54 +00:00
import-as-reserved-word.out Simplify error message logic in ParseImportNames 2015-02-25 19:40:54 +00:00
import-eval.js Simplify error message logic in ParseImportNames 2015-02-25 19:40:54 +00:00
import-eval.out Simplify error message logic in ParseImportNames 2015-02-25 19:40:54 +00:00
import-redeclaration.js Re-introduce ImportDeclaration to the parser 2015-02-26 18:41:04 +00:00
import-redeclaration.out Re-introduce ImportDeclaration to the parser 2015-02-26 18:41:04 +00:00
import-reserved-word.js Simplify error message logic in ParseImportNames 2015-02-25 19:40:54 +00:00
import-reserved-word.out Simplify error message logic in ParseImportNames 2015-02-25 19:40:54 +00:00
instanceof.js Fix error message wording when instanceof throws. 2013-11-08 11:45:56 +00:00
instanceof.out Fix error message wording when instanceof throws. 2013-11-08 11:45:56 +00:00
invalid-spread-2.js Remove --harmony-arrow-functions flag 2015-09-30 19:50:40 +00:00
invalid-spread-2.out Support rest parameters in arrow functions 2015-06-10 16:11:31 +00:00
invalid-spread.js Remove --harmony-arrow-functions flag 2015-09-30 19:50:40 +00:00
invalid-spread.out Support rest parameters in arrow functions 2015-06-10 16:11:31 +00:00
isvar.js Make sure files end with exactly one new line and police this in presubmit. 2013-11-22 13:50:39 +00:00
isvar.out Change 'Parse error' to three more informative messages. 2013-04-26 14:26:54 +00:00
let-lexical-name-prohibited.js Prohibit let in lexical bindings 2015-10-05 20:29:22 +00:00
let-lexical-name-prohibited.out Prohibit let in lexical bindings 2015-10-05 20:29:22 +00:00
message.gyp Reland [swarming] Isolate v8 testing. 2015-10-05 09:48:42 +00:00
message.isolate Reland [swarming] Isolate v8 testing. 2015-10-05 09:48:42 +00:00
message.status X87: enable the X87 turbofan support. 2015-06-16 11:23:19 +00:00
new-target-assignment.js [es6] Make assignment to new.target an early ReferenceError 2015-08-13 18:06:13 +00:00
new-target-assignment.out [es6] Make assignment to new.target an early ReferenceError 2015-08-13 18:06:13 +00:00
new-target-for-loop.js [es6] Make assignment to new.target an early ReferenceError 2015-08-13 18:06:13 +00:00
new-target-for-loop.out [parser] make kInvalidLhsInFor a SyntaxError 2015-08-15 17:57:16 +00:00
new-target-postfix-op.js [es6] Make assignment to new.target an early ReferenceError 2015-08-13 18:06:13 +00:00
new-target-postfix-op.out [es6] Make assignment to new.target an early ReferenceError 2015-08-13 18:06:13 +00:00
new-target-prefix-op.js [es6] Make assignment to new.target an early ReferenceError 2015-08-13 18:06:13 +00:00
new-target-prefix-op.out [es6] Make assignment to new.target an early ReferenceError 2015-08-13 18:06:13 +00:00
no-legacy-const-2.js Add a flag for legacy const semantics 2015-07-07 21:57:19 +00:00
no-legacy-const-2.out Add a flag for legacy const semantics 2015-07-07 21:57:19 +00:00
no-legacy-const-3.js Add a flag for legacy const semantics 2015-07-07 21:57:19 +00:00
no-legacy-const-3.out Add a flag for legacy const semantics 2015-07-07 21:57:19 +00:00
no-legacy-const.js Add a flag for legacy const semantics 2015-07-07 21:57:19 +00:00
no-legacy-const.out Add a flag for legacy const semantics 2015-07-07 21:57:19 +00:00
overwritten-builtins.js Make sure that message reporting works when the builtin string and 2009-06-25 10:27:36 +00:00
overwritten-builtins.out Reland r13188, r13194, r13256 (Deferred formatting of error stack trace during GC). 2013-01-14 13:19:27 +00:00
paren_in_arg_string.js Make sure files end with exactly one new line and police this in presubmit. 2013-11-22 13:50:39 +00:00
paren_in_arg_string.out Crankshaft builtins. 2013-10-23 08:57:54 +00:00
replacement-marker-as-argument.js Make sure files end with exactly one new line and police this in presubmit. 2013-11-22 13:50:39 +00:00
replacement-marker-as-argument.out Fix bug introduced by earlier "cleanup". 2011-08-22 12:54:03 +00:00
rest-param-class-setter-strict.js [es6] Remove harmony-classes flag 2015-06-26 21:16:58 +00:00
rest-param-class-setter-strict.out [parser] report SyntaxError if rest parameter used in Setter MethodDefinition 2015-05-18 15:52:45 +00:00
rest-param-object-setter-sloppy.js [parser] report SyntaxError if rest parameter used in Setter MethodDefinition 2015-05-18 15:52:45 +00:00
rest-param-object-setter-sloppy.out [parser] report SyntaxError if rest parameter used in Setter MethodDefinition 2015-05-18 15:52:45 +00:00
rest-param-object-setter-strict.js [parser] report SyntaxError if rest parameter used in Setter MethodDefinition 2015-05-18 15:52:45 +00:00
rest-param-object-setter-strict.out [parser] report SyntaxError if rest parameter used in Setter MethodDefinition 2015-05-18 15:52:45 +00:00
simple-throw.js Added new test type, message, to test error reporting. 2008-09-26 13:06:49 +00:00
simple-throw.out Added new test type, message, to test error reporting. 2008-09-26 13:06:49 +00:00
single-function-literal.js Revert of Correctly compute line numbers in functions from the function constructor. (patchset #5 id:80001 of https://codereview.chromium.org/701093003/) 2015-04-01 10:11:26 +00:00
single-function-literal.out Change 'Parse error' to three more informative messages. 2013-04-26 14:26:54 +00:00
strict-formal-parameters.js Factor formal argument parsing into ParserBase 2015-04-21 11:09:34 +00:00
strict-formal-parameters.out Improve error message for duplicate parameters 2015-07-14 21:59:03 +00:00
strong-object-freeze-prop.js [strong] fix strong object exception messages 2015-06-01 22:44:05 +00:00
strong-object-freeze-prop.out [strong] fix strong object exception messages 2015-06-01 22:44:05 +00:00
strong-object-set-proto.js [strong] fix strong object exception messages 2015-06-01 22:44:05 +00:00
strong-object-set-proto.out [strong] fix strong object exception messages 2015-06-01 22:44:05 +00:00
super-constructor-extra-statement.js [es6] Remove harmony-classes flag 2015-06-26 21:16:58 +00:00
super-constructor-extra-statement.out Make super() a syntax error in base class constructor 2015-02-12 23:04:54 +00:00
super-constructor.js [es6] Remove harmony-classes flag 2015-06-26 21:16:58 +00:00
super-constructor.out Make super() a syntax error in base class constructor 2015-02-12 23:04:54 +00:00
super-in-function.js [es6] Remove harmony-classes flag 2015-06-26 21:16:58 +00:00
super-in-function.out Fix location of super syntax errors 2015-02-12 20:53:17 +00:00
testcfg.py Reland "[test] Fix cctest path separators on Windows" 2015-09-17 13:01:12 +00:00
try-catch-finally-no-message.js Changed the message reporting for try { ... } finally { ... } statements to 2008-10-23 08:40:19 +00:00
try-catch-finally-no-message.out First commit of new tools/run-tests.py 2012-09-24 09:38:46 +00:00
try-catch-finally-return-in-finally.js Update V8 to version 3.0 (re-land r5920). 2010-12-07 11:31:57 +00:00
try-catch-finally-return-in-finally.out Update V8 to version 3.0 (re-land r5920). 2010-12-07 11:31:57 +00:00
try-catch-finally-throw-in-catch-and-finally.js Changed the message reporting for try { ... } finally { ... } statements to 2008-10-23 08:40:19 +00:00
try-catch-finally-throw-in-catch-and-finally.out Changed the message reporting for try { ... } finally { ... } statements to 2008-10-23 08:40:19 +00:00
try-catch-finally-throw-in-catch.js Changed the message reporting for try { ... } finally { ... } statements to 2008-10-23 08:40:19 +00:00
try-catch-finally-throw-in-catch.out Changed the message reporting for try { ... } finally { ... } statements to 2008-10-23 08:40:19 +00:00
try-catch-finally-throw-in-finally.js Changed the message reporting for try { ... } finally { ... } statements to 2008-10-23 08:40:19 +00:00
try-catch-finally-throw-in-finally.out Changed the message reporting for try { ... } finally { ... } statements to 2008-10-23 08:40:19 +00:00
try-finally-return-in-finally.js Update V8 to version 3.0 (re-land r5920). 2010-12-07 11:31:57 +00:00
try-finally-return-in-finally.out Update V8 to version 3.0 (re-land r5920). 2010-12-07 11:31:57 +00:00
try-finally-throw-in-finally.js Changed the message reporting for try { ... } finally { ... } statements to 2008-10-23 08:40:19 +00:00
try-finally-throw-in-finally.out Changed the message reporting for try { ... } finally { ... } statements to 2008-10-23 08:40:19 +00:00
try-finally-throw-in-try-and-finally.js Changed the message reporting for try { ... } finally { ... } statements to 2008-10-23 08:40:19 +00:00
try-finally-throw-in-try-and-finally.out Changed the message reporting for try { ... } finally { ... } statements to 2008-10-23 08:40:19 +00:00
try-finally-throw-in-try.js Changed the message reporting for try { ... } finally { ... } statements to 2008-10-23 08:40:19 +00:00
try-finally-throw-in-try.out Changed the message reporting for try { ... } finally { ... } statements to 2008-10-23 08:40:19 +00:00
unterminated-arg-list.js Beautify syntax error for unterminated argument list 2015-03-16 09:16:26 +00:00
unterminated-arg-list.out Beautify syntax error for unterminated argument list 2015-03-16 09:16:26 +00:00