updated test262.patch

This commit is contained in:
Fabrice Bellard 2024-05-30 15:49:31 +02:00
parent adec734346
commit d86aaf0b8f

View File

@ -1,8 +1,8 @@
diff --git a/harness/atomicsHelper.js b/harness/atomicsHelper.js diff --git a/harness/atomicsHelper.js b/harness/atomicsHelper.js
index 9c1217351e..3c24755558 100644 index 9828b15..4a5919d 100644
--- a/harness/atomicsHelper.js --- a/harness/atomicsHelper.js
+++ b/harness/atomicsHelper.js +++ b/harness/atomicsHelper.js
@@ -227,10 +227,14 @@ $262.agent.waitUntil = function(typedArray, index, expected) { @@ -272,10 +272,14 @@ $262.agent.waitUntil = function(typedArray, index, expected) {
* } * }
*/ */
$262.agent.timeouts = { $262.agent.timeouts = {
@ -22,11 +22,11 @@ index 9c1217351e..3c24755558 100644
/** /**
diff --git a/harness/regExpUtils.js b/harness/regExpUtils.js diff --git a/harness/regExpUtils.js b/harness/regExpUtils.js
index be7039fda0..7b38abf8df 100644 index b55f3c6..396bad4 100644
--- a/harness/regExpUtils.js --- a/harness/regExpUtils.js
+++ b/harness/regExpUtils.js +++ b/harness/regExpUtils.js
@@ -6,24 +6,27 @@ description: | @@ -6,27 +6,30 @@ description: |
defines: [buildString, testPropertyEscapes, matchValidator] defines: [buildString, testPropertyEscapes, testPropertyOfStrings, testExtendedCharacterClass, matchValidator]
---*/ ---*/
+if ($262 && typeof $262.codePointRange === "function") { +if ($262 && typeof $262.codePointRange === "function") {
@ -44,7 +44,12 @@ index be7039fda0..7b38abf8df 100644
+ } + }
+} +}
+ +
function buildString({ loneCodePoints, ranges }) { function buildString(args) {
// Use member expressions rather than destructuring `args` for improved
// compatibility with engines that only implement assignment patterns
// partially or not at all.
const loneCodePoints = args.loneCodePoints;
const ranges = args.ranges;
- const CHUNK_SIZE = 10000; - const CHUNK_SIZE = 10000;
- let result = Reflect.apply(String.fromCodePoint, null, loneCodePoints); - let result = Reflect.apply(String.fromCodePoint, null, loneCodePoints);
- for (let i = 0; i < ranges.length; i++) { - for (let i = 0; i < ranges.length; i++) {
@ -58,14 +63,11 @@ index be7039fda0..7b38abf8df 100644
- result += Reflect.apply(String.fromCodePoint, null, codePoints); - result += Reflect.apply(String.fromCodePoint, null, codePoints);
- codePoints.length = length = 0; - codePoints.length = length = 0;
- } - }
+ let result = String.fromCodePoint.apply(null, loneCodePoints); - }
+ for (const [start, end] of ranges) {
+ result += codePointRange(start, end + 1);
}
- result += Reflect.apply(String.fromCodePoint, null, codePoints); - result += Reflect.apply(String.fromCodePoint, null, codePoints);
- } + let result = String.fromCodePoint.apply(null, loneCodePoints);
- return result; + for (const [start, end] of ranges) {
+ return result; + result += codePointRange(start, end + 1);
}
return result;
} }
function testPropertyEscapes(regex, string, expression) {