| 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 | 9 #if V8_TURBOFAN_TARGET |
| 10 | 10 |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 " function bar() { return foo(); };" | 501 " function bar() { return foo(); };" |
| 502 " %SetInlineBuiltinFlag(foo);" | 502 " %SetInlineBuiltinFlag(foo);" |
| 503 " return bar;" | 503 " return bar;" |
| 504 "})();", | 504 "})();", |
| 505 kBuiltinInlineFlags); | 505 kBuiltinInlineFlags); |
| 506 | 506 |
| 507 InstallAssertInlineCountHelper(CcTest::isolate()); | 507 InstallAssertInlineCountHelper(CcTest::isolate()); |
| 508 T.CheckCall(T.true_value()); | 508 T.CheckCall(T.true_value()); |
| 509 } | 509 } |
| 510 | 510 |
| 511 |
| 512 TEST(InlineNestedBuiltin) { |
| 513 FLAG_turbo_deoptimization = true; |
| 514 FunctionTester T( |
| 515 "(function () {" |
| 516 " function foo(s,t,u) { AssertInlineCount(3); return true; }" |
| 517 " function baz(s,t,u) { return foo(s,t,u); }" |
| 518 " function bar() { return baz(); };" |
| 519 " %SetInlineBuiltinFlag(foo);" |
| 520 " %SetInlineBuiltinFlag(baz);" |
| 521 " return bar;" |
| 522 "})();", |
| 523 kBuiltinInlineFlags); |
| 524 |
| 525 InstallAssertInlineCountHelper(CcTest::isolate()); |
| 526 T.CheckCall(T.true_value()); |
| 527 } |
| 528 |
| 511 #endif // V8_TURBOFAN_TARGET | 529 #endif // V8_TURBOFAN_TARGET |
| OLD | NEW |