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

Unified Diff: test/mjsunit/regress/regress-deopt-in-array-literal-spread.js

Issue 1455953002: [turbofan] Fix deoptimization from array literal spread. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Skip ignition. Created 5 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 | « test/mjsunit/mjsunit.status ('k') | test/mjsunit/regress/regress-osr-in-literal.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-deopt-in-array-literal-spread.js
diff --git a/test/mjsunit/compiler/eager-deopt-simple.js b/test/mjsunit/regress/regress-deopt-in-array-literal-spread.js
similarity index 56%
copy from test/mjsunit/compiler/eager-deopt-simple.js
copy to test/mjsunit/regress/regress-deopt-in-array-literal-spread.js
index 067400cfc629bdd28b58540f45bcc9dc1c36ecbb..8bebbe27f5824f96064cc7f379bc599824328b81 100644
--- a/test/mjsunit/compiler/eager-deopt-simple.js
+++ b/test/mjsunit/regress/regress-deopt-in-array-literal-spread.js
@@ -4,15 +4,9 @@
// Flags: --allow-natives-syntax
-function g(a, b, c) {
- return a + b + c;
-}
+function f(a,b,c,d) { return [a, ...(%DeoptimizeNow(), [b,c]), d]; }
-function f() {
- return g(1, (%_DeoptimizeNow(), 2), 3);
-}
-
-f();
-f();
+assertEquals([1,2,3,4], f(1,2,3,4));
+assertEquals([1,2,3,4], f(1,2,3,4));
%OptimizeFunctionOnNextCall(f);
-assertEquals(6, f());
+assertEquals([1,2,3,4], f(1,2,3,4));
« no previous file with comments | « test/mjsunit/mjsunit.status ('k') | test/mjsunit/regress/regress-osr-in-literal.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698