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

Unified Diff: test/mjsunit/regress/consolidated-holey-load.js

Issue 23761002: Merged r16205, r16220, r16237, r16249, r16262, r16269, r16273 into 3.20 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.20
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 | « test/mjsunit/compiler/regress-shared-deopt.js ('k') | test/mjsunit/regress/debug-prepare-step-in.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/consolidated-holey-load.js
diff --git a/test/mjsunit/constant-compare-nil-value.js b/test/mjsunit/regress/consolidated-holey-load.js
similarity index 83%
copy from test/mjsunit/constant-compare-nil-value.js
copy to test/mjsunit/regress/consolidated-holey-load.js
index 9f5b2adb063abc0c7920d8dee30edb7ee6eb1ff9..ef8f1ef14007440f370b724a2acaa6a974179302 100644
--- a/test/mjsunit/constant-compare-nil-value.js
+++ b/test/mjsunit/regress/consolidated-holey-load.js
@@ -27,16 +27,14 @@
// Flags: --allow-natives-syntax
-function inlined() {
- return 1;
+function foo(array) {
+ return array[0];
}
-function foo() {
- if ((inlined() + 0.5) == null) return "null";
- return "non-null";
-}
-
-assertEquals("non-null", foo());
-assertEquals("non-null", foo());
+var a = [1, 2, , 4]; // Holey Smi elements.
+var b = ["abcd", 0]; // Fast elements.
+foo(b); // Observe fast elements first, or the IC will transition without
+foo(a); // going polymorphic.
%OptimizeFunctionOnNextCall(foo);
-assertEquals("non-null", foo());
+var c = [, 0];
+assertEquals(undefined, foo(c)); // Elided hole check will leak the hole.
« no previous file with comments | « test/mjsunit/compiler/regress-shared-deopt.js ('k') | test/mjsunit/regress/debug-prepare-step-in.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698