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

Unified Diff: test/cctest/compiler/test-run-deopt.cc

Issue 442253002: Add deoptimization translations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review comments. Created 6 years, 4 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/cctest/compiler/test-codegen-deopt.cc ('k') | test/cctest/compiler/test-scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-run-deopt.cc
diff --git a/test/cctest/compiler/test-run-deopt.cc b/test/cctest/compiler/test-run-deopt.cc
index dbf3dfb8eb236b08bb5864804009f74c2ee7065f..af173d6be6e5b917393ab4205b227902fb1f0798 100644
--- a/test/cctest/compiler/test-run-deopt.cc
+++ b/test/cctest/compiler/test-run-deopt.cc
@@ -9,6 +9,7 @@
using namespace v8::internal;
using namespace v8::internal::compiler;
+#if V8_TURBOFAN_TARGET
TEST(TurboSimpleDeopt) {
FLAG_allow_natives_syntax = true;
@@ -26,6 +27,24 @@ TEST(TurboSimpleDeopt) {
}
+TEST(TurboSimpleDeoptInExpr) {
+ FLAG_allow_natives_syntax = true;
+ FLAG_turbo_deoptimization = true;
+
+ FunctionTester T(
+ "(function f(a) {"
+ "var b = 1;"
+ "var c = 2;"
+ "if (!%IsOptimized()) return 0;"
+ "var d = b + (%DeoptimizeFunction(f), c);"
+ "if (%IsOptimized()) return 0;"
+ "return d + a; })");
+
+ T.CheckCall(T.Val(6), T.Val(3));
+}
+
+#endif
+
TEST(TurboTrivialDeopt) {
FLAG_allow_natives_syntax = true;
FLAG_turbo_deoptimization = true;
« no previous file with comments | « test/cctest/compiler/test-codegen-deopt.cc ('k') | test/cctest/compiler/test-scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698