summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/language')
-rw-r--r--js/src/tests/test262/language/expressions/assignment/S11.13.1_A7_T3.js28
-rw-r--r--js/src/tests/test262/language/expressions/assignment/target-member-computed-reference.js42
-rw-r--r--js/src/tests/test262/language/expressions/assignment/target-super-computed-reference.js51
-rw-r--r--js/src/tests/test262/language/global-code/script-decl-lex-var-declared-via-eval-sloppy.js32
-rw-r--r--js/src/tests/test262/language/global-code/script-decl-lex-var-declared-via-eval.js (renamed from js/src/tests/test262/language/global-code/script-decl-lex-var-declared-via-eval-strict-strict.js)17
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-i.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-m.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-multi-duplicate.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-s-escape.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-add-remove-s.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-both-empty.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-code-point-repeat-i-1.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-code-point-repeat-i-2.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-no-colon-1.js19
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-no-colon-2.js19
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-no-colon-3.js19
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-arbitrary.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-combining-i.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-combining-m.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-combining-s.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-d.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-g.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-display-1.jsbin0 -> 715 bytes
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-display-2.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-flag.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-u.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-uppercase-I.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-y.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-zwj.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-zwnbsp.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-zwnj.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-i.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-m.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-multi-duplicate.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-s-escape.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-s.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-code-point-repeat-i-1.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-code-point-repeat-i-2.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-arbitrary.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-combining-i.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-combining-m.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-combining-s.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-d.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-g.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-display-1.jsbin0 -> 715 bytes
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-display-2.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-flag.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-u.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-uppercase-I.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-y.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-zwj.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-zwnbsp.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-zwnj.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-case-fold-i.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-case-fold-m.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-case-fold-s.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-unicode-case-fold-i.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-unicode-case-fold-s.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-case-fold-i.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-case-fold-m.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-case-fold-s.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-unicode-case-fold-i.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-should-not-unicode-case-fold-s.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-code-point-repeat-i-1.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-code-point-repeat-i-2.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-arbitrary.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-combining-i.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-combining-m.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-combining-s.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-d.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-g.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-non-display-1.jsbin0 -> 853 bytes
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-non-display-2.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-non-flag.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-u.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-uppercase-I.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-y.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-zwj.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-zwnbsp.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-zwnj.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-case-fold-i.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-case-fold-m.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-case-fold-s.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-case-fold-i.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-case-fold-s.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-escape-i.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-escape-m.js20
-rw-r--r--js/src/tests/test262/language/literals/regexp/early-err-modifiers-should-not-unicode-escape-s.js20
-rw-r--r--js/src/tests/test262/language/module-code/import-attributes/allow-nlt-before-with.js2
-rw-r--r--js/src/tests/test262/language/module-code/top-level-await/async-module-does-not-block-sibling-modules.js17
-rw-r--r--js/src/tests/test262/language/module-code/top-level-await/async-module-sync_FIXTURE.js5
-rw-r--r--js/src/tests/test262/language/module-code/top-level-await/async-module-tla_FIXTURE.js7
-rw-r--r--js/src/tests/test262/language/statements/class/subclass/builtin-objects/TypedArray/regular-subclassing.js1
-rw-r--r--js/src/tests/test262/language/statements/class/subclass/builtin-objects/TypedArray/super-must-be-called.js1
94 files changed, 1736 insertions, 64 deletions
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.js
index 34c2685a80..a92cca7b41 100644
--- 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.js
@@ -1,10 +1,11 @@
-'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().
+description: No let binding collision with existing var declaration due to eval().
info: |
+ In strict mode:
+
PerformEval ( x, strictCaller, direct )
[...]
@@ -12,7 +13,17 @@ info: |
a. Let lexEnv be NewDeclarativeEnvironment(runningContext's LexicalEnvironment).
[...]
18. If strictEval is true, set varEnv to lexEnv.
-flags: [onlyStrict]
+
+ 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;');
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
--- /dev/null
+++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-display-1.js
Binary files 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
--- /dev/null
+++ b/js/src/tests/test262/language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-display-1.js
Binary files 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
--- /dev/null
+++ b/js/src/tests/test262/language/literals/regexp/early-err-modifiers-other-code-point-non-display-1.js
Binary files 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.
/*---