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

Unified Diff: test/mjsunit/load_poly_effect.js

Issue 22213002: Replace LoadNamedFieldPolymorphic with explicit branches. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 | « src/x64/lithium-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/load_poly_effect.js
diff --git a/test/mjsunit/array-non-smi-length.js b/test/mjsunit/load_poly_effect.js
similarity index 82%
copy from test/mjsunit/array-non-smi-length.js
copy to test/mjsunit/load_poly_effect.js
index 23a25ee797bd68690ad2a7ce26a9135e23b486e2..7663d86ad0fba67afabc751af8254d92542c00b3 100644
--- a/test/mjsunit/array-non-smi-length.js
+++ b/test/mjsunit/load_poly_effect.js
@@ -27,20 +27,21 @@
// Flags: --allow-natives-syntax
-function TestNonSmiArrayLength() {
- function f(a) {
- return a.length+1;
- }
+var o = {};
+var count = 0;
+Object.defineProperty(o, "x", {get:function(){count++;return 100}});
- var a = [];
- a.length = 0xFFFF;
- assertSame(0x10000, f(a));
- assertSame(0x10000, f(a));
-
- %OptimizeFunctionOnNextCall(f);
- a.length = 0xFFFFFFFF;
- assertSame(0x100000000, f(a));
+function load(o, o2) {
+ return 1 + (o.x, o2.x_tagged);
}
-TestNonSmiArrayLength();
+var deopt = false;
+var o2 = {x_tagged:{}};
+o2.x_tagged = 1;
+load({x:1}, o2);
+load({x:1}, o2);
+print(load(o, o2));
+%OptimizeFunctionOnNextCall(load);
+o2.x_tagged = true;
+print(load(o, o2));
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698