summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/unboxed-object-clear-new-script.js
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 /js/src/jit-test/tests/basic/unboxed-object-clear-new-script.js
parent1cf7e63d993b0f41aecc3af7e0cd759c8b067df4 (diff)
downloadUXP-083d840f32e6cee08c709408160dcbc802b600fc.tar
UXP-083d840f32e6cee08c709408160dcbc802b600fc.tar.gz
UXP-083d840f32e6cee08c709408160dcbc802b600fc.tar.lz
UXP-083d840f32e6cee08c709408160dcbc802b600fc.tar.xz
UXP-083d840f32e6cee08c709408160dcbc802b600fc.zip
Remove unboxed object tests.
Diffstat (limited to 'js/src/jit-test/tests/basic/unboxed-object-clear-new-script.js')
-rw-r--r--js/src/jit-test/tests/basic/unboxed-object-clear-new-script.js49
1 files changed, 0 insertions, 49 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();