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

Unified Diff: test/mjsunit/regress/regress-crbug-374838.js

Issue 299713003: Fix ArrayShift hydrogen support (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
« no previous file with comments | « src/hydrogen-instructions.h ('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-crbug-374838.js
diff --git a/test/mjsunit/regress/regress-361608.js b/test/mjsunit/regress/regress-crbug-374838.js
similarity index 57%
copy from test/mjsunit/regress/regress-361608.js
copy to test/mjsunit/regress/regress-crbug-374838.js
index b3cc90cfd4b06afb3c7424758e23f91d685e3aa2..614b4d9a877fb3b52fe920c74e4ea8c1d19fad93 100644
--- a/test/mjsunit/regress/regress-361608.js
+++ b/test/mjsunit/regress/regress-crbug-374838.js
@@ -4,17 +4,17 @@
// Flags: --allow-natives-syntax
-function f() {};
-int_array = [1];
-
function foo() {
- var x;
- for (var i = -1; i < 0; i++) {
- x = int_array[i + 1];
- f(function() { x = i; });
+ var a = [0];
+ result = 0;
+ for (var i = 0; i < 4; i++) {
+ result += a.length;
+ a.shift();
}
+ return result;
}
-foo();
+assertEquals(1, foo());
+assertEquals(1, foo());
%OptimizeFunctionOnNextCall(foo);
-foo();
+assertEquals(1, foo());
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698