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

Unified Diff: test/mjsunit/elide-double-hole-check-8.js

Issue 15014020: Elide hole checks on KeyedLoads of holey double arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Implement missing platforms and add tests Created 7 years, 7 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
« src/isolate.cc ('K') | « test/mjsunit/elide-double-hole-check-7.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/elide-double-hole-check-8.js
diff --git a/test/mjsunit/regress/regress-171641.js b/test/mjsunit/elide-double-hole-check-8.js
similarity index 84%
copy from test/mjsunit/regress/regress-171641.js
copy to test/mjsunit/elide-double-hole-check-8.js
index 8db6781821325f8f6253eb2df4abb2b362b001c0..35cc91fa8e977c2ac1cb37ac0c03410c5b34bf21 100644
--- a/test/mjsunit/regress/regress-171641.js
+++ b/test/mjsunit/elide-double-hole-check-8.js
@@ -27,14 +27,14 @@
// Flags: --allow-natives-syntax
-function foo(k, p) {
- for (var i = 0; i < 1; i++) {
- p = Math.min(p, i);
- }
- m = Math.floor((k | 0) / p);
+function f1(a, i) {
+ return a[i] + 0.5;
}
-
-foo(0, 1);
-foo(0, 1);
-%OptimizeFunctionOnNextCall(foo);
-foo(0, 1);
+var arr = [0.0,,2.5];
+assertEquals(0.5, f1(arr, 0));
+assertEquals(0.5, f1(arr, 0));
+%OptimizeFunctionOnNextCall(f1);
+assertEquals(0.5, f1(arr, 0));
+Array.prototype.__proto__ = new Object();
+Array.prototype.__proto__[1] = 1.5;
+assertEquals(2, f1(arr, 1));
« src/isolate.cc ('K') | « test/mjsunit/elide-double-hole-check-7.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698