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

Unified Diff: test/mjsunit/elide-double-hole-check-2.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-2.js
diff --git a/test/mjsunit/regress/regress-crbug-173974.js b/test/mjsunit/elide-double-hole-check-2.js
similarity index 86%
copy from test/mjsunit/regress/regress-crbug-173974.js
copy to test/mjsunit/elide-double-hole-check-2.js
index 905bd6058a0ad0fe2ebe10e4c7dafbe9945cbe3b..978abc3bb0d2861a7afad59c719a16e6738fad92 100644
--- a/test/mjsunit/regress/regress-crbug-173974.js
+++ b/test/mjsunit/elide-double-hole-check-2.js
@@ -27,10 +27,15 @@
// Flags: --allow-natives-syntax
-function f() {
- var count = "";
- count[0] --;
+function f(a, i) {
+ return a[i] + 0.5;
}
-f();
+var arr = [0.0,,];
+assertEquals(0.5, f(arr, 0));
+assertEquals(0.5, f(arr, 0));
%OptimizeFunctionOnNextCall(f);
-f();
+assertEquals(0.5, f(arr, 0));
+assertEquals(NaN, f(arr, 1));
+arr.__proto__ = [1.5,1.5,1.5];
+assertEquals(2, f(arr, 1));
+assertEquals(0.5, f(arr, 0));

Powered by Google App Engine
This is Rietveld 408576698