| 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 19b96bad504afd5277650e147da1e7566da59417..783ed5471e161fbd19d79859c05d0a07f3f21df1 100644
|
| --- a/test/cctest/compiler/test-run-inlining.cc
|
| +++ b/test/cctest/compiler/test-run-inlining.cc
|
| @@ -320,6 +320,53 @@ TEST(InlineLoopGuardedTwice) {
|
| }
|
|
|
|
|
| +TEST(InlineLoopUnguardedEmpty) {
|
| + FLAG_turbo_deoptimization = true;
|
| + FunctionTester T(
|
| + "(function () {"
|
| + " function foo(s) { AssertInlineCount(2); while (s); return s; };"
|
| + " function bar(s, t) { return foo(s); };"
|
| + " return bar;"
|
| + "})();",
|
| + kInlineFlags);
|
| +
|
| + InstallAssertInlineCountHelper(CcTest::isolate());
|
| + T.CheckCall(T.Val(0.0), T.Val(0.0), T.Val(4));
|
| +}
|
| +
|
| +
|
| +TEST(InlineLoopUnguardedOnce) {
|
| + FLAG_turbo_deoptimization = true;
|
| + FunctionTester T(
|
| + "(function () {"
|
| + " function foo(s) { AssertInlineCount(2); while (s) {"
|
| + " s = s - 1; }; return s; };"
|
| + " function bar(s, t) { return foo(s); };"
|
| + " return bar;"
|
| + "})();",
|
| + kInlineFlags);
|
| +
|
| + InstallAssertInlineCountHelper(CcTest::isolate());
|
| + T.CheckCall(T.Val(0.0), T.Val(0.0), T.Val(4));
|
| +}
|
| +
|
| +
|
| +TEST(InlineLoopUnguardedTwice) {
|
| + FLAG_turbo_deoptimization = true;
|
| + FunctionTester T(
|
| + "(function () {"
|
| + " function foo(s) { AssertInlineCount(2); while (s > 0) {"
|
| + " s = s - 1; }; return s; };"
|
| + " function bar(s,t) { return foo(foo(s,t),t); };"
|
| + " return bar;"
|
| + "})();",
|
| + kInlineFlags);
|
| +
|
| + InstallAssertInlineCountHelper(CcTest::isolate());
|
| + T.CheckCall(T.Val(0.0), T.Val(0.0), T.Val(4));
|
| +}
|
| +
|
| +
|
| TEST(InlineStrictIntoNonStrict) {
|
| FLAG_turbo_deoptimization = true;
|
| FunctionTester T(
|
|
|