| diff --git a/harness/atomicsHelper.js b/harness/atomicsHelper.js |
| index 9828b15..4a5919d 100644 |
| --- a/harness/atomicsHelper.js |
| +++ b/harness/atomicsHelper.js |
| @@ -272,10 +272,14 @@ $262.agent.waitUntil = function(typedArray, index, expected) { |
| * } |
| */ |
| $262.agent.timeouts = { |
| - yield: 100, |
| - small: 200, |
| - long: 1000, |
| - huge: 10000, |
| +// yield: 100, |
| +// small: 200, |
| +// long: 1000, |
| +// huge: 10000, |
| + yield: 40, |
| + small: 40, |
| + long: 200, |
| + huge: 1000, |
| }; |
| |
| /** |
| diff --git a/harness/regExpUtils.js b/harness/regExpUtils.js |
| index b397be0..c197ddc 100644 |
| --- a/harness/regExpUtils.js |
| +++ b/harness/regExpUtils.js |
| @@ -6,27 +6,30 @@ description: | |
| defines: [buildString, testPropertyEscapes, testPropertyOfStrings, testExtendedCharacterClass, matchValidator] |
| ---*/ |
| |
| +if ($262 && typeof $262.codePointRange === "function") { |
| + /* use C function to build the codePointRange (much faster with |
| + slow JS engines) */ |
| + codePointRange = $262.codePointRange; |
| +} else { |
| + codePointRange = function codePointRange(start, end) { |
| + const codePoints = []; |
| + let length = 0; |
| + for (codePoint = start; codePoint < end; codePoint++) { |
| + codePoints[length++] = codePoint; |
| + } |
| + return String.fromCodePoint.apply(null, codePoints); |
| + } |
| +} |
| + |
| 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; |
| let result = String.fromCodePoint.apply(null, loneCodePoints); |
| - for (let i = 0; i < ranges.length; i++) { |
| - let range = ranges[i]; |
| - let start = range[0]; |
| - let end = range[1]; |
| - let codePoints = []; |
| - for (let length = 0, codePoint = start; codePoint <= end; codePoint++) { |
| - codePoints[length++] = codePoint; |
| - if (length === CHUNK_SIZE) { |
| - result += String.fromCodePoint.apply(null, codePoints); |
| - codePoints.length = length = 0; |
| - } |
| - } |
| - result += String.fromCodePoint.apply(null, codePoints); |
| + for (const [start, end] of ranges) { |
| + result += codePointRange(start, end + 1); |
| } |
| return result; |
| } |
| diff --git a/harness/sm/non262.js b/harness/sm/non262.js |
| index c1829e3..3a3ee27 100644 |
| --- a/harness/sm/non262.js |
| +++ b/harness/sm/non262.js |
| @@ -41,8 +41,6 @@ globalThis.createNewGlobal = function() { |
| return $262.createRealm().global |
| } |
| |
| -function print(...args) { |
| -} |
| function assertEq(...args) { |
| assert.sameValue(...args) |
| } |
| @@ -71,4 +69,4 @@ if (globalThis.createExternalArrayBuffer === undefined) { |
| if (globalThis.enableGeckoProfilingWithSlowAssertions === undefined) { |
| globalThis.enableGeckoProfilingWithSlowAssertions = globalThis.enableGeckoProfiling = |
| globalThis.disableGeckoProfiling = () => {} |
| -} |
| \ No newline at end of file |
| +} |
| diff --git a/test/staging/sm/extensions/regress-469625-01.js b/test/staging/sm/extensions/regress-469625-01.js |
| index 5b62aeb..da07aae 100644 |
| --- a/test/staging/sm/extensions/regress-469625-01.js |
| +++ b/test/staging/sm/extensions/regress-469625-01.js |
| @@ -14,8 +14,7 @@ esid: pending |
| //----------------------------------------------------------------------------- |
| var BUGNUMBER = 469625; |
| var summary = 'TM: Array prototype and expression closures'; |
| -var actual = ''; |
| -var expect = ''; |
| +var actual = null; |
| |
| |
| //----------------------------------------------------------------------------- |
| @@ -27,9 +26,6 @@ function test() |
| printBugNumber(BUGNUMBER); |
| printStatus (summary); |
| |
| - expect = 'TypeError: [].__proto__ is not a function'; |
| - |
| - |
| Array.prototype.__proto__ = function () { return 3; }; |
| |
| try |
| @@ -38,8 +34,10 @@ function test() |
| } |
| catch(ex) |
| { |
| - print(actual = ex + ''); |
| + print(ex + ''); |
| + actual = ex; |
| } |
| |
| - assert.sameValue(expect, actual, summary); |
| + assert.sameValue(actual instanceof TypeError, true); |
| + assert.sameValue(actual.message.includes("not a function"), true); |
| } |
| diff --git a/test/staging/sm/misc/new-with-non-constructor.js b/test/staging/sm/misc/new-with-non-constructor.js |
| index 18c2f0c..f9aa209 100644 |
| --- a/test/staging/sm/misc/new-with-non-constructor.js |
| +++ b/test/staging/sm/misc/new-with-non-constructor.js |
| @@ -16,7 +16,7 @@ function checkConstruct(thing) { |
| new thing(); |
| assert.sameValue(0, 1, "not reached " + thing); |
| } catch (e) { |
| - assert.sameValue(e.message.includes(" is not a constructor") || |
| + assert.sameValue(e.message.includes("not a constructor") || |
| e.message === "Function.prototype.toString called on incompatible object", true); |
| } |
| } |