mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
[javascriptcore-test262-automation] Changes from https://github.com/webkit/webkit.git at sha 0cfa6086eb on Fri Nov 16 2018 18:57:37 GMT+0000 (Coordinated Universal Time)
This commit is contained in:
parent
2726142bb9
commit
5ccad79611
@ -1,17 +0,0 @@
|
|||||||
// Reviewed
|
|
||||||
Object.defineProperty(Array.prototype, '0', {
|
|
||||||
get() { },
|
|
||||||
set() { throw new Error(); }
|
|
||||||
});
|
|
||||||
|
|
||||||
var __v_7772 = "GGCCGGGTAAAGTGGCTCACGCCTGTAATCCCAGCACTTTACCCCCCGAGGCGGGCGGA";
|
|
||||||
var exception;
|
|
||||||
|
|
||||||
try {
|
|
||||||
__v_7772.match(/[cgt]gggtaaa|tttaccc[acg]/ig);
|
|
||||||
} catch (e) {
|
|
||||||
exception = e;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (exception != "Error")
|
|
||||||
throw "FAILED";
|
|
@ -0,0 +1,8 @@
|
|||||||
|
//@ runDefault("--useControlFlowProfiler=true")
|
||||||
|
|
||||||
|
function foo() {
|
||||||
|
for (var x in []) {
|
||||||
|
o[++x];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foo()
|
@ -0,0 +1,25 @@
|
|||||||
|
function assertEq(actual, expected) {
|
||||||
|
if (actual != expected)
|
||||||
|
throw ("Expected: " + expected + ", actual: " + actual);
|
||||||
|
}
|
||||||
|
|
||||||
|
var otherGlobal = $vm.createGlobalObject();
|
||||||
|
|
||||||
|
Array.prototype.__defineSetter__(7, () => {
|
||||||
|
arr[0] = { };
|
||||||
|
});
|
||||||
|
|
||||||
|
let arr = new otherGlobal.Array(1.1, 2.2, 3.3);
|
||||||
|
|
||||||
|
function foo(arr, regexp, str){
|
||||||
|
var result = regexp[Symbol.match](str);
|
||||||
|
arr[1] = 3.54484805889626e-310;
|
||||||
|
return arr[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
let regexp = /a/g;
|
||||||
|
for (let i = 0; i < 10000; i++)
|
||||||
|
foo(arr, regexp, "aaaa");
|
||||||
|
|
||||||
|
let r = foo(arr, regexp, "aaaaaaaa");
|
||||||
|
assertEq(arr[1], "3.54484805889626e-310");
|
@ -0,0 +1,27 @@
|
|||||||
|
function assertEq(actual, expected) {
|
||||||
|
if (actual != expected)
|
||||||
|
throw ("Expected: " + expected + ", actual: " + actual);
|
||||||
|
}
|
||||||
|
|
||||||
|
function foo(arr, regexp, str) {
|
||||||
|
regexp[Symbol.match](str);
|
||||||
|
arr[1] = 3.54484805889626e-310;
|
||||||
|
return arr[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
let arr = [1.1, 2.2, 3.3];
|
||||||
|
let regexp = /a/y;
|
||||||
|
|
||||||
|
for (let i = 0; i < 10000; i++)
|
||||||
|
foo(arr, regexp, "abcd");
|
||||||
|
|
||||||
|
regexp.lastIndex = {
|
||||||
|
valueOf: () => {
|
||||||
|
arr[0] = arr;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let result = foo(arr, regexp, "abcd");
|
||||||
|
|
||||||
|
assertEq(arr[1], "3.54484805889626e-310");
|
||||||
|
assertEq(result, ",3.54484805889626e-310,3.3");
|
Loading…
x
Reference in New Issue
Block a user