Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,20 @@ internal static void InitClassSlow(MethodTable* mt)
}

[DebuggerHidden]
private static void InitClass(MethodTable* mt)
private static void* InitClass(MethodTable* mt)
{
if (mt->AuxiliaryData->IsClassInited)
return;
else
if (!mt->AuxiliaryData->IsClassInited)
InitClassSlow(mt);

// The InitClass JIT helper is modeled as value-returning by the JIT and interpreter
// (the result is pushed and then discarded). On targets that use portable entry points
// (wasm), the call_indirect signature must match the compiled method exactly, including
// return arity, so this helper returns a (dummy) value rather than void.
return null;
}

[DebuggerHidden]
private static void InitInstantiatedClass(MethodTable* mt, MethodDesc* methodDesc)
private static void* InitInstantiatedClass(MethodTable* mt, MethodDesc* methodDesc)
{
MethodTable *pTemplateMT = methodDesc->MethodTable;
MethodTable *pMT;
Expand All @@ -45,10 +49,11 @@ private static void InitInstantiatedClass(MethodTable* mt, MethodDesc* methodDes
pMT = pTemplateMT;
}

if (pMT->AuxiliaryData->IsClassInitedAndActive)
return;
else
if (!pMT->AuxiliaryData->IsClassInitedAndActive)
InitClassSlow(pMT);

// See the comment in InitClass for why this helper returns a value rather than void.
return null;
}

[DebuggerHidden]
Expand Down
Loading