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

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

Issue 426233002: Land the Fan (disabled) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback, rebase and "git cl format" Created 6 years, 5 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/cctest/compiler/compiler/test-run-deopt.cc
diff --git a/test/cctest/compiler/compiler/test-run-deopt.cc b/test/cctest/compiler/compiler/test-run-deopt.cc
new file mode 100644
index 0000000000000000000000000000000000000000..36998d00050e149ab4329d26da545ad2437a0584
--- /dev/null
+++ b/test/cctest/compiler/compiler/test-run-deopt.cc
@@ -0,0 +1,39 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "v8.h"
+
+#include "function-tester.h"
+
+using namespace v8::internal;
+using namespace v8::internal::compiler;
+
+
+TEST(TurboSimpleDeopt) {
+ FLAG_allow_natives_syntax = true;
+ FLAG_turbo_deoptimization = true;
+
+ FunctionTester T(
+ "(function f(a) {"
+ "var b = 1;"
+ "if (!%IsOptimized()) return 0;"
+ "%DeoptimizeFunction(f);"
+ "if (%IsOptimized()) return 0;"
+ "return a + b; })");
+
+ T.CheckCall(T.Val(2), T.Val(1));
+}
+
+
+TEST(TurboTrivialDeopt) {
+ FLAG_allow_natives_syntax = true;
+ FLAG_turbo_deoptimization = true;
+
+ FunctionTester T(
+ "(function foo() {"
+ "%DeoptimizeFunction(foo);"
+ "return 1; })");
+
+ T.CheckCall(T.Val(1));
+}
« no previous file with comments | « test/cctest/compiler/compiler/test-representation-change.cc ('k') | test/cctest/compiler/compiler/test-run-intrinsics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698