v8/test/message
Adam Klein 69b165db00 [ast] Save one pointer in most Function and Variable declaration node
Currently, Declaration stores a Scope pointer to whichever Scope the
declaration appeared in. This is used to disallow var declarations
being hoisted over lexical declarations. For example:

  {
    let x;
    { var x; }
  }

But in fact this is the only sort of case where storing the scope
is required: for lexical declarations (including function declarations
appearing in blocks), Declaration::scope() was always identical to
Declaration::proxy()->var()->scope(). That is, only var declarations
end up "nested" in this way.

This patch adds a subclass of VariableDeclaration to store the Scope.
Since the only thing that cares about that data is Scope analysis,
this isn't treated as a distinct AstNode::NodeType from VariableDeclaration,
leaving all AstVisitors untouched in the process.

Also reworked the logic in Scope::CheckConflictingVarDeclarations() for
clarity after making changes to accomodate the new code.

Change-Id: I6ee4298700508ab9e28a76ddb8504bae68bc473f
Reviewed-on: https://chromium-review.googlesource.com/619595
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47441}
2017-08-18 17:55:04 +00:00
..
regress [runtime] Fix detection of construct frames in stack traces. 2017-06-16 09:27:36 +00:00
arrow-bare-rest-param.js Remove always-on --harmony-rest-parameters flag 2015-12-12 00:00:38 +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-invalid-rest-2.js [parser] report invalid rest parameter errors in Arrow functions 2016-02-02 00:33:07 +00:00
arrow-invalid-rest-2.out [parser] Fix parse errors for async arrow function edge cases 2017-05-04 22:43:42 +00:00
arrow-invalid-rest.js [parser] report invalid rest parameter errors in Arrow functions 2016-02-02 00:33:07 +00:00
arrow-invalid-rest.out [parser] Fix parse errors for async arrow function edge cases 2017-05-04 22:43:42 +00:00
arrow-missing.js Remove always-on --harmony-rest-parameters flag 2015-12-12 00:00:38 +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 always-on --harmony-rest-parameters flag 2015-12-12 00:00:38 +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 always-on --harmony-rest-parameters flag 2015-12-12 00:00:38 +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 always-on --harmony-rest-parameters flag 2015-12-12 00:00:38 +00:00
arrow-two-rest-params.out Support rest parameters in arrow functions 2015-06-10 16:11:31 +00:00
asm-assignment-undeclared.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-assignment-undeclared.out [asm.js] Fix assignment with undeclared target. 2017-03-30 08:36:17 +00:00
asm-function-mismatch-def.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-function-mismatch-def.out [asm.js] Test and fix function type checking. 2017-04-07 12:10:45 +00:00
asm-function-mismatch-use.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-function-mismatch-use.out [asm.js] Test and fix function type checking. 2017-04-07 12:10:45 +00:00
asm-function-redefined.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-function-redefined.out [asm.js] Test and fix function name collisions. 2017-04-07 09:03:11 +00:00
asm-function-undefined.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-function-undefined.out [asm.js] Test and fix function table definition failures. 2017-04-11 16:46:26 +00:00
asm-function-variable-collision.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-function-variable-collision.out [asm.js] Test and fix function name collisions. 2017-04-07 09:03:11 +00:00
asm-import-wrong-annotation.js [asm.js] Fix validation failure in module variable import. 2017-05-05 11:39:06 +00:00
asm-import-wrong-annotation.out [asm.js] Fix validation failure in module variable import. 2017-05-05 11:39:06 +00:00
asm-import-wrong-object.js [asm.js] Fix validation failure in module variable import. 2017-05-05 11:39:06 +00:00
asm-import-wrong-object.out [asm.js] Fix validation failure in module variable import. 2017-05-05 11:39:06 +00:00
asm-linking-bogus-heap.js [asm.js] Report module linking failures to the console. 2017-05-19 11:31:12 +00:00
asm-linking-bogus-heap.out [asm.js] Report module linking failures to the console. 2017-05-19 11:31:12 +00:00
asm-linking-bogus-stdlib.js [asm.js] Report module linking failures to the console. 2017-05-19 11:31:12 +00:00
asm-linking-bogus-stdlib.out [asm.js] Report module linking failures to the console. 2017-05-19 11:31:12 +00:00
asm-linking-missing-heap.js [asm.js] Report module linking failures to the console. 2017-05-19 11:31:12 +00:00
asm-linking-missing-heap.out [asm.js] Report module linking failures to the console. 2017-05-19 11:31:12 +00:00
asm-missing-parameter-annotation.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-missing-parameter-annotation.out [asm.js] Make validation error messages consistent. 2017-03-29 20:55:12 +00:00
asm-missing-return-annotation.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-missing-return-annotation.out [asm.js] Make validation error messages consistent. 2017-03-29 20:55:12 +00:00
asm-table-mismatch-def.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-table-mismatch-def.out [asm.js] Test and fix function table type checks. 2017-04-10 08:47:34 +00:00
asm-table-mismatch-use.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-table-mismatch-use.out [asm.js] Test and fix function table type checks. 2017-04-10 08:47:34 +00:00
asm-table-redefined.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-table-redefined.out [asm.js] Test and fix function table definition failures. 2017-04-11 16:46:26 +00:00
asm-table-undefined.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-table-undefined.out [asm.js] Test and fix function table definition failures. 2017-04-11 16:46:26 +00:00
asm-table-variable-collision.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-table-variable-collision.out [asm.js] Test and fix function table definition failures. 2017-04-11 16:46:26 +00:00
async-arrow-invalid-rest-2.js [parser] Fix parse errors for async arrow function edge cases 2017-05-04 22:43:42 +00:00
async-arrow-invalid-rest-2.out [parser] Fix parse errors for async arrow function edge cases 2017-05-04 22:43:42 +00:00
async-arrow-invalid-rest.js [parser] Fix parse errors for async arrow function edge cases 2017-05-04 22:43:42 +00:00
async-arrow-invalid-rest.out [parser] Fix parse errors for async arrow function edge cases 2017-05-04 22:43:42 +00:00
async-arrow-param-after-rest.js [parser] Fix parse errors for async arrow function edge cases 2017-05-04 22:43:42 +00:00
async-arrow-param-after-rest.out [parser] Fix parse errors for async arrow function edge cases 2017-05-04 22:43:42 +00:00
await-non-async.js [parser] Provide better error when incorrectly using await 2017-07-25 22:53:58 +00:00
await-non-async.out [parser] Provide better error when incorrectly using await 2017-07-25 22:53:58 +00:00
call-non-constructable.js [turbofan] Fix exception message for non-constructables. 2016-11-23 13:17:55 +00:00
call-non-constructable.out [turbofan] Fix exception message for non-constructables. 2016-11-23 13:17:55 +00:00
call-primitive-constructor.js [turbofan] Fix exception message for non-constructables. 2016-11-23 13:17:55 +00:00
call-primitive-constructor.out [turbofan] Fix exception message for non-constructables. 2016-11-23 13:17:55 +00:00
call-primitive-function.js [turbofan] Fix exception message for non-constructables. 2016-11-23 13:17:55 +00:00
call-primitive-function.out [turbofan] Fix exception message for non-constructables. 2016-11-23 13:17:55 +00:00
call-undeclared-constructor.js [test] Add call-undeclared-constructor message test. 2017-08-02 07:31:31 +00:00
call-undeclared-constructor.out [test] Add call-undeclared-constructor message test. 2017-08-02 07:31:31 +00:00
call-undeclared-function.js [turbofan] Fix exception message for non-constructables. 2016-11-23 13:17:55 +00:00
call-undeclared-function.out [turbofan] Fix exception message for non-constructables. 2016-11-23 13:17:55 +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
class-spread-property.js [parser] Fix fatal error on spread in class properties 2017-05-02 18:03:13 +00:00
class-spread-property.out [parser] Fix fatal error on spread in class properties 2017-05-02 18:03:13 +00:00
console.js [d8] console methods must not throw. 2017-04-26 09:48:29 +00:00
console.out [d8] console methods must not throw. 2017-04-26 09:48:29 +00:00
const-decl-no-init2.js [parser] early error when declaration Pattern missing Initializer 2015-11-04 19:26:40 +00:00
const-decl-no-init2.out [parser] early error when declaration Pattern missing Initializer 2015-11-04 19:26:40 +00:00
const-decl-no-init-sloppy.out Pass legacy const runtime flag to preparser appropriately 2016-03-18 01:09:17 +00:00
const-decl-no-init.js [parser] early error when declaration Pattern missing Initializer 2015-11-04 19:26:40 +00:00
const-decl-no-init.out [parser] early error when declaration Pattern missing Initializer 2015-11-04 19:26:40 +00:00
default-parameter-tdz-arrow.js Remove destructuring and default arguments runtime flags 2016-03-10 23:22:30 +00:00
default-parameter-tdz-arrow.out [es6] Self-assignment in a default parameter initializer should throw 2015-11-25 01:30:39 +00:00
default-parameter-tdz.js Remove destructuring and default arguments runtime flags 2016-03-10 23:22:30 +00:00
default-parameter-tdz.out [es6] Self-assignment in a default parameter initializer should throw 2015-11-25 01:30:39 +00:00
destructuring-array-non-iterable-number.js [parser] Better error msg for destructuring non iterable 2017-06-19 17:44:21 +00:00
destructuring-array-non-iterable-number.out [parser] Improve error message for destructuring non iterable 2017-07-06 19:57:44 +00:00
destructuring-array-non-iterable-object-literal-complex.js [parser] Improve error message for destructuring non iterable 2017-07-06 19:57:44 +00:00
destructuring-array-non-iterable-object-literal-complex.out [parser] Improve error message for destructuring non iterable 2017-07-06 19:57:44 +00:00
destructuring-array-non-iterable-object-literal.js [parser] Improve error message for destructuring non iterable 2017-07-06 19:57:44 +00:00
destructuring-array-non-iterable-object-literal.out [parser] Improve error message for destructuring non iterable 2017-07-06 19:57:44 +00:00
destructuring-array-non-iterable-object.js [parser] Better error msg for destructuring non iterable 2017-06-19 17:44:21 +00:00
destructuring-array-non-iterable-object.out [parser] Improve error message for destructuring non iterable 2017-07-06 19:57:44 +00:00
destructuring-array-non-iterable-undefined.js Fix error message while array destructuring undefined 2017-07-17 22:18:19 +00:00
destructuring-array-non-iterable-undefined.out Fix error message while array destructuring undefined 2017-07-17 22:18:19 +00:00
destructuring-decl-no-init-array2.js Remove destructuring and default arguments runtime flags 2016-03-10 23:22:30 +00:00
destructuring-decl-no-init-array2.out [parser] early error when declaration Pattern missing Initializer 2015-11-04 19:26:40 +00:00
destructuring-decl-no-init-array.js Remove destructuring and default arguments runtime flags 2016-03-10 23:22:30 +00:00
destructuring-decl-no-init-array.out [parser] early error when declaration Pattern missing Initializer 2015-11-04 19:26:40 +00:00
destructuring-decl-no-init-obj2.js Remove destructuring and default arguments runtime flags 2016-03-10 23:22:30 +00:00
destructuring-decl-no-init-obj2.out [parser] early error when declaration Pattern missing Initializer 2015-11-04 19:26:40 +00:00
destructuring-decl-no-init-obj.js Remove destructuring and default arguments runtime flags 2016-03-10 23:22:30 +00:00
destructuring-decl-no-init-obj.out [parser] early error when declaration Pattern missing Initializer 2015-11-04 19:26:40 +00:00
destructuring-function-non-iterable.js [parser] Provide better error when destructuring callable 2017-08-01 01:19:08 +00:00
destructuring-function-non-iterable.out [parser] Provide better error when destructuring callable 2017-08-01 01:19:08 +00:00
destructuring-modify-const.js Remove destructuring and default arguments runtime flags 2016-03-10 23:22:30 +00:00
destructuring-modify-const.out [destructuring] More tests for object literal pattern 2015-05-18 20:14:51 +00:00
destructuring-new-callable-non-iterable.js [parser] Provide better error when destructuring callable 2017-08-01 01:19:08 +00:00
destructuring-new-callable-non-iterable.out [parser] Provide better error when destructuring callable 2017-08-01 01:19:08 +00:00
destructuring-non-function-non-iterable.js [parser] Provide better error when destructuring callable 2017-08-01 01:19:08 +00:00
destructuring-non-function-non-iterable.out [parser] Provide better error when destructuring callable 2017-08-01 01:19:08 +00:00
destructuring-undefined-computed-property.js [parser] Better error message when destructuring against undefined/null 2017-06-15 21:52:58 +00:00
destructuring-undefined-computed-property.out [parser] Better error message when destructuring against undefined/null 2017-06-15 21:52:58 +00:00
destructuring-undefined-number-property.js [parser] Better error message when destructuring against undefined/null 2017-06-15 21:52:58 +00:00
destructuring-undefined-number-property.out [parser] Better error message when destructuring against undefined/null 2017-06-15 21:52:58 +00:00
destructuring-undefined-string-property.js [parser] Better error message when destructuring against undefined/null 2017-06-15 21:52:58 +00:00
destructuring-undefined-string-property.out [parser] Better error message when destructuring against undefined/null 2017-06-15 21:52:58 +00:00
export-duplicate-as.js Reland of "[modules] Make duplicate export error deterministic." 2016-09-15 01:37:03 +00:00
export-duplicate-as.out Reland of "[modules] Make duplicate export error deterministic." 2016-09-15 01:37:03 +00:00
export-duplicate-default.js Reland of "[modules] Make duplicate export error deterministic." 2016-09-15 01:37:03 +00:00
export-duplicate-default.out Reland of "[modules] Make duplicate export error deterministic." 2016-09-15 01:37:03 +00:00
export-duplicate.js Reland of "[modules] Make duplicate export error deterministic." 2016-09-15 01:37:03 +00:00
export-duplicate.out Reland of "[modules] Make duplicate export error deterministic." 2016-09-15 01:37:03 +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-destructuring.js Remove destructuring and default arguments runtime flags 2016-03-10 23:22:30 +00:00
for-in-loop-initializers-destructuring.out Disallow destructuring in legacy sloppy for-in loop parsing 2015-11-25 01:15:28 +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 Remove FLAG_min_preparse_length. 2016-11-18 14:06:49 +00:00
for-loop-invalid-lhs.out Remove FLAG_min_preparse_length. 2016-11-18 14:06:49 +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
for-of-non-iterable.js [parser] Improve error message for destructuring non iterable 2017-07-06 19:57:44 +00:00
for-of-non-iterable.out [parser] Improve error message for destructuring non iterable 2017-07-06 19:57:44 +00:00
for-of-throw-in-body.js Preserve exception message in iterator finalization. 2016-04-04 08:15:25 +00:00
for-of-throw-in-body.out Preserve exception message in iterator finalization. 2016-04-04 08:15:25 +00:00
formal-parameters-bad-rest.js Remove always-on --harmony-rest-parameters flag 2015-12-12 00:00:38 +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 Enable --harmony-trailing-commas 2017-01-31 23:30:57 +00:00
formal-parameters-trailing-comma.out Enable --harmony-trailing-commas 2017-01-31 23:30:57 +00:00
function-param-after-rest.js [parser] Fix parse errors for async arrow function edge cases 2017-05-04 22:43:42 +00:00
function-param-after-rest.out [parser] Fix parse errors for async arrow function edge cases 2017-05-04 22:43:42 +00:00
function-sent-escaped.js [parser] unify metaproperty parsing and require unescaped property name 2016-02-16 23:38:09 +00:00
function-sent-escaped.out [parser] unify metaproperty parsing and require unescaped property name 2016-02-16 23:38:09 +00:00
generators-throw1.js Remove the --ignition-generators flag. 2016-07-25 12:56:27 +00:00
generators-throw1.out Remove the --ignition-generators flag. 2016-07-25 12:56:27 +00:00
generators-throw2.js Remove the --ignition-generators flag. 2016-07-25 12:56:27 +00:00
generators-throw2.out Remove the --ignition-generators flag. 2016-07-25 12:56:27 +00:00
get-iterator1.js [prettyprinter] improve call-printing of GetIterator nodes 2017-04-11 01:53:49 +00:00
get-iterator1.out [parser] Provide better error when destructuring callable 2017-08-01 01:19:08 +00:00
get-iterator-return-non-receiver.js [parser] Better error msg for destructuring non iterable 2017-06-19 17:44:21 +00:00
get-iterator-return-non-receiver.out [parser] Better error msg for destructuring non iterable 2017-06-19 17:44:21 +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-noncallable.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
instanceof-noncallable.out [es6] Rebaseline tests of 'instanceof' error messages. 2016-03-21 14:01:50 +00:00
instanceof-nonobject.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
instanceof-nonobject.out [es6] Rebaseline tests of 'instanceof' error messages. 2016-03-21 14:01:50 +00:00
invalid-spread-2.js Remove always-on --harmony-rest-parameters flag 2015-12-12 00:00:38 +00:00
invalid-spread-2.out Support rest parameters in arrow functions 2015-06-10 16:11:31 +00:00
invalid-spread.js Remove always-on --harmony-rest-parameters flag 2015-12-12 00:00:38 +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-declaration-destructuring-brace-in-single-statement.js Report unexpected lexical decl also without destructuring 2017-02-17 10:57:32 +00:00
let-lexical-declaration-destructuring-brace-in-single-statement.out Report unexpected lexical decl also without destructuring 2017-02-17 10:57:32 +00:00
let-lexical-declaration-destructuring-in-single-statement.js Report unexpected lexical decl also without destructuring 2017-02-17 10:57:32 +00:00
let-lexical-declaration-destructuring-in-single-statement.out Report unexpected lexical decl also without destructuring 2017-02-17 10:57:32 +00:00
let-lexical-declaration-in-single-statement.js Report unexpected lexical decl also without destructuring 2017-02-17 10:57:32 +00:00
let-lexical-declaration-in-single-statement.out Report unexpected lexical decl also without destructuring 2017-02-17 10:57:32 +00:00
let-lexical-name-in-array-prohibited.js Remove runtime flags for sloppy mode block scoping features 2016-04-08 00:30:20 +00:00
let-lexical-name-in-array-prohibited.out Fix let pattern error accumulation 2015-10-15 10:46:17 +00:00
let-lexical-name-in-object-prohibited.js Remove runtime flags for sloppy mode block scoping features 2016-04-08 00:30:20 +00:00
let-lexical-name-in-object-prohibited.out Check for let in lexically bound names for short object literals 2015-10-15 07:52:20 +00:00
let-lexical-name-prohibited.js Remove runtime flags for sloppy mode block scoping features 2016-04-08 00:30:20 +00:00
let-lexical-name-prohibited.out Prohibit let in lexical bindings 2015-10-05 20:29:22 +00:00
message.gyp [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
message.isolate Reland [swarming] Isolate v8 testing. 2015-10-05 09:48:42 +00:00
message.status [asm.js] Widen test coverage to message tests. 2017-03-29 08:42:32 +00:00
modules-cycle1.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-cycle1.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-cycle2.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-cycle2.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-cycle3.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-cycle3.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-cycle4.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-cycle4.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-cycle5.js [modules] Fix bug in Module::Instantiate. 2017-02-28 19:00:58 +00:00
modules-cycle5.out [modules] Fix bug in Module::Instantiate. 2017-02-28 19:00:58 +00:00
modules-cycle6.js [modules] Fix bug in Module::Instantiate. 2017-02-28 19:00:58 +00:00
modules-cycle6.out [modules] Fix bug in Module::Instantiate. 2017-02-28 19:00:58 +00:00
modules-duplicate-export1.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-duplicate-export1.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-duplicate-export2.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-duplicate-export2.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-duplicate-export3.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-duplicate-export3.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-duplicate-export4.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-duplicate-export4.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-import1.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-import1.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-import2.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-import2.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-import3.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-import3.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-import4.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-import4.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-import5.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-import5.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-import6.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-import6.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-import-redeclare1.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-import-redeclare1.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-import-redeclare2.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-import-redeclare2.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-import-redeclare3.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-import-redeclare3.out [parsing] When failing due to variable redeclaration, point at the variable. 2016-10-27 11:03:47 +00:00
modules-skip-cycle2.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-skip-cycle3.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-skip-cycle5.js [modules] Fix bug in Module::Instantiate. 2017-02-28 19:00:58 +00:00
modules-skip-cycle6.js [modules] Fix bug in Module::Instantiate. 2017-02-28 19:00:58 +00:00
modules-star-conflict1.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-star-conflict1.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-star-conflict2.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-star-conflict2.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-star-default.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-star-default.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-undefined-export1.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-undefined-export1.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-undefined-export2.js [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
modules-undefined-export2.out [modules] Improve error messages. 2016-10-26 15:10:24 +00:00
new-target-assignment.js Remove --harmony-new-target flag 2015-10-28 16:47:08 +00:00
new-target-assignment.out Remove --harmony-new-target flag 2015-10-28 16:47:08 +00:00
new-target-escaped.js [parser] unify metaproperty parsing and require unescaped property name 2016-02-16 23:38:09 +00:00
new-target-escaped.out [parser] unify metaproperty parsing and require unescaped property name 2016-02-16 23:38:09 +00:00
new-target-for-loop.js Remove --harmony-new-target flag 2015-10-28 16:47:08 +00:00
new-target-for-loop.out Remove --harmony-new-target flag 2015-10-28 16:47:08 +00:00
new-target-postfix-op.js Remove --harmony-new-target flag 2015-10-28 16:47:08 +00:00
new-target-postfix-op.out Remove --harmony-new-target flag 2015-10-28 16:47:08 +00:00
new-target-prefix-op.js Remove --harmony-new-target flag 2015-10-28 16:47:08 +00:00
new-target-prefix-op.out Remove --harmony-new-target flag 2015-10-28 16:47:08 +00:00
nf-yield-in-generator.js [tests] add tests for "yield" as function name 2015-12-08 20:41:31 +00:00
nf-yield-in-generator.out [tests] add tests for "yield" as function name 2015-12-08 20:41:31 +00:00
nf-yield-strict-in-generator.js [tests] add tests for "yield" as function name 2015-12-08 20:41:31 +00:00
nf-yield-strict-in-generator.out [tests] add tests for "yield" as function name 2015-12-08 20:41:31 +00:00
nf-yield-strict.js [tests] add tests for "yield" as function name 2015-12-08 20:41:31 +00:00
nf-yield-strict.out [tests] add tests for "yield" as function name 2015-12-08 20:41:31 +00:00
nfe-yield-generator.js [tests] add tests for "yield" as function name 2015-12-08 20:41:31 +00:00
nfe-yield-generator.out [tests] add tests for "yield" as function name 2015-12-08 20:41:31 +00:00
nfe-yield-strict.js [tests] add tests for "yield" as function name 2015-12-08 20:41:31 +00:00
nfe-yield-strict.out [tests] add tests for "yield" as function name 2015-12-08 20:41:31 +00:00
non-alphanum.js [testing] Convert "non-alphanum" to be a "message" test. 2016-03-11 11:36:40 +00:00
non-alphanum.out [testing] Convert "non-alphanum" to be a "message" test. 2016-03-11 11:36:40 +00:00
non-use-strict-hex-escape.js [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
non-use-strict-hex-escape.out [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
non-use-strict-octal-escape.js [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
non-use-strict-octal-escape.out [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
non-use-strict-uhex-escape.js [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
non-use-strict-uhex-escape.out [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
nonstrict-arguments.js [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
nonstrict-arguments.out [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
nonstrict-eval.js [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
nonstrict-eval.out [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
nonstrict-with.js [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
nonstrict-with.out [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
object-rest-assignment-pattern.js [parser] Update {Binding,Assignment}RestPattern 2017-07-14 00:10:06 +00:00
object-rest-assignment-pattern.out [parser] Update {Binding,Assignment}RestPattern 2017-07-14 00:10:06 +00:00
object-rest-binding-pattern.js [parser] Update {Binding,Assignment}RestPattern 2017-07-14 00:10:06 +00:00
object-rest-binding-pattern.out [parser] Update {Binding,Assignment}RestPattern 2017-07-14 00:10:06 +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 "[parser] moved load property position after dot" 2017-07-10 22:17:58 +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 [builtins] Add receiver to builtin exit frames 2016-07-04 12:46:47 +00:00
README.md [testing] Rename documentation file. 2017-03-31 08:05:15 +00:00
redeclaration1.js [parsing] When failing due to variable redeclaration, point at the variable. 2016-10-27 11:03:47 +00:00
redeclaration1.out [parsing] When failing due to variable redeclaration, point at the variable. 2016-10-27 11:03:47 +00:00
redeclaration2.js [parsing] When failing due to variable redeclaration, point at the variable. 2016-10-27 11:03:47 +00:00
redeclaration2.out [parsing] When failing due to variable redeclaration, point at the variable. 2016-10-27 11:03:47 +00:00
redeclaration3.js [parsing] When failing due to variable redeclaration, point at the variable. 2016-10-27 11:03:47 +00:00
redeclaration3.out [parsing] When failing due to variable redeclaration, point at the variable. 2016-10-27 11:03:47 +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 Remove always-on --harmony-rest-parameters flag 2015-12-12 00:00:38 +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 Remove always-on --harmony-rest-parameters flag 2015-12-12 00:00:38 +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 Remove always-on --harmony-rest-parameters flag 2015-12-12 00:00:38 +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
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
strict-octal-indirect-regexp.js [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
strict-octal-indirect-regexp.out [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
strict-octal-number.js [testing] Convert some "preparser" tests into "message". 2016-03-11 11:00:12 +00:00
strict-octal-number.out [testing] Convert some "preparser" tests into "message". 2016-03-11 11:00:12 +00:00
strict-octal-regexp.js [testing] Convert some "preparser" tests into "message". 2016-03-11 11:00:12 +00:00
strict-octal-regexp.out [testing] Convert some "preparser" tests into "message". 2016-03-11 11:00:12 +00:00
strict-octal-string.js [testing] Convert some "preparser" tests into "message". 2016-03-11 11:00:12 +00:00
strict-octal-string.out Change error messages for octal escape sequences 2016-12-07 17:26:42 +00:00
strict-octal-use-strict-after.js [testing] Convert some "preparser" tests into "message". 2016-03-11 11:00:12 +00:00
strict-octal-use-strict-after.out Change error messages for octal escape sequences 2016-12-07 17:26:42 +00:00
strict-octal-use-strict-before.js [testing] Convert some "preparser" tests into "message". 2016-03-11 11:00:12 +00:00
strict-octal-use-strict-before.out Change error messages for octal escape sequences 2016-12-07 17:26:42 +00:00
strict-with.js [testing] Convert some "preparser" tests into "message". 2016-03-11 11:00:12 +00:00
strict-with.out [testing] Convert some "preparser" tests into "message". 2016-03-11 11:00:12 +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 [d8] implement console for d8. 2017-04-24 13:23:10 +00:00
tonumber-symbol.js [Interpreter] Add expression positions to BinaryOps. 2016-12-08 10:11:17 +00:00
tonumber-symbol.out [Interpreter] Add expression positions to BinaryOps. 2016-12-08 10:11:17 +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-catch-lexical-conflict.js Remove destructuring and default arguments runtime flags 2016-03-10 23:22:30 +00:00
try-catch-lexical-conflict.out Eagerly declare variables in ParseVariableDeclarations where possible 2016-02-16 19:09:45 +00:00
try-catch-variable-conflict.js Remove destructuring and default arguments runtime flags 2016-03-10 23:22:30 +00:00
try-catch-variable-conflict.out Eagerly declare variables in ParseVariableDeclarations where possible 2016-02-16 19:09:45 +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
undefined-keyed-property.js [Interpreter] Fix expression position on keyed property loads. 2017-07-18 15:32:29 +00:00
undefined-keyed-property.out [Interpreter] Fix expression position on keyed property loads. 2017-07-18 15:32:29 +00:00
unicode-escape-invalid-2.js [parser] implement error reporting for Scanner 2016-03-21 20:27:44 +00:00
unicode-escape-invalid-2.out [parser] implement error reporting for Scanner 2016-03-21 20:27:44 +00:00
unicode-escape-invalid.js [parser] implement error reporting for Scanner 2016-03-21 20:27:44 +00:00
unicode-escape-invalid.out [parser] implement error reporting for Scanner 2016-03-21 20:27:44 +00:00
unicode-escape-undefined.js [parser] implement error reporting for Scanner 2016-03-21 20:27:44 +00:00
unicode-escape-undefined.out [parser] implement error reporting for Scanner 2016-03-21 20:27:44 +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
var-conflict-in-with.js [ast] Save one pointer in most Function and Variable declaration node 2017-08-18 17:55:04 +00:00
var-conflict-in-with.out [ast] Save one pointer in most Function and Variable declaration node 2017-08-18 17:55:04 +00:00
wasm-function-name.js [wasm] Decode and use module name 2017-06-12 10:58:48 +00:00
wasm-function-name.out [wasm] Decode and use module name 2017-06-12 10:58:48 +00:00
wasm-module-and-function-name.js [wasm] Decode and use module name 2017-06-12 10:58:48 +00:00
wasm-module-and-function-name.out [wasm] Decode and use module name 2017-06-12 10:58:48 +00:00
wasm-module-name.js [wasm] Decode and use module name 2017-06-12 10:58:48 +00:00
wasm-module-name.out [wasm] Decode and use module name 2017-06-12 10:58:48 +00:00
wasm-no-name.js [wasm] Decode and use module name 2017-06-12 10:58:48 +00:00
wasm-no-name.out [wasm] Decode and use module name 2017-06-12 10:58:48 +00:00
wasm-trap.js [wasm] Generate correct locations for error messages 2016-12-12 12:46:02 +00:00
wasm-trap.out [wasm] Use spec'ed location format 2017-06-09 15:04:36 +00:00
yield-in-arrow-param.js Properly disallow 'yield' in class expressions and arrow parameters 2016-05-03 01:57:48 +00:00
yield-in-arrow-param.out Properly disallow 'yield' in class expressions and arrow parameters 2016-05-03 01:57:48 +00:00
yield-in-generator-param.js Properly disallow 'yield' in class expressions and arrow parameters 2016-05-03 01:57:48 +00:00
yield-in-generator-param.out Properly disallow 'yield' in class expressions and arrow parameters 2016-05-03 01:57:48 +00:00

JavaScript tests with expected output

Tests in test/message pass if the output matches the expected output. Message tests are particularly useful when checking for exact error messages.

Tests and their expected output must have the same filename, with the .js and .out extension.

foo.js
foo.out

All tests must end with an exception. The test runner does not handle output from multiple runs, e.g., --stress-opt. Without an exception, the output will be generated several times and the comparison will fail.

You can use a regex in the expected output. Instead of the exact path. use

*%(basename)s:7: SyntaxError: Detected cycle while resolving name 'a'

Empty lines are ignored in the comparison, but whitespaces are not.

Exact details of the test runner are in testcfg.py.