| OLD | NEW |
| 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 | |
| 10 | |
| 11 using namespace v8::internal; | 9 using namespace v8::internal; |
| 12 using namespace v8::internal::compiler; | 10 using namespace v8::internal::compiler; |
| 13 | 11 |
| 14 namespace { | 12 namespace { |
| 15 | 13 |
| 16 // Helper to determine inline count via JavaScriptFrame::GetFunctions. | 14 // Helper to determine inline count via JavaScriptFrame::GetFunctions. |
| 17 // Note that a count of 1 indicates that no inlining has occured. | 15 // Note that a count of 1 indicates that no inlining has occured. |
| 18 void AssertInlineCount(const v8::FunctionCallbackInfo<v8::Value>& args) { | 16 void AssertInlineCount(const v8::FunctionCallbackInfo<v8::Value>& args) { |
| 19 StackTraceFrameIterator it(CcTest::i_isolate()); | 17 StackTraceFrameIterator it(CcTest::i_isolate()); |
| 20 int frames_seen = 0; | 18 int frames_seen = 0; |
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 " if (x == 1) return bar(42);" | 565 " if (x == 1) return bar(42);" |
| 568 " return x;" | 566 " return x;" |
| 569 " }" | 567 " }" |
| 570 " return foo;" | 568 " return foo;" |
| 571 "})();", | 569 "})();", |
| 572 kInlineFlags); | 570 kInlineFlags); |
| 573 | 571 |
| 574 InstallAssertInlineCountHelper(CcTest::isolate()); | 572 InstallAssertInlineCountHelper(CcTest::isolate()); |
| 575 T.CheckCall(T.Val(42), T.Val(1)); | 573 T.CheckCall(T.Val(42), T.Val(1)); |
| 576 } | 574 } |
| 577 | |
| 578 #endif // V8_TURBOFAN_TARGET | |
| OLD | NEW |