Upgrade V8 to 5.1.281.57 DO NOT MERGE
FPIIM-449
Change-Id: Id981b686b4d587ac31697662eb98bb34be42ad90
(cherry picked from commit 3b9bc31999c9787eb726ecdbfd5796bfdec32a18)
diff --git a/test/message/strong-object-set-proto.js b/test/message/const-decl-no-init-sloppy.js
similarity index 73%
rename from test/message/strong-object-set-proto.js
rename to test/message/const-decl-no-init-sloppy.js
index 890dd84..a122eae 100644
--- a/test/message/strong-object-set-proto.js
+++ b/test/message/const-decl-no-init-sloppy.js
@@ -1,9 +1,9 @@
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+//
+// Flags: --harmony-sloppy
-// Flags: --strong-mode
-
-"use strong";
-
-({}).__proto__ = {};
+function f() {
+ const a;
+}
diff --git a/test/message/const-decl-no-init-sloppy.out b/test/message/const-decl-no-init-sloppy.out
new file mode 100644
index 0000000..3024977
--- /dev/null
+++ b/test/message/const-decl-no-init-sloppy.out
@@ -0,0 +1,7 @@
+# Copyright 2016 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+*%(basename)s:8: SyntaxError: Missing initializer in const declaration
+ const a;
+ ^
+SyntaxError: Missing initializer in const declaration
diff --git a/test/message/default-parameter-tdz-arrow.js b/test/message/default-parameter-tdz-arrow.js
index cad091f..d68ceb2 100644
--- a/test/message/default-parameter-tdz-arrow.js
+++ b/test/message/default-parameter-tdz-arrow.js
@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Flags: --harmony-default-parameters
+//
((a=-a) => { })();
diff --git a/test/message/default-parameter-tdz.js b/test/message/default-parameter-tdz.js
index ff2a400..a109196 100644
--- a/test/message/default-parameter-tdz.js
+++ b/test/message/default-parameter-tdz.js
@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Flags: --harmony-default-parameters
+//
(function(a=+a) { })();
diff --git a/test/message/destructuring-decl-no-init-array.js b/test/message/destructuring-decl-no-init-array.js
index 7c73d3b..ab976b1 100644
--- a/test/message/destructuring-decl-no-init-array.js
+++ b/test/message/destructuring-decl-no-init-array.js
@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Flags: --harmony-destructuring-bind
+//
var [ a, b, c ];
diff --git a/test/message/destructuring-decl-no-init-array2.js b/test/message/destructuring-decl-no-init-array2.js
index a82afa4..9ffa58b 100644
--- a/test/message/destructuring-decl-no-init-array2.js
+++ b/test/message/destructuring-decl-no-init-array2.js
@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Flags: --harmony-destructuring-bind
+//
for (var [ a ]; a; ) {}
diff --git a/test/message/destructuring-decl-no-init-obj.js b/test/message/destructuring-decl-no-init-obj.js
index 23424aa..398b4fc 100644
--- a/test/message/destructuring-decl-no-init-obj.js
+++ b/test/message/destructuring-decl-no-init-obj.js
@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Flags: --harmony-destructuring-bind
+//
var { a, b, c };
diff --git a/test/message/destructuring-decl-no-init-obj2.js b/test/message/destructuring-decl-no-init-obj2.js
index 6c76137..652409b 100644
--- a/test/message/destructuring-decl-no-init-obj2.js
+++ b/test/message/destructuring-decl-no-init-obj2.js
@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Flags: --harmony-destructuring-bind
+//
for (var { a, b, c }; a && b && c; ) {}
diff --git a/test/message/destructuring-modify-const.js b/test/message/destructuring-modify-const.js
index 88bda35..5575ae9 100644
--- a/test/message/destructuring-modify-const.js
+++ b/test/message/destructuring-modify-const.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-destructuring-bind
+//
'use strict';
const { x : x, y : y } = { x : 1, y : 2 };
diff --git a/test/message/for-in-loop-initializers-destructuring.js b/test/message/for-in-loop-initializers-destructuring.js
index eab8b81..9bbfd8d 100644
--- a/test/message/for-in-loop-initializers-destructuring.js
+++ b/test/message/for-in-loop-initializers-destructuring.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Flags: --harmony-destructuring-bind
+//
function f() {
for (var [x, y] = {} in {});
diff --git a/test/message/for-of-throw-in-body.js b/test/message/for-of-throw-in-body.js
new file mode 100644
index 0000000..38b27f3
--- /dev/null
+++ b/test/message/for-of-throw-in-body.js
@@ -0,0 +1,5 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+for (var x of [1, 2, 3]) { throw 42 }
diff --git a/test/message/for-of-throw-in-body.out b/test/message/for-of-throw-in-body.out
new file mode 100644
index 0000000..4bc48eb
--- /dev/null
+++ b/test/message/for-of-throw-in-body.out
@@ -0,0 +1,6 @@
+# Copyright 2016 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+*%(basename)s:5: 42
+for (var x of [1, 2, 3]) { throw 42 }
+ ^
diff --git a/test/message/instanceof.js b/test/message/instanceof-noncallable.js
similarity index 96%
copy from test/message/instanceof.js
copy to test/message/instanceof-noncallable.js
index 1d55e0f..571a2b0 100644
--- a/test/message/instanceof.js
+++ b/test/message/instanceof-noncallable.js
@@ -25,4 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-1 instanceof 2;
+// Flags: --harmony-instanceof
+
+1 instanceof {};
diff --git a/test/message/instanceof-noncallable.out b/test/message/instanceof-noncallable.out
new file mode 100644
index 0000000..73e2ae6
--- /dev/null
+++ b/test/message/instanceof-noncallable.out
@@ -0,0 +1,5 @@
+*%(basename)s:30: TypeError: Right-hand side of 'instanceof' is not callable
+1 instanceof {};
+ ^
+TypeError: Right-hand side of 'instanceof' is not callable
+ at *%(basename)s:30:3
diff --git a/test/message/instanceof.js b/test/message/instanceof-nonobject.js
similarity index 97%
rename from test/message/instanceof.js
rename to test/message/instanceof-nonobject.js
index 1d55e0f..4715257 100644
--- a/test/message/instanceof.js
+++ b/test/message/instanceof-nonobject.js
@@ -25,4 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Flags: --harmony-instanceof
+
1 instanceof 2;
diff --git a/test/message/instanceof-nonobject.out b/test/message/instanceof-nonobject.out
new file mode 100644
index 0000000..ecf47af
--- /dev/null
+++ b/test/message/instanceof-nonobject.out
@@ -0,0 +1,5 @@
+*%(basename)s:30: TypeError: Right-hand side of 'instanceof' is not an object
+1 instanceof 2;
+ ^
+TypeError: Right-hand side of 'instanceof' is not an object
+ at *%(basename)s:30:3
diff --git a/test/message/instanceof.out b/test/message/instanceof.out
deleted file mode 100644
index d279bc4..0000000
--- a/test/message/instanceof.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*%(basename)s:28: TypeError: Expecting a function in instanceof check, but got 2
-1 instanceof 2;
- ^
-TypeError: Expecting a function in instanceof check, but got 2
- at *%(basename)s:28:3
diff --git a/test/message/let-lexical-name-in-array-prohibited.js b/test/message/let-lexical-name-in-array-prohibited.js
index c7a35cd..a6cba6f 100644
--- a/test/message/let-lexical-name-in-array-prohibited.js
+++ b/test/message/let-lexical-name-in-array-prohibited.js
@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Flags: --harmony-sloppy --harmony-sloppy-let --harmony-destructuring-bind
+// Flags: --harmony-sloppy --harmony-sloppy-let
let [let];
diff --git a/test/message/let-lexical-name-in-object-prohibited.js b/test/message/let-lexical-name-in-object-prohibited.js
index d2b7c90..0a12762 100644
--- a/test/message/let-lexical-name-in-object-prohibited.js
+++ b/test/message/let-lexical-name-in-object-prohibited.js
@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Flags: --harmony-sloppy --harmony-sloppy-let --harmony-destructuring-bind
+// Flags: --harmony-sloppy --harmony-sloppy-let
let {let};
diff --git a/test/message/message.status b/test/message/message.status
index 234bf0f..051911c 100644
--- a/test/message/message.status
+++ b/test/message/message.status
@@ -29,5 +29,9 @@
[ALWAYS, {
# All tests in the bug directory are expected to fail.
'bugs/*': [FAIL],
+ # We don't parse RegExps at scanning time, so we can't fail on octal
+ # escapes (we need to parse to distinguish octal escapes from valid
+ # back-references).
+ 'strict-octal-regexp': [SKIP],
}], # ALWAYS
]
diff --git a/test/message/no-legacy-const-2.js b/test/message/no-legacy-const-2.js
index 24e3f85..5dc63b3 100644
--- a/test/message/no-legacy-const-2.js
+++ b/test/message/no-legacy-const-2.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Flags: --no-legacy-const --no-harmony-sloppy --no-harmony-sloppy-let
+// Flags: --no-harmony-sloppy --no-harmony-sloppy-let
// Flags: --no-harmony-sloppy-function
const = 42;
diff --git a/test/message/no-legacy-const-3.js b/test/message/no-legacy-const-3.js
index 4f6e9a4..43dd9c9 100644
--- a/test/message/no-legacy-const-3.js
+++ b/test/message/no-legacy-const-3.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Flags: --no-legacy-const --no-harmony-sloppy --no-harmony-sloppy-let
+// Flags: --no-harmony-sloppy --no-harmony-sloppy-let
// Flags: --no-harmony-sloppy-function
const
diff --git a/test/message/no-legacy-const.js b/test/message/no-legacy-const.js
index d9a716b..9eebee5 100644
--- a/test/message/no-legacy-const.js
+++ b/test/message/no-legacy-const.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Flags: --no-legacy-const --no-harmony-sloppy --no-harmony-sloppy-let
+// Flags: --no-harmony-sloppy --no-harmony-sloppy-let
// Flags: --no-harmony-sloppy-function
const x = 42;
diff --git a/test/message/non-alphanum.js b/test/message/non-alphanum.js
new file mode 100644
index 0000000..357ebfa
--- /dev/null
+++ b/test/message/non-alphanum.js
@@ -0,0 +1,34 @@
+// Copyright 2011 the V8 project authors. All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// This file contains no symbols or function declarations, and only
+// non-alphanumeric characters, but does contain valid code.
+
+// Created using http://discogscounter.getfreehosting.co.uk/js-noalnum_com.php
+// Will throw a TypeError, but should parse fine and not throw a SyntaxError.
+
+([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()[(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]])([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()[([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[+!+[]]]((![]+[])[+!+[]])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+[][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()[(![]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()+[])[!+[]+!+[]]]((![]+[])[+!+[]]+(+[![]]+[])[+[]])[+[]]+(![]+[])[+!+[]]+(+[]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([]+([]+[])[([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[!+[]+!+[]+!+[]+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()[(![]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()+[])[!+[]+!+[]]]((![]+[])[+!+[]]+[+[]])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[!+[]+!+[]]+[][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()[(![]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()+[])[!+[]+!+[]]]((+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])+[])[+[]]+(![]+[])[+[]])[+[]])
diff --git a/test/message/non-alphanum.out b/test/message/non-alphanum.out
new file mode 100644
index 0000000..dc15a61
--- /dev/null
+++ b/test/message/non-alphanum.out
@@ -0,0 +1,6 @@
+*%(basename)s:34: TypeError: Array.prototype.sort called on null or undefined
+([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()[(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]])([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()[([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[+!+[]]]((![]+[])[+!+[]])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+[][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()[(![]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()+[])[!+[]+!+[]]]((![]+[])[+!+[]]+(+[![]]+[])[+[]])[+[]]+(![]+[])[+!+[]]+(+[]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([]+([]+[])[([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[!+[]+!+[]+!+[]+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()[(![]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()+[])[!+[]+!+[]]]((![]+[])[+!+[]]+[+[]])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[!+[]+!+[]]+[][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()[(![]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()+[])[!+[]+!+[]]]((+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])+[])[+[]]+(![]+[])[+[]])[+[]])
+ ^
+TypeError: Array.prototype.sort called on null or undefined
+ at sort (native)
+ at *%(basename)s:34:410
diff --git a/test/message/instanceof.js b/test/message/non-use-strict-hex-escape.js
similarity index 86%
copy from test/message/instanceof.js
copy to test/message/non-use-strict-hex-escape.js
index 1d55e0f..44db66e 100644
--- a/test/message/instanceof.js
+++ b/test/message/non-use-strict-hex-escape.js
@@ -1,4 +1,4 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,4 +25,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-1 instanceof 2;
+// A string looking like "use strict", but with a hex escape in it,
+// doesn't trigger strict mode.
+
+function foo() {
+ "use\x20strict";
+ var x = "hello\040world";
+ return x;
+}
diff --git a/test/message/non-use-strict-hex-escape.out b/test/message/non-use-strict-hex-escape.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/message/non-use-strict-hex-escape.out
diff --git a/test/message/instanceof.js b/test/message/non-use-strict-octal-escape.js
similarity index 85%
copy from test/message/instanceof.js
copy to test/message/non-use-strict-octal-escape.js
index 1d55e0f..55f035a 100644
--- a/test/message/instanceof.js
+++ b/test/message/non-use-strict-octal-escape.js
@@ -1,4 +1,4 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,4 +25,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-1 instanceof 2;
+// A string looking like "use strict", but with an octal escape in it,
+// doesn't trigger strict mode.
+
+function foo() {
+ "use\040strict";
+ var x = "hello\040world";
+ return x;
+}
diff --git a/test/message/non-use-strict-octal-escape.out b/test/message/non-use-strict-octal-escape.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/message/non-use-strict-octal-escape.out
diff --git a/test/message/instanceof.js b/test/message/non-use-strict-uhex-escape.js
similarity index 85%
copy from test/message/instanceof.js
copy to test/message/non-use-strict-uhex-escape.js
index 1d55e0f..c7df2cb 100644
--- a/test/message/instanceof.js
+++ b/test/message/non-use-strict-uhex-escape.js
@@ -1,4 +1,4 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,4 +25,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-1 instanceof 2;
+// A string looking like "use strict", but with a long hex escape in it,
+// doesn't trigger strict mode.
+
+function foo() {
+ "use\u0020strict";
+ var x = "hello\040world";
+ return x;
+}
diff --git a/test/message/non-use-strict-uhex-escape.out b/test/message/non-use-strict-uhex-escape.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/message/non-use-strict-uhex-escape.out
diff --git a/test/message/instanceof.js b/test/message/nonstrict-arguments.js
similarity index 69%
copy from test/message/instanceof.js
copy to test/message/nonstrict-arguments.js
index 1d55e0f..e5ce0f9 100644
--- a/test/message/instanceof.js
+++ b/test/message/nonstrict-arguments.js
@@ -1,4 +1,4 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,4 +25,28 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-1 instanceof 2;
+// Eval restrictions should not trigger outside of strict-mode code.
+
+function foo() {
+ var arguments = 42;
+ arguments = arguments++;
+ arguments += --arguments;
+ arguments -= ++arguments;
+ arguments *= arguments--;
+ function arguments(arguments) {};
+ try {} catch (arguments) {}
+
+ function strict() {
+ "use strict";
+ // Reading eval and arguments is allowed.
+ eval(arguments);
+ }
+
+ var arguments = 42;
+ arguments = arguments++;
+ arguments += --arguments;
+ arguments -= ++arguments;
+ arguments *= arguments--;
+ function arguments(arguments) {};
+ try {} catch (arguments) {}
+}
diff --git a/test/message/nonstrict-arguments.out b/test/message/nonstrict-arguments.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/message/nonstrict-arguments.out
diff --git a/test/message/instanceof.js b/test/message/nonstrict-eval.js
similarity index 73%
copy from test/message/instanceof.js
copy to test/message/nonstrict-eval.js
index 1d55e0f..13d7903 100644
--- a/test/message/instanceof.js
+++ b/test/message/nonstrict-eval.js
@@ -1,4 +1,4 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,4 +25,28 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-1 instanceof 2;
+// Eval restrictions should not trigger outside of strict-mode code.
+
+function foo() {
+ var eval = 42;
+ eval = eval++;
+ eval += --eval;
+ eval -= ++eval;
+ eval *= eval--;
+ function eval(eval) {};
+ try {} catch (eval) {}
+
+ function strict() {
+ "use strict";
+ // Reading eval and arguments is allowed.
+ eval(arguments);
+ }
+
+ var eval = 42;
+ eval = eval++;
+ eval += --eval;
+ eval -= ++eval;
+ eval *= eval--;
+ function eval(eval) {};
+ try {} catch (eval) {}
+}
diff --git a/test/message/nonstrict-eval.out b/test/message/nonstrict-eval.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/message/nonstrict-eval.out
diff --git a/test/message/instanceof.js b/test/message/nonstrict-with.js
similarity index 83%
copy from test/message/instanceof.js
copy to test/message/nonstrict-with.js
index 1d55e0f..f6e39c9 100644
--- a/test/message/instanceof.js
+++ b/test/message/nonstrict-with.js
@@ -1,4 +1,4 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,4 +25,18 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-1 instanceof 2;
+// The with statement is allowed in non-strict code, and even around
+// strict code.
+
+function foo() {
+ with ({}) {}
+
+ with ({x : 42}) {
+ var foo = function () {
+ "use strict";
+ return x;
+ };
+ }
+
+ with ({}) {}
+}
diff --git a/test/message/nonstrict-with.out b/test/message/nonstrict-with.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/message/nonstrict-with.out
diff --git a/test/message/regress/regress-4829-1.js b/test/message/regress/regress-4829-1.js
new file mode 100644
index 0000000..1ad5fed
--- /dev/null
+++ b/test/message/regress/regress-4829-1.js
@@ -0,0 +1,7 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function tag() {}
+
+tag(tag`\xyy`);
diff --git a/test/message/regress/regress-4829-1.out b/test/message/regress/regress-4829-1.out
new file mode 100644
index 0000000..6b51a8a
--- /dev/null
+++ b/test/message/regress/regress-4829-1.out
@@ -0,0 +1,8 @@
+# Copyright 2016 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+*%(basename)s:7: SyntaxError: Invalid hexadecimal escape sequence
+tag(tag`\xyy`);
+ ^^^^
+SyntaxError: Invalid hexadecimal escape sequence
diff --git a/test/message/regress/regress-4829-2.js b/test/message/regress/regress-4829-2.js
new file mode 100644
index 0000000..eadb653
--- /dev/null
+++ b/test/message/regress/regress-4829-2.js
@@ -0,0 +1,7 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function tag() {}
+
+`${tag`\xyy`}`;
diff --git a/test/message/regress/regress-4829-2.out b/test/message/regress/regress-4829-2.out
new file mode 100644
index 0000000..c8272b4
--- /dev/null
+++ b/test/message/regress/regress-4829-2.out
@@ -0,0 +1,8 @@
+# Copyright 2016 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+*%(basename)s:7: SyntaxError: Invalid hexadecimal escape sequence
+`${tag`\xyy`}`;
+ ^^^^
+SyntaxError: Invalid hexadecimal escape sequence
diff --git a/test/message/instanceof.js b/test/message/strict-octal-indirect-regexp.js
similarity index 87%
copy from test/message/instanceof.js
copy to test/message/strict-octal-indirect-regexp.js
index 1d55e0f..ea5c5e3 100644
--- a/test/message/instanceof.js
+++ b/test/message/strict-octal-indirect-regexp.js
@@ -1,4 +1,4 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,4 +25,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-1 instanceof 2;
+// Strict mode with call to RegExp containing octal escape:
+
+function foo() {
+ "use strict";
+ var re = RegExp("Hello\\040World");
+ return re;
+}
diff --git a/test/message/strict-octal-indirect-regexp.out b/test/message/strict-octal-indirect-regexp.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/message/strict-octal-indirect-regexp.out
diff --git a/test/message/instanceof.js b/test/message/strict-octal-number.js
similarity index 89%
copy from test/message/instanceof.js
copy to test/message/strict-octal-number.js
index 1d55e0f..3e99127 100644
--- a/test/message/instanceof.js
+++ b/test/message/strict-octal-number.js
@@ -1,4 +1,4 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,4 +25,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-1 instanceof 2;
+// Strict mode with octal number literal.
+
+function foo() {
+ "use strict";
+ var x = 012;
+ return x;
+}
diff --git a/test/message/strict-octal-number.out b/test/message/strict-octal-number.out
new file mode 100644
index 0000000..6873218
--- /dev/null
+++ b/test/message/strict-octal-number.out
@@ -0,0 +1,4 @@
+*%(basename)s:32: SyntaxError: Octal literals are not allowed in strict mode.
+ var x = 012;
+ ^^^
+SyntaxError: Octal literals are not allowed in strict mode.
diff --git a/test/message/instanceof.js b/test/message/strict-octal-regexp.js
similarity index 88%
copy from test/message/instanceof.js
copy to test/message/strict-octal-regexp.js
index 1d55e0f..b39d0b2 100644
--- a/test/message/instanceof.js
+++ b/test/message/strict-octal-regexp.js
@@ -1,4 +1,4 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,4 +25,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-1 instanceof 2;
+// Strict mode with octal escape in RegExp literal.
+
+function foo() {
+ "use strict";
+ var re = /hello\040world/;
+ return re;
+}
diff --git a/test/message/strict-octal-regexp.out b/test/message/strict-octal-regexp.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/message/strict-octal-regexp.out
diff --git a/test/message/instanceof.js b/test/message/strict-octal-string.js
similarity index 88%
copy from test/message/instanceof.js
copy to test/message/strict-octal-string.js
index 1d55e0f..87c0e99 100644
--- a/test/message/instanceof.js
+++ b/test/message/strict-octal-string.js
@@ -1,4 +1,4 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,4 +25,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-1 instanceof 2;
+// Strict mode with octal escape in string literal.
+
+function foo() {
+ "use strict";
+ var x = "hello\040world";
+ return x;
+}
diff --git a/test/message/strict-octal-string.out b/test/message/strict-octal-string.out
new file mode 100644
index 0000000..c46df6b
--- /dev/null
+++ b/test/message/strict-octal-string.out
@@ -0,0 +1,4 @@
+*%(basename)s:32: SyntaxError: Octal literals are not allowed in strict mode.
+ var x = "hello\040world";
+ ^^
+SyntaxError: Octal literals are not allowed in strict mode.
diff --git a/test/message/instanceof.js b/test/message/strict-octal-use-strict-after.js
similarity index 85%
copy from test/message/instanceof.js
copy to test/message/strict-octal-use-strict-after.js
index 1d55e0f..57d0f20 100644
--- a/test/message/instanceof.js
+++ b/test/message/strict-octal-use-strict-after.js
@@ -1,4 +1,4 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,4 +25,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-1 instanceof 2;
+// Strict mode with octal escape in string/directive prologue looking like
+// "use strict", after "use strict" directive.
+
+function foo() {
+ "use strict";
+ "use\040strict";
+ return true;
+}
diff --git a/test/message/strict-octal-use-strict-after.out b/test/message/strict-octal-use-strict-after.out
new file mode 100644
index 0000000..2a42500
--- /dev/null
+++ b/test/message/strict-octal-use-strict-after.out
@@ -0,0 +1,4 @@
+*%(basename)s:33: SyntaxError: Octal literals are not allowed in strict mode.
+ "use\040strict";
+ ^^
+SyntaxError: Octal literals are not allowed in strict mode.
diff --git a/test/message/instanceof.js b/test/message/strict-octal-use-strict-before.js
similarity index 85%
copy from test/message/instanceof.js
copy to test/message/strict-octal-use-strict-before.js
index 1d55e0f..bfc380f 100644
--- a/test/message/instanceof.js
+++ b/test/message/strict-octal-use-strict-before.js
@@ -1,4 +1,4 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,4 +25,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-1 instanceof 2;
+// Strict mode with octal escape in string/directive prologue looking like
+// "use strict, before "use strict" directive.
+
+function foo() {
+ "use\040strict";
+ "use strict";
+ return true;
+}
diff --git a/test/message/strict-octal-use-strict-before.out b/test/message/strict-octal-use-strict-before.out
new file mode 100644
index 0000000..cd93e50
--- /dev/null
+++ b/test/message/strict-octal-use-strict-before.out
@@ -0,0 +1,4 @@
+*%(basename)s:32: SyntaxError: Octal literals are not allowed in strict mode.
+ "use\040strict";
+ ^^
+SyntaxError: Octal literals are not allowed in strict mode.
diff --git a/test/message/instanceof.js b/test/message/strict-with.js
similarity index 89%
copy from test/message/instanceof.js
copy to test/message/strict-with.js
index 1d55e0f..411fc29 100644
--- a/test/message/instanceof.js
+++ b/test/message/strict-with.js
@@ -1,4 +1,4 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,4 +25,9 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-1 instanceof 2;
+// The with statement is not allowed in strict code.
+
+function foo() {
+ "use strict";
+ with ({}) {}
+}
diff --git a/test/message/strict-with.out b/test/message/strict-with.out
new file mode 100644
index 0000000..06e7ed8
--- /dev/null
+++ b/test/message/strict-with.out
@@ -0,0 +1,4 @@
+*%(basename)s:32: SyntaxError: Strict mode code may not include a with statement
+ with ({}) {}
+ ^^^^
+SyntaxError: Strict mode code may not include a with statement
diff --git a/test/message/strong-object-freeze-prop.js b/test/message/strong-object-freeze-prop.js
deleted file mode 100644
index 1725015..0000000
--- a/test/message/strong-object-freeze-prop.js
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2015 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Flags: --strong-mode
-
-"use strong";
-
-let o = {};
-Object.defineProperty(o, "foo", { writable: true });
-Object.defineProperty(o, "foo", { writable: false });
diff --git a/test/message/strong-object-freeze-prop.out b/test/message/strong-object-freeze-prop.out
deleted file mode 100644
index 0c611c5..0000000
--- a/test/message/strong-object-freeze-prop.out
+++ /dev/null
@@ -1,9 +0,0 @@
-# Copyright 2015 the V8 project authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-*%(basename)s:11: TypeError: On strong object #<Object>, redefining writable, non-configurable property 'foo' to be non-writable is deprecated
-Object.defineProperty(o, "foo", { writable: false });
- ^
-TypeError: On strong object #<Object>, redefining writable, non-configurable property 'foo' to be non-writable is deprecated
- at Function.defineProperty (native)
- at *%(basename)s:11:8
diff --git a/test/message/strong-object-set-proto.out b/test/message/strong-object-set-proto.out
deleted file mode 100644
index bf2c933..0000000
--- a/test/message/strong-object-set-proto.out
+++ /dev/null
@@ -1,9 +0,0 @@
-# Copyright 2015 the V8 project authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-*%(basename)s:9: TypeError: On strong object #<Object>, redefining the internal prototype is deprecated
-({}).__proto__ = {};
- ^
-TypeError: On strong object #<Object>, redefining the internal prototype is deprecated
- at Object.set __proto__ (native)
- at *%(basename)s:9:16
diff --git a/test/message/testcfg.py b/test/message/testcfg.py
index 7c53041..577b476 100644
--- a/test/message/testcfg.py
+++ b/test/message/testcfg.py
@@ -94,7 +94,9 @@
string.find("Native Client module will be loaded") > 0 or
string.find("NaClHostDescOpen:") > 0)
- def IsFailureOutput(self, output, testpath):
+ def IsFailureOutput(self, testcase):
+ output = testcase.output
+ testpath = testcase.path
expected_path = os.path.join(self.root, testpath + ".out")
expected_lines = []
# Can't use utils.ReadLinesFrom() here because it strips whitespace.
diff --git a/test/message/try-catch-lexical-conflict.js b/test/message/try-catch-lexical-conflict.js
index a5db298..48b1a16 100644
--- a/test/message/try-catch-lexical-conflict.js
+++ b/test/message/try-catch-lexical-conflict.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Flags: --harmony-destructuring-bind
+//
"use strict";
try {
diff --git a/test/message/try-catch-variable-conflict.js b/test/message/try-catch-variable-conflict.js
index 6cf04fa..49e120b 100644
--- a/test/message/try-catch-variable-conflict.js
+++ b/test/message/try-catch-variable-conflict.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Flags: --harmony-destructuring-bind
+//
try {
} catch ({x}) {
diff --git a/test/message/unicode-escape-invalid-2.js b/test/message/unicode-escape-invalid-2.js
new file mode 100644
index 0000000..b83665b
--- /dev/null
+++ b/test/message/unicode-escape-invalid-2.js
@@ -0,0 +1,5 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+print("\u162P");
diff --git a/test/message/unicode-escape-invalid-2.out b/test/message/unicode-escape-invalid-2.out
new file mode 100644
index 0000000..423e79d
--- /dev/null
+++ b/test/message/unicode-escape-invalid-2.out
@@ -0,0 +1,8 @@
+# Copyright 2016 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+*%(basename)s:5: SyntaxError: Invalid Unicode escape sequence
+print("\u162P");
+ ^^^^^^
+SyntaxError: Invalid Unicode escape sequence
diff --git a/test/message/unicode-escape-invalid.js b/test/message/unicode-escape-invalid.js
new file mode 100644
index 0000000..5378acf
--- /dev/null
+++ b/test/message/unicode-escape-invalid.js
@@ -0,0 +1,5 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+print("\u{FFYZ}");
diff --git a/test/message/unicode-escape-invalid.out b/test/message/unicode-escape-invalid.out
new file mode 100644
index 0000000..2bdd538
--- /dev/null
+++ b/test/message/unicode-escape-invalid.out
@@ -0,0 +1,8 @@
+# Copyright 2016 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+*%(basename)s:5: SyntaxError: Invalid Unicode escape sequence
+print("\u{FFYZ}");
+ ^
+SyntaxError: Invalid Unicode escape sequence
diff --git a/test/message/unicode-escape-undefined.js b/test/message/unicode-escape-undefined.js
new file mode 100644
index 0000000..49de2fb
--- /dev/null
+++ b/test/message/unicode-escape-undefined.js
@@ -0,0 +1,5 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+print("\u{110000}");
diff --git a/test/message/unicode-escape-undefined.out b/test/message/unicode-escape-undefined.out
new file mode 100644
index 0000000..9b0483c
--- /dev/null
+++ b/test/message/unicode-escape-undefined.out
@@ -0,0 +1,8 @@
+# Copyright 2016 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+*%(basename)s:5: SyntaxError: Undefined Unicode code-point
+print("\u{110000}");
+ ^^^^^^^^^
+SyntaxError: Undefined Unicode code-point
\ No newline at end of file
diff --git a/test/message/yield-in-arrow-param.js b/test/message/yield-in-arrow-param.js
new file mode 100644
index 0000000..c815fe7
--- /dev/null
+++ b/test/message/yield-in-arrow-param.js
@@ -0,0 +1,5 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function* g() { (a = yield) => {} }
diff --git a/test/message/yield-in-arrow-param.out b/test/message/yield-in-arrow-param.out
new file mode 100644
index 0000000..8eeb0df
--- /dev/null
+++ b/test/message/yield-in-arrow-param.out
@@ -0,0 +1,4 @@
+*%(basename)s:5: SyntaxError: Yield expression not allowed in formal parameter
+function* g() { (a = yield) => {} }
+ ^^^^^
+SyntaxError: Yield expression not allowed in formal parameter
diff --git a/test/message/strong-object-set-proto.js b/test/message/yield-in-generator-param.js
similarity index 73%
copy from test/message/strong-object-set-proto.js
copy to test/message/yield-in-generator-param.js
index 890dd84..1a8f842 100644
--- a/test/message/strong-object-set-proto.js
+++ b/test/message/yield-in-generator-param.js
@@ -2,8 +2,4 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --strong-mode
-
-"use strong";
-
-({}).__proto__ = {};
+function* g(a = yield) {}
diff --git a/test/message/yield-in-generator-param.out b/test/message/yield-in-generator-param.out
new file mode 100644
index 0000000..ec46f47
--- /dev/null
+++ b/test/message/yield-in-generator-param.out
@@ -0,0 +1,4 @@
+*%(basename)s:5: SyntaxError: Yield expression not allowed in formal parameter
+function* g(a = yield) {}
+ ^^^^^
+SyntaxError: Yield expression not allowed in formal parameter