Index: test/cctest/compiler/test-run-inlining.cc |
diff --git a/test/cctest/compiler/test-run-inlining.cc b/test/cctest/compiler/test-run-inlining.cc |
index 5fb460f69891c520d251a31742e2217e4a67a0d9..a6d76e4d578b9ebe4624324cf6ba027f36c40253 100644 |
--- a/test/cctest/compiler/test-run-inlining.cc |
+++ b/test/cctest/compiler/test-run-inlining.cc |
@@ -508,4 +508,22 @@ TEST(InlineBuiltin) { |
T.CheckCall(T.true_value()); |
} |
+ |
+TEST(InlineNestedBuiltin) { |
+ FLAG_turbo_deoptimization = true; |
+ FunctionTester T( |
+ "(function () {" |
+ " function foo(s,t,u) { AssertInlineCount(3); return true; }" |
+ " function baz(s,t,u) { return foo(s,t,u); }" |
+ " function bar() { return baz(); };" |
+ " %SetInlineBuiltinFlag(foo);" |
+ " %SetInlineBuiltinFlag(baz);" |
+ " return bar;" |
+ "})();", |
+ kBuiltinInlineFlags); |
+ |
+ InstallAssertInlineCountHelper(CcTest::isolate()); |
+ T.CheckCall(T.true_value()); |
+} |
+ |
#endif // V8_TURBOFAN_TARGET |