Skip to content

Commit 41c04e7

Browse files
committed
Don't assert on tail calli, just do a non-tail call for now so the application will at least run (but potentially run out of stack)
1 parent 99c2048 commit 41c04e7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/coreclr/vm/interpexec.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1879,10 +1879,10 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr
18791879
goto CALL_INTERP_METHOD;
18801880
}
18811881

1882-
// Interpreter-FIXME: INTOP_CALLI_TAIL
1882+
case INTOP_CALLI_TAIL:
18831883
case INTOP_CALLI:
18841884
{
1885-
isTailcall = false;
1885+
isTailcall = (*ip == INTOP_CALLI_TAIL);
18861886
returnOffset = ip[1];
18871887
callArgsOffset = ip[2];
18881888
int32_t calliFunctionPointerVar = ip[3];
@@ -1891,6 +1891,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr
18911891
CallStubHeader *pCallStub = (CallStubHeader*)pMethod->pDataItems[calliCookie];
18921892
ip += 5;
18931893

1894+
// Interpreter-FIXME: isTailcall
18941895
InvokeCalliStub(LOCAL_VAR(calliFunctionPointerVar, PCODE), pCallStub, stack + callArgsOffset, stack + returnOffset);
18951896
break;
18961897
}
@@ -1991,7 +1992,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr
19911992
if (targetIp == NULL)
19921993
{
19931994
// If we didn't get the interpreter code pointer setup, then this is a method we need to invoke as a compiled method.
1994-
// Interpreter-FIXME: What do we do for tail call?
1995+
// Interpreter-FIXME: Implement tailcall via helpers, see https://github.com/dotnet/runtime/blob/main/docs/design/features/tailcalls-with-helpers.md
19951996
InvokeCompiledMethod(targetMethod, stack + callArgsOffset, stack + returnOffset, targetMethod->GetMultiCallableAddrOfCode(CORINFO_ACCESS_ANY));
19961997
break;
19971998
}

0 commit comments

Comments
 (0)