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

Unified Diff: test/mjsunit/elide-double-hole-check-3.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
Index: test/mjsunit/elide-double-hole-check-3.js
diff --git a/test/mjsunit/regress/regress-2451.js b/test/mjsunit/elide-double-hole-check-3.js
similarity index 88%
copy from test/mjsunit/regress/regress-2451.js
copy to test/mjsunit/elide-double-hole-check-3.js
index 465e4e68c26f3e3e119cbaf82d50c8f83c6efa9a..f8179403ec0db288dca74a4a889fd0771372c7b1 100644
--- a/test/mjsunit/regress/regress-2451.js
+++ b/test/mjsunit/elide-double-hole-check-3.js
@@ -27,15 +27,13 @@
// Flags: --allow-natives-syntax
-function f() {
- assertEquals(-1.0, Math.round(-1.5));
- assertEquals(-2.0, Math.round(-2.5));
- assertEquals(-1.0, Math.round(-0.5000000000000001));
+function f(a, i) {
+ return a[i] + 0.5;
}
-
-f();
-f();
+Array.prototype = [1.5,1.5,1.5];
+var arr = [0.0,,];
+assertEquals(0.5, f(arr, 0));
+assertEquals(0.5, f(arr, 0));
%OptimizeFunctionOnNextCall(f);
-f();
-assertTrue(%GetOptimizationStatus(f) != 2);
-
+assertEquals(0.5, f(arr, 0));
+assertEquals(NaN, f(arr, 1));

Powered by Google App Engine
This is Rietveld 408576698