Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Remove testForFixup
  • Loading branch information
EgorBo committed Mar 15, 2023
commit 0e95e4b0cbea23ed7c660bfc7e6ad3192c43539b
3 changes: 0 additions & 3 deletions src/coreclr/inc/corinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -1268,9 +1268,6 @@ struct CORINFO_RUNTIME_LOOKUP
// If set, test for null and branch to helper if null
bool testForNull;

// If set, test the lowest bit and dereference if set (see code:FixupPointer)
bool testForFixup;

uint16_t sizeOffset;
size_t offsets[CORINFO_MAXINDIRECTIONS];

Expand Down
10 changes: 5 additions & 5 deletions src/coreclr/inc/jiteeversionguid.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ typedef const GUID *LPCGUID;
#define GUID_DEFINED
#endif // !GUID_DEFINED

constexpr GUID JITEEVersionIdentifier = { /* b0e1ce41-2339-491d-ab72-736a8d233ea1 */
0xb0e1ce41,
0x2339,
0x491d,
{0xab, 0x72, 0x73, 0x6a, 0x8d, 0x23, 0x3e, 0xa1}
constexpr GUID JITEEVersionIdentifier = { /* 3a8a07e7-928e-4281-ab68-cd4017c1141b */
0x3a8a07e7,
0x928e,
0x4281,
{0xab, 0x68, 0xcd, 0x40, 0x17, 0xc1, 0x14, 0x1b}
};

//////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/jit/importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1837,7 +1837,6 @@ GenTree* Compiler::impRuntimeLookupToTree(CORINFO_RESOLVED_TOKEN* pResolvedToken
slotPtrTree = gtNewOperNode(GT_IND, TYP_I_IMPL, slotPtrTree);
slotPtrTree->gtFlags |= GTF_IND_NONFAULTING;

assert(!pRuntimeLookup->testForFixup);
return slotPtrTree;
}

Expand Down
3 changes: 1 addition & 2 deletions src/coreclr/jit/morph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7047,7 +7047,7 @@ GenTree* Compiler::getRuntimeLookupTree(CORINFO_RESOLVED_TOKEN* pResolvedToken,
// If pRuntimeLookup->indirections is equal to CORINFO_USEHELPER, it specifies that a run-time helper should be
// used; otherwise, it specifies the number of indirections via pRuntimeLookup->offsets array.
if ((pRuntimeLookup->indirections == CORINFO_USEHELPER) || (pRuntimeLookup->indirections == CORINFO_USENULL) ||
pRuntimeLookup->testForNull || pRuntimeLookup->testForFixup)
pRuntimeLookup->testForNull)
{
return gtNewRuntimeLookupHelperCallNode(pRuntimeLookup,
getRuntimeContextTree(pLookup->lookupKind.runtimeLookupKind),
Expand Down Expand Up @@ -7105,7 +7105,6 @@ GenTree* Compiler::getRuntimeLookupTree(CORINFO_RESOLVED_TOKEN* pResolvedToken,
assert(!pRuntimeLookup->testForNull);
if (pRuntimeLookup->indirections > 0)
{
assert(!pRuntimeLookup->testForFixup);
result = gtNewOperNode(GT_IND, TYP_I_IMPL, result);
result->gtFlags |= GTF_IND_NONFAULTING;
}
Expand Down
4 changes: 0 additions & 4 deletions src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,6 @@ public unsafe struct CORINFO_RUNTIME_LOOKUP
public byte _testForNull;
public bool testForNull { get { return _testForNull != 0; } set { _testForNull = value ? (byte)1 : (byte)0; } }

// If set, test the lowest bit and dereference if set (see code:FixupPointer)
public byte _testForFixup;
public bool testForFixup { get { return _testForFixup != 0; } set { _testForFixup = value ? (byte)1 : (byte)0; } }

public ushort sizeOffset;
public IntPtr offset0;
public IntPtr offset1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ private void ComputeLookup(ref CORINFO_RESOLVED_TOKEN pResolvedToken, object ent
lookup.runtimeLookup.offset1 = IntPtr.Zero;
}
lookup.runtimeLookup.sizeOffset = CORINFO.CORINFO_NO_SIZE_CHECK;
lookup.runtimeLookup.testForFixup = false; // TODO: this will be needed in true multifile
lookup.runtimeLookup.testForNull = false;
lookup.runtimeLookup.indirectFirstOffset = false;
lookup.runtimeLookup.indirectSecondOffset = false;
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/tools/superpmi/superpmi-shared/agnostic.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ struct Agnostic_CORINFO_RUNTIME_LOOKUP
DWORD helper;
DWORD indirections;
DWORD testForNull;
DWORD testForFixup;
WORD sizeOffset;
DWORDLONG offsets[CORINFO_MAXINDIRECTIONS];
DWORD indirectFirstOffset;
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/tools/superpmi/superpmi-shared/spmidumphelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ std::string SpmiDumpHelper::DumpAgnostic_CORINFO_RUNTIME_LOOKUP(
const Agnostic_CORINFO_RUNTIME_LOOKUP& lookup)
{
char buffer[MAX_BUFFER_SIZE];
sprintf_s(buffer, MAX_BUFFER_SIZE, " sig-%016llX hlp-%u ind-%u tfn-%u tff-%u so-%u { ", lookup.signature, lookup.helper,
lookup.indirections, lookup.testForNull, lookup.testForFixup, lookup.sizeOffset);
sprintf_s(buffer, MAX_BUFFER_SIZE, " sig-%016llX hlp-%u ind-%u tfn-%u so-%u { ", lookup.signature, lookup.helper,
lookup.indirections, lookup.testForNull, lookup.sizeOffset);
std::string resultDump(buffer);
for (int i = 0; i < CORINFO_MAXINDIRECTIONS; i++)
{
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/tools/superpmi/superpmi-shared/spmirecordhelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,6 @@ inline Agnostic_CORINFO_RUNTIME_LOOKUP SpmiRecordsHelper::StoreAgnostic_CORINFO_
runtimeLookup.helper = (DWORD)pLookup->helper;
runtimeLookup.indirections = (DWORD)pLookup->indirections;
runtimeLookup.testForNull = (DWORD)pLookup->testForNull;
runtimeLookup.testForFixup = (DWORD)pLookup->testForFixup;
runtimeLookup.sizeOffset = pLookup->sizeOffset;
runtimeLookup.indirectFirstOffset = (DWORD)pLookup->indirectFirstOffset;
runtimeLookup.indirectSecondOffset = (DWORD)pLookup->indirectSecondOffset;
Expand All @@ -503,7 +502,6 @@ inline CORINFO_RUNTIME_LOOKUP SpmiRecordsHelper::RestoreCORINFO_RUNTIME_LOOKUP(
runtimeLookup.helper = (CorInfoHelpFunc)lookup.helper;
runtimeLookup.indirections = (WORD)lookup.indirections;
runtimeLookup.testForNull = lookup.testForNull != 0;
runtimeLookup.testForFixup = lookup.testForFixup != 0;
runtimeLookup.sizeOffset = lookup.sizeOffset;
runtimeLookup.indirectFirstOffset = lookup.indirectFirstOffset != 0;
runtimeLookup.indirectSecondOffset = lookup.indirectSecondOffset != 0;
Expand Down
6 changes: 0 additions & 6 deletions src/coreclr/vm/jitinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2874,7 +2874,6 @@ void CEEInfo::ComputeRuntimeLookupForSharedGenericToken(DictionaryEntryKind entr
{
pResult->indirections = 2;
pResult->testForNull = 0;
pResult->testForFixup = 0;
pResult->offsets[0] = offsetof(InstantiatedMethodDesc, m_pPerInstInfo);

uint32_t data;
Expand Down Expand Up @@ -2914,7 +2913,6 @@ void CEEInfo::ComputeRuntimeLookupForSharedGenericToken(DictionaryEntryKind entr
// Just use the method descriptor that was passed in!
pResult->indirections = 0;
pResult->testForNull = 0;
pResult->testForFixup = 0;

return;
}
Expand Down Expand Up @@ -2951,7 +2949,6 @@ void CEEInfo::ComputeRuntimeLookupForSharedGenericToken(DictionaryEntryKind entr
{
pResult->indirections = 3;
pResult->testForNull = 0;
pResult->testForFixup = 0;
pResult->offsets[0] = MethodTable::GetOffsetOfPerInstInfo();
pResult->offsets[1] = sizeof(TypeHandle*) * (pContextMT->GetNumDicts() - 1);
uint32_t data;
Expand All @@ -2974,7 +2971,6 @@ void CEEInfo::ComputeRuntimeLookupForSharedGenericToken(DictionaryEntryKind entr
// Just use the vtable pointer itself!
pResult->indirections = 0;
pResult->testForNull = 0;
pResult->testForFixup = 0;

return;
}
Expand Down Expand Up @@ -3166,7 +3162,6 @@ void CEEInfo::ComputeRuntimeLookupForSharedGenericToken(DictionaryEntryKind entr
if (DictionaryLayout::FindToken(pContextMD, pContextMD->GetLoaderAllocator(), 1, &sigBuilder, NULL, signatureSource, pResult, &slot))
{
pResult->testForNull = 1;
pResult->testForFixup = 0;
int minDictSize = pContextMD->GetNumGenericMethodArgs() + 1 + pContextMD->GetDictionaryLayout()->GetNumInitialSlots();
if (slot >= minDictSize)
{
Expand All @@ -3185,7 +3180,6 @@ void CEEInfo::ComputeRuntimeLookupForSharedGenericToken(DictionaryEntryKind entr
if (DictionaryLayout::FindToken(pContextMT, pContextMT->GetLoaderAllocator(), 2, &sigBuilder, NULL, signatureSource, pResult, &slot))
{
pResult->testForNull = 1;
pResult->testForFixup = 0;
int minDictSize = pContextMT->GetNumGenericArgs() + 1 + pContextMT->GetClass()->GetDictionaryLayout()->GetNumInitialSlots();
if (slot >= minDictSize)
{
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/vm/prestub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2843,7 +2843,6 @@ void ProcessDynamicDictionaryLookup(TransitionBlock * pTransitionBlock

TADDR genericContextPtr = *(TADDR*)GetFirstArgumentRegisterValuePtr(pTransitionBlock);

pResult->testForFixup = pResult->testForNull = false;
pResult->signature = NULL;

pResult->indirectFirstOffset = 0;
Expand Down