Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/coreclr/vm/wasm/calldescrworkerwasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,18 @@ extern "C" void STDCALL CallDescrWorkerInternal(CallDescrData* pCallDescrData)
retBuff = &pCallDescrData->returnValue;
}

ExecuteInterpretedMethodWithArgs((TADDR)targetIp, args, argsSize, retBuff, (PCODE)&CallDescrWorkerInternal);
if (targetIp == NULL)
{
// The target has no interpreter code because it is R2R (native Wasm) compiled.
// Dispatch to the native entry point via the interpreter-to-R2R thunk, mirroring
// ExecuteInterpretedMethodWithArgs_PortableEntryPoint_Complex. Calling the
// interpreter with a NULL target would not execute the method and would leave the
// return buffer aliasing the incoming arguments.
ManagedMethodParam param = { pMethod, args, (int8_t*)retBuff, (PCODE)NULL, NULL };
InvokeManagedMethod(&param);
Comment on lines +43 to +49
}
else
{
ExecuteInterpretedMethodWithArgs((TADDR)targetIp, args, argsSize, retBuff, (PCODE)&CallDescrWorkerInternal);
}
}
Loading