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
15 changes: 2 additions & 13 deletions src/coreclr/vm/jitinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1904,22 +1904,11 @@ CEEInfo::getHeapClassSize(
TypeHandle VMClsHnd(clsHnd);
MethodTable* pMT = VMClsHnd.GetMethodTable();
_ASSERTE(pMT);
_ASSERTE(!pMT->IsValueType());
_ASSERTE(!pMT->HasComponentSize());

#ifdef FEATURE_READYTORUN_COMPILER
_ASSERTE(!IsReadyToRunCompilation() || pMT->IsInheritanceChainLayoutFixedInCurrentVersionBubble());
#endif

// Add OBJECT_SIZE to account for method table pointer.
//
if (pMT->IsValueType())
{
result = VMClsHnd.GetSize() + OBJECT_SIZE;
}
else
{
result = pMT->GetNumInstanceFieldBytes() + OBJECT_SIZE;
}
result = pMT->GetNumInstanceFieldBytes() + OBJECT_SIZE;

EE_TO_JIT_TRANSITION_LEAF();
return result;
Expand Down