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

Side by Side Diff: test/cctest/compiler/test-run-inlining.cc

Issue 1146403008: [turbofan] Use Start as sentinel for frame states. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/compiler/verifier.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "test/cctest/compiler/function-tester.h" 7 #include "test/cctest/compiler/function-tester.h"
8 8
9 #if V8_TURBOFAN_TARGET 9 #if V8_TURBOFAN_TARGET
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 " function bar(s, t) { return foo(s); };" 71 " function bar(s, t) { return foo(s); };"
72 " return bar;" 72 " return bar;"
73 "})();", 73 "})();",
74 kInlineFlags); 74 kInlineFlags);
75 75
76 InstallAssertInlineCountHelper(CcTest::isolate()); 76 InstallAssertInlineCountHelper(CcTest::isolate());
77 T.CheckCall(T.Val(1), T.Val(1), T.Val(2)); 77 T.CheckCall(T.Val(1), T.Val(1), T.Val(2));
78 } 78 }
79 79
80 80
81 TEST(SimpleInliningDeoptSelf) {
82 FunctionTester T(
83 "(function(){"
84 " function foo(s) { %_DeoptimizeNow(); return s; };"
85 " function bar(s, t) { return foo(s); };"
86 " return bar;"
87 "})();",
88 kInlineFlags);
89
90 InstallAssertInlineCountHelper(CcTest::isolate());
91 T.CheckCall(T.Val(1), T.Val(1), T.Val(2));
92 }
93
94
81 TEST(SimpleInliningContext) { 95 TEST(SimpleInliningContext) {
82 FunctionTester T( 96 FunctionTester T(
83 "(function () {" 97 "(function () {"
84 " function foo(s) { AssertInlineCount(2); var x = 12; return s + x; };" 98 " function foo(s) { AssertInlineCount(2); var x = 12; return s + x; };"
85 " function bar(s, t) { return foo(s); };" 99 " function bar(s, t) { return foo(s); };"
86 " return bar;" 100 " return bar;"
87 "})();", 101 "})();",
88 kInlineFlags); 102 kInlineFlags);
89 103
90 InstallAssertInlineCountHelper(CcTest::isolate()); 104 InstallAssertInlineCountHelper(CcTest::isolate());
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 " 'use strong';" 532 " 'use strong';"
519 " function foo(x, y) { return x; }" 533 " function foo(x, y) { return x; }"
520 " function bar(x, y) { return foo(x); }" 534 " function bar(x, y) { return foo(x); }"
521 " return bar;" 535 " return bar;"
522 "})();", 536 "})();",
523 kInlineFlags); 537 kInlineFlags);
524 T.CheckThrows(T.undefined(), T.undefined()); 538 T.CheckThrows(T.undefined(), T.undefined());
525 } 539 }
526 540
527 #endif // V8_TURBOFAN_TARGET 541 #endif // V8_TURBOFAN_TARGET
OLDNEW
« no previous file with comments | « src/compiler/verifier.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698