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 "src/frames-inl.h" |
7 #include "test/cctest/compiler/function-tester.h" | 8 #include "test/cctest/compiler/function-tester.h" |
8 | 9 |
9 using namespace v8::internal; | 10 using namespace v8::internal; |
10 using namespace v8::internal::compiler; | 11 using namespace v8::internal::compiler; |
11 | 12 |
12 namespace { | 13 namespace { |
13 | 14 |
14 // Helper to determine inline count via JavaScriptFrame::GetFunctions. | 15 // Helper to determine inline count via JavaScriptFrame::GetFunctions. |
15 // Note that a count of 1 indicates that no inlining has occured. | 16 // Note that a count of 1 indicates that no inlining has occured. |
16 void AssertInlineCount(const v8::FunctionCallbackInfo<v8::Value>& args) { | 17 void AssertInlineCount(const v8::FunctionCallbackInfo<v8::Value>& args) { |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 " if (x == 1) return bar(42);" | 566 " if (x == 1) return bar(42);" |
566 " return x;" | 567 " return x;" |
567 " }" | 568 " }" |
568 " return foo;" | 569 " return foo;" |
569 "})();", | 570 "})();", |
570 kInlineFlags); | 571 kInlineFlags); |
571 | 572 |
572 InstallAssertInlineCountHelper(CcTest::isolate()); | 573 InstallAssertInlineCountHelper(CcTest::isolate()); |
573 T.CheckCall(T.Val(42), T.Val(1)); | 574 T.CheckCall(T.Val(42), T.Val(1)); |
574 } | 575 } |
OLD | NEW |