From 8dd16259287f58f9273002717ec4d27e97127719 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:43:14 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- .../expressions/assignment/S11.13.1_A7_T3.js | 28 ----------- .../assignment/target-member-computed-reference.js | 42 +++++++++++++++++ .../assignment/target-super-computed-reference.js | 51 +++++++++++++++++++++ ...script-decl-lex-var-declared-via-eval-sloppy.js | 32 ------------- ...decl-lex-var-declared-via-eval-strict-strict.js | 27 ----------- .../script-decl-lex-var-declared-via-eval.js | 38 +++++++++++++++ .../early-err-arithmetic-modifiers-add-remove-i.js | 20 ++++++++ .../early-err-arithmetic-modifiers-add-remove-m.js | 20 ++++++++ ...thmetic-modifiers-add-remove-multi-duplicate.js | 20 ++++++++ ...err-arithmetic-modifiers-add-remove-s-escape.js | 20 ++++++++ .../early-err-arithmetic-modifiers-add-remove-s.js | 20 ++++++++ .../early-err-arithmetic-modifiers-both-empty.js | 20 ++++++++ ...r-arithmetic-modifiers-code-point-repeat-i-1.js | 20 ++++++++ ...r-arithmetic-modifiers-code-point-repeat-i-2.js | 20 ++++++++ .../early-err-arithmetic-modifiers-no-colon-1.js | 19 ++++++++ .../early-err-arithmetic-modifiers-no-colon-2.js | 19 ++++++++ .../early-err-arithmetic-modifiers-no-colon-3.js | 19 ++++++++ ...thmetic-modifiers-other-code-point-arbitrary.js | 20 ++++++++ ...metic-modifiers-other-code-point-combining-i.js | 20 ++++++++ ...metic-modifiers-other-code-point-combining-m.js | 20 ++++++++ ...metic-modifiers-other-code-point-combining-s.js | 20 ++++++++ ...-err-arithmetic-modifiers-other-code-point-d.js | 20 ++++++++ ...-err-arithmetic-modifiers-other-code-point-g.js | 20 ++++++++ ...tic-modifiers-other-code-point-non-display-1.js | Bin 0 -> 715 bytes ...tic-modifiers-other-code-point-non-display-2.js | 20 ++++++++ ...ithmetic-modifiers-other-code-point-non-flag.js | 20 ++++++++ ...-err-arithmetic-modifiers-other-code-point-u.js | 20 ++++++++ ...metic-modifiers-other-code-point-uppercase-I.js | 20 ++++++++ ...-err-arithmetic-modifiers-other-code-point-y.js | 20 ++++++++ ...rr-arithmetic-modifiers-other-code-point-zwj.js | 20 ++++++++ ...arithmetic-modifiers-other-code-point-zwnbsp.js | 20 ++++++++ ...r-arithmetic-modifiers-other-code-point-zwnj.js | 20 ++++++++ ...rr-arithmetic-modifiers-reverse-add-remove-i.js | 20 ++++++++ ...rr-arithmetic-modifiers-reverse-add-remove-m.js | 20 ++++++++ ...modifiers-reverse-add-remove-multi-duplicate.js | 20 ++++++++ ...hmetic-modifiers-reverse-add-remove-s-escape.js | 20 ++++++++ ...rr-arithmetic-modifiers-reverse-add-remove-s.js | 20 ++++++++ ...etic-modifiers-reverse-code-point-repeat-i-1.js | 20 ++++++++ ...etic-modifiers-reverse-code-point-repeat-i-2.js | 20 ++++++++ ...modifiers-reverse-other-code-point-arbitrary.js | 20 ++++++++ ...difiers-reverse-other-code-point-combining-i.js | 20 ++++++++ ...difiers-reverse-other-code-point-combining-m.js | 20 ++++++++ ...difiers-reverse-other-code-point-combining-s.js | 20 ++++++++ ...thmetic-modifiers-reverse-other-code-point-d.js | 20 ++++++++ ...thmetic-modifiers-reverse-other-code-point-g.js | 20 ++++++++ ...fiers-reverse-other-code-point-non-display-1.js | Bin 0 -> 715 bytes ...fiers-reverse-other-code-point-non-display-2.js | 20 ++++++++ ...-modifiers-reverse-other-code-point-non-flag.js | 20 ++++++++ ...thmetic-modifiers-reverse-other-code-point-u.js | 20 ++++++++ ...difiers-reverse-other-code-point-uppercase-I.js | 20 ++++++++ ...thmetic-modifiers-reverse-other-code-point-y.js | 20 ++++++++ ...metic-modifiers-reverse-other-code-point-zwj.js | 20 ++++++++ ...ic-modifiers-reverse-other-code-point-zwnbsp.js | 20 ++++++++ ...etic-modifiers-reverse-other-code-point-zwnj.js | 20 ++++++++ ...tic-modifiers-reverse-should-not-case-fold-i.js | 20 ++++++++ ...tic-modifiers-reverse-should-not-case-fold-m.js | 20 ++++++++ ...tic-modifiers-reverse-should-not-case-fold-s.js | 20 ++++++++ ...fiers-reverse-should-not-unicode-case-fold-i.js | 20 ++++++++ ...fiers-reverse-should-not-unicode-case-fold-s.js | 20 ++++++++ ...-arithmetic-modifiers-should-not-case-fold-i.js | 20 ++++++++ ...-arithmetic-modifiers-should-not-case-fold-m.js | 20 ++++++++ ...-arithmetic-modifiers-should-not-case-fold-s.js | 20 ++++++++ ...tic-modifiers-should-not-unicode-case-fold-i.js | 20 ++++++++ ...tic-modifiers-should-not-unicode-case-fold-s.js | 20 ++++++++ .../early-err-modifiers-code-point-repeat-i-1.js | 20 ++++++++ .../early-err-modifiers-code-point-repeat-i-2.js | 20 ++++++++ ...rly-err-modifiers-other-code-point-arbitrary.js | 20 ++++++++ ...y-err-modifiers-other-code-point-combining-i.js | 20 ++++++++ ...y-err-modifiers-other-code-point-combining-m.js | 20 ++++++++ ...y-err-modifiers-other-code-point-combining-s.js | 20 ++++++++ .../early-err-modifiers-other-code-point-d.js | 20 ++++++++ .../early-err-modifiers-other-code-point-g.js | 20 ++++++++ ...err-modifiers-other-code-point-non-display-1.js | Bin 0 -> 853 bytes ...err-modifiers-other-code-point-non-display-2.js | 20 ++++++++ ...arly-err-modifiers-other-code-point-non-flag.js | 20 ++++++++ .../early-err-modifiers-other-code-point-u.js | 20 ++++++++ ...y-err-modifiers-other-code-point-uppercase-I.js | 20 ++++++++ .../early-err-modifiers-other-code-point-y.js | 20 ++++++++ .../early-err-modifiers-other-code-point-zwj.js | 20 ++++++++ .../early-err-modifiers-other-code-point-zwnbsp.js | 20 ++++++++ .../early-err-modifiers-other-code-point-zwnj.js | 20 ++++++++ .../early-err-modifiers-should-not-case-fold-i.js | 20 ++++++++ .../early-err-modifiers-should-not-case-fold-m.js | 20 ++++++++ .../early-err-modifiers-should-not-case-fold-s.js | 20 ++++++++ ...err-modifiers-should-not-unicode-case-fold-i.js | 20 ++++++++ ...err-modifiers-should-not-unicode-case-fold-s.js | 20 ++++++++ ...ly-err-modifiers-should-not-unicode-escape-i.js | 20 ++++++++ ...ly-err-modifiers-should-not-unicode-escape-m.js | 20 ++++++++ ...ly-err-modifiers-should-not-unicode-escape-s.js | 20 ++++++++ .../import-attributes/allow-nlt-before-with.js | 2 +- .../async-module-does-not-block-sibling-modules.js | 17 +++++++ .../top-level-await/async-module-sync_FIXTURE.js | 5 ++ .../top-level-await/async-module-tla_FIXTURE.js | 7 +++ .../TypedArray/regular-subclassing.js | 1 + .../TypedArray/super-must-be-called.js | 1 + 95 files changed, 1760 insertions(+), 88 deletions(-) delete mode 100644 js/src/tests/test262/language/expressions/assignment/S11.13.1_A7_T3.js create mode 100644 js/src/tests/test262/language/expressions/assignment/target-member-computed-reference.js create mode 100644 js/src/tests/test262/language/expressions/assignment/target-super-computed-reference.js delete mode 100644 js/src/tests/test262/language/global-code/script-decl-lex-var-declared-via-eval-sloppy.js delete mode 100644 js/src/tests/test262/language/global-code/script-decl-lex-var-declared-via-eval-strict-strict.js create mode 100644 js/src/tests/test262/language/global-code/script-decl-lex-var-declared-via-eval.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-i.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-m.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-multi-duplicate.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-s-escape.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-s.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-both-empty.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-code-point-repeat-i-1.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-code-point-repeat-i-2.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-no-colon-1.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-no-colon-2.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-no-colon-3.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-arbitrary.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-combining-i.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-combining-m.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-combining-s.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-d.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-g.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-display-1.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-display-2.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-flag.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-u.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-uppercase-I.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-y.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-zwj.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-zwnbsp.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-zwnj.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-i.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-m.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-multi-duplicate.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-s-escape.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-s.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-code-point-repeat-i-1.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-code-point-repeat-i-2.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-arbitrary.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-combining-i.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-combining-m.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-combining-s.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-d.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-g.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-display-1.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-display-2.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-flag.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-u.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-uppercase-I.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-y.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-zwj.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-zwnbsp.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-zwnj.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-case-fold-i.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-case-fold-m.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-case-fold-s.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-unicode-case-fold-i.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-unicode-case-fold-s.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-case-fold-i.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-case-fold-m.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-case-fold-s.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-unicode-case-fold-i.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-unicode-case-fold-s.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-code-point-repeat-i-1.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-code-point-repeat-i-2.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-arbitrary.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-combining-i.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-combining-m.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-combining-s.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-d.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-g.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-non-display-1.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-non-display-2.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-non-flag.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-u.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-uppercase-I.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-y.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-zwj.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-zwnbsp.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-zwnj.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-case-fold-i.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-case-fold-m.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-case-fold-s.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-case-fold-i.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-case-fold-s.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-escape-i.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-escape-m.js create mode 100644 js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-escape-s.js create mode 100644 js/src/tests/test262/language/module-code/top-level-await/async-module-does-not-block-sibling-modules.js create mode 100644 js/src/tests/test262/language/module-code/top-level-await/async-module-sync_FIXTURE.js create mode 100644 js/src/tests/test262/language/module-code/top-level-await/async-module-tla_FIXTURE.js (limited to 'js/src/tests/test262/language') diff --git a/js/src/tests/test262/language/expressions/assignment/S11.13.1_A7_T3.js b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A7_T3.js deleted file mode 100644 index 8675448e23..0000000000 --- a/js/src/tests/test262/language/expressions/assignment/S11.13.1_A7_T3.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2015 André Bargull. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: Assignment Operator evaluates its operands from left to right. -description: > - The left-hand side expression is evaluated before the right-hand side. - Left-hand side expression is MemberExpression: base[prop]. Evaluating - ToPropertyKey(prop) throws an error. ----*/ - -function DummyError() { } - -assert.throws(DummyError, function() { - var base = {}; - var prop = { - toString: function() { - throw new DummyError(); - } - }; - var expr = function() { - throw new Test262Error("right-hand side expression evaluated"); - }; - - base[prop] = expr(); -}); - -reportCompare(0, 0); diff --git a/js/src/tests/test262/language/expressions/assignment/target-member-computed-reference.js b/js/src/tests/test262/language/expressions/assignment/target-member-computed-reference.js new file mode 100644 index 0000000000..fefc73370f --- /dev/null +++ b/js/src/tests/test262/language/expressions/assignment/target-member-computed-reference.js @@ -0,0 +1,42 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// Copyright (C) 2024 Sony Interactive Entertainment Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-assignment-operators +description: Assignment Operator evaluates its operands from left to right (formerly S11.13.1_A7_T3) +info: | + The left-hand side expression is evaluated before the right-hand side. + Left-hand side expression is MemberExpression: base[prop]. + ToPropertyKey(prop) occurs after both sides are evaluated. +---*/ + +function DummyError() { } + +assert.throws(DummyError, function() { + var base = {}; + var prop = function() { + throw new DummyError(); + }; + var expr = function() { + throw new Test262Error("right-hand side expression evaluated"); + }; + + base[prop()] = expr(); +}); + +assert.throws(DummyError, function() { + var base = {}; + var prop = { + toString: function() { + throw new Test262Error("property key evaluated"); + } + }; + var expr = function() { + throw new DummyError(); + }; + + base[prop] = expr(); +}); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/expressions/assignment/target-super-computed-reference.js b/js/src/tests/test262/language/expressions/assignment/target-super-computed-reference.js new file mode 100644 index 0000000000..39d692a81b --- /dev/null +++ b/js/src/tests/test262/language/expressions/assignment/target-super-computed-reference.js @@ -0,0 +1,51 @@ +// Copyright (C) 2024 Sony Interactive Entertainment Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-assignment-operators +description: Assignment Operator evaluates its operands from left to right +info: | + The left-hand side expression is evaluated before the right-hand side. + Left-hand side expression is MemberExpression: super[prop]. + ToPropertyKey(prop) occurs after both sides are evaluated. +---*/ + +function DummyError() {} + +assert.throws(DummyError, function() { + var prop = function() { + throw new DummyError(); + }; + var expr = function() { + throw new Test262Error("right-hand side expression evaluated"); + }; + + class C extends class {} { + m() { + super[prop()] = expr(); + } + } + + (new C()).m(); +}); + +assert.throws(DummyError, function() { + var prop = { + toString: function() { + throw new Test262Error("property key evaluated"); + } + }; + var expr = function() { + throw new DummyError(); + }; + + class C extends class {} { + m() { + super[prop] = expr(); + } + } + + (new C()).m(); +}); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/global-code/script-decl-lex-var-declared-via-eval-sloppy.js b/js/src/tests/test262/language/global-code/script-decl-lex-var-declared-via-eval-sloppy.js deleted file mode 100644 index 85c144b666..0000000000 --- a/js/src/tests/test262/language/global-code/script-decl-lex-var-declared-via-eval-sloppy.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2023 Alexey Shvayka. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-globaldeclarationinstantiation -description: Let binding collision with existing var declaration that was created via eval(). -info: | - [...] - 3. For each element name of lexNames, do - a. If env.HasVarDeclaration(name) is true, throw a SyntaxError exception. -flags: [noStrict] ----*/ - -eval('var test262Var;'); -eval('function test262Fn() {}'); - -assert.throws(SyntaxError, function() { - $262.evalScript('var x; let test262Var;'); -}, 'variable'); - -assert.throws(ReferenceError, function() { - x; -}, 'no bindings created (script shadowing variable)'); - -assert.throws(SyntaxError, function() { - $262.evalScript('var x; let test262Fn;'); -}, 'function'); - -assert.throws(ReferenceError, function() { - x; -}, 'no bindings created (script shadowing function)'); - -reportCompare(0, 0); diff --git a/js/src/tests/test262/language/global-code/script-decl-lex-var-declared-via-eval-strict-strict.js b/js/src/tests/test262/language/global-code/script-decl-lex-var-declared-via-eval-strict-strict.js deleted file mode 100644 index 34c2685a80..0000000000 --- a/js/src/tests/test262/language/global-code/script-decl-lex-var-declared-via-eval-strict-strict.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; -// Copyright (C) 2023 Alexey Shvayka. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-globaldeclarationinstantiation -description: No let binding collision with existing var declaration due to strict-mode eval(). -info: | - PerformEval ( x, strictCaller, direct ) - - [...] - 16. If direct is true, then - a. Let lexEnv be NewDeclarativeEnvironment(runningContext's LexicalEnvironment). - [...] - 18. If strictEval is true, set varEnv to lexEnv. -flags: [onlyStrict] ----*/ - -eval('var test262Var;'); -eval('function test262Fn() {}'); - -$262.evalScript('let test262Var = 1;'); -assert.sameValue(test262Var, 1); - -$262.evalScript('const test262Fn = 2;'); -assert.sameValue(test262Fn, 2); - -reportCompare(0, 0); diff --git a/js/src/tests/test262/language/global-code/script-decl-lex-var-declared-via-eval.js b/js/src/tests/test262/language/global-code/script-decl-lex-var-declared-via-eval.js new file mode 100644 index 0000000000..a92cca7b41 --- /dev/null +++ b/js/src/tests/test262/language/global-code/script-decl-lex-var-declared-via-eval.js @@ -0,0 +1,38 @@ +// Copyright (C) 2023 Alexey Shvayka. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-globaldeclarationinstantiation +description: No let binding collision with existing var declaration due to eval(). +info: | + In strict mode: + + PerformEval ( x, strictCaller, direct ) + + [...] + 16. If direct is true, then + a. Let lexEnv be NewDeclarativeEnvironment(runningContext's LexicalEnvironment). + [...] + 18. If strictEval is true, set varEnv to lexEnv. + + In sloppy mode: + + GlobalDeclarationInstantiation ( script, env ) + + [...] + 3. For each element name of lexNames, do + a. If env.HasLexicalDeclaration(name) is true, throw a SyntaxError exception. + b. Let hasRestrictedGlobal be ? env.HasRestrictedGlobalProperty(name). + c. NOTE: Global var and function bindings (except those that are introduced by non-strict direct eval) are non-configurable and are therefore restricted global properties. + d. If hasRestrictedGlobal is true, throw a SyntaxError exception. +---*/ + +eval('var test262Var;'); +eval('function test262Fn() {}'); + +$262.evalScript('let test262Var = 1;'); +assert.sameValue(test262Var, 1); + +$262.evalScript('const test262Fn = 2;'); +assert.sameValue(test262Fn, 2); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-i.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-i.js new file mode 100644 index 0000000000..a63c3e1af7 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-i.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the any code point in the source text matched by the first RegularExpressionFlags is also contained in the source text matched by the second RegularExpressionFlags. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?i-i:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-m.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-m.js new file mode 100644 index 0000000000..c3b44f4796 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-m.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the any code point in the source text matched by the first RegularExpressionFlags is also contained in the source text matched by the second RegularExpressionFlags. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?m-m:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-multi-duplicate.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-multi-duplicate.js new file mode 100644 index 0000000000..92cfb0457d --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-multi-duplicate.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the any code point in the source text matched by the first RegularExpressionFlags is also contained in the source text matched by the second RegularExpressionFlags. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?ims-m:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-s-escape.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-s-escape.js new file mode 100644 index 0000000000..b8937aaa07 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-s-escape.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the any code point in the source text matched by the first RegularExpressionFlags is also contained in the source text matched by the second RegularExpressionFlags. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?\u{0073}-s:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-s.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-s.js new file mode 100644 index 0000000000..e8d09f4cc6 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-s.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the any code point in the source text matched by the first RegularExpressionFlags is also contained in the source text matched by the second RegularExpressionFlags. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?s-s:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-both-empty.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-both-empty.js new file mode 100644 index 0000000000..db06a2eb86 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-both-empty.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by the first RegularExpressionFlags and the source text matched by the second RegularExpressionFlags are both empty. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-code-point-repeat-i-1.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-code-point-repeat-i-1.js new file mode 100644 index 0000000000..78c275e17f --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-code-point-repeat-i-1.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-ii:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-code-point-repeat-i-2.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-code-point-repeat-i-2.js new file mode 100644 index 0000000000..16f52d86f5 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-code-point-repeat-i-2.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-imsi:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-no-colon-1.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-no-colon-1.js new file mode 100644 index 0000000000..a392d5b0e0 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-no-colon-1.js @@ -0,0 +1,19 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Regular expression modifiers should not parse without the colon. +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... +---*/ + +$DONOTEVALUATE(); + +/(?ms-i)/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-no-colon-2.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-no-colon-2.js new file mode 100644 index 0000000000..46c3f4db43 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-no-colon-2.js @@ -0,0 +1,19 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Regular expression modifiers should not parse without the colon. +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... +---*/ + +$DONOTEVALUATE(); + +/(?-s)/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-no-colon-3.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-no-colon-3.js new file mode 100644 index 0000000000..e44077389c --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-no-colon-3.js @@ -0,0 +1,19 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Regular expression modifiers should not parse without the colon. +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... +---*/ + +$DONOTEVALUATE(); + +/(?i-)/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-arbitrary.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-arbitrary.js new file mode 100644 index 0000000000..62a138a3aa --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-arbitrary.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-1:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-combining-i.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-combining-i.js new file mode 100644 index 0000000000..958024fe65 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-combining-i.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-iͥ:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-combining-m.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-combining-m.js new file mode 100644 index 0000000000..45284e6d38 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-combining-m.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-mͫ:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-combining-s.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-combining-s.js new file mode 100644 index 0000000000..35bda819bd --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-combining-s.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-s̀:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-d.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-d.js new file mode 100644 index 0000000000..6567f99c37 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-d.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-d:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-g.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-g.js new file mode 100644 index 0000000000..ec8b2f03f8 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-g.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-g:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-display-1.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-display-1.js new file mode 100644 index 0000000000..e88cb7a696 Binary files /dev/null and b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-display-1.js differ diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-display-2.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-display-2.js new file mode 100644 index 0000000000..90816752fb --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-display-2.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-s‎:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-flag.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-flag.js new file mode 100644 index 0000000000..cd8ae0baf9 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-flag.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-Q:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-u.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-u.js new file mode 100644 index 0000000000..23a1f23b72 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-u.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-u:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-uppercase-I.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-uppercase-I.js new file mode 100644 index 0000000000..be6d2e61dc --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-uppercase-I.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-I:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-y.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-y.js new file mode 100644 index 0000000000..d65d6e6874 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-y.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-y:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-zwj.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-zwj.js new file mode 100644 index 0000000000..84e7253ef8 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-zwj.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-s‍:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-zwnbsp.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-zwnbsp.js new file mode 100644 index 0000000000..7acc6a49e3 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-zwnbsp.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-s:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-zwnj.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-zwnj.js new file mode 100644 index 0000000000..118ff69976 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-zwnj.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-s‌:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-i.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-i.js new file mode 100644 index 0000000000..a63c3e1af7 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-i.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the any code point in the source text matched by the first RegularExpressionFlags is also contained in the source text matched by the second RegularExpressionFlags. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?i-i:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-m.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-m.js new file mode 100644 index 0000000000..c3b44f4796 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-m.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the any code point in the source text matched by the first RegularExpressionFlags is also contained in the source text matched by the second RegularExpressionFlags. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?m-m:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-multi-duplicate.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-multi-duplicate.js new file mode 100644 index 0000000000..20ad04b60d --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-multi-duplicate.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the any code point in the source text matched by the first RegularExpressionFlags is also contained in the source text matched by the second RegularExpressionFlags. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?m-ims:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-s-escape.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-s-escape.js new file mode 100644 index 0000000000..a3b3263fdf --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-s-escape.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the any code point in the source text matched by the first RegularExpressionFlags is also contained in the source text matched by the second RegularExpressionFlags. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?s-\u{0073}:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-s.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-s.js new file mode 100644 index 0000000000..e8d09f4cc6 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-s.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the any code point in the source text matched by the first RegularExpressionFlags is also contained in the source text matched by the second RegularExpressionFlags. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?s-s:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-code-point-repeat-i-1.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-code-point-repeat-i-1.js new file mode 100644 index 0000000000..80352f948e --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-code-point-repeat-i-1.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?ii-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-code-point-repeat-i-2.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-code-point-repeat-i-2.js new file mode 100644 index 0000000000..1793724cfa --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-code-point-repeat-i-2.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?imsi-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-arbitrary.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-arbitrary.js new file mode 100644 index 0000000000..996963dbd0 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-arbitrary.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?1-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-combining-i.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-combining-i.js new file mode 100644 index 0000000000..616a537acb --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-combining-i.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?iͥ-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-combining-m.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-combining-m.js new file mode 100644 index 0000000000..6fa734c89a --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-combining-m.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?mͫ-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-combining-s.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-combining-s.js new file mode 100644 index 0000000000..d3d5aa8ce3 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-combining-s.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?s̀-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-d.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-d.js new file mode 100644 index 0000000000..b91c8bd612 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-d.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?d-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-g.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-g.js new file mode 100644 index 0000000000..c1e99de1ad --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-g.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?g-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-display-1.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-display-1.js new file mode 100644 index 0000000000..eec06fce52 Binary files /dev/null and b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-display-1.js differ diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-display-2.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-display-2.js new file mode 100644 index 0000000000..6a00b90484 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-display-2.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?s‎-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-flag.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-flag.js new file mode 100644 index 0000000000..e351dd2e3b --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-flag.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?Q-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-u.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-u.js new file mode 100644 index 0000000000..ae33a9ae34 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-u.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?u-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-uppercase-I.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-uppercase-I.js new file mode 100644 index 0000000000..c177ef76c7 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-uppercase-I.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?I-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-y.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-y.js new file mode 100644 index 0000000000..65383882cc --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-y.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?y-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-zwj.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-zwj.js new file mode 100644 index 0000000000..c3d3032ea0 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-zwj.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?s‍-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-zwnbsp.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-zwnbsp.js new file mode 100644 index 0000000000..e4b702e4a7 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-zwnbsp.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?s-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-zwnj.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-zwnj.js new file mode 100644 index 0000000000..eff2688281 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-zwnj.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?s‌-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-case-fold-i.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-case-fold-i.js new file mode 100644 index 0000000000..7b922f651c --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-case-fold-i.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Code points other than "i", "m", "s" should not be case folded to "i", "m", or "s" (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?I-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-case-fold-m.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-case-fold-m.js new file mode 100644 index 0000000000..189fce143c --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-case-fold-m.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Code points other than "i", "m", "s" should not be case folded to "i", "m", or "s" (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?M-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-case-fold-s.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-case-fold-s.js new file mode 100644 index 0000000000..47dbf5aa9a --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-case-fold-s.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Code points other than "i", "m", "s" should not be case folded to "i", "m", or "s" (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?S-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-unicode-case-fold-i.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-unicode-case-fold-i.js new file mode 100644 index 0000000000..106b9b2add --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-unicode-case-fold-i.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Code points other than "i", "m", "s" should not be case-folded to "i", "m", or "s" (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?İ-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-unicode-case-fold-s.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-unicode-case-fold-s.js new file mode 100644 index 0000000000..7b15fe7a09 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-unicode-case-fold-s.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Code points other than "i", "m", "s" should not be case-folded to "i", "m", or "s" (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?ſ-:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-case-fold-i.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-case-fold-i.js new file mode 100644 index 0000000000..c07e0041c0 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-case-fold-i.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Code points other than "i", "m", "s" should not be case folded to "i", "m", or "s" (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-I:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-case-fold-m.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-case-fold-m.js new file mode 100644 index 0000000000..4afe34ff44 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-case-fold-m.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Code points other than "i", "m", "s" should not be case folded to "i", "m", or "s" (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-M:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-case-fold-s.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-case-fold-s.js new file mode 100644 index 0000000000..e83af36569 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-case-fold-s.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Code points other than "i", "m", "s" should not be case folded to "i", "m", or "s" (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-S:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-unicode-case-fold-i.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-unicode-case-fold-i.js new file mode 100644 index 0000000000..2a948073f0 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-unicode-case-fold-i.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Code points other than "i", "m", "s" should not be case-folded to "i", "m", or "s" (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-İ:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-unicode-case-fold-s.js b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-unicode-case-fold-s.js new file mode 100644 index 0000000000..7c2f23c502 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-unicode-case-fold-s.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Code points other than "i", "m", "s" should not be case-folded to "i", "m", or "s" (arithmetic regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) + ... + +---*/ + +$DONOTEVALUATE(); + +/(?-ſ:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-code-point-repeat-i-1.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-code-point-repeat-i-1.js new file mode 100644 index 0000000000..ff0d589e26 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-code-point-repeat-i-1.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?ii:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-code-point-repeat-i-2.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-code-point-repeat-i-2.js new file mode 100644 index 0000000000..7975935725 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-code-point-repeat-i-2.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?imsi:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-arbitrary.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-arbitrary.js new file mode 100644 index 0000000000..6569bbef01 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-arbitrary.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?1:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-combining-i.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-combining-i.js new file mode 100644 index 0000000000..7d557532d8 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-combining-i.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?iͥ:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-combining-m.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-combining-m.js new file mode 100644 index 0000000000..a09130e2df --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-combining-m.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?mͫ:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-combining-s.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-combining-s.js new file mode 100644 index 0000000000..a83fe10f9d --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-combining-s.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?s̀:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-d.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-d.js new file mode 100644 index 0000000000..559b7b4566 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-d.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?d:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-g.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-g.js new file mode 100644 index 0000000000..92304ef165 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-g.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?g:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-non-display-1.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-non-display-1.js new file mode 100644 index 0000000000..102dee02bc Binary files /dev/null and b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-non-display-1.js differ diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-non-display-2.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-non-display-2.js new file mode 100644 index 0000000000..b005b43c67 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-non-display-2.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?s‎:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-non-flag.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-non-flag.js new file mode 100644 index 0000000000..d144b58bd1 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-non-flag.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?Q:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-u.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-u.js new file mode 100644 index 0000000000..94805b1c8e --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-u.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?u:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-uppercase-I.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-uppercase-I.js new file mode 100644 index 0000000000..a1bd269c61 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-uppercase-I.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?I:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-y.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-y.js new file mode 100644 index 0000000000..399f5d8837 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-y.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?y:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-zwj.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-zwj.js new file mode 100644 index 0000000000..5f3c392313 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-zwj.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?s‍:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-zwnbsp.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-zwnbsp.js new file mode 100644 index 0000000000..37b0bf301b --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-zwnbsp.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?s:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-zwnj.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-zwnj.js new file mode 100644 index 0000000000..5889fc154d --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-zwnj.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code point other than i, m, or s, or if it contains the same code point more than once. (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?s‌:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-case-fold-i.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-case-fold-i.js new file mode 100644 index 0000000000..0c50a15058 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-case-fold-i.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Code points other than "i", "m", "s" should not be case folded to "i", "m", or "s" (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?I:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-case-fold-m.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-case-fold-m.js new file mode 100644 index 0000000000..38e290647e --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-case-fold-m.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Code points other than "i", "m", "s" should not be case folded to "i", "m", or "s" (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?M:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-case-fold-s.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-case-fold-s.js new file mode 100644 index 0000000000..a2c4ba26db --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-case-fold-s.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Code points other than "i", "m", "s" should not be case folded to "i", "m", or "s" (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?S:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-case-fold-i.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-case-fold-i.js new file mode 100644 index 0000000000..3a4efff07d --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-case-fold-i.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Code points other than "i", "m", "s" should not be case-folded to "i", "m", or "s" (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?İ:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-case-fold-s.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-case-fold-s.js new file mode 100644 index 0000000000..32ebb024e2 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-case-fold-s.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Code points other than "i", "m", "s" should not be case-folded to "i", "m", or "s" (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?ſ:a)//*{ global-modifiers }*/; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-escape-i.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-escape-i.js new file mode 100644 index 0000000000..b2493e3855 --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-escape-i.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Source text cannot use unicode escape sequences to express code points "i", "m", "s" (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?\u0069:a)/u /* i */; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-escape-m.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-escape-m.js new file mode 100644 index 0000000000..cd1e66099c --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-escape-m.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Source text cannot use unicode escape sequences to express code points "i", "m", "s" (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?\u006D:a)/u /* m */; diff --git a/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-escape-s.js b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-escape-s.js new file mode 100644 index 0000000000..145ab4fe4a --- /dev/null +++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-escape-s.js @@ -0,0 +1,20 @@ +// |reftest| skip error:SyntaxError -- regexp-modifiers is not supported +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Source text cannot use unicode escape sequences to express code points "i", "m", "s" (regular expression flags) +esid: sec-patterns-static-semantics-early-errors +features: [regexp-modifiers] +negative: + phase: parse + type: SyntaxError +info: | + Atom :: ( ? RegularExpresisonFlags : Disjunction ) + It is a Syntax Error if the source text matched by RegularExpressionFlags contains any code points other than "i", "m", "s", or if it contains the same code point more than once. + +---*/ + +$DONOTEVALUATE(); + +/(?\u0073:a)/u /* s */; diff --git a/js/src/tests/test262/language/module-code/import-attributes/allow-nlt-before-with.js b/js/src/tests/test262/language/module-code/import-attributes/allow-nlt-before-with.js index ed6c329c92..73131843af 100644 --- a/js/src/tests/test262/language/module-code/import-attributes/allow-nlt-before-with.js +++ b/js/src/tests/test262/language/module-code/import-attributes/allow-nlt-before-with.js @@ -7,7 +7,7 @@ description: > esid: sec-modules info: | ImportDeclaration: - import ModuleSpecifier[no LineTerminator here] WithClause; + import ModuleSpecifier WithClause; WithClause: AttributesKeyword {} diff --git a/js/src/tests/test262/language/module-code/top-level-await/async-module-does-not-block-sibling-modules.js b/js/src/tests/test262/language/module-code/top-level-await/async-module-does-not-block-sibling-modules.js new file mode 100644 index 0000000000..c7c5e2f35f --- /dev/null +++ b/js/src/tests/test262/language/module-code/top-level-await/async-module-does-not-block-sibling-modules.js @@ -0,0 +1,17 @@ +// |reftest| module async +// Copyright (C) 2023 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-innermoduleevaluation +description: > + While an asynchronous module is waiting for a promise resolution, + sibling modules in the modules graph must be evaluated. +flags: [module, async] +features: [top-level-await] +---*/ + +import "./async-module-tla_FIXTURE.js"; +import { check } from "./async-module-sync_FIXTURE.js"; +assert.sameValue(check, false); +$DONE(); diff --git a/js/src/tests/test262/language/module-code/top-level-await/async-module-sync_FIXTURE.js b/js/src/tests/test262/language/module-code/top-level-await/async-module-sync_FIXTURE.js new file mode 100644 index 0000000000..a6595716be --- /dev/null +++ b/js/src/tests/test262/language/module-code/top-level-await/async-module-sync_FIXTURE.js @@ -0,0 +1,5 @@ +// |reftest| skip -- not a test file +// Copyright (C) 2023 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +export const { check } = globalThis; diff --git a/js/src/tests/test262/language/module-code/top-level-await/async-module-tla_FIXTURE.js b/js/src/tests/test262/language/module-code/top-level-await/async-module-tla_FIXTURE.js new file mode 100644 index 0000000000..b5a0b046b2 --- /dev/null +++ b/js/src/tests/test262/language/module-code/top-level-await/async-module-tla_FIXTURE.js @@ -0,0 +1,7 @@ +// |reftest| skip -- not a test file +// Copyright (C) 2023 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +globalThis.check = false; +await 0; +globalThis.check = true; diff --git a/js/src/tests/test262/language/statements/class/subclass/builtin-objects/TypedArray/regular-subclassing.js b/js/src/tests/test262/language/statements/class/subclass/builtin-objects/TypedArray/regular-subclassing.js index dc22b74e0f..69722f58e3 100644 --- a/js/src/tests/test262/language/statements/class/subclass/builtin-objects/TypedArray/regular-subclassing.js +++ b/js/src/tests/test262/language/statements/class/subclass/builtin-objects/TypedArray/regular-subclassing.js @@ -1,3 +1,4 @@ +// |reftest| shell-option(--enable-float16array) // Copyright (C) 2016 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- diff --git a/js/src/tests/test262/language/statements/class/subclass/builtin-objects/TypedArray/super-must-be-called.js b/js/src/tests/test262/language/statements/class/subclass/builtin-objects/TypedArray/super-must-be-called.js index 04b4638390..e75fbfe30b 100644 --- a/js/src/tests/test262/language/statements/class/subclass/builtin-objects/TypedArray/super-must-be-called.js +++ b/js/src/tests/test262/language/statements/class/subclass/builtin-objects/TypedArray/super-must-be-called.js @@ -1,3 +1,4 @@ +// |reftest| shell-option(--enable-float16array) // Copyright (C) 2016 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- -- cgit v1.2.3