Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0fe7042
Initial impl of Jan's suggestions
EgorBo Oct 29, 2022
e428363
Address part of the feedback
EgorBo Oct 29, 2022
774af69
Address feedback
EgorBo Oct 29, 2022
28b9be3
Remove "is frozen" check from jit
EgorBo Oct 29, 2022
9f92bfb
NativeAOT support
EgorBo Oct 29, 2022
687d5cb
Use CORINFO_OBJECT_HANDLE in more places
EgorBo Oct 29, 2022
872058d
Free jit handles upon exit
EgorBo Oct 29, 2022
860d706
Update src/coreclr/vm/jitinterface.cpp
EgorBo Oct 29, 2022
bffb8e6
Clean up
EgorBo Oct 29, 2022
f0a35cc
clean up in getArrayLength
EgorBo Oct 29, 2022
bfaf6ee
Update jitinterface.h
EgorBo Oct 29, 2022
a3ccc91
Remove unnecessary DestroyHandle
EgorBo Oct 29, 2022
7e041c1
Rename to getArrayOrStringLength, free jit handles in destructor
EgorBo Oct 29, 2022
1bba1ec
fix compilation
EgorBo Oct 29, 2022
ee0117e
Use IND instead of LoadVector
EgorBo Oct 30, 2022
b20f1fb
Update hwintrinsicxarch.cpp
EgorBo Oct 30, 2022
2a12b10
Update hwintrinsicxarch.cpp
EgorBo Oct 30, 2022
504acf3
Apply suggestions from code review
EgorBo Oct 30, 2022
b56a67f
Address feedback
EgorBo Oct 30, 2022
15a39a6
Address feedback
EgorBo Oct 30, 2022
1683f29
Address feedback
EgorBo Oct 30, 2022
43a32c9
Move "Is frozen" check to getJitHandleForObject
EgorBo Oct 30, 2022
d10f4eb
Update src/coreclr/vm/jitinterface.cpp
EgorBo Oct 30, 2022
4443383
Update src/coreclr/vm/jitinterface.cpp
EgorBo Oct 30, 2022
429b4d1
use OBJECTREF everywhere
EgorBo Oct 30, 2022
49c32c4
fix bad merge
EgorBo Oct 30, 2022
5dbbef4
Cannonize more loads
EgorBo Oct 30, 2022
62f5cbb
check ISAs
EgorBo Oct 30, 2022
a096211
Fix comments
EgorBo Oct 30, 2022
efd71e9
Handle stores
EgorBo Oct 31, 2022
27a2619
Fix compilation & address feedback around redundant IsFrozenSegment call
EgorBo Oct 31, 2022
1f95212
Merge branch 'use-ind-for-loads' of github.com:EgorBo/runtime-1 into …
EgorBo Oct 31, 2022
d5c3cab
DescriptionDescription -> Description
EgorBo Oct 31, 2022
7621045
Merge branch 'main' of github.com:dotnet/runtime into fold-static-rea…
EgorBo Oct 31, 2022
96397b1
Update valuenum.cpp
EgorBo Oct 31, 2022
076d4cd
Add comments
EgorBo Oct 31, 2022
1ecceca
Merge branch 'main' of github.com:dotnet/runtime into fold-static-rea…
EgorBo Oct 31, 2022
752c840
Revert unrelated SIMD changes (accidentally pushed)
EgorBo Oct 31, 2022
ea8e369
Use Exception sets
EgorBo Oct 31, 2022
2fab46b
Address feedback
EgorBo Oct 31, 2022
07d42e5
Address feedback
EgorBo Oct 31, 2022
8c2ec20
Update src/coreclr/jit/valuenum.cpp
EgorBo Oct 31, 2022
93c11c9
Address feedback
EgorBo Oct 31, 2022
19df3e6
Apply suggestions from code review
EgorBo Oct 31, 2022
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
Use CORINFO_OBJECT_HANDLE in more places
  • Loading branch information
EgorBo committed Oct 29, 2022
commit 687d5cb1357511d363eedd2b3e8d6f77e9b64a88
6 changes: 3 additions & 3 deletions src/coreclr/inc/corinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -2501,7 +2501,7 @@ class ICorStaticInfo
CORINFO_CLASS_HANDLE cls
) = 0;

virtual void* getRuntimeTypePointer(
virtual CORINFO_OBJECT_HANDLE getRuntimeTypePointer(
CORINFO_CLASS_HANDLE cls
) = 0;

Expand All @@ -2515,7 +2515,7 @@ class ICorStaticInfo
// Returns true if object is known to be immutable
//
virtual bool isObjectImmutable(
void* objPtr
CORINFO_OBJECT_HANDLE objPtr
) = 0;

//------------------------------------------------------------------------------
Expand All @@ -2528,7 +2528,7 @@ class ICorStaticInfo
// Returns CORINFO_CLASS_HANDLE handle that represents given object's type
//
virtual CORINFO_CLASS_HANDLE getObjectType(
void* objPtr
CORINFO_OBJECT_HANDLE objPtr
) = 0;

virtual bool getReadyToRunHelper(
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/inc/icorjitinfoimpl_generated.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,14 @@ CorInfoHelpFunc getBoxHelper(
CorInfoHelpFunc getUnBoxHelper(
CORINFO_CLASS_HANDLE cls) override;

void* getRuntimeTypePointer(
CORINFO_OBJECT_HANDLE getRuntimeTypePointer(
CORINFO_CLASS_HANDLE cls) override;

bool isObjectImmutable(
void* objPtr) override;
CORINFO_OBJECT_HANDLE objPtr) override;

CORINFO_CLASS_HANDLE getObjectType(
void* objPtr) override;
CORINFO_OBJECT_HANDLE objPtr) override;

bool getReadyToRunHelper(
CORINFO_RESOLVED_TOKEN* pResolvedToken,
Expand Down
8 changes: 4 additions & 4 deletions src/coreclr/jit/ICorJitInfo_wrapper_generated.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,17 +665,17 @@ CorInfoHelpFunc WrapICorJitInfo::getUnBoxHelper(
return temp;
}

void* WrapICorJitInfo::getRuntimeTypePointer(
CORINFO_OBJECT_HANDLE WrapICorJitInfo::getRuntimeTypePointer(
CORINFO_CLASS_HANDLE cls)
{
API_ENTER(getRuntimeTypePointer);
void* temp = wrapHnd->getRuntimeTypePointer(cls);
CORINFO_OBJECT_HANDLE temp = wrapHnd->getRuntimeTypePointer(cls);
API_LEAVE(getRuntimeTypePointer);
return temp;
}

bool WrapICorJitInfo::isObjectImmutable(
void* objPtr)
CORINFO_OBJECT_HANDLE objPtr)
{
API_ENTER(isObjectImmutable);
bool temp = wrapHnd->isObjectImmutable(objPtr);
Expand All @@ -684,7 +684,7 @@ bool WrapICorJitInfo::isObjectImmutable(
}

CORINFO_CLASS_HANDLE WrapICorJitInfo::getObjectType(
void* objPtr)
CORINFO_OBJECT_HANDLE objPtr)
{
API_ENTER(getObjectType);
CORINFO_CLASS_HANDLE temp = wrapHnd->getObjectType(objPtr);
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/gentree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17619,7 +17619,7 @@ CORINFO_CLASS_HANDLE Compiler::gtGetClassHandle(GenTree* tree, bool* pIsExact, b
{
if (tree->IsIconHandle(GTF_ICON_OBJ_HDL))
{
objClass = info.compCompHnd->getObjectType((void*)tree->AsIntCon()->IconValue());
objClass = info.compCompHnd->getObjectType((CORINFO_OBJECT_HANDLE)tree->AsIntCon()->IconValue());
if (objClass != NO_CLASS_HANDLE)
{
// if we managed to get a class handle it's definitely not null
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/lower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7180,7 +7180,7 @@ void Lowering::LowerStoreIndirCommon(GenTreeStoreInd* ind)
if (ind->Data()->IsIconHandle(GTF_ICON_OBJ_HDL))
{
const ssize_t handle = ind->Data()->AsIntCon()->IconValue();
if (!comp->info.compCompHnd->isObjectImmutable(reinterpret_cast<void*>(handle)))
if (!comp->info.compCompHnd->isObjectImmutable(reinterpret_cast<CORINFO_OBJECT_HANDLE>(handle)))
{
// On platforms with weaker memory model we need to make sure we use a store with the release semantic
// when we publish a potentially mutable object
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/jit/morph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8298,11 +8298,11 @@ GenTree* Compiler::fgMorphCall(GenTreeCall* call)
CORINFO_CLASS_HANDLE hClass = gtGetHelperArgClassHandle(argNode);
if ((hClass != NO_CLASS_HANDLE) && !gtIsActiveCSE_Candidate(argNode))
{
void* ptr = info.compCompHnd->getRuntimeTypePointer(hClass);
if (ptr != nullptr)
CORINFO_OBJECT_HANDLE ptr = info.compCompHnd->getRuntimeTypePointer(hClass);
if (ptr != NULL)
{
setMethodHasFrozenObjects();
GenTree* retNode = gtNewIconEmbHndNode(ptr, nullptr, GTF_ICON_OBJ_HDL, nullptr);
GenTree* retNode = gtNewIconEmbHndNode((void*)ptr, nullptr, GTF_ICON_OBJ_HDL, nullptr);
retNode->gtType = TYP_REF;
INDEBUG(retNode->AsIntCon()->gtTargetHandle = (size_t)ptr);
return fgMorphTree(retNode);
Expand Down
12 changes: 6 additions & 6 deletions src/coreclr/tools/Common/JitInterface/CorInfoImpl_generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ private static CorInfoHelpFunc _getUnBoxHelper(IntPtr thisHandle, IntPtr* ppExce
}

[UnmanagedCallersOnly]
private static void* _getRuntimeTypePointer(IntPtr thisHandle, IntPtr* ppException, CORINFO_CLASS_STRUCT_* cls)
private static CORINFO_OBJECT_STRUCT_* _getRuntimeTypePointer(IntPtr thisHandle, IntPtr* ppException, CORINFO_CLASS_STRUCT_* cls)
{
var _this = GetThis(thisHandle);
try
Expand All @@ -1018,7 +1018,7 @@ private static CorInfoHelpFunc _getUnBoxHelper(IntPtr thisHandle, IntPtr* ppExce
}

[UnmanagedCallersOnly]
private static byte _isObjectImmutable(IntPtr thisHandle, IntPtr* ppException, void* objPtr)
private static byte _isObjectImmutable(IntPtr thisHandle, IntPtr* ppException, CORINFO_OBJECT_STRUCT_* objPtr)
{
var _this = GetThis(thisHandle);
try
Expand All @@ -1033,7 +1033,7 @@ private static byte _isObjectImmutable(IntPtr thisHandle, IntPtr* ppException, v
}

[UnmanagedCallersOnly]
private static CORINFO_CLASS_STRUCT_* _getObjectType(IntPtr thisHandle, IntPtr* ppException, void* objPtr)
private static CORINFO_CLASS_STRUCT_* _getObjectType(IntPtr thisHandle, IntPtr* ppException, CORINFO_OBJECT_STRUCT_* objPtr)
{
var _this = GetThis(thisHandle);
try
Expand Down Expand Up @@ -2754,9 +2754,9 @@ private static IntPtr GetUnmanagedCallbacks()
callbacks[64] = (delegate* unmanaged<IntPtr, IntPtr*, CORINFO_CLASS_STRUCT_*, CORINFO_CLASS_STRUCT_*>)&_getTypeForBox;
callbacks[65] = (delegate* unmanaged<IntPtr, IntPtr*, CORINFO_CLASS_STRUCT_*, CorInfoHelpFunc>)&_getBoxHelper;
callbacks[66] = (delegate* unmanaged<IntPtr, IntPtr*, CORINFO_CLASS_STRUCT_*, CorInfoHelpFunc>)&_getUnBoxHelper;
callbacks[67] = (delegate* unmanaged<IntPtr, IntPtr*, CORINFO_CLASS_STRUCT_*, void*>)&_getRuntimeTypePointer;
callbacks[68] = (delegate* unmanaged<IntPtr, IntPtr*, void*, byte>)&_isObjectImmutable;
callbacks[69] = (delegate* unmanaged<IntPtr, IntPtr*, void*, CORINFO_CLASS_STRUCT_*>)&_getObjectType;
callbacks[67] = (delegate* unmanaged<IntPtr, IntPtr*, CORINFO_CLASS_STRUCT_*, CORINFO_OBJECT_STRUCT_*>)&_getRuntimeTypePointer;
callbacks[68] = (delegate* unmanaged<IntPtr, IntPtr*, CORINFO_OBJECT_STRUCT_*, byte>)&_isObjectImmutable;
callbacks[69] = (delegate* unmanaged<IntPtr, IntPtr*, CORINFO_OBJECT_STRUCT_*, CORINFO_CLASS_STRUCT_*>)&_getObjectType;
callbacks[70] = (delegate* unmanaged<IntPtr, IntPtr*, CORINFO_RESOLVED_TOKEN*, CORINFO_LOOKUP_KIND*, CorInfoHelpFunc, CORINFO_CONST_LOOKUP*, byte>)&_getReadyToRunHelper;
callbacks[71] = (delegate* unmanaged<IntPtr, IntPtr*, CORINFO_RESOLVED_TOKEN*, mdToken, CORINFO_CLASS_STRUCT_*, CORINFO_LOOKUP*, void>)&_getReadyToRunDelegateCtorHelper;
callbacks[72] = (delegate* unmanaged<IntPtr, IntPtr*, CorInfoHelpFunc, byte*>)&_getHelperName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ FUNCTIONS
CORINFO_CLASS_HANDLE getTypeForBox(CORINFO_CLASS_HANDLE cls)
CorInfoHelpFunc getBoxHelper(CORINFO_CLASS_HANDLE cls)
CorInfoHelpFunc getUnBoxHelper(CORINFO_CLASS_HANDLE cls)
void* getRuntimeTypePointer(CORINFO_CLASS_HANDLE cls)
bool isObjectImmutable(void* objPtr)
CORINFO_CLASS_HANDLE getObjectType(void* objPtr)
CORINFO_OBJECT_HANDLE getRuntimeTypePointer(CORINFO_CLASS_HANDLE cls)
bool isObjectImmutable(CORINFO_OBJECT_HANDLE objPtr)
CORINFO_CLASS_HANDLE getObjectType(CORINFO_OBJECT_HANDLE objPtr)
bool getReadyToRunHelper(CORINFO_RESOLVED_TOKEN * pResolvedToken, CORINFO_LOOKUP_KIND * pGenericLookupKind, CorInfoHelpFunc id, CORINFO_CONST_LOOKUP *pLookup)
void getReadyToRunDelegateCtorHelper(CORINFO_RESOLVED_TOKEN * pTargetMethod, mdToken targetConstraint, CORINFO_CLASS_HANDLE delegateType, CORINFO_LOOKUP *pLookup)
const char* getHelperName(CorInfoHelpFunc helpFunc)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2996,17 +2996,17 @@ private bool getReadonlyStaticFieldValue(CORINFO_FIELD_STRUCT_* fieldHandle, byt
return false;
}

private CORINFO_CLASS_STRUCT_* getObjectType(void* objPtr)
private CORINFO_CLASS_STRUCT_* getObjectType(CORINFO_OBJECT_STRUCT_* objPtr)
{
throw new NotSupportedException();
}

private bool isObjectImmutable(void* objPtr)
private bool isObjectImmutable(CORINFO_OBJECT_STRUCT_* objPtr)
{
throw new NotSupportedException();
}

private void* getRuntimeTypePointer(CORINFO_CLASS_STRUCT_* cls)
private CORINFO_OBJECT_STRUCT_* getRuntimeTypePointer(CORINFO_CLASS_STRUCT_* cls)
{
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2265,7 +2265,7 @@ private bool getReadonlyStaticFieldValue(CORINFO_FIELD_STRUCT_* fieldHandle, byt
return false;
}

private CORINFO_CLASS_STRUCT_* getObjectType(void* objPtr)
private CORINFO_CLASS_STRUCT_* getObjectType(CORINFO_OBJECT_STRUCT_* objPtr)
{
object obj = HandleToObject(objPtr);
return obj switch
Expand All @@ -2277,14 +2277,14 @@ private bool getReadonlyStaticFieldValue(CORINFO_FIELD_STRUCT_* fieldHandle, byt
}

#pragma warning disable CA1822 // Mark members as static
private void* getRuntimeTypePointer(CORINFO_CLASS_STRUCT_* cls)
private CORINFO_OBJECT_STRUCT_* getRuntimeTypePointer(CORINFO_CLASS_STRUCT_* cls)
#pragma warning restore CA1822 // Mark members as static
{
// TODO: https://github.com/dotnet/runtime/pull/75573#issuecomment-1250824543
return null;
}

private bool isObjectImmutable(void* objPtr)
private bool isObjectImmutable(CORINFO_OBJECT_STRUCT_* objPtr)
{
object obj = HandleToObject(objPtr);
return obj switch
Expand All @@ -2297,7 +2297,7 @@ private bool isObjectImmutable(void* objPtr)

private int getArrayLength(CORINFO_OBJECT_STRUCT_* objHnd)
{
object obj = HandleToObject(objPtr);
object obj = HandleToObject(objHnd);
return obj switch
{
FrozenStringNode frozenStr => frozenStr.Data.Length,
Expand Down
14 changes: 7 additions & 7 deletions src/coreclr/tools/aot/jitinterface/jitinterface_generated.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ struct JitInterfaceCallbacks
CORINFO_CLASS_HANDLE (* getTypeForBox)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
CorInfoHelpFunc (* getBoxHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
CorInfoHelpFunc (* getUnBoxHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
void* (* getRuntimeTypePointer)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
bool (* isObjectImmutable)(void * thisHandle, CorInfoExceptionClass** ppException, void* objPtr);
CORINFO_CLASS_HANDLE (* getObjectType)(void * thisHandle, CorInfoExceptionClass** ppException, void* objPtr);
CORINFO_OBJECT_HANDLE (* getRuntimeTypePointer)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
bool (* isObjectImmutable)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_OBJECT_HANDLE objPtr);
CORINFO_CLASS_HANDLE (* getObjectType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_OBJECT_HANDLE objPtr);
bool (* getReadyToRunHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken, CORINFO_LOOKUP_KIND* pGenericLookupKind, CorInfoHelpFunc id, CORINFO_CONST_LOOKUP* pLookup);
void (* getReadyToRunDelegateCtorHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pTargetMethod, unsigned int targetConstraint, CORINFO_CLASS_HANDLE delegateType, CORINFO_LOOKUP* pLookup);
const char* (* getHelperName)(void * thisHandle, CorInfoExceptionClass** ppException, CorInfoHelpFunc helpFunc);
Expand Down Expand Up @@ -860,17 +860,17 @@ class JitInterfaceWrapper : public ICorJitInfo
return temp;
}

virtual void* getRuntimeTypePointer(
virtual CORINFO_OBJECT_HANDLE getRuntimeTypePointer(
CORINFO_CLASS_HANDLE cls)
{
CorInfoExceptionClass* pException = nullptr;
void* temp = _callbacks->getRuntimeTypePointer(_thisHandle, &pException, cls);
CORINFO_OBJECT_HANDLE temp = _callbacks->getRuntimeTypePointer(_thisHandle, &pException, cls);
if (pException != nullptr) throw pException;
return temp;
}

virtual bool isObjectImmutable(
void* objPtr)
CORINFO_OBJECT_HANDLE objPtr)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->isObjectImmutable(_thisHandle, &pException, objPtr);
Expand All @@ -879,7 +879,7 @@ class JitInterfaceWrapper : public ICorJitInfo
}

virtual CORINFO_CLASS_HANDLE getObjectType(
void* objPtr)
CORINFO_OBJECT_HANDLE objPtr)
{
CorInfoExceptionClass* pException = nullptr;
CORINFO_CLASS_HANDLE temp = _callbacks->getObjectType(_thisHandle, &pException, objPtr);
Expand Down
14 changes: 7 additions & 7 deletions src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2223,7 +2223,7 @@ CorInfoHelpFunc MethodContext::repGetUnBoxHelper(CORINFO_CLASS_HANDLE cls)
return result;
}

void MethodContext::recGetRuntimeTypePointer(CORINFO_CLASS_HANDLE cls, void* result)
void MethodContext::recGetRuntimeTypePointer(CORINFO_CLASS_HANDLE cls, CORINFO_OBJECT_HANDLE result)
{
if (GetRuntimeTypePointer == nullptr)
GetRuntimeTypePointer = new LightWeightMap<DWORDLONG, DWORDLONG>();
Expand All @@ -2237,16 +2237,16 @@ void MethodContext::dmpGetRuntimeTypePointer(DWORDLONG key, DWORDLONG value)
{
printf("GetRuntimeTypePointer key cls-%016llX, value res-%016llX", key, value);
}
void* MethodContext::repGetRuntimeTypePointer(CORINFO_CLASS_HANDLE cls)
CORINFO_OBJECT_HANDLE MethodContext::repGetRuntimeTypePointer(CORINFO_CLASS_HANDLE cls)
{
DWORDLONG key = CastHandle(cls);
AssertMapAndKeyExist(GetRuntimeTypePointer, key, ": key %016llX", key);
DWORDLONG value = GetRuntimeTypePointer->Get(key);
DEBUG_REP(dmpGetRuntimeTypePointer(key, value));
return (void*)value;
return (CORINFO_OBJECT_HANDLE)value;
}

void MethodContext::recIsObjectImmutable(void* objPtr, bool result)
void MethodContext::recIsObjectImmutable(CORINFO_OBJECT_HANDLE objPtr, bool result)
{
if (IsObjectImmutable == nullptr)
IsObjectImmutable = new LightWeightMap<DWORDLONG, DWORD>();
Expand All @@ -2260,7 +2260,7 @@ void MethodContext::dmpIsObjectImmutable(DWORDLONG key, DWORD value)
{
printf("IsObjectImmutable key obj-%016llX, value res-%u", key, value);
}
bool MethodContext::repIsObjectImmutable(void* objPtr)
bool MethodContext::repIsObjectImmutable(CORINFO_OBJECT_HANDLE objPtr)
{
DWORDLONG key = (DWORDLONG)objPtr;
AssertMapAndKeyExist(IsObjectImmutable, key, ": key %016llX", key);
Expand All @@ -2269,7 +2269,7 @@ bool MethodContext::repIsObjectImmutable(void* objPtr)
return (bool)value;
}

void MethodContext::recGetObjectType(void* objPtr, CORINFO_CLASS_HANDLE result)
void MethodContext::recGetObjectType(CORINFO_OBJECT_HANDLE objPtr, CORINFO_CLASS_HANDLE result)
{
if (GetObjectType == nullptr)
GetObjectType = new LightWeightMap<DWORDLONG, DWORDLONG>();
Expand All @@ -2283,7 +2283,7 @@ void MethodContext::dmpGetObjectType(DWORDLONG key, DWORDLONG value)
{
printf("GetObjectType key obj-%016llX, value res-%016llX", key, value);
}
CORINFO_CLASS_HANDLE MethodContext::repGetObjectType(void* objPtr)
CORINFO_CLASS_HANDLE MethodContext::repGetObjectType(CORINFO_OBJECT_HANDLE objPtr)
{
DWORDLONG key = (DWORDLONG)objPtr;
AssertMapAndKeyExist(GetObjectType, key, ": key %016llX", key);
Expand Down
12 changes: 6 additions & 6 deletions src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,17 +314,17 @@ class MethodContext
void dmpGetUnBoxHelper(DWORDLONG key, DWORD value);
CorInfoHelpFunc repGetUnBoxHelper(CORINFO_CLASS_HANDLE cls);

void recGetRuntimeTypePointer(CORINFO_CLASS_HANDLE cls, void* result);
void recGetRuntimeTypePointer(CORINFO_CLASS_HANDLE cls, CORINFO_OBJECT_HANDLE result);
void dmpGetRuntimeTypePointer(DWORDLONG key, DWORDLONG value);
void* repGetRuntimeTypePointer(CORINFO_CLASS_HANDLE cls);
CORINFO_OBJECT_HANDLE repGetRuntimeTypePointer(CORINFO_CLASS_HANDLE cls);

void recIsObjectImmutable(void* objPtr, bool result);
void recIsObjectImmutable(CORINFO_OBJECT_HANDLE objPtr, bool result);
void dmpIsObjectImmutable(DWORDLONG key, DWORD value);
bool repIsObjectImmutable(void* objPtr);
bool repIsObjectImmutable(CORINFO_OBJECT_HANDLE objPtr);

void recGetObjectType(void* objPtr, CORINFO_CLASS_HANDLE result);
void recGetObjectType(CORINFO_OBJECT_HANDLE objPtr, CORINFO_CLASS_HANDLE result);
void dmpGetObjectType(DWORDLONG key, DWORDLONG value);
CORINFO_CLASS_HANDLE repGetObjectType(void* objPtr);
CORINFO_CLASS_HANDLE repGetObjectType(CORINFO_OBJECT_HANDLE objPtr);

void recGetReadyToRunHelper(CORINFO_RESOLVED_TOKEN* pResolvedToken,
CORINFO_LOOKUP_KIND* pGenericLookupKind,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -793,23 +793,23 @@ CorInfoHelpFunc interceptor_ICJI::getUnBoxHelper(CORINFO_CLASS_HANDLE cls)
return temp;
}

void* interceptor_ICJI::getRuntimeTypePointer(CORINFO_CLASS_HANDLE cls)
CORINFO_OBJECT_HANDLE interceptor_ICJI::getRuntimeTypePointer(CORINFO_CLASS_HANDLE cls)
{
mc->cr->AddCall("getRuntimeTypePointer");
void* temp = original_ICorJitInfo->getRuntimeTypePointer(cls);
CORINFO_OBJECT_HANDLE temp = original_ICorJitInfo->getRuntimeTypePointer(cls);
mc->recGetRuntimeTypePointer(cls, temp);
return temp;
}

bool interceptor_ICJI::isObjectImmutable(void* typeObj)
bool interceptor_ICJI::isObjectImmutable(CORINFO_OBJECT_HANDLE typeObj)
{
mc->cr->AddCall("isObjectImmutable");
bool temp = original_ICorJitInfo->isObjectImmutable(typeObj);
mc->recIsObjectImmutable(typeObj, temp);
return temp;
}

CORINFO_CLASS_HANDLE interceptor_ICJI::getObjectType(void* typeObj)
CORINFO_CLASS_HANDLE interceptor_ICJI::getObjectType(CORINFO_OBJECT_HANDLE typeObj)
{
mc->cr->AddCall("getObjectType");
CORINFO_CLASS_HANDLE temp = original_ICorJitInfo->getObjectType(typeObj);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,22 +546,22 @@ CorInfoHelpFunc interceptor_ICJI::getUnBoxHelper(
return original_ICorJitInfo->getUnBoxHelper(cls);
}

void* interceptor_ICJI::getRuntimeTypePointer(
CORINFO_OBJECT_HANDLE interceptor_ICJI::getRuntimeTypePointer(
CORINFO_CLASS_HANDLE cls)
{
mcs->AddCall("getRuntimeTypePointer");
return original_ICorJitInfo->getRuntimeTypePointer(cls);
}

bool interceptor_ICJI::isObjectImmutable(
void* objPtr)
CORINFO_OBJECT_HANDLE objPtr)
{
mcs->AddCall("isObjectImmutable");
return original_ICorJitInfo->isObjectImmutable(objPtr);
}

CORINFO_CLASS_HANDLE interceptor_ICJI::getObjectType(
void* objPtr)
CORINFO_OBJECT_HANDLE objPtr)
{
mcs->AddCall("getObjectType");
return original_ICorJitInfo->getObjectType(objPtr);
Expand Down
Loading