summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-06-25 20:18:14 +0000
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-06-25 20:18:14 +0000
commit083d840f32e6cee08c709408160dcbc802b600fc (patch)
tree4f77e7a71fff3b2999de947b0851c9601a428742
parent1cf7e63d993b0f41aecc3af7e0cd759c8b067df4 (diff)
downloadUXP-083d840f32e6cee08c709408160dcbc802b600fc.tar
UXP-083d840f32e6cee08c709408160dcbc802b600fc.tar.gz
UXP-083d840f32e6cee08c709408160dcbc802b600fc.tar.lz
UXP-083d840f32e6cee08c709408160dcbc802b600fc.tar.xz
UXP-083d840f32e6cee08c709408160dcbc802b600fc.zip
Remove unboxed object tests.
-rw-r--r--js/src/jit-test/tests/basic/unboxed-object-clear-new-script.js49
-rw-r--r--js/src/jit-test/tests/basic/unboxed-object-convert-to-native.js47
-rw-r--r--js/src/jit-test/tests/basic/unboxed-object-getelem.js20
-rw-r--r--js/src/jit-test/tests/basic/unboxed-object-set-property.js31
-rw-r--r--js/src/jit-test/tests/basic/unboxed-property-enumeration.js24
-rw-r--r--js/src/jit-test/tests/ion/unboxed-objects-invalidate.js16
6 files changed, 0 insertions, 187 deletions
diff --git a/js/src/jit-test/tests/basic/unboxed-object-clear-new-script.js b/js/src/jit-test/tests/basic/unboxed-object-clear-new-script.js
deleted file mode 100644
index f55456222..000000000
--- a/js/src/jit-test/tests/basic/unboxed-object-clear-new-script.js
+++ /dev/null
@@ -1,49 +0,0 @@
-
-function Foo(a, b) {
- this.a = a;
- this.b = b;
-}
-
-function invalidate_foo() {
- var a = [];
- var counter = 0;
- for (var i = 0; i < 50; i++)
- a.push(new Foo(i, i + 1));
- Object.defineProperty(Foo.prototype, "a", {configurable: true, set: function() { counter++; }});
- for (var i = 0; i < 50; i++)
- a.push(new Foo(i, i + 1));
- delete Foo.prototype.a;
- var total = 0;
- for (var i = 0; i < a.length; i++) {
- assertEq('a' in a[i], i < 50);
- total += a[i].b;
- }
- assertEq(total, 2550);
- assertEq(counter, 50);
-}
-invalidate_foo();
-
-function Bar(a, b, fn) {
- this.a = a;
- if (b == 30)
- Object.defineProperty(Bar.prototype, "b", {configurable: true, set: fn});
- this.b = b;
-}
-
-function invalidate_bar() {
- var a = [];
- var counter = 0;
- function fn() { counter++; }
- for (var i = 0; i < 50; i++)
- a.push(new Bar(i, i + 1, fn));
- delete Bar.prototype.b;
- var total = 0;
- for (var i = 0; i < a.length; i++) {
- assertEq('a' in a[i], true);
- assertEq('b' in a[i], i < 29);
- total += a[i].a;
- }
- assertEq(total, 1225);
- assertEq(counter, 21);
-}
-invalidate_bar();
diff --git a/js/src/jit-test/tests/basic/unboxed-object-convert-to-native.js b/js/src/jit-test/tests/basic/unboxed-object-convert-to-native.js
deleted file mode 100644
index 691fe166c..000000000
--- a/js/src/jit-test/tests/basic/unboxed-object-convert-to-native.js
+++ /dev/null
@@ -1,47 +0,0 @@
-
-// Test various ways of converting an unboxed object to native.
-
-function Foo(a, b) {
- this.a = a;
- this.b = b;
-}
-
-var proxyObj = {
- get: function(recipient, name) {
- return recipient[name] + 2;
- }
-};
-
-function f() {
- var a = [];
- for (var i = 0; i < 50; i++)
- a.push(new Foo(i, i + 1));
-
- var prop = "a";
-
- i = 0;
- for (; i < 5; i++)
- a[i].c = i;
- for (; i < 10; i++)
- Object.defineProperty(a[i], 'c', {value: i});
- for (; i < 15; i++)
- a[i] = new Proxy(a[i], proxyObj);
- for (; i < 20; i++)
- a[i].a = 3.5;
- for (; i < 25; i++)
- delete a[i].b;
- for (; i < 30; i++)
- a[prop] = 4;
-
- var total = 0;
- for (i = 0; i < a.length; i++) {
- if ('a' in a[i])
- total += a[i].a;
- if ('b' in a[i])
- total += a[i].b;
- if ('c' in a[i])
- total += a[i].c;
- }
- assertEq(total, 2382.5);
-}
-f();
diff --git a/js/src/jit-test/tests/basic/unboxed-object-getelem.js b/js/src/jit-test/tests/basic/unboxed-object-getelem.js
deleted file mode 100644
index b30b8325a..000000000
--- a/js/src/jit-test/tests/basic/unboxed-object-getelem.js
+++ /dev/null
@@ -1,20 +0,0 @@
-
-function f() {
- var propNames = ["a","b","c","d","e","f","g","h","i","j","x","y"];
- var arr = [];
- for (var i=0; i<64; i++)
- arr.push({x:1, y:2});
- for (var i=0; i<64; i++) {
- // Make sure there are expandos with dynamic slots for each object.
- for (var j = 0; j < propNames.length; j++)
- arr[i][propNames[j]] = j;
- }
- var res = 0;
- for (var i=0; i<100000; i++) {
- var o = arr[i % 64];
- var p = propNames[i % propNames.length];
- res += o[p];
- }
- assertEq(res, 549984);
-}
-f();
diff --git a/js/src/jit-test/tests/basic/unboxed-object-set-property.js b/js/src/jit-test/tests/basic/unboxed-object-set-property.js
deleted file mode 100644
index fdcfcf6b2..000000000
--- a/js/src/jit-test/tests/basic/unboxed-object-set-property.js
+++ /dev/null
@@ -1,31 +0,0 @@
-
-// Use the correct receiver when non-native objects are prototypes of other objects.
-
-function Thing(a, b) {
- this.a = a;
- this.b = b;
-}
-
-function foo() {
- var array = [];
- for (var i = 0; i < 10000; i++)
- array.push(new Thing(i, i + 1));
-
- var proto = new Thing(1, 2);
- var obj = Object.create(proto);
-
- Object.defineProperty(Thing.prototype, "c", {set:function() { this.d = 0; }});
- obj.c = 3;
- assertEq(obj.c, undefined);
- assertEq(obj.d, 0);
- assertEq(obj.hasOwnProperty("d"), true);
- assertEq(proto.d, undefined);
- assertEq(proto.hasOwnProperty("d"), false);
-
- obj.a = 3;
- assertEq(obj.a, 3);
- assertEq(proto.a, 1);
- assertEq(obj.hasOwnProperty("a"), true);
-}
-
-foo();
diff --git a/js/src/jit-test/tests/basic/unboxed-property-enumeration.js b/js/src/jit-test/tests/basic/unboxed-property-enumeration.js
deleted file mode 100644
index 142d932dd..000000000
--- a/js/src/jit-test/tests/basic/unboxed-property-enumeration.js
+++ /dev/null
@@ -1,24 +0,0 @@
-function O() {
- this.x = 1;
- this.y = 2;
-}
-function testUnboxed() {
- var arr = [];
- for (var i=0; i<100; i++)
- arr.push(new O);
-
- var o = arr[arr.length-1];
- o[0] = 0;
- o[2] = 2;
- var sym = Symbol();
- o[sym] = 1;
- o.z = 3;
- Object.defineProperty(o, '3', {value:1,enumerable:false,configurable:false,writable:false});
- o[4] = 4;
-
- var props = Reflect.ownKeys(o);
- assertEq(props[props.length-1], sym);
-
- assertEq(Object.getOwnPropertyNames(o).join(""), "0234xyz");
-}
-testUnboxed();
diff --git a/js/src/jit-test/tests/ion/unboxed-objects-invalidate.js b/js/src/jit-test/tests/ion/unboxed-objects-invalidate.js
deleted file mode 100644
index 02e27614f..000000000
--- a/js/src/jit-test/tests/ion/unboxed-objects-invalidate.js
+++ /dev/null
@@ -1,16 +0,0 @@
-
-var a = [];
-for (var i = 0; i < 2000; i++)
- a.push({f:i});
-
-function f() {
- var total = 0;
- for (var i = 0; i < a.length; i++)
- total += a[i].f;
- return total;
-}
-assertEq(f(), 1999000);
-
-var sub = Object.create(a[0]);
-
-assertEq(f(), 1999000);