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

Unified Diff: test/mjsunit/compiler/escape-analysis-deopt-5.js

Issue 1485183002: [turbofan] Deopt support for escape analysis (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@ea-local
Patch Set: Rebase Created 4 years, 11 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/escape-analysis-deopt-4.js ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/escape-analysis-deopt-5.js
diff --git a/test/mjsunit/compiler/escape-analysis-1.js b/test/mjsunit/compiler/escape-analysis-deopt-5.js
similarity index 84%
copy from test/mjsunit/compiler/escape-analysis-1.js
copy to test/mjsunit/compiler/escape-analysis-deopt-5.js
index b8c66448dca61d1be0fefb6491d49b75a46a76b7..e70f0b1221bd9ab9b33c72da70db4a38897fe34b 100644
--- a/test/mjsunit/compiler/escape-analysis-1.js
+++ b/test/mjsunit/compiler/escape-analysis-deopt-5.js
@@ -1,4 +1,4 @@
-// Copyright 2015 the V8 project authors. All rights reserved.
+// Copyright 2016 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:
@@ -26,18 +26,16 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --turbo-escape
-//
-
-function f(a) {
- "use strict";
- return arguments.length;
-}
-function g() {
- return f(1,2,3);
+function f() {
+ var x = new Array(2);
+ x[0] = 23.1234;
+ x[1] = 25.1234;
+ %DeoptimizeNow();
+ return x[0];
}
-assertEquals(3, g());
-assertEquals(3, g());
-%OptimizeFunctionOnNextCall(g);
-assertEquals(3, g());
+assertEquals(f(), 23.1234);
+assertEquals(f(), 23.1234);
+%OptimizeFunctionOnNextCall(f);
+assertEquals(f(), 23.1234);
« no previous file with comments | « test/mjsunit/compiler/escape-analysis-deopt-4.js ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698