Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Unified Diff: test/mjsunit/field-type-tracking.js

Issue 2598543003: [runtime][ic] Constant field tracking support. (Closed)
Patch Set: Addressing comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/compiler/concurrent-invalidate-transition-map.js ('k') | test/mjsunit/smi-representation.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/field-type-tracking.js
diff --git a/test/mjsunit/field-type-tracking.js b/test/mjsunit/field-type-tracking.js
index 447ec1590e9e2019a823bace97fca8c783e875ed..e6b19b9bbc864de66ad3b91ab3248e6d46bdb9f9 100644
--- a/test/mjsunit/field-type-tracking.js
+++ b/test/mjsunit/field-type-tracking.js
@@ -8,6 +8,9 @@
(function() {
var o = { text: "Hello World!" };
function A() {
+ // Assign twice to make the field non-constant.
+ // TODO(ishell): update test once constant field tracking is done.
+ this.a = {text: 'foo'};
this.a = o;
}
function readA(x) {
@@ -108,6 +111,9 @@
(function() {
function Foo(x) { this.x = x; }
+ // TODO(ishell): update test once constant field tracking is done.
+ var f0 = new Foo({x: 0});
+ f0.x = {x: 0}; // make Foo.x non-constant here.
var f1 = new Foo({x: 1});
var f2 = new Foo({x: 2});
var f3 = new Foo({x: 3});
@@ -144,7 +150,9 @@
function baz(f, y) { f.y = y; }
baz(f1, {y: 9});
baz(f2, {y: 9});
+ baz(f2, {y: 9});
%OptimizeFunctionOnNextCall(baz);
+ baz(f2, {y: 9});
baz(f3, {a: -1});
assertUnoptimized(baz);
})();
« no previous file with comments | « test/mjsunit/compiler/concurrent-invalidate-transition-map.js ('k') | test/mjsunit/smi-representation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698