summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/unboxed-object-convert-to-native.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-convert-to-native.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-convert-to-native.js')
-rw-r--r--js/src/jit-test/tests/basic/unboxed-object-convert-to-native.js47
1 files changed, 0 insertions, 47 deletions
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();