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

Unified Diff: test/mjsunit/regress/regress-array-pop-deopt.js

Issue 185653004: Experimental parser: merge to r19637 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 10 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/regress/regress-array-pop-deopt.js
diff --git a/test/mjsunit/regress/regress-crbug-242870.js b/test/mjsunit/regress/regress-array-pop-deopt.js
similarity index 87%
copy from test/mjsunit/regress/regress-crbug-242870.js
copy to test/mjsunit/regress/regress-array-pop-deopt.js
index 7183375ca811cedc81c870d34e694e98cf727f9b..9a0d35d3aa61b0bd3a05971b90f7c7544084d76c 100644
--- a/test/mjsunit/regress/regress-crbug-242870.js
+++ b/test/mjsunit/regress/regress-array-pop-deopt.js
@@ -1,4 +1,4 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
+// Copyright 2014 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -27,17 +27,15 @@
// Flags: --allow-natives-syntax
-var non_const_true = true;
+var o = [6,7,8,9];
-function f() {
- return (non_const_true || true && g());
+function f(b) {
+ var v = o.pop() + b;
+ return v;
}
-function g() {
- for (;;) {}
-}
-
-assertTrue(f());
-assertTrue(f());
+assertEquals(10, f(1));
+assertEquals(9, f(1));
+assertEquals(8, f(1));
%OptimizeFunctionOnNextCall(f);
-assertTrue(f());
+assertEquals("61", f("1"));
« no previous file with comments | « test/mjsunit/regress/regress-634-debug.js ('k') | test/mjsunit/regress/regress-check-eliminate-loop-phis.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698