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

Unified Diff: test/mjsunit/regress/regress-662904.js

Issue 2476423003: [crankshaft] FIx for in deopt at the end of the loop. (Closed)
Patch Set: Also check warm-up Created 4 years, 1 month 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/crankshaft/hydrogen.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-662904.js
diff --git a/test/mjsunit/regress/regress-3650-3.js b/test/mjsunit/regress/regress-662904.js
similarity index 60%
copy from test/mjsunit/regress/regress-3650-3.js
copy to test/mjsunit/regress/regress-662904.js
index 013e4df2834e20435982300303eb6260eb41b2be..00ab1cd65fad58a3d9cc283bad20ced18c317fca 100644
--- a/test/mjsunit/regress/regress-3650-3.js
+++ b/test/mjsunit/regress/regress-662904.js
@@ -5,13 +5,15 @@
// Flags: --allow-natives-syntax
function foo(a) {
- for (var d in a) {
- delete a[1];
+ var sum = 0;
+ var a = [0, "a"];
+ for (var i in a) {
+ sum += a[i];
}
+ return sum;
}
-foo([1,2,3]);
-foo([2,3,4]);
+assertEquals("0a", foo());
+assertEquals("0a", foo());
%OptimizeFunctionOnNextCall(foo);
-foo([1,2,3]);
-assertOptimized(foo);
+assertEquals("0a", foo());
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698