Bug 1406146 - Add jsshell test for WindowProxy ICs. r=jandem
authorTed Campbell <tcampbell@mozilla.com>
Wed, 10 Apr 2019 12:50:03 +0000
changeset 468819 32cbcac2b40a061701bb8a9ab9fb5c6d47f30d37
parent 468818 dc43810c71fd7969ddae1f9cf4fc35736c50ba1b
child 468820 c64199fb6020ac6a0fd093d7de961b4fafc21270
push id112755
push userdvarga@mozilla.com
push dateWed, 10 Apr 2019 22:06:41 +0000
treeherdermozilla-inbound@606f85641d0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1406146
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1406146 - Add jsshell test for WindowProxy ICs. r=jandem Depends on D26837 Differential Revision: https://phabricator.services.mozilla.com/D26838
js/src/jit-test/tests/cacheir/windowproxy.js
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/cacheir/windowproxy.js
@@ -0,0 +1,32 @@
+
+var g = newGlobal({
+    sameZoneAs: this,
+    useWindowProxy: true,
+});
+
+g.evaluate(`
+    this.data = 7;
+
+    // Getter / Setter
+    Object.defineProperty(this, "prop", {
+        get: function() { return this.data; },
+        set: function(val) { this.data = val; },
+    });
+
+    // Getter / Setter ICs
+    for (var i = 0; i < 20; ++i) {
+        this.data = i;
+        assertEq(prop, i);
+        prop = i;
+        assertEq(this.prop, i);
+        this.prop = i;
+        assertEq(this.data, i);
+    }
+`);
+
+
+// CCW of WindowProxy
+for (var i = 0; i < 20; ++i) {
+    g.slot = i;
+    assertEq(g.slot, i);
+}