From 4f3545e2d1466512f53a2cd8b0db71667810c083 Mon Sep 17 00:00:00 2001 From: David Wrighton Date: Wed, 17 Feb 2021 19:03:19 -0800 Subject: [PATCH] Adjust logic in cor.h, corhdr.h, corinfo.h, corjit.h and such so that they may be included without the PAL (#46055) This was done via simple substitution of the standard sized integer types, and dealing with the fallout. It is tested by using the ICorJitInfo interface directly within the crossgen2 jitinterface thunk library. Effort was made to use a minimum number of casts, as casts in such a large change are likely to be wrong somewhere. - Exceptions are the use of casting to handle some calls to the existing internal metadata api and around use of char16_t. In addition, a small amount of logic from the PAL headers were pulled into the proper header to allow compilation in the presence of some SAL annotation, and other small details. --- .../superpmi-shared/compileresult.cpp | 2 +- .../superpmi/superpmi-shared/compileresult.h | 2 +- .../superpmi-shared/icorjitcompilerimpl.h | 12 +- .../superpmi-shared/methodcontext.cpp | 30 +- .../superpmi/superpmi-shared/methodcontext.h | 18 +- .../icorjitcompiler.cpp | 12 +- .../superpmi-shim-collector/icorjitinfo.cpp | 110 +- .../superpmi-shim-counter/icorjitcompiler.cpp | 12 +- .../superpmi-shim-counter/icorjitinfo.cpp | 106 +- .../superpmi-shim-simple/icorjitcompiler.cpp | 12 +- .../superpmi-shim-simple/icorjitinfo.cpp | 106 +- .../ToolBox/superpmi/superpmi/icorjitinfo.cpp | 98 +- .../ToolBox/superpmi/superpmi/jitinstance.cpp | 8 +- .../classlibnative/bcltype/varargsnative.cpp | 4 +- src/coreclr/debug/di/module.cpp | 20 +- src/coreclr/debug/di/rsfunction.cpp | 2 +- src/coreclr/debug/di/rspriv.h | 4 +- src/coreclr/debug/di/rsthread.cpp | 6 +- src/coreclr/debug/di/rstype.cpp | 10 +- src/coreclr/ildasm/dasm.cpp | 2 +- src/coreclr/inc/cor.h | 73 +- src/coreclr/inc/cordebuginfo.h | 18 +- src/coreclr/inc/corhdr.h | 72 +- src/coreclr/inc/corhlprpriv.h | 2 +- src/coreclr/inc/corinfo.h | 145 ++- src/coreclr/inc/corjit.h | 133 +- src/coreclr/inc/corjitflags.h | 12 +- src/coreclr/inc/icorjitinfoimpl_generated.h | 106 +- src/coreclr/inc/jiteeversionguid.h | 21 +- src/coreclr/inc/metadata.h | 8 +- src/coreclr/inc/metamodelpub.h | 2 +- src/coreclr/inc/sigparser.h | 36 +- src/coreclr/jit/ICorJitInfo_API_wrapper.hpp | 136 +- src/coreclr/jit/codegen.h | 12 +- src/coreclr/jit/codegencommon.cpp | 2 +- src/coreclr/jit/codegeninterface.h | 2 +- src/coreclr/jit/compiler.cpp | 15 +- src/coreclr/jit/compiler.h | 6 +- src/coreclr/jit/ee_il_dll.cpp | 13 +- src/coreclr/jit/ee_il_dll.hpp | 12 +- src/coreclr/jit/importer.cpp | 8 +- src/coreclr/jit/jit.h | 2 +- src/coreclr/jit/lower.cpp | 5 +- src/coreclr/jit/morph.cpp | 6 +- src/coreclr/jit/simd.cpp | 2 +- src/coreclr/md/compiler/assemblymd_emit.cpp | 10 +- src/coreclr/md/compiler/custattr_import.cpp | 4 +- src/coreclr/md/compiler/emit.cpp | 12 +- src/coreclr/md/compiler/filtermanager.cpp | 4 +- src/coreclr/md/compiler/import.cpp | 78 +- src/coreclr/md/compiler/importhelper.cpp | 38 +- src/coreclr/md/compiler/regmeta.cpp | 2 +- src/coreclr/md/compiler/regmeta_emit.cpp | 2 +- src/coreclr/md/compiler/regmeta_import.cpp | 24 +- src/coreclr/md/enc/mdinternalrw.cpp | 8 +- src/coreclr/md/enc/metamodelenc.cpp | 4 +- src/coreclr/md/enc/metamodelrw.cpp | 68 +- src/coreclr/md/inc/metamodel.h | 4 +- src/coreclr/md/inc/metamodelrw.h | 10 +- src/coreclr/md/runtime/metamodelro.cpp | 4 +- src/coreclr/pal/inc/rt/ntimage.h | 4 + .../tools/Common/JitInterface/CorInfoImpl.cs | 4 +- .../JitInterface/ThunkGenerator/Program.cs | 3 +- .../ThunkGenerator/ThunkInput.txt | 238 ++-- .../tools/aot/jitinterface/jitinterface.cpp | 9 +- .../tools/aot/jitinterface/jitinterface.h | 1127 +++++++++-------- .../tools/aot/jitinterface/jitwrapper.cpp | 54 +- src/coreclr/utilcode/sigparser.cpp | 14 +- src/coreclr/utilcode/util.cpp | 18 +- src/coreclr/vm/assembly.cpp | 4 +- src/coreclr/vm/ceeload.cpp | 4 +- src/coreclr/vm/class.cpp | 6 +- src/coreclr/vm/codeman.cpp | 2 +- src/coreclr/vm/compile.cpp | 30 +- src/coreclr/vm/debuginfostore.cpp | 20 +- src/coreclr/vm/dllimport.cpp | 10 +- src/coreclr/vm/field.cpp | 2 +- src/coreclr/vm/genericdict.cpp | 22 +- src/coreclr/vm/i386/asmhelpers.S | 2 +- src/coreclr/vm/i386/asmhelpers.asm | 2 +- src/coreclr/vm/i386/cgenx86.cpp | 2 +- src/coreclr/vm/ilstubcache.cpp | 2 +- src/coreclr/vm/jithelpers.cpp | 4 +- src/coreclr/vm/jitinterface.cpp | 226 ++-- src/coreclr/vm/jitinterface.h | 52 +- src/coreclr/vm/memberload.cpp | 4 +- src/coreclr/vm/method.cpp | 18 +- src/coreclr/vm/methodtable.cpp | 2 +- src/coreclr/vm/methodtablebuilder.cpp | 8 +- src/coreclr/vm/prestub.cpp | 4 +- src/coreclr/vm/readytoruninfo.cpp | 16 +- src/coreclr/vm/sigformat.cpp | 18 +- src/coreclr/vm/siginfo.cpp | 64 +- src/coreclr/vm/stubgen.cpp | 28 +- src/coreclr/vm/stubgen.h | 2 +- src/coreclr/vm/threadsuspend.cpp | 4 +- src/coreclr/vm/typehash.cpp | 2 +- src/coreclr/vm/vars.cpp | 4 +- src/coreclr/vm/vars.hpp | 2 +- src/coreclr/vm/zapsig.cpp | 28 +- src/coreclr/zap/zapinfo.cpp | 68 +- src/coreclr/zap/zapinfo.h | 5 +- 102 files changed, 1970 insertions(+), 1865 deletions(-) diff --git a/src/coreclr/ToolBox/superpmi/superpmi-shared/compileresult.cpp b/src/coreclr/ToolBox/superpmi/superpmi-shared/compileresult.cpp index 01be396d6832a..4d2a13af9a43a 100644 --- a/src/coreclr/ToolBox/superpmi/superpmi-shared/compileresult.cpp +++ b/src/coreclr/ToolBox/superpmi/superpmi-shared/compileresult.cpp @@ -388,7 +388,7 @@ void CompileResult::repAllocGCInfo(size_t* size, void** retval) *retval = (void*)AllocGCInfo->GetBuffer(value.retval_offset); } -void CompileResult::recCompileMethod(BYTE** nativeEntry, ULONG* nativeSizeOfCode, CorJitResult result) +void CompileResult::recCompileMethod(uint8_t** nativeEntry, uint32_t* nativeSizeOfCode, CorJitResult result) { if (CompileMethod == nullptr) CompileMethod = new LightWeightMap(); diff --git a/src/coreclr/ToolBox/superpmi/superpmi-shared/compileresult.h b/src/coreclr/ToolBox/superpmi/superpmi-shared/compileresult.h index 963bb0ebbd3d5..47dbc0a07ba0e 100644 --- a/src/coreclr/ToolBox/superpmi/superpmi-shared/compileresult.h +++ b/src/coreclr/ToolBox/superpmi/superpmi-shared/compileresult.h @@ -113,7 +113,7 @@ class CompileResult void dmpAllocGCInfo(DWORD key, const Agnostic_AllocGCInfo& value); void repAllocGCInfo(size_t* size, void** retval); - void recCompileMethod(BYTE** nativeEntry, ULONG* nativeSizeOfCode, CorJitResult result); + void recCompileMethod(uint8_t** nativeEntry, uint32_t* nativeSizeOfCode, CorJitResult result); void dmpCompileMethod(DWORD key, const Agnostic_CompileMethodResults& value); void repCompileMethod(BYTE** nativeEntry, ULONG* nativeSizeOfCode, CorJitResult* result); diff --git a/src/coreclr/ToolBox/superpmi/superpmi-shared/icorjitcompilerimpl.h b/src/coreclr/ToolBox/superpmi/superpmi-shared/icorjitcompilerimpl.h index e502a536757ae..6b7ed4fd8e73d 100644 --- a/src/coreclr/ToolBox/superpmi/superpmi-shared/icorjitcompilerimpl.h +++ b/src/coreclr/ToolBox/superpmi/superpmi-shared/icorjitcompilerimpl.h @@ -25,12 +25,12 @@ // * For the 64 bit jit this is implemented by code:PreJit.compileMethod // // Note: Obfuscators that are hacking the JIT depend on this method having __stdcall calling convention -CorJitResult __stdcall compileMethod(ICorJitInfo* comp, /* IN */ - struct CORINFO_METHOD_INFO* info, /* IN */ - unsigned /* code:CorJitFlag */ flags, /* IN */ - BYTE** nativeEntry, /* OUT */ - ULONG* nativeSizeOfCode /* OUT */ - ); +CorJitResult compileMethod(ICorJitInfo* comp, /* IN */ + struct CORINFO_METHOD_INFO* info, /* IN */ + unsigned /* code:CorJitFlag */ flags, /* IN */ + uint8_t** nativeEntry, /* OUT */ + uint32_t* nativeSizeOfCode /* OUT */ + ); // Do any appropriate work at process shutdown. Default impl is to do nothing. void ProcessShutdownWork(ICorStaticInfo* info); /* {}; */ diff --git a/src/coreclr/ToolBox/superpmi/superpmi-shared/methodcontext.cpp b/src/coreclr/ToolBox/superpmi/superpmi-shared/methodcontext.cpp index 59027d3707861..acd6c2778c373 100644 --- a/src/coreclr/ToolBox/superpmi/superpmi-shared/methodcontext.cpp +++ b/src/coreclr/ToolBox/superpmi/superpmi-shared/methodcontext.cpp @@ -851,7 +851,7 @@ void MethodContext::repGetVars(CORINFO_METHOD_HANDLE ftn, // Note - the jit will call freearray on the array we give back.... void MethodContext::recGetBoundaries(CORINFO_METHOD_HANDLE ftn, unsigned int* cILOffsets, - DWORD** pILOffsets, + uint32_t** pILOffsets, ICorDebugInfo::BoundaryTypes* implictBoundaries) { if (GetBoundaries == nullptr) @@ -882,7 +882,7 @@ void MethodContext::dmpGetBoundaries(DWORDLONG key, const Agnostic_GetBoundaries } void MethodContext::repGetBoundaries(CORINFO_METHOD_HANDLE ftn, unsigned int* cILOffsets, - DWORD** pILOffsets, + uint32_t** pILOffsets, ICorDebugInfo::BoundaryTypes* implictBoundaries) { Agnostic_GetBoundaries value; @@ -891,7 +891,7 @@ void MethodContext::repGetBoundaries(CORINFO_METHOD_HANDLE ftn, *cILOffsets = (unsigned int)value.cILOffsets; if (*cILOffsets > 0) - *pILOffsets = (DWORD*)GetBoundaries->GetBuffer(value.pILOffset_offset); + *pILOffsets = (uint32_t*)GetBoundaries->GetBuffer(value.pILOffset_offset); *implictBoundaries = (ICorDebugInfo::BoundaryTypes)value.implicitBoundaries; DEBUG_REP(dmpGetBoundaries(CastHandle(ftn), value)); @@ -1164,7 +1164,7 @@ LPCWSTR MethodContext::repGetJitTimeLogFilename() void MethodContext::recCanInline(CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd, - DWORD* pRestrictions, + uint32_t* pRestrictions, CorInfoInline response, DWORD exceptionCode) { @@ -1196,7 +1196,7 @@ void MethodContext::dmpCanInline(DLDL key, const Agnostic_CanInline& value) } CorInfoInline MethodContext::repCanInline(CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd, - DWORD* pRestrictions, + uint32_t* pRestrictions, DWORD* exceptionCode) { DLDL key; @@ -4161,7 +4161,7 @@ const void* MethodContext::repGetInlinedCallFrameVptr(void** ppIndirection) return (const void*)value.B; } -void MethodContext::recGetAddrOfCaptureThreadGlobal(void** ppIndirection, LONG* result) +void MethodContext::recGetAddrOfCaptureThreadGlobal(void** ppIndirection, int32_t* result) { if (GetAddrOfCaptureThreadGlobal == nullptr) GetAddrOfCaptureThreadGlobal = new LightWeightMap(); @@ -4181,7 +4181,7 @@ void MethodContext::dmpGetAddrOfCaptureThreadGlobal(DWORD key, DLDL value) { printf("GetAddrOfCaptureThreadGlobal key %u, value ppi-%016llX res-%016llX", key, value.A, value.B); } -LONG* MethodContext::repGetAddrOfCaptureThreadGlobal(void** ppIndirection) +int32_t* MethodContext::repGetAddrOfCaptureThreadGlobal(void** ppIndirection) { DLDL value; @@ -4191,7 +4191,7 @@ LONG* MethodContext::repGetAddrOfCaptureThreadGlobal(void** ppIndirection) LogDebug("Sparse - repGetAddrOfCaptureThreadGlobal returning nullptr and 0xCAFE0001"); if (ppIndirection != nullptr) *ppIndirection = nullptr; - return (LONG*)(size_t)0xCAFE0001; + return (int32_t*)(size_t)0xCAFE0001; #else LogException(EXCEPTIONCODE_MC, "Didn't find anything for GetAddrOfCaptureThreadGlobal", ""); #endif @@ -4201,7 +4201,7 @@ LONG* MethodContext::repGetAddrOfCaptureThreadGlobal(void** ppIndirection) if (ppIndirection != nullptr) *ppIndirection = (void*)value.A; DEBUG_REP(dmpGetAddrOfCaptureThreadGlobal((DWORD)0, value)); - return (LONG*)value.B; + return (int32_t*)value.B; } void MethodContext::recGetClassDomainID(CORINFO_CLASS_HANDLE cls, void** ppIndirection, unsigned result) @@ -4586,7 +4586,7 @@ bool MethodContext::repIsValidStringRef(CORINFO_MODULE_HANDLE module, unsigned m } -void MethodContext::recGetStringLiteral(CORINFO_MODULE_HANDLE module, unsigned metaTOK, int length, LPCWSTR result) +void MethodContext::recGetStringLiteral(CORINFO_MODULE_HANDLE module, unsigned metaTOK, int length, const char16_t* result) { if (GetStringLiteral == nullptr) GetStringLiteral = new LightWeightMap(); @@ -4600,7 +4600,7 @@ void MethodContext::recGetStringLiteral(CORINFO_MODULE_HANDLE module, unsigned m DWORD strBuf = (DWORD)-1; if (result != nullptr) - strBuf = (DWORD)GetStringLiteral->AddBuffer((unsigned char*)result, (unsigned int)((wcslen(result) * 2) + 2)); + strBuf = (DWORD)GetStringLiteral->AddBuffer((unsigned char*)result, (unsigned int)((wcslen((LPCWSTR)result) * 2) + 2)); DD value; value.A = (DWORD)length; @@ -4615,7 +4615,7 @@ void MethodContext::dmpGetStringLiteral(DLD key, DD value) GetStringLiteral->GetBuffer(value.B), value.A); } -LPCWSTR MethodContext::repGetStringLiteral(CORINFO_MODULE_HANDLE module, unsigned metaTOK, int* length) +const char16_t* MethodContext::repGetStringLiteral(CORINFO_MODULE_HANDLE module, unsigned metaTOK, int* length) { if (GetStringLiteral == nullptr) { @@ -4640,7 +4640,7 @@ LPCWSTR MethodContext::repGetStringLiteral(CORINFO_MODULE_HANDLE module, unsigne { DD result = GetStringLiteral->Get(key); *length = (int)result.A; - return (LPCWSTR)GetStringLiteral->GetBuffer(itemIndex); + return (const char16_t*)GetStringLiteral->GetBuffer(itemIndex); } } @@ -6187,7 +6187,7 @@ CORINFO_CLASS_HANDLE MethodContext::repGetTypeInstantiationArgument(CORINFO_CLAS } void MethodContext::recAppendClassName( - CORINFO_CLASS_HANDLE cls, bool fNamespace, bool fFullInst, bool fAssembly, const WCHAR* result) + CORINFO_CLASS_HANDLE cls, bool fNamespace, bool fFullInst, bool fAssembly, const char16_t* result) { if (AppendClassName == nullptr) AppendClassName = new LightWeightMap(); @@ -6202,7 +6202,7 @@ void MethodContext::recAppendClassName( DWORD temp = (DWORD)-1; if (result != nullptr) - temp = (DWORD)AppendClassName->AddBuffer((unsigned char*)result, (unsigned int)((wcslen(result) * 2) + 2)); + temp = (DWORD)AppendClassName->AddBuffer((unsigned char*)result, (unsigned int)((wcslen((LPCWSTR)result) * 2) + 2)); AppendClassName->Add(key, (DWORD)temp); DEBUG_REC(dmpAppendClassName(key, (DWORD)temp)); diff --git a/src/coreclr/ToolBox/superpmi/superpmi-shared/methodcontext.h b/src/coreclr/ToolBox/superpmi/superpmi-shared/methodcontext.h index 05c8e37db1ae9..573a36d2f72a3 100644 --- a/src/coreclr/ToolBox/superpmi/superpmi-shared/methodcontext.h +++ b/src/coreclr/ToolBox/superpmi/superpmi-shared/methodcontext.h @@ -112,12 +112,12 @@ class MethodContext void recGetBoundaries(CORINFO_METHOD_HANDLE ftn, unsigned int* cILOffsets, - DWORD** pILOffsets, + uint32_t** pILOffsets, ICorDebugInfo::BoundaryTypes* implictBoundaries); void dmpGetBoundaries(DWORDLONG key, const Agnostic_GetBoundaries& value); void repGetBoundaries(CORINFO_METHOD_HANDLE ftn, unsigned int* cILOffsets, - DWORD** pILOffsets, + uint32_t** pILOffsets, ICorDebugInfo::BoundaryTypes* implictBoundaries); void recInitClass(CORINFO_FIELD_HANDLE field, @@ -154,13 +154,13 @@ class MethodContext void recCanInline(CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd, - DWORD* pRestrictions, + uint32_t* pRestrictions, CorInfoInline response, DWORD exceptionCode); void dmpCanInline(DLDL key, const Agnostic_CanInline& value); CorInfoInline repCanInline(CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd, - DWORD* pRestrictions, + uint32_t* pRestrictions, DWORD* exceptionCode); void recResolveToken(CORINFO_RESOLVED_TOKEN* pResolvedToken, DWORD exceptionCode); @@ -509,9 +509,9 @@ class MethodContext void dmpGetInlinedCallFrameVptr(DWORD key, DLDL value); const void* repGetInlinedCallFrameVptr(void** ppIndirection); - void recGetAddrOfCaptureThreadGlobal(void** ppIndirection, LONG* result); + void recGetAddrOfCaptureThreadGlobal(void** ppIndirection, int32_t* result); void dmpGetAddrOfCaptureThreadGlobal(DWORD key, DLDL value); - LONG* repGetAddrOfCaptureThreadGlobal(void** ppIndirection); + int32_t* repGetAddrOfCaptureThreadGlobal(void** ppIndirection); void recGetClassDomainID(CORINFO_CLASS_HANDLE cls, void** ppIndirection, unsigned result); void dmpGetClassDomainID(DWORDLONG key, DLD value); @@ -567,9 +567,9 @@ class MethodContext void dmpIsValidStringRef(DLD key, DWORD value); bool repIsValidStringRef(CORINFO_MODULE_HANDLE module, unsigned metaTOK); - void recGetStringLiteral(CORINFO_MODULE_HANDLE module, unsigned metaTOK, int length, LPCWSTR result); + void recGetStringLiteral(CORINFO_MODULE_HANDLE module, unsigned metaTOK, int length, const char16_t* result); void dmpGetStringLiteral(DLD key, DD value); - LPCWSTR repGetStringLiteral(CORINFO_MODULE_HANDLE module, unsigned metaTOK, int* length); + const char16_t* repGetStringLiteral(CORINFO_MODULE_HANDLE module, unsigned metaTOK, int* length); void recGetHelperName(CorInfoHelpFunc funcNum, const char* result); void dmpGetHelperName(DWORD key, DWORD value); @@ -754,7 +754,7 @@ class MethodContext CORINFO_CLASS_HANDLE repGetTypeInstantiationArgument(CORINFO_CLASS_HANDLE cls, unsigned index); void recAppendClassName( - CORINFO_CLASS_HANDLE cls, bool fNamespace, bool fFullInst, bool fAssembly, const WCHAR* result); + CORINFO_CLASS_HANDLE cls, bool fNamespace, bool fFullInst, bool fAssembly, const char16_t* result); void dmpAppendClassName(const Agnostic_AppendClassName& key, DWORD value); const WCHAR* repAppendClassName(CORINFO_CLASS_HANDLE cls, bool fNamespace, bool fFullInst, bool fAssembly); diff --git a/src/coreclr/ToolBox/superpmi/superpmi-shim-collector/icorjitcompiler.cpp b/src/coreclr/ToolBox/superpmi/superpmi-shim-collector/icorjitcompiler.cpp index cde7330bc4095..69b5b1177274d 100644 --- a/src/coreclr/ToolBox/superpmi/superpmi-shim-collector/icorjitcompiler.cpp +++ b/src/coreclr/ToolBox/superpmi/superpmi-shim-collector/icorjitcompiler.cpp @@ -10,12 +10,12 @@ #define fatMC // this is nice to have on so ildump works... -CorJitResult __stdcall interceptor_ICJC::compileMethod(ICorJitInfo* comp, /* IN */ - struct CORINFO_METHOD_INFO* info, /* IN */ - unsigned /* code:CorJitFlag */ flags, /* IN */ - BYTE** nativeEntry, /* OUT */ - ULONG* nativeSizeOfCode /* OUT */ - ) +CorJitResult interceptor_ICJC::compileMethod(ICorJitInfo* comp, /* IN */ + struct CORINFO_METHOD_INFO* info, /* IN */ + unsigned /* code:CorJitFlag */ flags, /* IN */ + uint8_t** nativeEntry, /* OUT */ + uint32_t* nativeSizeOfCode /* OUT */ + ) { interceptor_ICJI our_ICorJitInfo; our_ICorJitInfo.original_ICorJitInfo = comp; diff --git a/src/coreclr/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp b/src/coreclr/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp index 9064755d88710..6ba188d598783 100644 --- a/src/coreclr/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp +++ b/src/coreclr/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp @@ -18,7 +18,7 @@ // /**********************************************************************************/ // return flags (defined above, CORINFO_FLG_PUBLIC ...) -DWORD interceptor_ICJI::getMethodAttribs(CORINFO_METHOD_HANDLE ftn /* IN */) +uint32_t interceptor_ICJI::getMethodAttribs(CORINFO_METHOD_HANDLE ftn /* IN */) { mc->cr->AddCall("getMethodAttribs"); DWORD temp = original_ICorJitInfo->getMethodAttribs(ftn); @@ -105,7 +105,7 @@ bool interceptor_ICJI::getMethodInfo(CORINFO_METHOD_HANDLE ftn, /* IN */ CorInfoInline interceptor_ICJI::canInline(CORINFO_METHOD_HANDLE callerHnd, /* IN */ CORINFO_METHOD_HANDLE calleeHnd, /* IN */ - DWORD* pRestrictions /* OUT */ + uint32_t* pRestrictions /* OUT */ ) { struct Param : FilterSuperPMIExceptionsParam_CaptureException @@ -113,7 +113,7 @@ CorInfoInline interceptor_ICJI::canInline(CORINFO_METHOD_HANDLE callerHnd, /* interceptor_ICJI* pThis; CORINFO_METHOD_HANDLE callerHnd; CORINFO_METHOD_HANDLE calleeHnd; - DWORD* pRestrictions; + uint32_t* pRestrictions; CorInfoInline temp; } param; param.pThis = this; @@ -489,13 +489,13 @@ bool interceptor_ICJI::isValidStringRef(CORINFO_MODULE_HANDLE module, /* IN */ return temp; } -LPCWSTR interceptor_ICJI::getStringLiteral(CORINFO_MODULE_HANDLE module, /* IN */ +const char16_t* interceptor_ICJI::getStringLiteral(CORINFO_MODULE_HANDLE module, /* IN */ unsigned metaTOK, /* IN */ int* length /* OUT */ ) { mc->cr->AddCall("getStringLiteral"); - LPCWSTR temp = original_ICorJitInfo->getStringLiteral(module, metaTOK, length); + const char16_t* temp = original_ICorJitInfo->getStringLiteral(module, metaTOK, length); mc->recGetStringLiteral(module, metaTOK, *length, temp); return temp; } @@ -546,15 +546,15 @@ CORINFO_CLASS_HANDLE interceptor_ICJI::getTypeInstantiationArgument(CORINFO_CLAS // If fFullInst=TRUE (regardless of fNamespace and fAssembly), include namespace and assembly for any type parameters // If fAssembly=TRUE, suffix with a comma and the full assembly qualification // return size of representation -int interceptor_ICJI::appendClassName(__deref_inout_ecount(*pnBufLen) WCHAR** ppBuf, - int* pnBufLen, - CORINFO_CLASS_HANDLE cls, - bool fNamespace, - bool fFullInst, - bool fAssembly) +int interceptor_ICJI::appendClassName(__deref_inout_ecount(*pnBufLen) char16_t** ppBuf, + int* pnBufLen, + CORINFO_CLASS_HANDLE cls, + bool fNamespace, + bool fFullInst, + bool fAssembly) { mc->cr->AddCall("appendClassName"); - WCHAR* pBuf = *ppBuf; + char16_t* pBuf = *ppBuf; int nLen = original_ICorJitInfo->appendClassName(ppBuf, pnBufLen, cls, fNamespace, fFullInst, fAssembly); mc->recAppendClassName(cls, fNamespace, fFullInst, fAssembly, pBuf); return nLen; @@ -583,7 +583,7 @@ CorInfoInlineTypeCheck interceptor_ICJI::canInlineTypeCheck(CORINFO_CLASS_HANDLE } // return flags (defined above, CORINFO_FLG_PUBLIC ...) -DWORD interceptor_ICJI::getClassAttribs(CORINFO_CLASS_HANDLE cls) +uint32_t interceptor_ICJI::getClassAttribs(CORINFO_CLASS_HANDLE cls) { mc->cr->AddCall("getClassAttribs"); DWORD temp = original_ICorJitInfo->getClassAttribs(cls); @@ -1012,7 +1012,7 @@ unsigned interceptor_ICJI::getArrayRank(CORINFO_CLASS_HANDLE cls) } // Get static field data for an array -void* interceptor_ICJI::getArrayInitializationData(CORINFO_FIELD_HANDLE field, DWORD size) +void* interceptor_ICJI::getArrayInitializationData(CORINFO_FIELD_HANDLE field, uint32_t size) { mc->cr->AddCall("getArrayInitializationData"); void* temp = original_ICorJitInfo->getArrayInitializationData(field, size); @@ -1121,7 +1121,7 @@ bool interceptor_ICJI::isFieldStatic(CORINFO_FIELD_HANDLE fldHnd) // code generation. void interceptor_ICJI::getBoundaries(CORINFO_METHOD_HANDLE ftn, // [IN] method of interest unsigned int* cILOffsets, // [OUT] size of pILOffsets - DWORD** pILOffsets, // [OUT] IL offsets of interest + uint32_t** pILOffsets, // [OUT] IL offsets of interest // jit MUST free with freeArray! ICorDebugInfo::BoundaryTypes* implictBoundaries // [OUT] tell jit, all boundries of // this type @@ -1344,7 +1344,7 @@ HRESULT interceptor_ICJI::GetErrorHRESULT(struct _EXCEPTION_POINTERS* pException // Fetches the message of the current exception // Returns the size of the message (including terminating null). This can be // greater than bufferLength if the buffer is insufficient. -ULONG interceptor_ICJI::GetErrorMessage(__inout_ecount(bufferLength) LPWSTR buffer, ULONG bufferLength) +uint32_t interceptor_ICJI::GetErrorMessage(__inout_ecount(bufferLength) char16_t *buffer, uint32_t bufferLength) { mc->cr->AddCall("GetErrorMessage"); return original_ICorJitInfo->GetErrorMessage(buffer, bufferLength); @@ -1400,11 +1400,11 @@ void interceptor_ICJI::getEEInfo(CORINFO_EE_INFO* pEEInfoOut) } // Returns name of the JIT timer log -LPCWSTR interceptor_ICJI::getJitTimeLogFilename() +const char16_t* interceptor_ICJI::getJitTimeLogFilename() { mc->cr->AddCall("getJitTimeLogFilename"); - LPCWSTR temp = original_ICorJitInfo->getJitTimeLogFilename(); - mc->recGetJitTimeLogFilename(temp); + const char16_t* temp = original_ICorJitInfo->getJitTimeLogFilename(); + mc->recGetJitTimeLogFilename((LPCWSTR)temp); return temp; } @@ -1485,10 +1485,10 @@ bool interceptor_ICJI::getSystemVAmd64PassStructInRegisterDescriptor( } // Stuff on ICorDynamicInfo -DWORD interceptor_ICJI::getThreadTLSIndex(void** ppIndirection) +uint32_t interceptor_ICJI::getThreadTLSIndex(void** ppIndirection) { mc->cr->AddCall("getThreadTLSIndex"); - DWORD temp = original_ICorJitInfo->getThreadTLSIndex(ppIndirection); + uint32_t temp = original_ICorJitInfo->getThreadTLSIndex(ppIndirection); mc->recGetThreadTLSIndex(ppIndirection, temp); return temp; } @@ -1501,10 +1501,10 @@ const void* interceptor_ICJI::getInlinedCallFrameVptr(void** ppIndirection) return temp; } -LONG* interceptor_ICJI::getAddrOfCaptureThreadGlobal(void** ppIndirection) +int32_t* interceptor_ICJI::getAddrOfCaptureThreadGlobal(void** ppIndirection) { mc->cr->AddCall("getAddrOfCaptureThreadGlobal"); - LONG* temp = original_ICorJitInfo->getAddrOfCaptureThreadGlobal(ppIndirection); + int32_t* temp = original_ICorJitInfo->getAddrOfCaptureThreadGlobal(ppIndirection); mc->recGetAddrOfCaptureThreadGlobal(ppIndirection, temp); return temp; } @@ -1824,10 +1824,10 @@ InfoAccessType interceptor_ICJI::emptyStringLiteral(void** ppValue) // (static fields only) given that 'field' refers to thread local store, // return the ID (TLS index), which is used to find the beginning of the // TLS data area for the particular DLL 'field' is associated with. -DWORD interceptor_ICJI::getFieldThreadLocalStoreID(CORINFO_FIELD_HANDLE field, void** ppIndirection) +uint32_t interceptor_ICJI::getFieldThreadLocalStoreID(CORINFO_FIELD_HANDLE field, void** ppIndirection) { mc->cr->AddCall("getFieldThreadLocalStoreID"); - DWORD temp = original_ICorJitInfo->getFieldThreadLocalStoreID(field, ppIndirection); + uint32_t temp = original_ICorJitInfo->getFieldThreadLocalStoreID(field, ppIndirection); mc->recGetFieldThreadLocalStoreID(field, ppIndirection, temp); return temp; } @@ -1882,10 +1882,10 @@ bool interceptor_ICJI::getTailCallHelpers( // Stuff directly on ICorJitInfo // Returns extended flags for a particular compilation instance. -DWORD interceptor_ICJI::getJitFlags(CORJIT_FLAGS* jitFlags, DWORD sizeInBytes) +uint32_t interceptor_ICJI::getJitFlags(CORJIT_FLAGS* jitFlags, uint32_t sizeInBytes) { mc->cr->AddCall("getJitFlags"); - DWORD result = original_ICorJitInfo->getJitFlags(jitFlags, sizeInBytes); + uint32_t result = original_ICorJitInfo->getJitFlags(jitFlags, sizeInBytes); mc->recGetJitFlags(jitFlags, sizeInBytes, result); return result; } @@ -1902,10 +1902,10 @@ bool interceptor_ICJI::runWithErrorTrap(void (*function)(void*), void* param) } // get a block of memory for the code, readonly data, and read-write data -void interceptor_ICJI::allocMem(ULONG hotCodeSize, /* IN */ - ULONG coldCodeSize, /* IN */ - ULONG roDataSize, /* IN */ - ULONG xcptnsCount, /* IN */ +void interceptor_ICJI::allocMem(uint32_t hotCodeSize, /* IN */ + uint32_t coldCodeSize, /* IN */ + uint32_t roDataSize, /* IN */ + uint32_t xcptnsCount, /* IN */ CorJitAllocMemFlag flag, /* IN */ void** hotCodeBlock, /* OUT */ void** coldCodeBlock, /* OUT */ @@ -1930,9 +1930,9 @@ void interceptor_ICJI::allocMem(ULONG hotCodeSize, /* IN */ // For prejitted code we split up the unwinding information into // separate sections .rdata and .pdata. // -void interceptor_ICJI::reserveUnwindInfo(bool isFunclet, /* IN */ - bool isColdCode, /* IN */ - ULONG unwindSize /* IN */ +void interceptor_ICJI::reserveUnwindInfo(bool isFunclet, /* IN */ + bool isColdCode, /* IN */ + uint32_t unwindSize /* IN */ ) { mc->cr->AddCall("reserveUnwindInfo"); @@ -1957,12 +1957,12 @@ void interceptor_ICJI::reserveUnwindInfo(bool isFunclet, /* IN */ // pUnwindBlock pointer to unwind info // funcKind type of funclet (main method code, handler, filter) // -void interceptor_ICJI::allocUnwindInfo(BYTE* pHotCode, /* IN */ - BYTE* pColdCode, /* IN */ - ULONG startOffset, /* IN */ - ULONG endOffset, /* IN */ - ULONG unwindSize, /* IN */ - BYTE* pUnwindBlock, /* IN */ +void interceptor_ICJI::allocUnwindInfo(uint8_t* pHotCode, /* IN */ + uint8_t* pColdCode, /* IN */ + uint32_t startOffset, /* IN */ + uint32_t endOffset, /* IN */ + uint32_t unwindSize, /* IN */ + uint8_t* pUnwindBlock, /* IN */ CorJitFuncKind funcKind /* IN */ ) { @@ -2035,8 +2035,8 @@ void interceptor_ICJI::reportFatalError(CorJitResult result) // for jitted basic blocks. HRESULT interceptor_ICJI::allocPgoInstrumentationBySchema(CORINFO_METHOD_HANDLE ftnHnd, PgoInstrumentationSchema* pSchema, - UINT32 countSchemaItems, - BYTE** pInstrumentationData) + uint32_t countSchemaItems, + uint8_t** pInstrumentationData) { mc->cr->AddCall("allocPgoInstrumentationBySchema"); HRESULT result = original_ICorJitInfo->allocPgoInstrumentationBySchema(ftnHnd, pSchema, countSchemaItems, pInstrumentationData); @@ -2048,8 +2048,8 @@ HRESULT interceptor_ICJI::allocPgoInstrumentationBySchema(CORINFO_METHOD_HANDLE // of the buffer is the same as the format the JIT passes to allocMethodBlockCounts. HRESULT interceptor_ICJI::getPgoInstrumentationResults(CORINFO_METHOD_HANDLE ftnHnd, PgoInstrumentationSchema **pSchema, // pointer to the schema table which describes the instrumentation results (pointer will not remain valid after jit completes) - UINT32 * pCountSchemaItems, // pointer to the count schema items - BYTE ** pInstrumentationData) // pointer to the actual instrumentation data (pointer will not remain valid after jit completes) + uint32_t * pCountSchemaItems, // pointer to the count schema items + uint8_t ** pInstrumentationData) // pointer to the actual instrumentation data (pointer will not remain valid after jit completes) { mc->cr->AddCall("getPgoInstrumentationResults"); HRESULT temp = original_ICorJitInfo->getPgoInstrumentationResults(ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData); @@ -2062,9 +2062,9 @@ HRESULT interceptor_ICJI::getPgoInstrumentationResults(CORINFO_METHOD_HANDLE // being called. CORINFO_CLASS_HANDLE interceptor_ICJI::getLikelyClass(CORINFO_METHOD_HANDLE ftnHnd, CORINFO_CLASS_HANDLE baseHnd, - UINT32 ilOffset, - UINT32* pLikelihood, - UINT32* pNumberOfClasses) + uint32_t ilOffset, + uint32_t* pLikelihood, + uint32_t* pNumberOfClasses) { mc->cr->AddCall("getLikelyClass"); CORINFO_CLASS_HANDLE result = original_ICorJitInfo->getLikelyClass(ftnHnd, baseHnd, ilOffset, pLikelihood, pNumberOfClasses); @@ -2076,7 +2076,7 @@ CORINFO_CLASS_HANDLE interceptor_ICJI::getLikelyClass(CORINFO_METHOD_HANDLE ftnH // the signature information and method handle the JIT used to lay out the call site. If // the call site has no signature information (e.g. a helper call) or has no method handle // (e.g. a CALLI P/Invoke), then null should be passed instead. -void interceptor_ICJI::recordCallSite(ULONG instrOffset, /* IN */ +void interceptor_ICJI::recordCallSite(uint32_t instrOffset, /* IN */ CORINFO_SIG_INFO* callSig, /* IN */ CORINFO_METHOD_HANDLE methodHandle /* IN */ ) @@ -2088,11 +2088,11 @@ void interceptor_ICJI::recordCallSite(ULONG instrOffset, /* IN * // A relocation is recorded if we are pre-jitting. // A jump thunk may be inserted if we are jitting -void interceptor_ICJI::recordRelocation(void* location, /* IN */ - void* target, /* IN */ - WORD fRelocType, /* IN */ - WORD slotNum, /* IN */ - INT32 addlDelta /* IN */ +void interceptor_ICJI::recordRelocation(void* location, /* IN */ + void* target, /* IN */ + uint16_t fRelocType, /* IN */ + uint16_t slotNum, /* IN */ + int32_t addlDelta /* IN */ ) { mc->cr->AddCall("recordRelocation"); @@ -2100,7 +2100,7 @@ void interceptor_ICJI::recordRelocation(void* location, /* IN */ mc->cr->recRecordRelocation(location, target, fRelocType, slotNum, addlDelta); } -WORD interceptor_ICJI::getRelocTypeHint(void* target) +uint16_t interceptor_ICJI::getRelocTypeHint(void* target) { mc->cr->AddCall("getRelocTypeHint"); WORD result = original_ICorJitInfo->getRelocTypeHint(target); @@ -2113,7 +2113,7 @@ WORD interceptor_ICJI::getRelocTypeHint(void* target) // is cross-compiling (such as the case for crossgen), it will return a // different value than if it was compiling for the host architecture. // -DWORD interceptor_ICJI::getExpectedTargetArchitecture() +uint32_t interceptor_ICJI::getExpectedTargetArchitecture() { mc->cr->AddCall("getExpectedTargetArchitecture"); DWORD result = original_ICorJitInfo->getExpectedTargetArchitecture(); diff --git a/src/coreclr/ToolBox/superpmi/superpmi-shim-counter/icorjitcompiler.cpp b/src/coreclr/ToolBox/superpmi/superpmi-shim-counter/icorjitcompiler.cpp index 710d7c7375fd6..36f262611d9d6 100644 --- a/src/coreclr/ToolBox/superpmi/superpmi-shim-counter/icorjitcompiler.cpp +++ b/src/coreclr/ToolBox/superpmi/superpmi-shim-counter/icorjitcompiler.cpp @@ -5,12 +5,12 @@ #include "icorjitcompiler.h" #include "icorjitinfo.h" -CorJitResult __stdcall interceptor_ICJC::compileMethod(ICorJitInfo* comp, /* IN */ - struct CORINFO_METHOD_INFO* info, /* IN */ - unsigned /* code:CorJitFlag */ flags, /* IN */ - BYTE** nativeEntry, /* OUT */ - ULONG* nativeSizeOfCode /* OUT */ - ) +CorJitResult interceptor_ICJC::compileMethod(ICorJitInfo* comp, /* IN */ + struct CORINFO_METHOD_INFO* info, /* IN */ + unsigned /* code:CorJitFlag */ flags, /* IN */ + uint8_t** nativeEntry, /* OUT */ + uint32_t* nativeSizeOfCode /* OUT */ + ) { interceptor_ICJI our_ICorJitInfo; our_ICorJitInfo.original_ICorJitInfo = comp; diff --git a/src/coreclr/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp b/src/coreclr/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp index 1f832798ce34f..674d9f4e1fd10 100644 --- a/src/coreclr/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp +++ b/src/coreclr/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp @@ -12,7 +12,7 @@ #include "spmiutil.h" -DWORD interceptor_ICJI::getMethodAttribs( +uint32_t interceptor_ICJI::getMethodAttribs( CORINFO_METHOD_HANDLE ftn) { mcs->AddCall("getMethodAttribs"); @@ -47,7 +47,7 @@ bool interceptor_ICJI::getMethodInfo( CorInfoInline interceptor_ICJI::canInline( CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd, - DWORD* pRestrictions) + uint32_t* pRestrictions) { mcs->AddCall("canInline"); return original_ICorJitInfo->canInline(callerHnd, calleeHnd, pRestrictions); @@ -298,7 +298,7 @@ bool interceptor_ICJI::isValidStringRef( return original_ICorJitInfo->isValidStringRef(module, metaTOK); } -LPCWSTR interceptor_ICJI::getStringLiteral( +const char16_t* interceptor_ICJI::getStringLiteral( CORINFO_MODULE_HANDLE module, unsigned metaTOK, int* length) @@ -338,7 +338,7 @@ CORINFO_CLASS_HANDLE interceptor_ICJI::getTypeInstantiationArgument( } int interceptor_ICJI::appendClassName( - WCHAR** ppBuf, + char16_t** ppBuf, int* pnBufLen, CORINFO_CLASS_HANDLE cls, bool fNamespace, @@ -364,7 +364,7 @@ CorInfoInlineTypeCheck interceptor_ICJI::canInlineTypeCheck( return original_ICorJitInfo->canInlineTypeCheck(cls, source); } -DWORD interceptor_ICJI::getClassAttribs( +uint32_t interceptor_ICJI::getClassAttribs( CORINFO_CLASS_HANDLE cls) { mcs->AddCall("getClassAttribs"); @@ -453,7 +453,7 @@ unsigned interceptor_ICJI::getClassAlignmentRequirement( unsigned interceptor_ICJI::getClassGClayout( CORINFO_CLASS_HANDLE cls, - BYTE* gcPtrs) + uint8_t* gcPtrs) { mcs->AddCall("getClassGClayout"); return original_ICorJitInfo->getClassGClayout(cls, gcPtrs); @@ -468,7 +468,7 @@ unsigned interceptor_ICJI::getClassNumInstanceFields( CORINFO_FIELD_HANDLE interceptor_ICJI::getFieldInClass( CORINFO_CLASS_HANDLE clsHnd, - INT num) + int32_t num) { mcs->AddCall("getFieldInClass"); return original_ICorJitInfo->getFieldInClass(clsHnd, num); @@ -476,7 +476,7 @@ CORINFO_FIELD_HANDLE interceptor_ICJI::getFieldInClass( bool interceptor_ICJI::checkMethodModifier( CORINFO_METHOD_HANDLE hMethod, - LPCSTR modifier, + const char* modifier, bool fOptional) { mcs->AddCall("checkMethodModifier"); @@ -684,7 +684,7 @@ unsigned interceptor_ICJI::getArrayRank( void* interceptor_ICJI::getArrayInitializationData( CORINFO_FIELD_HANDLE field, - DWORD size) + uint32_t size) { mcs->AddCall("getArrayInitializationData"); return original_ICorJitInfo->getArrayInitializationData(field, size); @@ -750,7 +750,7 @@ bool interceptor_ICJI::isFieldStatic( void interceptor_ICJI::getBoundaries( CORINFO_METHOD_HANDLE ftn, unsigned int* cILOffsets, - DWORD** pILOffsets, + uint32_t** pILOffsets, ICorDebugInfo::BoundaryTypes* implictBoundaries) { mcs->AddCall("getBoundaries"); @@ -759,7 +759,7 @@ void interceptor_ICJI::getBoundaries( void interceptor_ICJI::setBoundaries( CORINFO_METHOD_HANDLE ftn, - ULONG32 cMap, + uint32_t cMap, ICorDebugInfo::OffsetMapping* pMap) { mcs->AddCall("setBoundaries"); @@ -768,7 +768,7 @@ void interceptor_ICJI::setBoundaries( void interceptor_ICJI::getVars( CORINFO_METHOD_HANDLE ftn, - ULONG32* cVars, + uint32_t* cVars, ICorDebugInfo::ILVarInfo** vars, bool* extendOthers) { @@ -778,7 +778,7 @@ void interceptor_ICJI::getVars( void interceptor_ICJI::setVars( CORINFO_METHOD_HANDLE ftn, - ULONG32 cVars, + uint32_t cVars, ICorDebugInfo::NativeVarInfo* vars) { mcs->AddCall("setVars"); @@ -830,16 +830,16 @@ CorInfoHFAElemType interceptor_ICJI::getHFAType( return original_ICorJitInfo->getHFAType(hClass); } -HRESULT interceptor_ICJI::GetErrorHRESULT( +JITINTERFACE_HRESULT interceptor_ICJI::GetErrorHRESULT( struct _EXCEPTION_POINTERS* pExceptionPointers) { mcs->AddCall("GetErrorHRESULT"); return original_ICorJitInfo->GetErrorHRESULT(pExceptionPointers); } -ULONG interceptor_ICJI::GetErrorMessage( - LPWSTR buffer, - ULONG bufferLength) +uint32_t interceptor_ICJI::GetErrorMessage( + char16_t* buffer, + uint32_t bufferLength) { mcs->AddCall("GetErrorMessage"); return original_ICorJitInfo->GetErrorMessage(buffer, bufferLength); @@ -860,7 +860,7 @@ void interceptor_ICJI::HandleException( } void interceptor_ICJI::ThrowExceptionForJitResult( - HRESULT result) + JITINTERFACE_HRESULT result) { mcs->AddCall("ThrowExceptionForJitResult"); original_ICorJitInfo->ThrowExceptionForJitResult(result); @@ -888,7 +888,7 @@ void interceptor_ICJI::getEEInfo( original_ICorJitInfo->getEEInfo(pEEInfoOut); } -LPCWSTR interceptor_ICJI::getJitTimeLogFilename() +const char16_t* interceptor_ICJI::getJitTimeLogFilename() { mcs->AddCall("getJitTimeLogFilename"); return original_ICorJitInfo->getJitTimeLogFilename(); @@ -944,7 +944,7 @@ bool interceptor_ICJI::getSystemVAmd64PassStructInRegisterDescriptor( return original_ICorJitInfo->getSystemVAmd64PassStructInRegisterDescriptor(structHnd, structPassInRegDescPtr); } -DWORD interceptor_ICJI::getThreadTLSIndex( +uint32_t interceptor_ICJI::getThreadTLSIndex( void** ppIndirection) { mcs->AddCall("getThreadTLSIndex"); @@ -958,7 +958,7 @@ const void* interceptor_ICJI::getInlinedCallFrameVptr( return original_ICorJitInfo->getInlinedCallFrameVptr(ppIndirection); } -LONG* interceptor_ICJI::getAddrOfCaptureThreadGlobal( +int32_t* interceptor_ICJI::getAddrOfCaptureThreadGlobal( void** ppIndirection) { mcs->AddCall("getAddrOfCaptureThreadGlobal"); @@ -1062,7 +1062,7 @@ void interceptor_ICJI::getAddressOfPInvokeTarget( original_ICorJitInfo->getAddressOfPInvokeTarget(method, pLookup); } -LPVOID interceptor_ICJI::GetCookieForPInvokeCalliSig( +void* interceptor_ICJI::GetCookieForPInvokeCalliSig( CORINFO_SIG_INFO* szMetaSig, void** ppIndirection) { @@ -1175,7 +1175,7 @@ InfoAccessType interceptor_ICJI::emptyStringLiteral( return original_ICorJitInfo->emptyStringLiteral(ppValue); } -DWORD interceptor_ICJI::getFieldThreadLocalStoreID( +uint32_t interceptor_ICJI::getFieldThreadLocalStoreID( CORINFO_FIELD_HANDLE field, void** ppIndirection) { @@ -1243,10 +1243,10 @@ bool interceptor_ICJI::notifyInstructionSetUsage( } void interceptor_ICJI::allocMem( - ULONG hotCodeSize, - ULONG coldCodeSize, - ULONG roDataSize, - ULONG xcptnsCount, + uint32_t hotCodeSize, + uint32_t coldCodeSize, + uint32_t roDataSize, + uint32_t xcptnsCount, CorJitAllocMemFlag flag, void** hotCodeBlock, void** coldCodeBlock, @@ -1259,19 +1259,19 @@ void interceptor_ICJI::allocMem( void interceptor_ICJI::reserveUnwindInfo( bool isFunclet, bool isColdCode, - ULONG unwindSize) + uint32_t unwindSize) { mcs->AddCall("reserveUnwindInfo"); original_ICorJitInfo->reserveUnwindInfo(isFunclet, isColdCode, unwindSize); } void interceptor_ICJI::allocUnwindInfo( - BYTE* pHotCode, - BYTE* pColdCode, - ULONG startOffset, - ULONG endOffset, - ULONG unwindSize, - BYTE* pUnwindBlock, + uint8_t* pHotCode, + uint8_t* pColdCode, + uint32_t startOffset, + uint32_t endOffset, + uint32_t unwindSize, + uint8_t* pUnwindBlock, CorJitFuncKind funcKind) { mcs->AddCall("allocUnwindInfo"); @@ -1325,21 +1325,21 @@ void interceptor_ICJI::reportFatalError( original_ICorJitInfo->reportFatalError(result); } -HRESULT interceptor_ICJI::getPgoInstrumentationResults( +JITINTERFACE_HRESULT interceptor_ICJI::getPgoInstrumentationResults( CORINFO_METHOD_HANDLE ftnHnd, - PgoInstrumentationSchema** pSchema, - UINT32* pCountSchemaItems, - BYTE** pInstrumentationData) + ICorJitInfo::PgoInstrumentationSchema** pSchema, + uint32_t* pCountSchemaItems, + uint8_t** pInstrumentationData) { mcs->AddCall("getPgoInstrumentationResults"); return original_ICorJitInfo->getPgoInstrumentationResults(ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData); } -HRESULT interceptor_ICJI::allocPgoInstrumentationBySchema( +JITINTERFACE_HRESULT interceptor_ICJI::allocPgoInstrumentationBySchema( CORINFO_METHOD_HANDLE ftnHnd, - PgoInstrumentationSchema* pSchema, - UINT32 countSchemaItems, - BYTE** pInstrumentationData) + ICorJitInfo::PgoInstrumentationSchema* pSchema, + uint32_t countSchemaItems, + uint8_t** pInstrumentationData) { mcs->AddCall("allocPgoInstrumentationBySchema"); return original_ICorJitInfo->allocPgoInstrumentationBySchema(ftnHnd, pSchema, countSchemaItems, pInstrumentationData); @@ -1348,16 +1348,16 @@ HRESULT interceptor_ICJI::allocPgoInstrumentationBySchema( CORINFO_CLASS_HANDLE interceptor_ICJI::getLikelyClass( CORINFO_METHOD_HANDLE ftnHnd, CORINFO_CLASS_HANDLE baseHnd, - UINT32 ilOffset, - UINT32* pLikelihood, - UINT32* pNumberOfClasses) + uint32_t ilOffset, + uint32_t* pLikelihood, + uint32_t* pNumberOfClasses) { mcs->AddCall("getLikelyClass"); return original_ICorJitInfo->getLikelyClass(ftnHnd, baseHnd, ilOffset, pLikelihood, pNumberOfClasses); } void interceptor_ICJI::recordCallSite( - ULONG instrOffset, + uint32_t instrOffset, CORINFO_SIG_INFO* callSig, CORINFO_METHOD_HANDLE methodHandle) { @@ -1368,30 +1368,30 @@ void interceptor_ICJI::recordCallSite( void interceptor_ICJI::recordRelocation( void* location, void* target, - WORD fRelocType, - WORD slotNum, - INT32 addlDelta) + uint16_t fRelocType, + uint16_t slotNum, + int32_t addlDelta) { mcs->AddCall("recordRelocation"); original_ICorJitInfo->recordRelocation(location, target, fRelocType, slotNum, addlDelta); } -WORD interceptor_ICJI::getRelocTypeHint( +uint16_t interceptor_ICJI::getRelocTypeHint( void* target) { mcs->AddCall("getRelocTypeHint"); return original_ICorJitInfo->getRelocTypeHint(target); } -DWORD interceptor_ICJI::getExpectedTargetArchitecture() +uint32_t interceptor_ICJI::getExpectedTargetArchitecture() { mcs->AddCall("getExpectedTargetArchitecture"); return original_ICorJitInfo->getExpectedTargetArchitecture(); } -DWORD interceptor_ICJI::getJitFlags( +uint32_t interceptor_ICJI::getJitFlags( CORJIT_FLAGS* flags, - DWORD sizeInBytes) + uint32_t sizeInBytes) { mcs->AddCall("getJitFlags"); return original_ICorJitInfo->getJitFlags(flags, sizeInBytes); diff --git a/src/coreclr/ToolBox/superpmi/superpmi-shim-simple/icorjitcompiler.cpp b/src/coreclr/ToolBox/superpmi/superpmi-shim-simple/icorjitcompiler.cpp index 028fca3b87f20..c634843e44289 100644 --- a/src/coreclr/ToolBox/superpmi/superpmi-shim-simple/icorjitcompiler.cpp +++ b/src/coreclr/ToolBox/superpmi/superpmi-shim-simple/icorjitcompiler.cpp @@ -5,12 +5,12 @@ #include "icorjitcompiler.h" #include "icorjitinfo.h" -CorJitResult __stdcall interceptor_ICJC::compileMethod(ICorJitInfo* comp, /* IN */ - struct CORINFO_METHOD_INFO* info, /* IN */ - unsigned /* code:CorJitFlag */ flags, /* IN */ - BYTE** nativeEntry, /* OUT */ - ULONG* nativeSizeOfCode /* OUT */ - ) +CorJitResult interceptor_ICJC::compileMethod(ICorJitInfo* comp, /* IN */ + struct CORINFO_METHOD_INFO* info, /* IN */ + unsigned /* code:CorJitFlag */ flags, /* IN */ + uint8_t** nativeEntry, /* OUT */ + uint32_t* nativeSizeOfCode /* OUT */ + ) { interceptor_ICJI our_ICorJitInfo; our_ICorJitInfo.original_ICorJitInfo = comp; diff --git a/src/coreclr/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp b/src/coreclr/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp index 373b21ffa5219..a276453ba69c9 100644 --- a/src/coreclr/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp +++ b/src/coreclr/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp @@ -12,7 +12,7 @@ #include "spmiutil.h" -DWORD interceptor_ICJI::getMethodAttribs( +uint32_t interceptor_ICJI::getMethodAttribs( CORINFO_METHOD_HANDLE ftn) { return original_ICorJitInfo->getMethodAttribs(ftn); @@ -43,7 +43,7 @@ bool interceptor_ICJI::getMethodInfo( CorInfoInline interceptor_ICJI::canInline( CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd, - DWORD* pRestrictions) + uint32_t* pRestrictions) { return original_ICorJitInfo->canInline(callerHnd, calleeHnd, pRestrictions); } @@ -263,7 +263,7 @@ bool interceptor_ICJI::isValidStringRef( return original_ICorJitInfo->isValidStringRef(module, metaTOK); } -LPCWSTR interceptor_ICJI::getStringLiteral( +const char16_t* interceptor_ICJI::getStringLiteral( CORINFO_MODULE_HANDLE module, unsigned metaTOK, int* length) @@ -298,7 +298,7 @@ CORINFO_CLASS_HANDLE interceptor_ICJI::getTypeInstantiationArgument( } int interceptor_ICJI::appendClassName( - WCHAR** ppBuf, + char16_t** ppBuf, int* pnBufLen, CORINFO_CLASS_HANDLE cls, bool fNamespace, @@ -321,7 +321,7 @@ CorInfoInlineTypeCheck interceptor_ICJI::canInlineTypeCheck( return original_ICorJitInfo->canInlineTypeCheck(cls, source); } -DWORD interceptor_ICJI::getClassAttribs( +uint32_t interceptor_ICJI::getClassAttribs( CORINFO_CLASS_HANDLE cls) { return original_ICorJitInfo->getClassAttribs(cls); @@ -398,7 +398,7 @@ unsigned interceptor_ICJI::getClassAlignmentRequirement( unsigned interceptor_ICJI::getClassGClayout( CORINFO_CLASS_HANDLE cls, - BYTE* gcPtrs) + uint8_t* gcPtrs) { return original_ICorJitInfo->getClassGClayout(cls, gcPtrs); } @@ -411,14 +411,14 @@ unsigned interceptor_ICJI::getClassNumInstanceFields( CORINFO_FIELD_HANDLE interceptor_ICJI::getFieldInClass( CORINFO_CLASS_HANDLE clsHnd, - INT num) + int32_t num) { return original_ICorJitInfo->getFieldInClass(clsHnd, num); } bool interceptor_ICJI::checkMethodModifier( CORINFO_METHOD_HANDLE hMethod, - LPCSTR modifier, + const char* modifier, bool fOptional) { return original_ICorJitInfo->checkMethodModifier(hMethod, modifier, fOptional); @@ -599,7 +599,7 @@ unsigned interceptor_ICJI::getArrayRank( void* interceptor_ICJI::getArrayInitializationData( CORINFO_FIELD_HANDLE field, - DWORD size) + uint32_t size) { return original_ICorJitInfo->getArrayInitializationData(field, size); } @@ -657,7 +657,7 @@ bool interceptor_ICJI::isFieldStatic( void interceptor_ICJI::getBoundaries( CORINFO_METHOD_HANDLE ftn, unsigned int* cILOffsets, - DWORD** pILOffsets, + uint32_t** pILOffsets, ICorDebugInfo::BoundaryTypes* implictBoundaries) { original_ICorJitInfo->getBoundaries(ftn, cILOffsets, pILOffsets, implictBoundaries); @@ -665,7 +665,7 @@ void interceptor_ICJI::getBoundaries( void interceptor_ICJI::setBoundaries( CORINFO_METHOD_HANDLE ftn, - ULONG32 cMap, + uint32_t cMap, ICorDebugInfo::OffsetMapping* pMap) { original_ICorJitInfo->setBoundaries(ftn, cMap, pMap); @@ -673,7 +673,7 @@ void interceptor_ICJI::setBoundaries( void interceptor_ICJI::getVars( CORINFO_METHOD_HANDLE ftn, - ULONG32* cVars, + uint32_t* cVars, ICorDebugInfo::ILVarInfo** vars, bool* extendOthers) { @@ -682,7 +682,7 @@ void interceptor_ICJI::getVars( void interceptor_ICJI::setVars( CORINFO_METHOD_HANDLE ftn, - ULONG32 cVars, + uint32_t cVars, ICorDebugInfo::NativeVarInfo* vars) { original_ICorJitInfo->setVars(ftn, cVars, vars); @@ -727,15 +727,15 @@ CorInfoHFAElemType interceptor_ICJI::getHFAType( return original_ICorJitInfo->getHFAType(hClass); } -HRESULT interceptor_ICJI::GetErrorHRESULT( +JITINTERFACE_HRESULT interceptor_ICJI::GetErrorHRESULT( struct _EXCEPTION_POINTERS* pExceptionPointers) { return original_ICorJitInfo->GetErrorHRESULT(pExceptionPointers); } -ULONG interceptor_ICJI::GetErrorMessage( - LPWSTR buffer, - ULONG bufferLength) +uint32_t interceptor_ICJI::GetErrorMessage( + char16_t* buffer, + uint32_t bufferLength) { return original_ICorJitInfo->GetErrorMessage(buffer, bufferLength); } @@ -753,7 +753,7 @@ void interceptor_ICJI::HandleException( } void interceptor_ICJI::ThrowExceptionForJitResult( - HRESULT result) + JITINTERFACE_HRESULT result) { original_ICorJitInfo->ThrowExceptionForJitResult(result); } @@ -777,7 +777,7 @@ void interceptor_ICJI::getEEInfo( original_ICorJitInfo->getEEInfo(pEEInfoOut); } -LPCWSTR interceptor_ICJI::getJitTimeLogFilename() +const char16_t* interceptor_ICJI::getJitTimeLogFilename() { return original_ICorJitInfo->getJitTimeLogFilename(); } @@ -826,7 +826,7 @@ bool interceptor_ICJI::getSystemVAmd64PassStructInRegisterDescriptor( return original_ICorJitInfo->getSystemVAmd64PassStructInRegisterDescriptor(structHnd, structPassInRegDescPtr); } -DWORD interceptor_ICJI::getThreadTLSIndex( +uint32_t interceptor_ICJI::getThreadTLSIndex( void** ppIndirection) { return original_ICorJitInfo->getThreadTLSIndex(ppIndirection); @@ -838,7 +838,7 @@ const void* interceptor_ICJI::getInlinedCallFrameVptr( return original_ICorJitInfo->getInlinedCallFrameVptr(ppIndirection); } -LONG* interceptor_ICJI::getAddrOfCaptureThreadGlobal( +int32_t* interceptor_ICJI::getAddrOfCaptureThreadGlobal( void** ppIndirection) { return original_ICorJitInfo->getAddrOfCaptureThreadGlobal(ppIndirection); @@ -929,7 +929,7 @@ void interceptor_ICJI::getAddressOfPInvokeTarget( original_ICorJitInfo->getAddressOfPInvokeTarget(method, pLookup); } -LPVOID interceptor_ICJI::GetCookieForPInvokeCalliSig( +void* interceptor_ICJI::GetCookieForPInvokeCalliSig( CORINFO_SIG_INFO* szMetaSig, void** ppIndirection) { @@ -1028,7 +1028,7 @@ InfoAccessType interceptor_ICJI::emptyStringLiteral( return original_ICorJitInfo->emptyStringLiteral(ppValue); } -DWORD interceptor_ICJI::getFieldThreadLocalStoreID( +uint32_t interceptor_ICJI::getFieldThreadLocalStoreID( CORINFO_FIELD_HANDLE field, void** ppIndirection) { @@ -1088,10 +1088,10 @@ bool interceptor_ICJI::notifyInstructionSetUsage( } void interceptor_ICJI::allocMem( - ULONG hotCodeSize, - ULONG coldCodeSize, - ULONG roDataSize, - ULONG xcptnsCount, + uint32_t hotCodeSize, + uint32_t coldCodeSize, + uint32_t roDataSize, + uint32_t xcptnsCount, CorJitAllocMemFlag flag, void** hotCodeBlock, void** coldCodeBlock, @@ -1103,18 +1103,18 @@ void interceptor_ICJI::allocMem( void interceptor_ICJI::reserveUnwindInfo( bool isFunclet, bool isColdCode, - ULONG unwindSize) + uint32_t unwindSize) { original_ICorJitInfo->reserveUnwindInfo(isFunclet, isColdCode, unwindSize); } void interceptor_ICJI::allocUnwindInfo( - BYTE* pHotCode, - BYTE* pColdCode, - ULONG startOffset, - ULONG endOffset, - ULONG unwindSize, - BYTE* pUnwindBlock, + uint8_t* pHotCode, + uint8_t* pColdCode, + uint32_t startOffset, + uint32_t endOffset, + uint32_t unwindSize, + uint8_t* pUnwindBlock, CorJitFuncKind funcKind) { original_ICorJitInfo->allocUnwindInfo(pHotCode, pColdCode, startOffset, endOffset, unwindSize, pUnwindBlock, funcKind); @@ -1161,20 +1161,20 @@ void interceptor_ICJI::reportFatalError( original_ICorJitInfo->reportFatalError(result); } -HRESULT interceptor_ICJI::getPgoInstrumentationResults( +JITINTERFACE_HRESULT interceptor_ICJI::getPgoInstrumentationResults( CORINFO_METHOD_HANDLE ftnHnd, - PgoInstrumentationSchema** pSchema, - UINT32* pCountSchemaItems, - BYTE** pInstrumentationData) + ICorJitInfo::PgoInstrumentationSchema** pSchema, + uint32_t* pCountSchemaItems, + uint8_t** pInstrumentationData) { return original_ICorJitInfo->getPgoInstrumentationResults(ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData); } -HRESULT interceptor_ICJI::allocPgoInstrumentationBySchema( +JITINTERFACE_HRESULT interceptor_ICJI::allocPgoInstrumentationBySchema( CORINFO_METHOD_HANDLE ftnHnd, - PgoInstrumentationSchema* pSchema, - UINT32 countSchemaItems, - BYTE** pInstrumentationData) + ICorJitInfo::PgoInstrumentationSchema* pSchema, + uint32_t countSchemaItems, + uint8_t** pInstrumentationData) { return original_ICorJitInfo->allocPgoInstrumentationBySchema(ftnHnd, pSchema, countSchemaItems, pInstrumentationData); } @@ -1182,15 +1182,15 @@ HRESULT interceptor_ICJI::allocPgoInstrumentationBySchema( CORINFO_CLASS_HANDLE interceptor_ICJI::getLikelyClass( CORINFO_METHOD_HANDLE ftnHnd, CORINFO_CLASS_HANDLE baseHnd, - UINT32 ilOffset, - UINT32* pLikelihood, - UINT32* pNumberOfClasses) + uint32_t ilOffset, + uint32_t* pLikelihood, + uint32_t* pNumberOfClasses) { return original_ICorJitInfo->getLikelyClass(ftnHnd, baseHnd, ilOffset, pLikelihood, pNumberOfClasses); } void interceptor_ICJI::recordCallSite( - ULONG instrOffset, + uint32_t instrOffset, CORINFO_SIG_INFO* callSig, CORINFO_METHOD_HANDLE methodHandle) { @@ -1200,27 +1200,27 @@ void interceptor_ICJI::recordCallSite( void interceptor_ICJI::recordRelocation( void* location, void* target, - WORD fRelocType, - WORD slotNum, - INT32 addlDelta) + uint16_t fRelocType, + uint16_t slotNum, + int32_t addlDelta) { original_ICorJitInfo->recordRelocation(location, target, fRelocType, slotNum, addlDelta); } -WORD interceptor_ICJI::getRelocTypeHint( +uint16_t interceptor_ICJI::getRelocTypeHint( void* target) { return original_ICorJitInfo->getRelocTypeHint(target); } -DWORD interceptor_ICJI::getExpectedTargetArchitecture() +uint32_t interceptor_ICJI::getExpectedTargetArchitecture() { return original_ICorJitInfo->getExpectedTargetArchitecture(); } -DWORD interceptor_ICJI::getJitFlags( +uint32_t interceptor_ICJI::getJitFlags( CORJIT_FLAGS* flags, - DWORD sizeInBytes) + uint32_t sizeInBytes) { return original_ICorJitInfo->getJitFlags(flags, sizeInBytes); } diff --git a/src/coreclr/ToolBox/superpmi/superpmi/icorjitinfo.cpp b/src/coreclr/ToolBox/superpmi/superpmi/icorjitinfo.cpp index d2490a27a1678..dbc80e1a72bd8 100644 --- a/src/coreclr/ToolBox/superpmi/superpmi/icorjitinfo.cpp +++ b/src/coreclr/ToolBox/superpmi/superpmi/icorjitinfo.cpp @@ -24,7 +24,7 @@ ICorJitInfo* InitICorJitInfo(JitInstance* jitInstance) /**********************************************************************************/ // return flags (defined above, CORINFO_FLG_PUBLIC ...) -DWORD MyICJI::getMethodAttribs(CORINFO_METHOD_HANDLE ftn /* IN */) +uint32_t MyICJI::getMethodAttribs(CORINFO_METHOD_HANDLE ftn /* IN */) { jitInstance->mc->cr->AddCall("getMethodAttribs"); return jitInstance->mc->repGetMethodAttribs(ftn); @@ -83,7 +83,7 @@ bool MyICJI::getMethodInfo(CORINFO_METHOD_HANDLE ftn, /* IN */ CorInfoInline MyICJI::canInline(CORINFO_METHOD_HANDLE callerHnd, /* IN */ CORINFO_METHOD_HANDLE calleeHnd, /* IN */ - DWORD* pRestrictions /* OUT */ + uint32_t* pRestrictions /* OUT */ ) { jitInstance->mc->cr->AddCall("canInline"); @@ -377,10 +377,10 @@ bool MyICJI::isValidStringRef(CORINFO_MODULE_HANDLE module, /* IN */ return jitInstance->mc->repIsValidStringRef(module, metaTOK); } -LPCWSTR MyICJI::getStringLiteral(CORINFO_MODULE_HANDLE module, /* IN */ - unsigned metaTOK, /* IN */ - int* length /* OUT */ - ) +const char16_t* MyICJI::getStringLiteral(CORINFO_MODULE_HANDLE module, /* IN */ + unsigned metaTOK, /* IN */ + int* length /* OUT */ + ) { jitInstance->mc->cr->AddCall("getStringLiteral"); return jitInstance->mc->repGetStringLiteral(module, metaTOK, length); @@ -427,7 +427,7 @@ CORINFO_CLASS_HANDLE MyICJI::getTypeInstantiationArgument(CORINFO_CLASS_HANDLE c // If fFullInst=TRUE (regardless of fNamespace and fAssembly), include namespace and assembly for any type parameters // If fAssembly=TRUE, suffix with a comma and the full assembly qualification // return size of representation -int MyICJI::appendClassName(__deref_inout_ecount(*pnBufLen) WCHAR** ppBuf, +int MyICJI::appendClassName(__deref_inout_ecount(*pnBufLen) char16_t** ppBuf, int* pnBufLen, CORINFO_CLASS_HANDLE cls, bool fNamespace, @@ -442,7 +442,7 @@ int MyICJI::appendClassName(__deref_inout_ecount(*pnBufLen) WCHAR** ppBuf, nLen = (int)wcslen(result); if (*pnBufLen > nLen) { - wcscpy_s(*ppBuf, *pnBufLen, result); + wcscpy_s((WCHAR*)*ppBuf, *pnBufLen, result); (*ppBuf) += nLen; (*pnBufLen) -= nLen; } @@ -468,7 +468,7 @@ CorInfoInlineTypeCheck MyICJI::canInlineTypeCheck(CORINFO_CLASS_HANDLE cls, CorI } // return flags (defined above, CORINFO_FLG_PUBLIC ...) -DWORD MyICJI::getClassAttribs(CORINFO_CLASS_HANDLE cls) +uint32_t MyICJI::getClassAttribs(CORINFO_CLASS_HANDLE cls) { jitInstance->mc->cr->AddCall("getClassAttribs"); return jitInstance->mc->repGetClassAttribs(cls); @@ -838,7 +838,7 @@ unsigned MyICJI::getArrayRank(CORINFO_CLASS_HANDLE cls) } // Get static field data for an array -void* MyICJI::getArrayInitializationData(CORINFO_FIELD_HANDLE field, DWORD size) +void* MyICJI::getArrayInitializationData(CORINFO_FIELD_HANDLE field, uint32_t size) { jitInstance->mc->cr->AddCall("getArrayInitializationData"); return jitInstance->mc->repGetArrayInitializationData(field, size); @@ -934,7 +934,7 @@ bool MyICJI::isFieldStatic(CORINFO_FIELD_HANDLE fldHnd) // code generation. void MyICJI::getBoundaries(CORINFO_METHOD_HANDLE ftn, // [IN] method of interest unsigned int* cILOffsets, // [OUT] size of pILOffsets - DWORD** pILOffsets, // [OUT] IL offsets of interest + uint32_t** pILOffsets, // [OUT] IL offsets of interest // jit MUST free with freeArray! ICorDebugInfo::BoundaryTypes* implictBoundaries // [OUT] tell jit, all boundries of this type ) @@ -946,7 +946,7 @@ void MyICJI::getBoundaries(CORINFO_METHOD_HANDLE ftn, // [I // this if (*cILOffsets > 0) { - DWORD* realOffsets = (DWORD*)allocateArray(*cILOffsets * sizeof(ICorDebugInfo::BoundaryTypes)); + uint32_t* realOffsets = (uint32_t*)allocateArray(*cILOffsets * sizeof(ICorDebugInfo::BoundaryTypes)); memcpy(realOffsets, *pILOffsets, *cILOffsets * sizeof(ICorDebugInfo::BoundaryTypes)); *pILOffsets = realOffsets; } @@ -1115,7 +1115,7 @@ HRESULT MyICJI::GetErrorHRESULT(struct _EXCEPTION_POINTERS* pExceptionPointers) // Fetches the message of the current exception // Returns the size of the message (including terminating null). This can be // greater than bufferLength if the buffer is insufficient. -ULONG MyICJI::GetErrorMessage(__inout_ecount(bufferLength) LPWSTR buffer, ULONG bufferLength) +uint32_t MyICJI::GetErrorMessage(__inout_ecount(bufferLength) char16_t* buffer, uint32_t bufferLength) { jitInstance->mc->cr->AddCall("GetErrorMessage"); LogError("Hit unimplemented GetErrorMessage"); @@ -1172,7 +1172,7 @@ void MyICJI::getEEInfo(CORINFO_EE_INFO* pEEInfoOut) } // Returns name of the JIT timer log -LPCWSTR MyICJI::getJitTimeLogFilename() +const char16_t* MyICJI::getJitTimeLogFilename() { jitInstance->mc->cr->AddCall("getJitTimeLogFilename"); // we have the ability to replay this, but we treat it in this case as EE context @@ -1184,7 +1184,7 @@ LPCWSTR MyICJI::getJitTimeLogFilename() // also hard-coded the variable name here instead of using: // CLRConfig::GetConfigValue(CLRConfig::INTERNAL_JitTimeLogFile); // like in the VM, but it works for our purposes. - return GetEnvironmentVariableWithDefaultW(W("COMPlus_JitTimeLogFile")); + return (const char16_t*)GetEnvironmentVariableWithDefaultW(W("COMPlus_JitTimeLogFile")); } /*********************************************************************************/ @@ -1253,7 +1253,7 @@ bool MyICJI::getSystemVAmd64PassStructInRegisterDescriptor( } // Stuff on ICorDynamicInfo -DWORD MyICJI::getThreadTLSIndex(void** ppIndirection) +uint32_t MyICJI::getThreadTLSIndex(void** ppIndirection) { jitInstance->mc->cr->AddCall("getThreadTLSIndex"); return jitInstance->mc->repGetThreadTLSIndex(ppIndirection); @@ -1265,7 +1265,7 @@ const void* MyICJI::getInlinedCallFrameVptr(void** ppIndirection) return jitInstance->mc->repGetInlinedCallFrameVptr(ppIndirection); } -LONG* MyICJI::getAddrOfCaptureThreadGlobal(void** ppIndirection) +int32_t* MyICJI::getAddrOfCaptureThreadGlobal(void** ppIndirection) { jitInstance->mc->cr->AddCall("getAddrOfCaptureThreadGlobal"); return jitInstance->mc->repGetAddrOfCaptureThreadGlobal(ppIndirection); @@ -1503,7 +1503,7 @@ InfoAccessType MyICJI::emptyStringLiteral(void** ppValue) // (static fields only) given that 'field' refers to thread local store, // return the ID (TLS index), which is used to find the beginning of the // TLS data area for the particular DLL 'field' is associated with. -DWORD MyICJI::getFieldThreadLocalStoreID(CORINFO_FIELD_HANDLE field, void** ppIndirection) +uint32_t MyICJI::getFieldThreadLocalStoreID(CORINFO_FIELD_HANDLE field, void** ppIndirection) { jitInstance->mc->cr->AddCall("getFieldThreadLocalStoreID"); return jitInstance->mc->repGetFieldThreadLocalStoreID(field, ppIndirection); @@ -1567,10 +1567,10 @@ bool MyICJI::notifyInstructionSetUsage(CORINFO_InstructionSet instructionSet, bo // Stuff directly on ICorJitInfo // Returns extended flags for a particular compilation instance. -DWORD MyICJI::getJitFlags(CORJIT_FLAGS* jitFlags, DWORD sizeInBytes) +uint32_t MyICJI::getJitFlags(CORJIT_FLAGS* jitFlags, uint32_t sizeInBytes) { jitInstance->mc->cr->AddCall("getJitFlags"); - DWORD ret = jitInstance->mc->repGetJitFlags(jitFlags, sizeInBytes); + uint32_t ret = jitInstance->mc->repGetJitFlags(jitFlags, sizeInBytes); if (jitInstance->forceClearAltJitFlag) { jitFlags->Clear(CORJIT_FLAGS::CORJIT_FLAG_ALT_JIT); @@ -1603,10 +1603,10 @@ static void* ALIGN_UP_SPMI(void* val, size_t alignment) } // get a block of memory for the code, readonly data, and read-write data -void MyICJI::allocMem(ULONG hotCodeSize, /* IN */ - ULONG coldCodeSize, /* IN */ - ULONG roDataSize, /* IN */ - ULONG xcptnsCount, /* IN */ +void MyICJI::allocMem(uint32_t hotCodeSize, /* IN */ + uint32_t coldCodeSize, /* IN */ + uint32_t roDataSize, /* IN */ + uint32_t xcptnsCount, /* IN */ CorJitAllocMemFlag flag, /* IN */ void** hotCodeBlock, /* OUT */ void** coldCodeBlock, /* OUT */ @@ -1683,9 +1683,9 @@ void MyICJI::allocMem(ULONG hotCodeSize, /* IN */ // For prejitted code we split up the unwinding information into // separate sections .rdata and .pdata. // -void MyICJI::reserveUnwindInfo(bool isFunclet, /* IN */ - bool isColdCode, /* IN */ - ULONG unwindSize /* IN */ +void MyICJI::reserveUnwindInfo(bool isFunclet, /* IN */ + bool isColdCode, /* IN */ + uint32_t unwindSize /* IN */ ) { jitInstance->mc->cr->AddCall("reserveUnwindInfo"); @@ -1709,12 +1709,12 @@ void MyICJI::reserveUnwindInfo(bool isFunclet, /* IN */ // pUnwindBlock pointer to unwind info // funcKind type of funclet (main method code, handler, filter) // -void MyICJI::allocUnwindInfo(BYTE* pHotCode, /* IN */ - BYTE* pColdCode, /* IN */ - ULONG startOffset, /* IN */ - ULONG endOffset, /* IN */ - ULONG unwindSize, /* IN */ - BYTE* pUnwindBlock, /* IN */ +void MyICJI::allocUnwindInfo(uint8_t* pHotCode, /* IN */ + uint8_t* pColdCode, /* IN */ + uint32_t startOffset, /* IN */ + uint32_t endOffset, /* IN */ + uint32_t unwindSize, /* IN */ + uint8_t* pUnwindBlock, /* IN */ CorJitFuncKind funcKind /* IN */ ) { @@ -1809,8 +1809,8 @@ void MyICJI::reportFatalError(CorJitResult result) // for jitted basic blocks. HRESULT MyICJI::allocPgoInstrumentationBySchema(CORINFO_METHOD_HANDLE ftnHnd, PgoInstrumentationSchema* pSchema, - UINT32 countSchemaItems, - BYTE** pInstrumentationData) + uint32_t countSchemaItems, + uint8_t** pInstrumentationData) { jitInstance->mc->cr->AddCall("allocPgoInstrumentationBySchema"); return jitInstance->mc->repAllocPgoInstrumentationBySchema(ftnHnd, pSchema, countSchemaItems, pInstrumentationData); @@ -1820,8 +1820,8 @@ HRESULT MyICJI::allocPgoInstrumentationBySchema(CORINFO_METHOD_HANDLE ftnHnd, // of the buffer is the same as the format the JIT passes to allocMethodBlockCounts. HRESULT MyICJI::getPgoInstrumentationResults(CORINFO_METHOD_HANDLE ftnHnd, PgoInstrumentationSchema **pSchema, // pointer to the schema table which describes the instrumentation results (pointer will not remain valid after jit completes) - UINT32 * pCountSchemaItems, // pointer to the count schema items - BYTE ** pInstrumentationData) // pointer to the actual instrumentation data (pointer will not remain valid after jit completes) + uint32_t * pCountSchemaItems, // pointer to the count schema items + uint8_t ** pInstrumentationData) // pointer to the actual instrumentation data (pointer will not remain valid after jit completes) { jitInstance->mc->cr->AddCall("getPgoInstrumentationResults"); return jitInstance->mc->repGetPgoInstrumentationResults(ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData); @@ -1832,9 +1832,9 @@ HRESULT MyICJI::getPgoInstrumentationResults(CORINFO_METHOD_HANDLE ftnHnd, // being called. CORINFO_CLASS_HANDLE MyICJI::getLikelyClass(CORINFO_METHOD_HANDLE ftnHnd, CORINFO_CLASS_HANDLE baseHnd, - UINT32 ilOffset, - UINT32* pLikelihood, - UINT32* pNumberOfClasses) + uint32_t ilOffset, + uint32_t* pLikelihood, + uint32_t* pNumberOfClasses) { jitInstance->mc->cr->AddCall("getLikelyClass"); return jitInstance->mc->repGetLikelyClass(ftnHnd, baseHnd, ilOffset, pLikelihood, pNumberOfClasses); @@ -1844,7 +1844,7 @@ CORINFO_CLASS_HANDLE MyICJI::getLikelyClass(CORINFO_METHOD_HANDLE ftnHnd, // the signature information and method handle the JIT used to lay out the call site. If // the call site has no signature information (e.g. a helper call) or has no method handle // (e.g. a CALLI P/Invoke), then null should be passed instead. -void MyICJI::recordCallSite(ULONG instrOffset, /* IN */ +void MyICJI::recordCallSite(uint32_t instrOffset, /* IN */ CORINFO_SIG_INFO* callSig, /* IN */ CORINFO_METHOD_HANDLE methodHandle /* IN */ ) @@ -1855,21 +1855,21 @@ void MyICJI::recordCallSite(ULONG instrOffset, /* IN */ // A relocation is recorded if we are pre-jitting. // A jump thunk may be inserted if we are jitting -void MyICJI::recordRelocation(void* location, /* IN */ - void* target, /* IN */ - WORD fRelocType, /* IN */ - WORD slotNum, /* IN */ - INT32 addlDelta /* IN */ +void MyICJI::recordRelocation(void* location, /* IN */ + void* target, /* IN */ + uint16_t fRelocType, /* IN */ + uint16_t slotNum, /* IN */ + int32_t addlDelta /* IN */ ) { jitInstance->mc->cr->AddCall("recordRelocation"); jitInstance->mc->cr->repRecordRelocation(location, target, fRelocType, slotNum, addlDelta); } -WORD MyICJI::getRelocTypeHint(void* target) +uint16_t MyICJI::getRelocTypeHint(void* target) { jitInstance->mc->cr->AddCall("getRelocTypeHint"); - WORD result = jitInstance->mc->repGetRelocTypeHint(target); + uint16_t result = jitInstance->mc->repGetRelocTypeHint(target); return result; } @@ -1878,7 +1878,7 @@ WORD MyICJI::getRelocTypeHint(void* target) // is cross-compiling (such as the case for crossgen), it will return a // different value than if it was compiling for the host architecture. // -DWORD MyICJI::getExpectedTargetArchitecture() +uint32_t MyICJI::getExpectedTargetArchitecture() { jitInstance->mc->cr->AddCall("getExpectedTargetArchitecture"); DWORD result = jitInstance->mc->repGetExpectedTargetArchitecture(); diff --git a/src/coreclr/ToolBox/superpmi/superpmi/jitinstance.cpp b/src/coreclr/ToolBox/superpmi/superpmi/jitinstance.cpp index 675a1d1f7faf0..cd32e4deb850c 100644 --- a/src/coreclr/ToolBox/superpmi/superpmi/jitinstance.cpp +++ b/src/coreclr/ToolBox/superpmi/superpmi/jitinstance.cpp @@ -303,8 +303,8 @@ JitInstance::Result JitInstance::CompileMethod(MethodContext* MethodToCompile, i PAL_TRY(Param*, pParam, ¶m) { - BYTE* NEntryBlock = nullptr; - ULONG NCodeSizeBlock = 0; + uint8_t* NEntryBlock = nullptr; + uint32_t NCodeSizeBlock = 0; pParam->pThis->mc->repCompileMethod(&pParam->info, &pParam->flags); if (pParam->collectThroughput) @@ -381,8 +381,8 @@ JitInstance::Result JitInstance::CompileMethod(MethodContext* MethodToCompile, i void JitInstance::timeResult(CORINFO_METHOD_INFO info, unsigned flags) { - BYTE* NEntryBlock = nullptr; - ULONG NCodeSizeBlock = 0; + uint8_t* NEntryBlock = nullptr; + uint32_t NCodeSizeBlock = 0; int sampleSize = 10; // Save 2 smallest times. To help reduce noise, we will look at the closest pair of these. diff --git a/src/coreclr/classlibnative/bcltype/varargsnative.cpp b/src/coreclr/classlibnative/bcltype/varargsnative.cpp index a5f206aeef5de..8862bbc507234 100644 --- a/src/coreclr/classlibnative/bcltype/varargsnative.cpp +++ b/src/coreclr/classlibnative/bcltype/varargsnative.cpp @@ -70,10 +70,10 @@ static void InitCommon(VARARGS *data, VASigCookie** cookie) data->SigPtr = data->ArgCookie->signature.CreateSigPointer(); // Skip the calling convention, get the # of args and skip the return type. - ULONG callConv; + uint32_t callConv; IfFailThrow(data->SigPtr.GetCallingConvInfo(&callConv)); - ULONG sigData; + uint32_t sigData; IfFailThrow(data->SigPtr.GetData(&sigData)); data->RemainingArgs = sigData; diff --git a/src/coreclr/debug/di/module.cpp b/src/coreclr/debug/di/module.cpp index 921c3c4c10f74..bfaa3bf2a60c3 100644 --- a/src/coreclr/debug/di/module.cpp +++ b/src/coreclr/debug/di/module.cpp @@ -3267,7 +3267,7 @@ HRESULT CordbILCode::GetLocalVarSig(SigParser *pLocalSigParser, { PCCOR_SIGNATURE localSignature; ULONG size; - ULONG localCount; + uint32_t localCount; EX_TRY // // @dbgtodo exceptions - push this up { @@ -3286,7 +3286,7 @@ HRESULT CordbILCode::GetLocalVarSig(SigParser *pLocalSigParser, LOG((LF_CORDB, LL_INFO100000, "CIC::GLVS creating sig parser sig=0x%x size=0x%x\n", localSignature, size)); SigParser sigParser = SigParser(localSignature, size); - ULONG data; + uint32_t data; IfFailRet(sigParser.GetCallingConvInfo(&data)); @@ -4932,7 +4932,7 @@ HRESULT CordbNativeCode::GetSigParserFromFunction(mdToken mdFunction, mdToken *p HRESULT CordbNativeCode::EnsureReturnValueAllowed(Instantiation *currentInstantiation, mdToken targetClass, SigParser &parser, SigParser &methodGenerics) { HRESULT hr = S_OK; - ULONG genCount = 0; + uint32_t genCount = 0; IfFailRet(SkipToReturn(parser, &genCount)); return EnsureReturnValueAllowedWorker(currentInstantiation, targetClass, parser, methodGenerics, genCount); @@ -5003,18 +5003,18 @@ HRESULT CordbNativeCode::EnsureReturnValueAllowedWorker(Instantiation *currentIn if (returnType == ELEMENT_TYPE_MVAR) { // Get which generic parameter is referenced. - ULONG genParam = 0; + uint32_t genParam = 0; IfFailRet(parser.GetData(&genParam)); // Grab the calling convention of the method, ensure it's GENERICINST. - ULONG callingConv = 0; + uint32_t callingConv = 0; IfFailRet(methodGenerics.GetCallingConvInfo(&callingConv)); if (callingConv != IMAGE_CEE_CS_CALLCONV_GENERICINST) return META_E_BAD_SIGNATURE; // Ensure sensible bounds. SigParser generics(methodGenerics); // Make a copy since operations are destructive. - ULONG maxCount = 0; + uint32_t maxCount = 0; IfFailRet(generics.GetData(&maxCount)); if (maxCount <= genParam || genParam > 1024) return META_E_BAD_SIGNATURE; @@ -5031,7 +5031,7 @@ HRESULT CordbNativeCode::EnsureReturnValueAllowedWorker(Instantiation *currentIn if (returnType == ELEMENT_TYPE_VAR) { // Get which type parameter is reference. - ULONG typeParam = 0; + uint32_t typeParam = 0; parser.GetData(&typeParam); // Ensure something reasonable. @@ -5058,7 +5058,7 @@ HRESULT CordbNativeCode::EnsureReturnValueAllowedWorker(Instantiation *currentIn IfFailRet(typeParser.GetToken(NULL)); - ULONG totalTypeCount = 0; + uint32_t totalTypeCount = 0; IfFailRet(typeParser.GetData(&totalTypeCount)); if (totalTypeCount < typeParam) return META_E_BAD_SIGNATURE; @@ -5081,14 +5081,14 @@ HRESULT CordbNativeCode::EnsureReturnValueAllowedWorker(Instantiation *currentIn return S_OK; } -HRESULT CordbNativeCode::SkipToReturn(SigParser &parser, ULONG *genCount) +HRESULT CordbNativeCode::SkipToReturn(SigParser &parser, uint32_t *genCount) { // Takes a method signature parser (at the beginning of a signature) and skips to the // return value. HRESULT hr = S_OK; // Skip calling convention - ULONG uCallConv; + uint32_t uCallConv; IfFailRet(parser.GetCallingConvInfo(&uCallConv)); if ((uCallConv == IMAGE_CEE_CS_CALLCONV_FIELD) || (uCallConv == IMAGE_CEE_CS_CALLCONV_LOCAL_SIG)) return META_E_BAD_SIGNATURE; diff --git a/src/coreclr/debug/di/rsfunction.cpp b/src/coreclr/debug/di/rsfunction.cpp index 164e40d08a77c..b901a1ded88fe 100644 --- a/src/coreclr/debug/di/rsfunction.cpp +++ b/src/coreclr/debug/di/rsfunction.cpp @@ -1013,7 +1013,7 @@ HRESULT CordbFunction::GetSig(SigParser *pMethodSigParser, PCCOR_SIGNATURE functionSignature; ULONG size; DWORD methodAttr = 0; - ULONG argCount; + uint32_t argCount; EX_TRY // @dbgtotod - push this up { diff --git a/src/coreclr/debug/di/rspriv.h b/src/coreclr/debug/di/rspriv.h index 0874716db873e..f4e3077938b72 100644 --- a/src/coreclr/debug/di/rspriv.h +++ b/src/coreclr/debug/di/rspriv.h @@ -5973,7 +5973,7 @@ class CordbNativeCode : public CordbCode, // Moves a method signature from the start of the signature to the location of the return value (passing out the // number of generic parameters in the method). - static HRESULT SkipToReturn(SigParser &parser, ULONG *genArgCount = 0); + static HRESULT SkipToReturn(SigParser &parser, uint32_t *genArgCount = 0); private: // Read the actual bytes of native code into the data member m_rgbCode. @@ -7461,7 +7461,7 @@ class CordbJITILFrame : public CordbBase, public ICorDebugILFrame, public ICorDe bool m_fVarArgFnx; // the number of arguments, including the var args - ULONG m_allArgsCount; + uint32_t m_allArgsCount; // This byte array is used to store the signature for vararg methods. // It points to the underlying memory used by m_sigParserCached, and it enables us to easily delete diff --git a/src/coreclr/debug/di/rsthread.cpp b/src/coreclr/debug/di/rsthread.cpp index 9f1a2374a75a4..9349173cb04d6 100644 --- a/src/coreclr/debug/di/rsthread.cpp +++ b/src/coreclr/debug/di/rsthread.cpp @@ -8604,7 +8604,7 @@ HRESULT CordbJITILFrame::BuildInstantiationForCallsite(CordbModule * pModule, Ne // If the targetClass is a TypeSpec that means its first element is GENERICINST. // We only need to build types for the Instantiation if targetClass is a TypeSpec. - ULONG classGenerics = 0; + uint32_t classGenerics = 0; SigParser typeSig; if (TypeFromToken(targetClass) == mdtTypeSpec) { @@ -8632,10 +8632,10 @@ HRESULT CordbJITILFrame::BuildInstantiationForCallsite(CordbModule * pModule, Ne // Similarly for method generics. Simply fill "methodGenerics" with the number // of generics, and move "genericSig" to the start of the first generic param. - ULONG methodGenerics = 0; + uint32_t methodGenerics = 0; if (!genericSig.IsNull()) { - ULONG callingConv = 0; + uint32_t callingConv = 0; IfFailRet(genericSig.GetCallingConvInfo(&callingConv)); if (callingConv == IMAGE_CEE_CS_CALLCONV_GENERICINST) IfFailRet(genericSig.GetData(&methodGenerics)); diff --git a/src/coreclr/debug/di/rstype.cpp b/src/coreclr/debug/di/rstype.cpp index 3fcb5ee927d6c..f9e283b8cf32b 100644 --- a/src/coreclr/debug/di/rstype.cpp +++ b/src/coreclr/debug/di/rstype.cpp @@ -899,7 +899,7 @@ CordbType::SigToType(CordbModule * pModule, case ELEMENT_TYPE_VAR: case ELEMENT_TYPE_MVAR: { - ULONG tyvar_num; + uint32_t tyvar_num; IfFailRet(sigParser.GetData(&tyvar_num)); @@ -966,7 +966,7 @@ CordbType::SigToType(CordbModule * pModule, pClass->SetIsValueClassKnown(true); // Build up the array of generic arguments. - ULONG cArgs; // number of generic arguments in the type. + uint32_t cArgs; // number of generic arguments in the type. IfFailRet(sigParser.GetData(&cArgs)); @@ -1043,7 +1043,7 @@ CordbType::SigToType(CordbModule * pModule, IfFailRet(sigParser.SkipExactlyOne()); - ULONG rank; + uint32_t rank; IfFailRet(sigParser.GetData(&rank)); @@ -1070,7 +1070,7 @@ CordbType::SigToType(CordbModule * pModule, case ELEMENT_TYPE_FNPTR: { - ULONG cArgs; + uint32_t cArgs; IfFailRet(sigParser.GetData(&cArgs)); // Skip callingConv @@ -1867,7 +1867,7 @@ CordbType::GetUnboxedObjectSize(ULONG32 *pObjectSize) SigParser sigParser(&corSig, sizeof(corSig)); - ULONG size; + uint32_t size; IfFailRet(sigParser.PeekElemTypeSize(&size)); diff --git a/src/coreclr/ildasm/dasm.cpp b/src/coreclr/ildasm/dasm.cpp index f147b4cb3e91e..5a6501a5b4628 100644 --- a/src/coreclr/ildasm/dasm.cpp +++ b/src/coreclr/ildasm/dasm.cpp @@ -4594,7 +4594,7 @@ BOOL GetClassLayout(mdTypeDef cl, ULONG* pulPackSize, ULONG* pulClassSize) { COR_FIELD_OFFSET* pFO = g_rFieldOffset; for(g_cFieldOffsets=0; - SUCCEEDED(g_pImport->GetClassLayoutNext(&Layout,&(pFO->ridOfField),&(pFO->ulOffset))) + SUCCEEDED(g_pImport->GetClassLayoutNext(&Layout,&(pFO->ridOfField),(ULONG*)&(pFO->ulOffset))) &&RidFromToken(pFO->ridOfField); g_cFieldOffsets++, pFO++) ret = TRUE; } diff --git a/src/coreclr/inc/cor.h b/src/coreclr/inc/cor.h index 9101bcdbd4505..413000b920eed 100644 --- a/src/coreclr/inc/cor.h +++ b/src/coreclr/inc/cor.h @@ -2011,6 +2011,7 @@ FORCEINLINE ULONG CorSigUncompressData( return CorSigUncompressBigData(pData); } +#ifdef HOST_WINDOWS inline HRESULT CorSigUncompressData(// return S_OK or E_BADIMAGEFORMAT if the signature is bad PCCOR_SIGNATURE pData, // [IN] compressed data DWORD len, // [IN] length of the signature @@ -2073,6 +2074,70 @@ inline HRESULT CorSigUncompressData(// return S_OK or E_BADIMAGEFORMAT if the si return hr; } +#endif // HOST_WINDOWS + +inline HRESULT CorSigUncompressData(// return S_OK or E_BADIMAGEFORMAT if the signature is bad + PCCOR_SIGNATURE pData, // [IN] compressed data + DWORD len, // [IN] length of the signature + uint32_t * pDataOut, // [OUT] the expanded *pData + uint32_t * pDataLen) // [OUT] length of the expanded *pData +{ + HRESULT hr = S_OK; + BYTE const *pBytes = reinterpret_cast(pData); + + // Smallest. + if ((*pBytes & 0x80) == 0x00) // 0??? ???? + { + if (len < 1) + { + *pDataOut = 0; + *pDataLen = 0; + hr = META_E_BAD_SIGNATURE; + } + else + { + *pDataOut = *pBytes; + *pDataLen = 1; + } + } + // Medium. + else if ((*pBytes & 0xC0) == 0x80) // 10?? ???? + { + if (len < 2) + { + *pDataOut = 0; + *pDataLen = 0; + hr = META_E_BAD_SIGNATURE; + } + else + { + *pDataOut = (uint32_t)(((*pBytes & 0x3f) << 8 | *(pBytes+1))); + *pDataLen = 2; + } + } + else if ((*pBytes & 0xE0) == 0xC0) // 110? ???? + { + if (len < 4) + { + *pDataOut = 0; + *pDataLen = 0; + hr = META_E_BAD_SIGNATURE; + } + else + { + *pDataOut = (uint32_t)(((*pBytes & 0x1f) << 24 | *(pBytes+1) << 16 | *(pBytes+2) << 8 | *(pBytes+3))); + *pDataLen = 4; + } + } + else // We don't recognize this encoding + { + *pDataOut = 0; + *pDataLen = 0; + hr = META_E_BAD_SIGNATURE; + } + + return hr; +} inline ULONG CorSigUncompressData( // return number of bytes of that compressed data occupied in pData PCCOR_SIGNATURE pData, // [IN] compressed data @@ -2128,14 +2193,14 @@ inline ULONG CorSigUncompressToken( // return number of bytes of that compressed inline HRESULT CorSigUncompressToken( PCCOR_SIGNATURE pData, // [IN] compressed data - DWORD dwLen, // [IN] Remaining length of sigature + uint32_t dwLen, // [IN] Remaining length of sigature mdToken * pToken, // [OUT] the expanded *pData - DWORD * dwTokenLength) // [OUT] The length of the token in the sigature + uint32_t * dwTokenLength) // [OUT] The length of the token in the sigature { mdToken tk; mdToken tkType; - HRESULT hr = CorSigUncompressData(pData, dwLen, (ULONG *)&tk, dwTokenLength); + HRESULT hr = CorSigUncompressData(pData, dwLen, (uint32_t *)&tk, dwTokenLength); if (SUCCEEDED(hr)) { @@ -2161,7 +2226,7 @@ FORCEINLINE ULONG CorSigUncompressCallingConv( FORCEINLINE HRESULT CorSigUncompressCallingConv( PCCOR_SIGNATURE pData, // [IN] Signature DWORD dwLen, // [IN] Length of signature - ULONG * data) // [OUT] Compressed data + uint32_t * data) // [OUT] Compressed data { if (dwLen > 0) { diff --git a/src/coreclr/inc/cordebuginfo.h b/src/coreclr/inc/cordebuginfo.h index 66b0d50b875b1..4de783aae9845 100644 --- a/src/coreclr/inc/cordebuginfo.h +++ b/src/coreclr/inc/cordebuginfo.h @@ -51,8 +51,8 @@ class ICorDebugInfo struct OffsetMapping { - DWORD nativeOffset; - DWORD ilOffset; + uint32_t nativeOffset; + uint32_t ilOffset; SourceTypes source; // The debugger needs this so that // we don't put Edit and Continue breakpoints where // the stack isn't empty. We can put regular breakpoints @@ -215,7 +215,7 @@ class ICorDebugInfo signed vlsOffset; }; - // VLT_REG_REG -- TYP_LONG with both DWords enregistred + // VLT_REG_REG -- TYP_LONG with both uint32_ts enregistred // eg. RBM_EAXEDX struct vlRegReg @@ -321,16 +321,16 @@ class ICorDebugInfo struct ILVarInfo { - DWORD startOffset; - DWORD endOffset; - DWORD varNumber; + uint32_t startOffset; + uint32_t endOffset; + uint32_t varNumber; }; struct NativeVarInfo { - DWORD startOffset; - DWORD endOffset; - DWORD varNumber; + uint32_t startOffset; + uint32_t endOffset; + uint32_t varNumber; VarLoc loc; }; }; diff --git a/src/coreclr/inc/corhdr.h b/src/coreclr/inc/corhdr.h index 7187191a635fa..028a9c6f52ec3 100644 --- a/src/coreclr/inc/corhdr.h +++ b/src/coreclr/inc/corhdr.h @@ -28,12 +28,13 @@ #define USER_FRAMEWORK_REGISTRY_KEY_W W("Software\\Microsoft\\.NETFramework") #endif +#include #ifdef _MSC_VER #pragma warning(disable:4200) // nonstandard extension used : zero-sized array in struct/union. #endif -typedef LPVOID mdScope; // Obsolete; not used in the runtime. -typedef ULONG32 mdToken; // Generic token +typedef void* mdScope; // Obsolete; not used in the runtime. +typedef uint32_t mdToken; // Generic token // Token definitions @@ -76,7 +77,7 @@ typedef mdToken mdString; // User literal string token. typedef mdToken mdCPToken; // constantpool token #ifndef MACROS_NOT_SUPPORTED -typedef ULONG RID; +typedef uint32_t RID; #else typedef unsigned RID; #endif // MACROS_NOT_SUPPORTED @@ -173,6 +174,19 @@ typedef enum ReplacesCorHdrNumericDefines MAX_PACKAGE_NAME =1024, } ReplacesCorHdrNumericDefines; +// +// Directory format. +// +#ifndef IMAGE_DATA_DIRECTORY_DEFINED + +#define IMAGE_DATA_DIRECTORY_DEFINED +typedef struct _IMAGE_DATA_DIRECTORY { + uint32_t VirtualAddress; + uint32_t Size; +} IMAGE_DATA_DIRECTORY, *PIMAGE_DATA_DIRECTORY; + +#endif // IMAGE_DATA_DIRECTORY_DEFINED + // #ManagedHeader // // A managed code EXE or DLL uses the same basic format that unmanaged executables use call the Portable @@ -207,21 +221,21 @@ typedef enum ReplacesCorHdrNumericDefines typedef struct IMAGE_COR20_HEADER { // Header versioning - DWORD cb; - WORD MajorRuntimeVersion; - WORD MinorRuntimeVersion; + uint32_t cb; + uint16_t MajorRuntimeVersion; + uint16_t MinorRuntimeVersion; // Symbol table and startup information IMAGE_DATA_DIRECTORY MetaData; - DWORD Flags; + uint32_t Flags; // The main program if it is an EXE (not used if a DLL?) // If COMIMAGE_FLAGS_NATIVE_ENTRYPOINT is not set, EntryPointToken represents a managed entrypoint. // If COMIMAGE_FLAGS_NATIVE_ENTRYPOINT is set, EntryPointRVA represents an RVA to a native entrypoint // (depricated for DLLs, use modules constructors intead). union { - DWORD EntryPointToken; - DWORD EntryPointRVA; + uint32_t EntryPointToken; + uint32_t EntryPointRVA; }; // This is the blob of managed resources. Fetched using code:AssemblyNative.GetResource and @@ -848,7 +862,7 @@ typedef enum CorGenericParamAttr } CorGenericParamAttr; // structures and enums moved from COR.H -typedef unsigned __int8 COR_SIGNATURE; +typedef uint8_t COR_SIGNATURE; typedef COR_SIGNATURE* PCOR_SIGNATURE; // pointer to a cor sig. Not void* so that // the bytes can be incremented easily @@ -1115,8 +1129,8 @@ typedef enum CorILMethodSect // codes that identify typedef struct IMAGE_COR_ILMETHOD_SECT_SMALL { - BYTE Kind; - BYTE DataSize; + uint8_t Kind; + uint8_t DataSize; } IMAGE_COR_ILMETHOD_SECT_SMALL; @@ -1152,13 +1166,13 @@ typedef enum CorExceptionFlag // definitions for the Flags typedef struct IMAGE_COR_ILMETHOD_SECT_EH_CLAUSE_FAT { CorExceptionFlag Flags; - DWORD TryOffset; - DWORD TryLength; // relative to start of try block - DWORD HandlerOffset; - DWORD HandlerLength; // relative to start of handler + uint32_t TryOffset; + uint32_t TryLength; // relative to start of try block + uint32_t HandlerOffset; + uint32_t HandlerLength; // relative to start of handler union { - DWORD ClassToken; // use for type-based exception handlers - DWORD FilterOffset; // use for filter-based exception handlers (COR_ILEXCEPTION_FILTER is set) + uint32_t ClassToken; // use for type-based exception handlers + uint32_t FilterOffset; // use for filter-based exception handlers (COR_ILEXCEPTION_FILTER is set) }; } IMAGE_COR_ILMETHOD_SECT_EH_CLAUSE_FAT; @@ -1181,8 +1195,8 @@ typedef struct IMAGE_COR_ILMETHOD_SECT_EH_CLAUSE_SMALL unsigned HandlerOffset : 16; unsigned HandlerLength : 8; // relative to start of handler union { - DWORD ClassToken; - DWORD FilterOffset; + uint32_t ClassToken; + uint32_t FilterOffset; }; } IMAGE_COR_ILMETHOD_SECT_EH_CLAUSE_SMALL; @@ -1190,7 +1204,7 @@ typedef struct IMAGE_COR_ILMETHOD_SECT_EH_CLAUSE_SMALL typedef struct IMAGE_COR_ILMETHOD_SECT_EH_SMALL { IMAGE_COR_ILMETHOD_SECT_SMALL SectSmall; - WORD Reserved; + uint16_t Reserved; IMAGE_COR_ILMETHOD_SECT_EH_CLAUSE_SMALL Clauses[1]; // actually variable size } IMAGE_COR_ILMETHOD_SECT_EH_SMALL; @@ -1229,7 +1243,7 @@ typedef enum CorILMethodFlags /* Used when the method is tiny (< 64 bytes), and there are no local vars */ typedef struct IMAGE_COR_ILMETHOD_TINY { - BYTE Flags_CodeSize; + uint8_t Flags_CodeSize; } IMAGE_COR_ILMETHOD_TINY; /************************************/ @@ -1240,7 +1254,7 @@ typedef struct IMAGE_COR_ILMETHOD_FAT unsigned Flags : 12; // Flags see code:CorILMethodFlags unsigned Size : 4; // size in DWords of this structure (currently 3) unsigned MaxStack : 16; // maximum number of items (I4, I, I8, obj ...), on the operand stack - DWORD CodeSize; // size of the code + uint32_t CodeSize; // size of the code mdSignature LocalVarSigTok; // token that indicates the signature of the local vars (0 means none) } IMAGE_COR_ILMETHOD_FAT; @@ -1266,9 +1280,9 @@ typedef union IMAGE_COR_ILMETHOD typedef struct IMAGE_COR_VTABLEFIXUP { - ULONG RVA; // Offset of v-table array in image. - USHORT Count; // How many entries at location. - USHORT Type; // COR_VTABLE_xxx type of entries. + uint32_t RVA; // Offset of v-table array in image. + uint16_t Count; // How many entries at location. + uint16_t Type; // COR_VTABLE_xxx type of entries. } IMAGE_COR_VTABLEFIXUP; @@ -1464,7 +1478,7 @@ typedef enum CorLocalRefPreservation typedef struct COR_FIELD_OFFSET { mdFieldDef ridOfField; - ULONG ulOffset; + uint32_t ulOffset; } COR_FIELD_OFFSET; #endif @@ -1940,8 +1954,8 @@ typedef void ** PPSECURITY_VALUE ; // Descriptor for a single security custom attribute. typedef struct COR_SECATTR { mdMemberRef tkCtor; // Ref to constructor of security attribute. - const void *pCustomAttribute; // Blob describing ctor args and field/property values. - ULONG cbCustomAttribute; // Length of the above blob. + const void *pCustomAttribute; // Blob describing ctor args and field/property values. + uint32_t cbCustomAttribute; // Length of the above blob. } COR_SECATTR; #endif // __CORHDR_H__ diff --git a/src/coreclr/inc/corhlprpriv.h b/src/coreclr/inc/corhlprpriv.h index 64cb6addacfe4..38faa6f6ef8be 100644 --- a/src/coreclr/inc/corhlprpriv.h +++ b/src/coreclr/inc/corhlprpriv.h @@ -775,7 +775,7 @@ CorSigUncompressToken_EndPtr( } DWORD dwDataSize = (DWORD)cbDataSize; - ULONG cbTokenOutLength; + uint32_t cbTokenOutLength; IfFailRet(CorSigUncompressToken( pData, dwDataSize, diff --git a/src/coreclr/inc/corinfo.h b/src/coreclr/inc/corinfo.h index 6d2e881f628e8..c7922d3fff579 100644 --- a/src/coreclr/inc/corinfo.h +++ b/src/coreclr/inc/corinfo.h @@ -185,9 +185,22 @@ TODO: Talk about initializing strutures before use #define _COR_INFO_H_ #include "corhdr.h" -#include + +#if !defined(__deref_inout_ecount) +// Minimum set of SAL annotations so that non Windows builds work +#define __deref_inout_ecount(size) +#define __inout_ecount(size) +#define __out_ecount(size) +#endif + #include "jiteeversionguid.h" +#ifdef _MSC_VER +typedef long JITINTERFACE_HRESULT; +#else +typedef int JITINTERFACE_HRESULT; +#endif // _MSC_VER + // For System V on the CLR type system number of registers to pass in and return a struct is the same. // The CLR type system allows only up to 2 eightbytes to be passed in registers. There is no SSEUP classification types. #define CLR_SYSTEMV_MAX_EIGHTBYTES_COUNT_TO_PASS_IN_REGISTERS 2 @@ -196,7 +209,7 @@ TODO: Talk about initializing strutures before use // System V struct passing // The Classification types are described in the ABI spec at https://software.intel.com/sites/default/files/article/402129/mpx-linux64-abi.pdf -enum SystemVClassificationType : unsigned __int8 +enum SystemVClassificationType : uint8_t { SystemVClassificationTypeUnknown = 0, SystemVClassificationTypeStruct = 1, @@ -221,10 +234,10 @@ struct SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR } bool passedInRegisters; // Whether the struct is passable/passed (this includes struct returning) in registers. - unsigned __int8 eightByteCount; // Number of eightbytes for this struct. + uint8_t eightByteCount; // Number of eightbytes for this struct. SystemVClassificationType eightByteClassifications[CLR_SYSTEMV_MAX_EIGHTBYTES_COUNT_TO_PASS_IN_REGISTERS]; // The eightbytes type classification. - unsigned __int8 eightByteSizes[CLR_SYSTEMV_MAX_EIGHTBYTES_COUNT_TO_PASS_IN_REGISTERS]; // The size of the eightbytes (an eightbyte could include padding. This represents the no padding size of the eightbyte). - unsigned __int8 eightByteOffsets[CLR_SYSTEMV_MAX_EIGHTBYTES_COUNT_TO_PASS_IN_REGISTERS]; // The start offset of the eightbytes (in bytes). + uint8_t eightByteSizes[CLR_SYSTEMV_MAX_EIGHTBYTES_COUNT_TO_PASS_IN_REGISTERS]; // The size of the eightbytes (an eightbyte could include padding. This represents the no padding size of the eightbyte). + uint8_t eightByteOffsets[CLR_SYSTEMV_MAX_EIGHTBYTES_COUNT_TO_PASS_IN_REGISTERS]; // The start offset of the eightbytes (in bytes). // Members @@ -1114,7 +1127,7 @@ struct CORINFO_METHOD_INFO { CORINFO_METHOD_HANDLE ftn; CORINFO_MODULE_HANDLE scope; - BYTE * ILCode; + uint8_t * ILCode; unsigned ILCodeSize; unsigned maxStack; unsigned EHcount; @@ -1208,7 +1221,7 @@ struct CORINFO_LOOKUP_KIND // The 'runtimeLookupFlags' and 'runtimeLookupArgs' fields // are just for internal VM / ZAP communication, not to be used by the JIT. - WORD runtimeLookupFlags; + uint16_t runtimeLookupFlags; void * runtimeLookupArgs; } ; @@ -1221,13 +1234,13 @@ struct CORINFO_LOOKUP_KIND // This accounts for up to 2 indirections to get at a dictionary followed by a possible spill slot // #define CORINFO_MAXINDIRECTIONS 4 -#define CORINFO_USEHELPER ((WORD) 0xffff) -#define CORINFO_NO_SIZE_CHECK ((WORD) 0xffff) +#define CORINFO_USEHELPER ((uint16_t) 0xffff) +#define CORINFO_NO_SIZE_CHECK ((uint16_t) 0xffff) struct CORINFO_RUNTIME_LOOKUP { // This is signature you must pass back to the runtime lookup helper - LPVOID signature; + void* signature; // Here is the helper you must call. It is one of CORINFO_HELP_RUNTIMEHANDLE_* helpers. CorInfoHelpFunc helper; @@ -1237,7 +1250,7 @@ struct CORINFO_RUNTIME_LOOKUP // 0 = use the this pointer itself (e.g. token is C inside code in sealed class C) // or method desc itself (e.g. token is method void M::mymeth() inside code in M::mymeth) // Otherwise, follow each byte-offset stored in the "offsets[]" array (may be negative) - WORD indirections; + uint16_t indirections; // If set, test for null and branch to helper if null bool testForNull; @@ -1245,8 +1258,8 @@ struct CORINFO_RUNTIME_LOOKUP // If set, test the lowest bit and dereference if set (see code:FixupPointer) bool testForFixup; - WORD sizeOffset; - SIZE_T offsets[CORINFO_MAXINDIRECTIONS]; + uint16_t sizeOffset; + size_t offsets[CORINFO_MAXINDIRECTIONS]; // If set, first offset is indirect. // 0 means that value stored at first offset (offsets[0]) from pointer is next pointer, to which the next offset @@ -1538,9 +1551,9 @@ struct CORINFO_RESOLVED_TOKEN // [Out] TypeSpec and MethodSpec signatures for generics. NULL otherwise. // PCCOR_SIGNATURE pTypeSpec; - ULONG cbTypeSpec; + uint32_t cbTypeSpec; PCCOR_SIGNATURE pMethodSpec; - ULONG cbMethodSpec; + uint32_t cbMethodSpec; }; struct CORINFO_CALL_INFO @@ -1656,7 +1669,7 @@ struct CORINFO_FIELD_INFO CorInfoHelpFunc helper; // Field offset if there is one - DWORD offset; + uint32_t offset; CorInfoType fieldType; CORINFO_CLASS_HANDLE structType; //possibly null @@ -1674,14 +1687,14 @@ struct CORINFO_FIELD_INFO struct CORINFO_EH_CLAUSE { CORINFO_EH_CLAUSE_FLAGS Flags; - DWORD TryOffset; - DWORD TryLength; - DWORD HandlerOffset; - DWORD HandlerLength; + uint32_t TryOffset; + uint32_t TryLength; + uint32_t HandlerOffset; + uint32_t HandlerLength; union { - DWORD ClassToken; // use for type-based exception handlers - DWORD FilterOffset; // use for filter-based exception handlers (COR_ILEXCEPTION_FILTER is set) + uint32_t ClassToken; // use for type-based exception handlers + uint32_t FilterOffset; // use for filter-based exception handlers (COR_ILEXCEPTION_FILTER is set) }; }; @@ -1693,9 +1706,9 @@ enum CORINFO_OS struct CORINFO_CPU { - DWORD dwCPUType; - DWORD dwFeatures; - DWORD dwExtendedFeatures; + uint32_t dwCPUType; + uint32_t dwFeatures; + uint32_t dwExtendedFeatures; }; enum CORINFO_RUNTIME_ABI @@ -1788,8 +1801,6 @@ enum { LCL_FINALLY_MARK = 0xFC }; // FC = "Finally Call" * when it generates code **********************************************************************************/ -#include - typedef void* CORINFO_MethodPtr; // a generic method pointer struct CORINFO_Object @@ -1818,17 +1829,16 @@ struct CORINFO_Array : public CORINFO_Object union { - __int8 i1Elems[1]; // actually of variable size - unsigned __int8 u1Elems[1]; - __int16 i2Elems[1]; - unsigned __int16 u2Elems[1]; - __int32 i4Elems[1]; - unsigned __int32 u4Elems[1]; + int8_t i1Elems[1]; // actually of variable size + uint8_t u1Elems[1]; + int16_t i2Elems[1]; + uint16_t u2Elems[1]; + int32_t i4Elems[1]; + uint32_t u4Elems[1]; float r4Elems[1]; }; }; -#include struct CORINFO_Array8 : public CORINFO_Object { unsigned length; @@ -1839,12 +1849,11 @@ struct CORINFO_Array8 : public CORINFO_Object union { double r8Elems[1]; - __int64 i8Elems[1]; - unsigned __int64 u8Elems[1]; + int64_t i8Elems[1]; + uint64_t u8Elems[1]; }; }; -#include struct CORINFO_RefArray : public CORINFO_Object { @@ -1875,22 +1884,20 @@ struct CORINFO_VarArgInfo // (The CORINFO_VARARGS_HANDLE counts as an arg) }; -#include - #define SIZEOF__CORINFO_Object TARGET_POINTER_SIZE /* methTable */ #define OFFSETOF__CORINFO_Array__length SIZEOF__CORINFO_Object #ifdef TARGET_64BIT -#define OFFSETOF__CORINFO_Array__data (OFFSETOF__CORINFO_Array__length + sizeof(unsigned __int32) /* length */ + sizeof(unsigned __int32) /* alignpad */) +#define OFFSETOF__CORINFO_Array__data (OFFSETOF__CORINFO_Array__length + sizeof(uint32_t) /* length */ + sizeof(uint32_t) /* alignpad */) #else -#define OFFSETOF__CORINFO_Array__data (OFFSETOF__CORINFO_Array__length + sizeof(unsigned __int32) /* length */) +#define OFFSETOF__CORINFO_Array__data (OFFSETOF__CORINFO_Array__length + sizeof(uint32_t) /* length */) #endif #define OFFSETOF__CORINFO_TypedReference__dataPtr 0 #define OFFSETOF__CORINFO_TypedReference__type (OFFSETOF__CORINFO_TypedReference__dataPtr + TARGET_POINTER_SIZE /* dataPtr */) #define OFFSETOF__CORINFO_String__stringLen SIZEOF__CORINFO_Object -#define OFFSETOF__CORINFO_String__chars (OFFSETOF__CORINFO_String__stringLen + sizeof(unsigned __int32) /* stringLen */) +#define OFFSETOF__CORINFO_String__chars (OFFSETOF__CORINFO_String__stringLen + sizeof(uint32_t) /* stringLen */) /* data to optimize delegate construction */ @@ -1906,7 +1913,7 @@ struct DelegateCtorArgs #include // offsetof // Guard-stack cookie for preventing against stack buffer overruns -typedef SIZE_T GSCookie; +typedef size_t GSCookie; #include "cordebuginfo.h" @@ -1941,7 +1948,7 @@ class ICorStaticInfo /**********************************************************************************/ // return flags (a bitfield of CorInfoFlags values) - virtual DWORD getMethodAttribs ( + virtual uint32_t getMethodAttribs ( CORINFO_METHOD_HANDLE ftn /* IN */ ) = 0; @@ -1987,7 +1994,7 @@ class ICorStaticInfo virtual CorInfoInline canInline ( CORINFO_METHOD_HANDLE callerHnd, /* IN */ CORINFO_METHOD_HANDLE calleeHnd, /* IN */ - DWORD* pRestrictions /* OUT */ + uint32_t* pRestrictions /* OUT */ ) = 0; // Reports whether or not a method can be inlined, and why. canInline is responsible for reporting all @@ -2205,7 +2212,7 @@ class ICorStaticInfo // Returns string length and content (can be null for dynamic context) // for given metaTOK and module, length `-1` means input is incorrect - virtual LPCWSTR getStringLiteral ( + virtual const char16_t * getStringLiteral ( CORINFO_MODULE_HANDLE module, /* IN */ unsigned metaTOK, /* IN */ int* length /* OUT */ @@ -2249,7 +2256,7 @@ class ICorStaticInfo // If fAssembly=TRUE, suffix with a comma and the full assembly qualification // return size of representation virtual int appendClassName( - __deref_inout_ecount(*pnBufLen) WCHAR** ppBuf, + __deref_inout_ecount(*pnBufLen) char16_t** ppBuf, int* pnBufLen, CORINFO_CLASS_HANDLE cls, bool fNamespace, @@ -2266,7 +2273,7 @@ class ICorStaticInfo virtual CorInfoInlineTypeCheck canInlineTypeCheck(CORINFO_CLASS_HANDLE cls, CorInfoInlineTypeCheckSource source) = 0; // return flags (a bitfield of CorInfoFlags values) - virtual DWORD getClassAttribs ( + virtual uint32_t getClassAttribs ( CORINFO_CLASS_HANDLE cls ) = 0; @@ -2328,14 +2335,14 @@ class ICorStaticInfo // in representing of 'cls' from a GC perspective. The class is // assumed to be an array of machine words // (of length // getClassSize(cls) / TARGET_POINTER_SIZE), - // 'gcPtrs' is a pointer to an array of BYTEs of this length. + // 'gcPtrs' is a pointer to an array of uint8_ts of this length. // getClassGClayout fills in this array so that gcPtrs[i] is set // to one of the CorInfoGCType values which is the GC type of // the i-th machine word of an object of type 'cls' // returns the number of GC pointers in the array virtual unsigned getClassGClayout ( CORINFO_CLASS_HANDLE cls, /* IN */ - BYTE *gcPtrs /* OUT */ + uint8_t *gcPtrs /* OUT */ ) = 0; // returns the number of instance fields in a class @@ -2345,12 +2352,12 @@ class ICorStaticInfo virtual CORINFO_FIELD_HANDLE getFieldInClass( CORINFO_CLASS_HANDLE clsHnd, - INT num + int32_t num ) = 0; virtual bool checkMethodModifier( CORINFO_METHOD_HANDLE hMethod, - LPCSTR modifier, + const char * modifier, bool fOptional ) = 0; @@ -2545,7 +2552,7 @@ class ICorStaticInfo // Get static field data for an array virtual void * getArrayInitializationData( CORINFO_FIELD_HANDLE field, - DWORD size + uint32_t size ) = 0; // Check Visibility rules. @@ -2617,7 +2624,7 @@ class ICorStaticInfo virtual void getBoundaries( CORINFO_METHOD_HANDLE ftn, // [IN] method of interest unsigned int *cILOffsets, // [OUT] size of pILOffsets - DWORD **pILOffsets, // [OUT] IL offsets of interest + uint32_t **pILOffsets, // [OUT] IL offsets of interest // jit MUST free with freeArray! ICorDebugInfo::BoundaryTypes *implictBoundaries // [OUT] tell jit, all boundries of this type ) = 0; @@ -2630,8 +2637,8 @@ class ICorStaticInfo // offsets form a contiguous block of memory, and that the // OffsetMapping is sorted in order of increasing native offset. virtual void setBoundaries( - CORINFO_METHOD_HANDLE ftn, // [IN] method of interest - ULONG32 cMap, // [IN] size of pMap + CORINFO_METHOD_HANDLE ftn, // [IN] method of interest + uint32_t cMap, // [IN] size of pMap ICorDebugInfo::OffsetMapping *pMap // [IN] map including all points of interest. // jit allocated with allocateArray, EE frees ) = 0; @@ -2646,8 +2653,8 @@ class ICorStaticInfo // code generation. virtual void getVars( CORINFO_METHOD_HANDLE ftn, // [IN] method of interest - ULONG32 *cVars, // [OUT] size of 'vars' - ICorDebugInfo::ILVarInfo **vars, // [OUT] scopes of variables of interest + uint32_t *cVars, // [OUT] size of 'vars' + ICorDebugInfo::ILVarInfo **vars, // [OUT] scopes of variables of interest // jit MUST free with freeArray! bool *extendOthers // [OUT] it TRUE, then assume the scope // of unmentioned vars is entire method @@ -2659,7 +2666,7 @@ class ICorStaticInfo virtual void setVars( CORINFO_METHOD_HANDLE ftn, // [IN] method of interest - ULONG32 cVars, // [IN] size of 'vars' + uint32_t cVars, // [IN] size of 'vars' ICorDebugInfo::NativeVarInfo *vars // [IN] map telling where local vars are stored at what points // jit allocated with allocateArray, EE frees ) = 0; @@ -2726,16 +2733,16 @@ class ICorStaticInfo *****************************************************************************/ // Returns the HRESULT of the current exception - virtual HRESULT GetErrorHRESULT( + virtual JITINTERFACE_HRESULT GetErrorHRESULT( struct _EXCEPTION_POINTERS *pExceptionPointers ) = 0; // Fetches the message of the current exception // Returns the size of the message (including terminating null). This can be // greater than bufferLength if the buffer is insufficient. - virtual ULONG GetErrorMessage( - __inout_ecount(bufferLength) LPWSTR buffer, - ULONG bufferLength + virtual uint32_t GetErrorMessage( + __inout_ecount(bufferLength) char16_t *buffer, + uint32_t bufferLength ) = 0; // returns EXCEPTION_EXECUTE_HANDLER if it is OK for the compile to handle the @@ -2754,7 +2761,7 @@ class ICorStaticInfo ) = 0; virtual void ThrowExceptionForJitResult( - HRESULT result) = 0; + JITINTERFACE_HRESULT result) = 0; //Throws an exception defined by the given throw helper. virtual void ThrowExceptionForHelper( @@ -2783,7 +2790,7 @@ class ICorStaticInfo ) = 0; // Returns name of the JIT timer log - virtual LPCWSTR getJitTimeLogFilename() = 0; + virtual const char16_t *getJitTimeLogFilename() = 0; /*********************************************************************************/ // @@ -2871,7 +2878,7 @@ class ICorDynamicInfo : public ICorStaticInfo // Return details about EE internal data structures - virtual DWORD getThreadTLSIndex( + virtual uint32_t getThreadTLSIndex( void **ppIndirection = NULL ) = 0; @@ -2879,7 +2886,7 @@ class ICorDynamicInfo : public ICorStaticInfo void **ppIndirection = NULL ) = 0; - virtual LONG * getAddrOfCaptureThreadGlobal( + virtual int32_t * getAddrOfCaptureThreadGlobal( void **ppIndirection = NULL ) = 0; @@ -2969,7 +2976,7 @@ class ICorDynamicInfo : public ICorStaticInfo // Generate a cookie based on the signature that would needs to be passed // to CORINFO_HELP_PINVOKE_CALLI - virtual LPVOID GetCookieForPInvokeCalliSig( + virtual void* GetCookieForPInvokeCalliSig( CORINFO_SIG_INFO* szMetaSig, void ** ppIndirection = NULL ) = 0; @@ -3076,7 +3083,7 @@ class ICorDynamicInfo : public ICorStaticInfo // (static fields only) given that 'field' refers to thread local store, // return the ID (TLS index), which is used to find the beginning of the // TLS data area for the particular DLL 'field' is associated with. - virtual DWORD getFieldThreadLocalStoreID ( + virtual uint32_t getFieldThreadLocalStoreID ( CORINFO_FIELD_HANDLE field, void **ppIndirection = NULL ) = 0; diff --git a/src/coreclr/inc/corjit.h b/src/coreclr/inc/corjit.h index a15356471156d..85cb80bc3700e 100644 --- a/src/coreclr/inc/corjit.h +++ b/src/coreclr/inc/corjit.h @@ -33,6 +33,65 @@ #include "corjitflags.h" + +#ifndef MAKE_HRESULT +// If this header is included without including the windows or PAL headers, then define +// MAKE_HRESULT, and associated macros + +/******************* HRESULT types ****************************************/ + +#define FACILITY_WINDOWS 8 +#define FACILITY_URT 19 +#define FACILITY_UMI 22 +#define FACILITY_SXS 23 +#define FACILITY_STORAGE 3 +#define FACILITY_SSPI 9 +#define FACILITY_SCARD 16 +#define FACILITY_SETUPAPI 15 +#define FACILITY_SECURITY 9 +#define FACILITY_RPC 1 +#define FACILITY_WIN32 7 +#define FACILITY_CONTROL 10 +#define FACILITY_NULL 0 +#define FACILITY_MSMQ 14 +#define FACILITY_MEDIASERVER 13 +#define FACILITY_INTERNET 12 +#define FACILITY_ITF 4 +#define FACILITY_DPLAY 21 +#define FACILITY_DISPATCH 2 +#define FACILITY_COMPLUS 17 +#define FACILITY_CERT 11 +#define FACILITY_ACS 20 +#define FACILITY_AAF 18 + +#define NO_ERROR 0L + +#define SEVERITY_SUCCESS 0 +#define SEVERITY_ERROR 1 + +#define SUCCEEDED(Status) ((JITINTERFACE_HRESULT)(Status) >= 0) +#define FAILED(Status) ((JITINTERFACE_HRESULT)(Status)<0) +#define IS_ERROR(Status) ((uint32_t)(Status) >> 31 == SEVERITY_ERROR) // diff from win32 +#define HRESULT_CODE(hr) ((hr) & 0xFFFF) +#define SCODE_CODE(sc) ((sc) & 0xFFFF) +#define HRESULT_FACILITY(hr) (((hr) >> 16) & 0x1fff) +#define SCODE_FACILITY(sc) (((sc) >> 16) & 0x1fff) +#define HRESULT_SEVERITY(hr) (((hr) >> 31) & 0x1) +#define SCODE_SEVERITY(sc) (((sc) >> 31) & 0x1) + +// both macros diff from Win32 +#define MAKE_HRESULT(sev,fac,code) \ + ((JITINTERFACE_HRESULT) (((uint32_t)(sev)<<31) | ((uint32_t)(fac)<<16) | ((uint32_t)(code))) ) +#define MAKE_SCODE(sev,fac,code) \ + ((SCODE) (((uint32_t)(sev)<<31) | ((uint32_t)(fac)<<16) | ((LONG)(code))) ) + +#define FACILITY_NT_BIT 0x10000000 +#define HRESULT_FROM_WIN32(x) ((JITINTERFACE_HRESULT)(x) <= 0 ? ((JITINTERFACE_HRESULT)(x)) : ((JITINTERFACE_HRESULT) (((x) & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000))) +#define __HRESULT_FROM_WIN32(x) HRESULT_FROM_WIN32(x) + +#define HRESULT_FROM_NT(x) ((JITINTERFACE_HRESULT) ((x) | FACILITY_NT_BIT)) +#endif // MAKE_HRESULT + /*****************************************************************************/ // These are error codes returned by CompileMethod enum CorJitResult @@ -85,12 +144,12 @@ enum CheckedWriteBarrierKinds { #include "corjithost.h" -extern "C" void __stdcall jitStartup(ICorJitHost* host); +extern "C" void jitStartup(ICorJitHost* host); class ICorJitCompiler; class ICorJitInfo; -extern "C" ICorJitCompiler* __stdcall getJit(); +extern "C" ICorJitCompiler* getJit(); // #EEToJitInterface // ICorJitCompiler is the interface that the EE uses to get IL bytecode converted to native code. Note that @@ -111,14 +170,12 @@ class ICorJitCompiler // // * In the 32 bit jit this is implemented by code:CILJit.compileMethod // * For the 64 bit jit this is implemented by code:PreJit.compileMethod - // - // Note: Obfuscators that are hacking the JIT depend on this method having __stdcall calling convention - virtual CorJitResult __stdcall compileMethod ( + virtual CorJitResult compileMethod ( ICorJitInfo *comp, /* IN */ struct CORINFO_METHOD_INFO *info, /* IN */ unsigned /* code:CorJitFlag */ flags, /* IN */ - BYTE **nativeEntry, /* OUT */ - ULONG *nativeSizeOfCode /* OUT */ + uint8_t **nativeEntry, /* OUT */ + uint32_t *nativeSizeOfCode /* OUT */ ) = 0; // Do any appropriate work at process shutdown. Default impl is to do nothing. @@ -155,10 +212,10 @@ class ICorJitInfo : public ICorDynamicInfo public: // get a block of memory for the code, readonly data, and read-write data virtual void allocMem ( - ULONG hotCodeSize, /* IN */ - ULONG coldCodeSize, /* IN */ - ULONG roDataSize, /* IN */ - ULONG xcptnsCount, /* IN */ + uint32_t hotCodeSize, /* IN */ + uint32_t coldCodeSize, /* IN */ + uint32_t roDataSize, /* IN */ + uint32_t xcptnsCount, /* IN */ CorJitAllocMemFlag flag, /* IN */ void ** hotCodeBlock, /* OUT */ void ** coldCodeBlock, /* OUT */ @@ -179,7 +236,7 @@ class ICorJitInfo : public ICorDynamicInfo virtual void reserveUnwindInfo ( bool isFunclet, /* IN */ bool isColdCode, /* IN */ - ULONG unwindSize /* IN */ + uint32_t unwindSize /* IN */ ) = 0; // Allocate and initialize the .rdata and .pdata for this method or @@ -200,12 +257,12 @@ class ICorJitInfo : public ICorDynamicInfo // funcKind type of funclet (main method code, handler, filter) // virtual void allocUnwindInfo ( - BYTE * pHotCode, /* IN */ - BYTE * pColdCode, /* IN */ - ULONG startOffset, /* IN */ - ULONG endOffset, /* IN */ - ULONG unwindSize, /* IN */ - BYTE * pUnwindBlock, /* IN */ + uint8_t * pHotCode, /* IN */ + uint8_t * pColdCode, /* IN */ + uint32_t startOffset, /* IN */ + uint32_t endOffset, /* IN */ + uint32_t unwindSize, /* IN */ + uint8_t * pUnwindBlock, /* IN */ CorJitFuncKind funcKind /* IN */ ) = 0; @@ -247,8 +304,8 @@ class ICorJitInfo : public ICorDynamicInfo struct BlockCounts // Also defined by: CORBBTPROF_BLOCK_DATA { - UINT32 ILOffset; - UINT32 ExecutionCount; + uint32_t ILOffset; + uint32_t ExecutionCount; }; // Data structure for a single class probe. @@ -272,7 +329,7 @@ class ICorJitInfo : public ICorDynamicInfo OFFSET_MASK = 0x3FFFFFFF }; - UINT32 Count; + uint32_t Count; CORINFO_CLASS_HANDLE ClassTable[SIZE]; }; @@ -319,12 +376,12 @@ class ICorJitInfo : public ICorDynamicInfo // get profile information to be used for optimizing a current method. The format // of the buffer is the same as the format the JIT passes to allocPgoInstrumentationBySchema. - virtual HRESULT getPgoInstrumentationResults( + virtual JITINTERFACE_HRESULT getPgoInstrumentationResults( CORINFO_METHOD_HANDLE ftnHnd, PgoInstrumentationSchema **pSchema, // OUT: pointer to the schema table (array) which describes the instrumentation results // (pointer will not remain valid after jit completes). - UINT32 * pCountSchemaItems, // OUT: pointer to the count of schema items in `pSchema` array. - BYTE ** pInstrumentationData // OUT: `*pInstrumentationData` is set to the address of the instrumentation data + uint32_t * pCountSchemaItems, // OUT: pointer to the count of schema items in `pSchema` array. + uint8_t ** pInstrumentationData // OUT: `*pInstrumentationData` is set to the address of the instrumentation data // (pointer will not remain valid after jit completes). ) = 0; @@ -339,12 +396,12 @@ class ICorJitInfo : public ICorDynamicInfo // // The intention here is that it becomes possible to describe a C data structure with the alignment for ease of use with // instrumentation helper functions - virtual HRESULT allocPgoInstrumentationBySchema( + virtual JITINTERFACE_HRESULT allocPgoInstrumentationBySchema( CORINFO_METHOD_HANDLE ftnHnd, PgoInstrumentationSchema *pSchema, // IN OUT: pointer to the schema table (array) which describes the instrumentation results. `Offset` field // is filled in by VM; other fields are set and passed in by caller. - UINT32 countSchemaItems, // IN: count of schema items in `pSchema` array. - BYTE ** pInstrumentationData // OUT: `*pInstrumentationData` is set to the address of the instrumentation data. + uint32_t countSchemaItems, // IN: count of schema items in `pSchema` array. + uint8_t ** pInstrumentationData // OUT: `*pInstrumentationData` is set to the address of the instrumentation data. ) = 0; // Get the likely implementing class for a virtual call or interface call made by ftnHnd @@ -360,9 +417,9 @@ class ICorJitInfo : public ICorDynamicInfo virtual CORINFO_CLASS_HANDLE getLikelyClass( CORINFO_METHOD_HANDLE ftnHnd, CORINFO_CLASS_HANDLE baseHnd, - UINT32 ilOffset, - UINT32 * pLikelihood, // OUT, estimated likelihood of the class (0...100) - UINT32 * pNumberOfClasses // OUT, estimated number of possible classes + uint32_t ilOffset, + uint32_t * pLikelihood, // OUT, estimated likelihood of the class (0...100) + uint32_t * pNumberOfClasses // OUT, estimated number of possible classes ) = 0; // Associates a native call site, identified by its offset in the native code stream, with @@ -370,7 +427,7 @@ class ICorJitInfo : public ICorDynamicInfo // the call site has no signature information (e.g. a helper call) or has no method handle // (e.g. a CALLI P/Invoke), then null should be passed instead. virtual void recordCallSite( - ULONG instrOffset, /* IN */ + uint32_t instrOffset, /* IN */ CORINFO_SIG_INFO * callSig, /* IN */ CORINFO_METHOD_HANDLE methodHandle /* IN */ ) = 0; @@ -380,25 +437,25 @@ class ICorJitInfo : public ICorDynamicInfo virtual void recordRelocation( void * location, /* IN */ void * target, /* IN */ - WORD fRelocType, /* IN */ - WORD slotNum = 0, /* IN */ - INT32 addlDelta = 0 /* IN */ + uint16_t fRelocType, /* IN */ + uint16_t slotNum = 0, /* IN */ + int32_t addlDelta = 0 /* IN */ ) = 0; - virtual WORD getRelocTypeHint(void * target) = 0; + virtual uint16_t getRelocTypeHint(void * target) = 0; // For what machine does the VM expect the JIT to generate code? The VM // returns one of the IMAGE_FILE_MACHINE_* values. Note that if the VM // is cross-compiling (such as the case for crossgen), it will return a // different value than if it was compiling for the host architecture. // - virtual DWORD getExpectedTargetArchitecture() = 0; + virtual uint32_t getExpectedTargetArchitecture() = 0; // Fetches extended flags for a particular compilation instance. Returns // the number of bytes written to the provided buffer. - virtual DWORD getJitFlags( + virtual uint32_t getJitFlags( CORJIT_FLAGS* flags, /* IN: Points to a buffer that will hold the extended flags. */ - DWORD sizeInBytes /* IN: The size of the buffer. Note that this is effectively a + uint32_t sizeInBytes /* IN: The size of the buffer. Note that this is effectively a version number for the CORJIT_FLAGS value. */ ) = 0; }; diff --git a/src/coreclr/inc/corjitflags.h b/src/coreclr/inc/corjitflags.h index a29ec24afe61a..e8c330e3e41b3 100644 --- a/src/coreclr/inc/corjitflags.h +++ b/src/coreclr/inc/corjitflags.h @@ -167,17 +167,17 @@ class CORJIT_FLAGS void Set(CorJitFlag flag) { - corJitFlags |= 1ULL << (unsigned __int64)flag; + corJitFlags |= 1ULL << (uint64_t)flag; } void Clear(CorJitFlag flag) { - corJitFlags &= ~(1ULL << (unsigned __int64)flag); + corJitFlags &= ~(1ULL << (uint64_t)flag); } bool IsSet(CorJitFlag flag) const { - return (corJitFlags & (1ULL << (unsigned __int64)flag)) != 0; + return (corJitFlags & (1ULL << (uint64_t)flag)) != 0; } void Add(const CORJIT_FLAGS& other) @@ -197,20 +197,20 @@ class CORJIT_FLAGS } // DO NOT USE THIS FUNCTION! (except in very restricted special cases) - unsigned __int64 GetFlagsRaw() + uint64_t GetFlagsRaw() { return corJitFlags; } // DO NOT USE THIS FUNCTION! (except in very restricted special cases) - unsigned __int64 GetInstructionSetFlagsRaw() + uint64_t GetInstructionSetFlagsRaw() { return instructionSetFlags.GetFlagsRaw(); } private: - unsigned __int64 corJitFlags; + uint64_t corJitFlags; CORINFO_InstructionSetFlags instructionSetFlags; }; diff --git a/src/coreclr/inc/icorjitinfoimpl_generated.h b/src/coreclr/inc/icorjitinfoimpl_generated.h index e02a50993b551..beb71ca0d3fa7 100644 --- a/src/coreclr/inc/icorjitinfoimpl_generated.h +++ b/src/coreclr/inc/icorjitinfoimpl_generated.h @@ -21,7 +21,7 @@ public: -DWORD getMethodAttribs( +uint32_t getMethodAttribs( CORINFO_METHOD_HANDLE ftn) override; void setMethodAttribs( @@ -40,7 +40,7 @@ bool getMethodInfo( CorInfoInline canInline( CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd, - DWORD* pRestrictions) override; + uint32_t* pRestrictions) override; void reportInliningDecision( CORINFO_METHOD_HANDLE inlinerHnd, @@ -167,7 +167,7 @@ bool isValidStringRef( CORINFO_MODULE_HANDLE module, unsigned metaTOK) override; -LPCWSTR getStringLiteral( +const char16_t* getStringLiteral( CORINFO_MODULE_HANDLE module, unsigned metaTOK, int* length) override; @@ -187,7 +187,7 @@ CORINFO_CLASS_HANDLE getTypeInstantiationArgument( unsigned index) override; int appendClassName( - WCHAR** ppBuf, + char16_t** ppBuf, int* pnBufLen, CORINFO_CLASS_HANDLE cls, bool fNamespace, @@ -201,7 +201,7 @@ CorInfoInlineTypeCheck canInlineTypeCheck( CORINFO_CLASS_HANDLE cls, CorInfoInlineTypeCheckSource source) override; -DWORD getClassAttribs( +uint32_t getClassAttribs( CORINFO_CLASS_HANDLE cls) override; bool isStructRequiringStackAllocRetBuf( @@ -242,18 +242,18 @@ unsigned getClassAlignmentRequirement( unsigned getClassGClayout( CORINFO_CLASS_HANDLE cls, - BYTE* gcPtrs) override; + uint8_t* gcPtrs) override; unsigned getClassNumInstanceFields( CORINFO_CLASS_HANDLE cls) override; CORINFO_FIELD_HANDLE getFieldInClass( CORINFO_CLASS_HANDLE clsHnd, - INT num) override; + int32_t num) override; bool checkMethodModifier( CORINFO_METHOD_HANDLE hMethod, - LPCSTR modifier, + const char* modifier, bool fOptional) override; CorInfoHelpFunc getNewHelper( @@ -353,7 +353,7 @@ unsigned getArrayRank( void* getArrayInitializationData( CORINFO_FIELD_HANDLE field, - DWORD size) override; + uint32_t size) override; CorInfoIsAccessAllowedResult canAccessClass( CORINFO_RESOLVED_TOKEN* pResolvedToken, @@ -387,23 +387,23 @@ bool isFieldStatic( void getBoundaries( CORINFO_METHOD_HANDLE ftn, unsigned int* cILOffsets, - DWORD** pILOffsets, + uint32_t** pILOffsets, ICorDebugInfo::BoundaryTypes* implictBoundaries) override; void setBoundaries( CORINFO_METHOD_HANDLE ftn, - ULONG32 cMap, + uint32_t cMap, ICorDebugInfo::OffsetMapping* pMap) override; void getVars( CORINFO_METHOD_HANDLE ftn, - ULONG32* cVars, + uint32_t* cVars, ICorDebugInfo::ILVarInfo** vars, bool* extendOthers) override; void setVars( CORINFO_METHOD_HANDLE ftn, - ULONG32 cVars, + uint32_t cVars, ICorDebugInfo::NativeVarInfo* vars) override; void* allocateArray( @@ -427,12 +427,12 @@ CORINFO_CLASS_HANDLE getArgClass( CorInfoHFAElemType getHFAType( CORINFO_CLASS_HANDLE hClass) override; -HRESULT GetErrorHRESULT( +JITINTERFACE_HRESULT GetErrorHRESULT( struct _EXCEPTION_POINTERS* pExceptionPointers) override; -ULONG GetErrorMessage( - LPWSTR buffer, - ULONG bufferLength) override; +uint32_t GetErrorMessage( + char16_t* buffer, + uint32_t bufferLength) override; int FilterException( struct _EXCEPTION_POINTERS* pExceptionPointers) override; @@ -441,7 +441,7 @@ void HandleException( struct _EXCEPTION_POINTERS* pExceptionPointers) override; void ThrowExceptionForJitResult( - HRESULT result) override; + JITINTERFACE_HRESULT result) override; void ThrowExceptionForHelper( const CORINFO_HELPER_DESC* throwHelper) override; @@ -453,7 +453,7 @@ bool runWithErrorTrap( void getEEInfo( CORINFO_EE_INFO* pEEInfoOut) override; -LPCWSTR getJitTimeLogFilename() override; +const char16_t* getJitTimeLogFilename() override; mdMethodDef getMethodDefFromMethod( CORINFO_METHOD_HANDLE hMethod) override; @@ -481,13 +481,13 @@ bool getSystemVAmd64PassStructInRegisterDescriptor( CORINFO_CLASS_HANDLE structHnd, SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR* structPassInRegDescPtr) override; -DWORD getThreadTLSIndex( +uint32_t getThreadTLSIndex( void** ppIndirection) override; const void* getInlinedCallFrameVptr( void** ppIndirection) override; -LONG* getAddrOfCaptureThreadGlobal( +int32_t* getAddrOfCaptureThreadGlobal( void** ppIndirection) override; void* getHelperFtn( @@ -539,7 +539,7 @@ void getAddressOfPInvokeTarget( CORINFO_METHOD_HANDLE method, CORINFO_CONST_LOOKUP* pLookup) override; -LPVOID GetCookieForPInvokeCalliSig( +void* GetCookieForPInvokeCalliSig( CORINFO_SIG_INFO* szMetaSig, void** ppIndirection) override; @@ -596,7 +596,7 @@ InfoAccessType constructStringLiteral( InfoAccessType emptyStringLiteral( void** ppValue) override; -DWORD getFieldThreadLocalStoreID( +uint32_t getFieldThreadLocalStoreID( CORINFO_FIELD_HANDLE field, void** ppIndirection) override; @@ -632,10 +632,10 @@ bool notifyInstructionSetUsage( bool supportEnabled) override; void allocMem( - ULONG hotCodeSize, - ULONG coldCodeSize, - ULONG roDataSize, - ULONG xcptnsCount, + uint32_t hotCodeSize, + uint32_t coldCodeSize, + uint32_t roDataSize, + uint32_t xcptnsCount, CorJitAllocMemFlag flag, void** hotCodeBlock, void** coldCodeBlock, @@ -644,15 +644,15 @@ void allocMem( void reserveUnwindInfo( bool isFunclet, bool isColdCode, - ULONG unwindSize) override; + uint32_t unwindSize) override; void allocUnwindInfo( - BYTE* pHotCode, - BYTE* pColdCode, - ULONG startOffset, - ULONG endOffset, - ULONG unwindSize, - BYTE* pUnwindBlock, + uint8_t* pHotCode, + uint8_t* pColdCode, + uint32_t startOffset, + uint32_t endOffset, + uint32_t unwindSize, + uint8_t* pUnwindBlock, CorJitFuncKind funcKind) override; void* allocGCInfo( @@ -678,45 +678,45 @@ int doAssert( void reportFatalError( CorJitResult result) override; -HRESULT getPgoInstrumentationResults( +JITINTERFACE_HRESULT getPgoInstrumentationResults( CORINFO_METHOD_HANDLE ftnHnd, - PgoInstrumentationSchema** pSchema, - UINT32* pCountSchemaItems, - BYTE** pInstrumentationData) override; + ICorJitInfo::PgoInstrumentationSchema** pSchema, + uint32_t* pCountSchemaItems, + uint8_t** pInstrumentationData) override; -HRESULT allocPgoInstrumentationBySchema( +JITINTERFACE_HRESULT allocPgoInstrumentationBySchema( CORINFO_METHOD_HANDLE ftnHnd, - PgoInstrumentationSchema* pSchema, - UINT32 countSchemaItems, - BYTE** pInstrumentationData) override; + ICorJitInfo::PgoInstrumentationSchema* pSchema, + uint32_t countSchemaItems, + uint8_t** pInstrumentationData) override; CORINFO_CLASS_HANDLE getLikelyClass( CORINFO_METHOD_HANDLE ftnHnd, CORINFO_CLASS_HANDLE baseHnd, - UINT32 ilOffset, - UINT32* pLikelihood, - UINT32* pNumberOfClasses) override; + uint32_t ilOffset, + uint32_t* pLikelihood, + uint32_t* pNumberOfClasses) override; void recordCallSite( - ULONG instrOffset, + uint32_t instrOffset, CORINFO_SIG_INFO* callSig, CORINFO_METHOD_HANDLE methodHandle) override; void recordRelocation( void* location, void* target, - WORD fRelocType, - WORD slotNum, - INT32 addlDelta) override; + uint16_t fRelocType, + uint16_t slotNum, + int32_t addlDelta) override; -WORD getRelocTypeHint( +uint16_t getRelocTypeHint( void* target) override; -DWORD getExpectedTargetArchitecture() override; +uint32_t getExpectedTargetArchitecture() override; -DWORD getJitFlags( +uint32_t getJitFlags( CORJIT_FLAGS* flags, - DWORD sizeInBytes) override; + uint32_t sizeInBytes) override; /**********************************************************************************/ // clang-format on diff --git a/src/coreclr/inc/jiteeversionguid.h b/src/coreclr/inc/jiteeversionguid.h index 5cfbb06876031..8d356ee92323c 100644 --- a/src/coreclr/inc/jiteeversionguid.h +++ b/src/coreclr/inc/jiteeversionguid.h @@ -32,11 +32,22 @@ ////////////////////////////////////////////////////////////////////////////////////////////////////////// // -constexpr GUID JITEEVersionIdentifier = { /* af37688b-d4e5-4a41-a7ee-701728a470aa */ - 0xaf37688b, - 0xd4e5, - 0x4a41, - {0xa7, 0xee, 0x70, 0x17, 0x28, 0xa4, 0x70, 0xaa} +#ifndef GUID_DEFINED +typedef struct _GUID { + uint32_t Data1; // NOTE: diff from Win32, for LP64 + uint16_t Data2; + uint16_t Data3; + uint8_t Data4[ 8 ]; +} GUID; +typedef const GUID *LPCGUID; +#define GUID_DEFINED +#endif // !GUID_DEFINED + +constexpr GUID JITEEVersionIdentifier = { /* ba99f659-11ae-4c05-bdad-650cb5104f26 */ + 0xba99f659, + 0x11ae, + 0x4c05, + {0xbd, 0xad, 0x65, 0x0c, 0xb5, 0x10, 0x4f, 0x26} }; ////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/coreclr/inc/metadata.h b/src/coreclr/inc/metadata.h index 92d1cbc8bae42..4f119e2e9d6a5 100644 --- a/src/coreclr/inc/metadata.h +++ b/src/coreclr/inc/metadata.h @@ -88,14 +88,14 @@ typedef enum tagEnumType struct HENUMInternal { DWORD m_tkKind; // kind of tables that the enum is holding the result - ULONG m_ulCount; // count of total entries holding by the enumerator + uint32_t m_ulCount; // count of total entries holding by the enumerator EnumType m_EnumType; struct { - ULONG m_ulStart; - ULONG m_ulEnd; - ULONG m_ulCur; + uint32_t m_ulStart; + uint32_t m_ulEnd; + uint32_t m_ulCur; } u; // m_cursor will go away when we no longer support running EE with uncompressed diff --git a/src/coreclr/inc/metamodelpub.h b/src/coreclr/inc/metamodelpub.h index 0f00534a62142..37e77e9123b10 100644 --- a/src/coreclr/inc/metamodelpub.h +++ b/src/coreclr/inc/metamodelpub.h @@ -31,7 +31,7 @@ template inline T Align4(T p) return (T)i; } -typedef ULONG RID; +typedef uint32_t RID; // check if a rid is valid or not #define InvalidRid(rid) ((rid) == 0) diff --git a/src/coreclr/inc/sigparser.h b/src/coreclr/inc/sigparser.h index 8a385c1344fe7..9152727aee458 100644 --- a/src/coreclr/inc/sigparser.h +++ b/src/coreclr/inc/sigparser.h @@ -44,13 +44,13 @@ class SigParser // This type is performance critical - do not add fields to it. // (If you must, check for managed types that may use a SigParser or SigPointer inline, like ArgIterator.) PCCOR_SIGNATURE m_ptr; - DWORD m_dwLen; + uint32_t m_dwLen; //------------------------------------------------------------------------ // Skips specified number of bytes WITHOUT VALIDATION. Only to be used // when it is known that it won't overflow the signature buffer. //------------------------------------------------------------------------ - FORCEINLINE void SkipBytes(ULONG cb) + FORCEINLINE void SkipBytes(uint32_t cb) { SUPPORTS_DAC; _ASSERT(cb <= m_dwLen); @@ -82,7 +82,7 @@ class SigParser m_dwLen = 0xffffffff; } - FORCEINLINE SigParser(PCCOR_SIGNATURE ptr, DWORD len) + FORCEINLINE SigParser(PCCOR_SIGNATURE ptr, uint32_t len) { LIMITED_METHOD_CONTRACT; @@ -99,7 +99,7 @@ class SigParser m_dwLen = 0xffffffff; } - inline void SetSig(PCCOR_SIGNATURE ptr, DWORD len) + inline void SetSig(PCCOR_SIGNATURE ptr, uint32_t len) { LIMITED_METHOD_CONTRACT; @@ -119,7 +119,7 @@ class SigParser void GetSignature( PCCOR_SIGNATURE * pSig, - DWORD * pcbSigSize) + uint32_t * pcbSigSize) { *pSig = m_ptr; *pcbSigSize = m_dwLen; @@ -142,13 +142,13 @@ class SigParser // the head of the stream and return it. //------------------------------------------------------------------------ __checkReturn - FORCEINLINE HRESULT GetData(ULONG* data) + FORCEINLINE HRESULT GetData(uint32_t* data) { WRAPPER_NO_CONTRACT; SUPPORTS_DAC; - ULONG sizeOfData = 0; - ULONG tempData; + uint32_t sizeOfData = 0; + uint32_t tempData; if (data == NULL) data = &tempData; @@ -275,12 +275,12 @@ class SigParser // Note: Calling convention is always one byte, not four bytes __checkReturn - HRESULT GetCallingConvInfo(ULONG * data) + HRESULT GetCallingConvInfo(uint32_t * data) { WRAPPER_NO_CONTRACT; SUPPORTS_DAC; - ULONG tmpData; + uint32_t tmpData; if (data == NULL) data = &tmpData; @@ -295,10 +295,10 @@ class SigParser } __checkReturn - HRESULT GetCallingConv(ULONG* data) // @REVISIT_TODO: Calling convention is one byte, not four. + HRESULT GetCallingConv(uint32_t* data) // @REVISIT_TODO: Calling convention is one byte, not four. { WRAPPER_NO_CONTRACT; - ULONG info; + uint32_t info; HRESULT hr = GetCallingConvInfo(&info); if (SUCCEEDED(hr) && data != NULL) @@ -313,12 +313,12 @@ class SigParser // Non-destructive read of compressed integer. //------------------------------------------------------------------------ __checkReturn - HRESULT PeekData(ULONG *data) const + HRESULT PeekData(uint32_t *data) const { WRAPPER_NO_CONTRACT; _ASSERTE(data != NULL); - ULONG sizeOfData = 0; + uint32_t sizeOfData = 0; return CorSigUncompressData(m_ptr, m_dwLen, data, &sizeOfData); } @@ -386,12 +386,12 @@ class SigParser // E_INVALIDARG for base types that have variables sizes. //------------------------------------------------------------------------- __checkReturn - HRESULT PeekElemTypeSize(ULONG *pSize) + HRESULT PeekElemTypeSize(uint32_t *pSize) { WRAPPER_NO_CONTRACT; HRESULT hr = S_OK; - DWORD dwSize = 0; + uint32_t dwSize = 0; if (pSize == NULL) { @@ -510,7 +510,7 @@ class SigParser HRESULT GetToken(mdToken * token) { WRAPPER_NO_CONTRACT; - DWORD dwLen; + uint32_t dwLen; mdToken tempToken; if (token == NULL) @@ -716,7 +716,7 @@ class SigParser // the arguments. //------------------------------------------------------------------------ __checkReturn - HRESULT SkipMethodHeaderSignature(ULONG *pcArgs); + HRESULT SkipMethodHeaderSignature(uint32_t *pcArgs); //------------------------------------------------------------------------ // Skip a sub signature (as immediately follows an ELEMENT_TYPE_FNPTR). diff --git a/src/coreclr/jit/ICorJitInfo_API_wrapper.hpp b/src/coreclr/jit/ICorJitInfo_API_wrapper.hpp index ccae8f7096dc8..d80bb83ef059a 100644 --- a/src/coreclr/jit/ICorJitInfo_API_wrapper.hpp +++ b/src/coreclr/jit/ICorJitInfo_API_wrapper.hpp @@ -12,11 +12,11 @@ // clang-format off /**********************************************************************************/ -DWORD WrapICorJitInfo::getMethodAttribs( +uint32_t WrapICorJitInfo::getMethodAttribs( CORINFO_METHOD_HANDLE ftn) { API_ENTER(getMethodAttribs); - DWORD temp = wrapHnd->getMethodAttribs(ftn); + uint32_t temp = wrapHnd->getMethodAttribs(ftn); API_LEAVE(getMethodAttribs); return temp; } @@ -53,7 +53,7 @@ bool WrapICorJitInfo::getMethodInfo( CorInfoInline WrapICorJitInfo::canInline( CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd, - DWORD* pRestrictions) + uint32_t* pRestrictions) { API_ENTER(canInline); CorInfoInline temp = wrapHnd->canInline(callerHnd, calleeHnd, pRestrictions); @@ -355,13 +355,13 @@ bool WrapICorJitInfo::isValidStringRef( return temp; } -LPCWSTR WrapICorJitInfo::getStringLiteral( +const char16_t* WrapICorJitInfo::getStringLiteral( CORINFO_MODULE_HANDLE module, unsigned metaTOK, int* length) { API_ENTER(getStringLiteral); - LPCWSTR temp = wrapHnd->getStringLiteral(module, metaTOK, length); + const char16_t* temp = wrapHnd->getStringLiteral(module, metaTOK, length); API_LEAVE(getStringLiteral); return temp; } @@ -405,7 +405,7 @@ CORINFO_CLASS_HANDLE WrapICorJitInfo::getTypeInstantiationArgument( } int WrapICorJitInfo::appendClassName( - WCHAR** ppBuf, + char16_t** ppBuf, int* pnBufLen, CORINFO_CLASS_HANDLE cls, bool fNamespace, @@ -437,11 +437,11 @@ CorInfoInlineTypeCheck WrapICorJitInfo::canInlineTypeCheck( return temp; } -DWORD WrapICorJitInfo::getClassAttribs( +uint32_t WrapICorJitInfo::getClassAttribs( CORINFO_CLASS_HANDLE cls) { API_ENTER(getClassAttribs); - DWORD temp = wrapHnd->getClassAttribs(cls); + uint32_t temp = wrapHnd->getClassAttribs(cls); API_LEAVE(getClassAttribs); return temp; } @@ -549,7 +549,7 @@ unsigned WrapICorJitInfo::getClassAlignmentRequirement( unsigned WrapICorJitInfo::getClassGClayout( CORINFO_CLASS_HANDLE cls, - BYTE* gcPtrs) + uint8_t* gcPtrs) { API_ENTER(getClassGClayout); unsigned temp = wrapHnd->getClassGClayout(cls, gcPtrs); @@ -568,7 +568,7 @@ unsigned WrapICorJitInfo::getClassNumInstanceFields( CORINFO_FIELD_HANDLE WrapICorJitInfo::getFieldInClass( CORINFO_CLASS_HANDLE clsHnd, - INT num) + int32_t num) { API_ENTER(getFieldInClass); CORINFO_FIELD_HANDLE temp = wrapHnd->getFieldInClass(clsHnd, num); @@ -578,7 +578,7 @@ CORINFO_FIELD_HANDLE WrapICorJitInfo::getFieldInClass( bool WrapICorJitInfo::checkMethodModifier( CORINFO_METHOD_HANDLE hMethod, - LPCSTR modifier, + const char* modifier, bool fOptional) { API_ENTER(checkMethodModifier); @@ -838,7 +838,7 @@ unsigned WrapICorJitInfo::getArrayRank( void* WrapICorJitInfo::getArrayInitializationData( CORINFO_FIELD_HANDLE field, - DWORD size) + uint32_t size) { API_ENTER(getArrayInitializationData); void* temp = wrapHnd->getArrayInitializationData(field, size); @@ -919,7 +919,7 @@ bool WrapICorJitInfo::isFieldStatic( void WrapICorJitInfo::getBoundaries( CORINFO_METHOD_HANDLE ftn, unsigned int* cILOffsets, - DWORD** pILOffsets, + uint32_t** pILOffsets, ICorDebugInfo::BoundaryTypes* implictBoundaries) { API_ENTER(getBoundaries); @@ -929,7 +929,7 @@ void WrapICorJitInfo::getBoundaries( void WrapICorJitInfo::setBoundaries( CORINFO_METHOD_HANDLE ftn, - ULONG32 cMap, + uint32_t cMap, ICorDebugInfo::OffsetMapping* pMap) { API_ENTER(setBoundaries); @@ -939,7 +939,7 @@ void WrapICorJitInfo::setBoundaries( void WrapICorJitInfo::getVars( CORINFO_METHOD_HANDLE ftn, - ULONG32* cVars, + uint32_t* cVars, ICorDebugInfo::ILVarInfo** vars, bool* extendOthers) { @@ -950,7 +950,7 @@ void WrapICorJitInfo::getVars( void WrapICorJitInfo::setVars( CORINFO_METHOD_HANDLE ftn, - ULONG32 cVars, + uint32_t cVars, ICorDebugInfo::NativeVarInfo* vars) { API_ENTER(setVars); @@ -1014,21 +1014,21 @@ CorInfoHFAElemType WrapICorJitInfo::getHFAType( return temp; } -HRESULT WrapICorJitInfo::GetErrorHRESULT( +JITINTERFACE_HRESULT WrapICorJitInfo::GetErrorHRESULT( struct _EXCEPTION_POINTERS* pExceptionPointers) { API_ENTER(GetErrorHRESULT); - HRESULT temp = wrapHnd->GetErrorHRESULT(pExceptionPointers); + JITINTERFACE_HRESULT temp = wrapHnd->GetErrorHRESULT(pExceptionPointers); API_LEAVE(GetErrorHRESULT); return temp; } -ULONG WrapICorJitInfo::GetErrorMessage( - LPWSTR buffer, - ULONG bufferLength) +uint32_t WrapICorJitInfo::GetErrorMessage( + char16_t* buffer, + uint32_t bufferLength) { API_ENTER(GetErrorMessage); - ULONG temp = wrapHnd->GetErrorMessage(buffer, bufferLength); + uint32_t temp = wrapHnd->GetErrorMessage(buffer, bufferLength); API_LEAVE(GetErrorMessage); return temp; } @@ -1051,7 +1051,7 @@ void WrapICorJitInfo::HandleException( } void WrapICorJitInfo::ThrowExceptionForJitResult( - HRESULT result) + JITINTERFACE_HRESULT result) { API_ENTER(ThrowExceptionForJitResult); wrapHnd->ThrowExceptionForJitResult(result); @@ -1084,10 +1084,10 @@ void WrapICorJitInfo::getEEInfo( API_LEAVE(getEEInfo); } -LPCWSTR WrapICorJitInfo::getJitTimeLogFilename() +const char16_t* WrapICorJitInfo::getJitTimeLogFilename() { API_ENTER(getJitTimeLogFilename); - LPCWSTR temp = wrapHnd->getJitTimeLogFilename(); + const char16_t* temp = wrapHnd->getJitTimeLogFilename(); API_LEAVE(getJitTimeLogFilename); return temp; } @@ -1154,11 +1154,11 @@ bool WrapICorJitInfo::getSystemVAmd64PassStructInRegisterDescriptor( return temp; } -DWORD WrapICorJitInfo::getThreadTLSIndex( +uint32_t WrapICorJitInfo::getThreadTLSIndex( void** ppIndirection) { API_ENTER(getThreadTLSIndex); - DWORD temp = wrapHnd->getThreadTLSIndex(ppIndirection); + uint32_t temp = wrapHnd->getThreadTLSIndex(ppIndirection); API_LEAVE(getThreadTLSIndex); return temp; } @@ -1172,11 +1172,11 @@ const void* WrapICorJitInfo::getInlinedCallFrameVptr( return temp; } -LONG* WrapICorJitInfo::getAddrOfCaptureThreadGlobal( +int32_t* WrapICorJitInfo::getAddrOfCaptureThreadGlobal( void** ppIndirection) { API_ENTER(getAddrOfCaptureThreadGlobal); - LONG* temp = wrapHnd->getAddrOfCaptureThreadGlobal(ppIndirection); + int32_t* temp = wrapHnd->getAddrOfCaptureThreadGlobal(ppIndirection); API_LEAVE(getAddrOfCaptureThreadGlobal); return temp; } @@ -1297,12 +1297,12 @@ void WrapICorJitInfo::getAddressOfPInvokeTarget( API_LEAVE(getAddressOfPInvokeTarget); } -LPVOID WrapICorJitInfo::GetCookieForPInvokeCalliSig( +void* WrapICorJitInfo::GetCookieForPInvokeCalliSig( CORINFO_SIG_INFO* szMetaSig, void** ppIndirection) { API_ENTER(GetCookieForPInvokeCalliSig); - LPVOID temp = wrapHnd->GetCookieForPInvokeCalliSig(szMetaSig, ppIndirection); + void* temp = wrapHnd->GetCookieForPInvokeCalliSig(szMetaSig, ppIndirection); API_LEAVE(GetCookieForPInvokeCalliSig); return temp; } @@ -1436,12 +1436,12 @@ InfoAccessType WrapICorJitInfo::emptyStringLiteral( return temp; } -DWORD WrapICorJitInfo::getFieldThreadLocalStoreID( +uint32_t WrapICorJitInfo::getFieldThreadLocalStoreID( CORINFO_FIELD_HANDLE field, void** ppIndirection) { API_ENTER(getFieldThreadLocalStoreID); - DWORD temp = wrapHnd->getFieldThreadLocalStoreID(field, ppIndirection); + uint32_t temp = wrapHnd->getFieldThreadLocalStoreID(field, ppIndirection); API_LEAVE(getFieldThreadLocalStoreID); return temp; } @@ -1517,10 +1517,10 @@ bool WrapICorJitInfo::notifyInstructionSetUsage( } void WrapICorJitInfo::allocMem( - ULONG hotCodeSize, - ULONG coldCodeSize, - ULONG roDataSize, - ULONG xcptnsCount, + uint32_t hotCodeSize, + uint32_t coldCodeSize, + uint32_t roDataSize, + uint32_t xcptnsCount, CorJitAllocMemFlag flag, void** hotCodeBlock, void** coldCodeBlock, @@ -1534,7 +1534,7 @@ void WrapICorJitInfo::allocMem( void WrapICorJitInfo::reserveUnwindInfo( bool isFunclet, bool isColdCode, - ULONG unwindSize) + uint32_t unwindSize) { API_ENTER(reserveUnwindInfo); wrapHnd->reserveUnwindInfo(isFunclet, isColdCode, unwindSize); @@ -1542,12 +1542,12 @@ void WrapICorJitInfo::reserveUnwindInfo( } void WrapICorJitInfo::allocUnwindInfo( - BYTE* pHotCode, - BYTE* pColdCode, - ULONG startOffset, - ULONG endOffset, - ULONG unwindSize, - BYTE* pUnwindBlock, + uint8_t* pHotCode, + uint8_t* pColdCode, + uint32_t startOffset, + uint32_t endOffset, + uint32_t unwindSize, + uint8_t* pUnwindBlock, CorJitFuncKind funcKind) { API_ENTER(allocUnwindInfo); @@ -1611,26 +1611,26 @@ void WrapICorJitInfo::reportFatalError( API_LEAVE(reportFatalError); } -HRESULT WrapICorJitInfo::getPgoInstrumentationResults( +JITINTERFACE_HRESULT WrapICorJitInfo::getPgoInstrumentationResults( CORINFO_METHOD_HANDLE ftnHnd, - PgoInstrumentationSchema** pSchema, - UINT32* pCountSchemaItems, - BYTE** pInstrumentationData) + ICorJitInfo::PgoInstrumentationSchema** pSchema, + uint32_t* pCountSchemaItems, + uint8_t** pInstrumentationData) { API_ENTER(getPgoInstrumentationResults); - HRESULT temp = wrapHnd->getPgoInstrumentationResults(ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData); + JITINTERFACE_HRESULT temp = wrapHnd->getPgoInstrumentationResults(ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData); API_LEAVE(getPgoInstrumentationResults); return temp; } -HRESULT WrapICorJitInfo::allocPgoInstrumentationBySchema( +JITINTERFACE_HRESULT WrapICorJitInfo::allocPgoInstrumentationBySchema( CORINFO_METHOD_HANDLE ftnHnd, - PgoInstrumentationSchema* pSchema, - UINT32 countSchemaItems, - BYTE** pInstrumentationData) + ICorJitInfo::PgoInstrumentationSchema* pSchema, + uint32_t countSchemaItems, + uint8_t** pInstrumentationData) { API_ENTER(allocPgoInstrumentationBySchema); - HRESULT temp = wrapHnd->allocPgoInstrumentationBySchema(ftnHnd, pSchema, countSchemaItems, pInstrumentationData); + JITINTERFACE_HRESULT temp = wrapHnd->allocPgoInstrumentationBySchema(ftnHnd, pSchema, countSchemaItems, pInstrumentationData); API_LEAVE(allocPgoInstrumentationBySchema); return temp; } @@ -1638,9 +1638,9 @@ HRESULT WrapICorJitInfo::allocPgoInstrumentationBySchema( CORINFO_CLASS_HANDLE WrapICorJitInfo::getLikelyClass( CORINFO_METHOD_HANDLE ftnHnd, CORINFO_CLASS_HANDLE baseHnd, - UINT32 ilOffset, - UINT32* pLikelihood, - UINT32* pNumberOfClasses) + uint32_t ilOffset, + uint32_t* pLikelihood, + uint32_t* pNumberOfClasses) { API_ENTER(getLikelyClass); CORINFO_CLASS_HANDLE temp = wrapHnd->getLikelyClass(ftnHnd, baseHnd, ilOffset, pLikelihood, pNumberOfClasses); @@ -1649,7 +1649,7 @@ CORINFO_CLASS_HANDLE WrapICorJitInfo::getLikelyClass( } void WrapICorJitInfo::recordCallSite( - ULONG instrOffset, + uint32_t instrOffset, CORINFO_SIG_INFO* callSig, CORINFO_METHOD_HANDLE methodHandle) { @@ -1661,38 +1661,38 @@ void WrapICorJitInfo::recordCallSite( void WrapICorJitInfo::recordRelocation( void* location, void* target, - WORD fRelocType, - WORD slotNum, - INT32 addlDelta) + uint16_t fRelocType, + uint16_t slotNum, + int32_t addlDelta) { API_ENTER(recordRelocation); wrapHnd->recordRelocation(location, target, fRelocType, slotNum, addlDelta); API_LEAVE(recordRelocation); } -WORD WrapICorJitInfo::getRelocTypeHint( +uint16_t WrapICorJitInfo::getRelocTypeHint( void* target) { API_ENTER(getRelocTypeHint); - WORD temp = wrapHnd->getRelocTypeHint(target); + uint16_t temp = wrapHnd->getRelocTypeHint(target); API_LEAVE(getRelocTypeHint); return temp; } -DWORD WrapICorJitInfo::getExpectedTargetArchitecture() +uint32_t WrapICorJitInfo::getExpectedTargetArchitecture() { API_ENTER(getExpectedTargetArchitecture); - DWORD temp = wrapHnd->getExpectedTargetArchitecture(); + uint32_t temp = wrapHnd->getExpectedTargetArchitecture(); API_LEAVE(getExpectedTargetArchitecture); return temp; } -DWORD WrapICorJitInfo::getJitFlags( +uint32_t WrapICorJitInfo::getJitFlags( CORJIT_FLAGS* flags, - DWORD sizeInBytes) + uint32_t sizeInBytes) { API_ENTER(getJitFlags); - DWORD temp = wrapHnd->getJitFlags(flags, sizeInBytes); + uint32_t temp = wrapHnd->getJitFlags(flags, sizeInBytes); API_LEAVE(getJitFlags); return temp; } diff --git a/src/coreclr/jit/codegen.h b/src/coreclr/jit/codegen.h index 2ac972ce7731a..1770947d64021 100644 --- a/src/coreclr/jit/codegen.h +++ b/src/coreclr/jit/codegen.h @@ -31,7 +31,7 @@ class CodeGen final : public CodeGenInterface // This could use further abstraction CodeGen(Compiler* theCompiler); - virtual void genGenerateCode(void** codePtr, ULONG* nativeSizeOfCode); + virtual void genGenerateCode(void** codePtr, uint32_t* nativeSizeOfCode); void genGenerateMachineCode(); void genEmitMachineCode(); @@ -205,11 +205,11 @@ class CodeGen final : public CodeGenInterface // the current (pending) label ref, a label which has been referenced but not yet seen BasicBlock* genPendingCallLabel; - void** codePtr; - ULONG* nativeSizeOfCode; - unsigned codeSize; - void* coldCodePtr; - void* consPtr; + void** codePtr; + uint32_t* nativeSizeOfCode; + unsigned codeSize; + void* coldCodePtr; + void* consPtr; #ifdef DEBUG // Last instr we have displayed for dspInstrs diff --git a/src/coreclr/jit/codegencommon.cpp b/src/coreclr/jit/codegencommon.cpp index c6fc52a101ffa..66ad2f340951f 100644 --- a/src/coreclr/jit/codegencommon.cpp +++ b/src/coreclr/jit/codegencommon.cpp @@ -2034,7 +2034,7 @@ void CodeGen::genInsertNopForUnwinder(BasicBlock* block) // codePtr [OUT] - address of generated code // nativeSizeOfCode [OUT] - length of generated code in bytes // -void CodeGen::genGenerateCode(void** codePtr, ULONG* nativeSizeOfCode) +void CodeGen::genGenerateCode(void** codePtr, uint32_t* nativeSizeOfCode) { #ifdef DEBUG diff --git a/src/coreclr/jit/codegeninterface.h b/src/coreclr/jit/codegeninterface.h index 9a0c5bfba7857..6a590352753f6 100644 --- a/src/coreclr/jit/codegeninterface.h +++ b/src/coreclr/jit/codegeninterface.h @@ -63,7 +63,7 @@ class CodeGenInterface public: CodeGenInterface(Compiler* theCompiler); - virtual void genGenerateCode(void** codePtr, ULONG* nativeSizeOfCode) = 0; + virtual void genGenerateCode(void** codePtr, uint32_t* nativeSizeOfCode) = 0; Compiler* GetCompiler() const { diff --git a/src/coreclr/jit/compiler.cpp b/src/coreclr/jit/compiler.cpp index 41166b2d344a5..a8b144fa250a0 100644 --- a/src/coreclr/jit/compiler.cpp +++ b/src/coreclr/jit/compiler.cpp @@ -4378,7 +4378,7 @@ void Compiler::EndPhase(Phases phase) // // Also called for inlinees, though they will only be run through the first few phases. // -void Compiler::compCompile(void** methodCodePtr, ULONG* methodCodeSize, JitFlags* compileFlags) +void Compiler::compCompile(void** methodCodePtr, uint32_t* methodCodeSize, JitFlags* compileFlags) { // Prepare for importation // @@ -5435,7 +5435,7 @@ bool Compiler::skipMethod() int Compiler::compCompile(CORINFO_MODULE_HANDLE classPtr, void** methodCodePtr, - ULONG* methodCodeSize, + uint32_t* methodCodeSize, JitFlags* compileFlags) { // compInit should have set these already. @@ -5453,7 +5453,8 @@ int Compiler::compCompile(CORINFO_MODULE_HANDLE classPtr, // Call into VM to get the config strings. FEATURE_JIT_METHOD_PERF is enabled for // retail builds. Do not call the regular Config helper here as it would pull // in a copy of the config parser into the clrjit.dll. - InterlockedCompareExchangeT(&Compiler::compJitTimeLogFilename, info.compCompHnd->getJitTimeLogFilename(), NULL); + InterlockedCompareExchangeT(&Compiler::compJitTimeLogFilename, + (LPCWSTR)info.compCompHnd->getJitTimeLogFilename(), NULL); // At a process or module boundary clear the file and start afresh. JitTimer::PrintCsvHeader(); @@ -5629,7 +5630,7 @@ int Compiler::compCompile(CORINFO_MODULE_HANDLE classPtr, COMP_HANDLE compHnd; CORINFO_METHOD_INFO* methodInfo; void** methodCodePtr; - ULONG* methodCodeSize; + uint32_t* methodCodeSize; JitFlags* compileFlags; int result; @@ -6054,7 +6055,7 @@ int Compiler::compCompileHelper(CORINFO_MODULE_HANDLE classPtr, COMP_HANDLE compHnd, CORINFO_METHOD_INFO* methodInfo, void** methodCodePtr, - ULONG* methodCodeSize, + uint32_t* methodCodeSize, JitFlags* compileFlags) { CORINFO_METHOD_HANDLE methodHnd = info.compMethodHnd; @@ -6900,7 +6901,7 @@ int jitNativeCode(CORINFO_METHOD_HANDLE methodHnd, COMP_HANDLE compHnd, CORINFO_METHOD_INFO* methodInfo, void** methodCodePtr, - ULONG* methodCodeSize, + uint32_t* methodCodeSize, JitFlags* compileFlags, void* inlineInfoPtr) { @@ -6944,7 +6945,7 @@ int jitNativeCode(CORINFO_METHOD_HANDLE methodHnd, COMP_HANDLE compHnd; CORINFO_METHOD_INFO* methodInfo; void** methodCodePtr; - ULONG* methodCodeSize; + uint32_t* methodCodeSize; JitFlags* compileFlags; InlineInfo* inlineInfo; #if MEASURE_CLRAPI_CALLS diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index a647827a544c1..c6b532edbcc8f 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -9705,14 +9705,14 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX int compCompile(CORINFO_MODULE_HANDLE classPtr, void** methodCodePtr, - ULONG* methodCodeSize, + uint32_t* methodCodeSize, JitFlags* compileFlags); void compCompileFinish(); int compCompileHelper(CORINFO_MODULE_HANDLE classPtr, COMP_HANDLE compHnd, CORINFO_METHOD_INFO* methodInfo, void** methodCodePtr, - ULONG* methodCodeSize, + uint32_t* methodCodeSize, JitFlags* compileFlag); ArenaAllocator* compGetArenaAllocator(); @@ -9863,7 +9863,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX #ifdef TARGET_ARMARCH bool compRsvdRegCheck(FrameLayoutState curState); #endif - void compCompile(void** methodCodePtr, ULONG* methodCodeSize, JitFlags* compileFlags); + void compCompile(void** methodCodePtr, uint32_t* methodCodeSize, JitFlags* compileFlags); // Clear annotations produced during optimizations; to be used between iterations when repeating opts. void ResetOptAnnotations(); diff --git a/src/coreclr/jit/ee_il_dll.cpp b/src/coreclr/jit/ee_il_dll.cpp index c41164a75ecd4..1062fd3c0e178 100644 --- a/src/coreclr/jit/ee_il_dll.cpp +++ b/src/coreclr/jit/ee_il_dll.cpp @@ -39,7 +39,7 @@ bool g_jitInitialized = false; /*****************************************************************************/ -extern "C" DLLEXPORT void __stdcall jitStartup(ICorJitHost* jitHost) +extern "C" DLLEXPORT void jitStartup(ICorJitHost* jitHost) { if (g_jitInitialized) { @@ -164,7 +164,7 @@ void* __cdecl operator new(size_t, const CILJitSingletonAllocator&) return CILJitBuff; } -DLLEXPORT ICorJitCompiler* __stdcall getJit() +DLLEXPORT ICorJitCompiler* getJit() { if (!g_jitInitialized) { @@ -251,8 +251,11 @@ void JitTls::SetCompiler(Compiler* compiler) // interface. Things really don't get going inside the JIT until the code:Compiler::compCompile#Phases // method. Usually that is where you want to go. -CorJitResult CILJit::compileMethod( - ICorJitInfo* compHnd, CORINFO_METHOD_INFO* methodInfo, unsigned flags, BYTE** entryAddress, ULONG* nativeSizeOfCode) +CorJitResult CILJit::compileMethod(ICorJitInfo* compHnd, + CORINFO_METHOD_INFO* methodInfo, + unsigned flags, + uint8_t** entryAddress, + uint32_t* nativeSizeOfCode) { JitFlags jitFlags; @@ -537,7 +540,7 @@ unsigned Compiler::eeGetMDArrayDataOffset(var_types type, unsigned rank) void Compiler::eeGetStmtOffsets() { ULONG32 offsetsCount; - DWORD* offsets; + uint32_t* offsets; ICorDebugInfo::BoundaryTypes offsetsImplicit; info.compCompHnd->getBoundaries(info.compMethodHnd, &offsetsCount, &offsets, &offsetsImplicit); diff --git a/src/coreclr/jit/ee_il_dll.hpp b/src/coreclr/jit/ee_il_dll.hpp index 731e1b2321ecc..59ac6b75c2c63 100644 --- a/src/coreclr/jit/ee_il_dll.hpp +++ b/src/coreclr/jit/ee_il_dll.hpp @@ -5,12 +5,12 @@ extern ICorJitHost* g_jitHost; class CILJit : public ICorJitCompiler { - CorJitResult __stdcall compileMethod(ICorJitInfo* comp, /* IN */ - CORINFO_METHOD_INFO* methodInfo, /* IN */ - unsigned flags, /* IN */ - BYTE** nativeEntry, /* OUT */ - ULONG* nativeSizeOfCode /* OUT */ - ); + CorJitResult compileMethod(ICorJitInfo* comp, /* IN */ + CORINFO_METHOD_INFO* methodInfo, /* IN */ + unsigned flags, /* IN */ + uint8_t** nativeEntry, /* OUT */ + uint32_t* nativeSizeOfCode /* OUT */ + ); void ProcessShutdownWork(ICorStaticInfo* statInfo); diff --git a/src/coreclr/jit/importer.cpp b/src/coreclr/jit/importer.cpp index 10caf0180f23b..994a63c7e12e3 100644 --- a/src/coreclr/jit/importer.cpp +++ b/src/coreclr/jit/importer.cpp @@ -3879,9 +3879,9 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis, { // Optimize `ldstr + String::get_Length()` to CNS_INT // e.g. "Hello".Length => 5 - int length = -1; - LPCWSTR str = info.compCompHnd->getStringLiteral(op1->AsStrCon()->gtScpHnd, - op1->AsStrCon()->gtSconCPX, &length); + int length = -1; + const char16_t* str = info.compCompHnd->getStringLiteral(op1->AsStrCon()->gtScpHnd, + op1->AsStrCon()->gtSconCPX, &length); if (length >= 0) { retNode = gtNewIconNode(length); @@ -19237,7 +19237,7 @@ void Compiler::impCheckCanInline(GenTreeCall* call, bool success = eeRunWithErrorTrap( [](Param* pParam) { - DWORD dwRestrictions = 0; + uint32_t dwRestrictions = 0; CorInfoInitClassResult initClassResult; #ifdef DEBUG diff --git a/src/coreclr/jit/jit.h b/src/coreclr/jit/jit.h index 62e7ac8059b16..c5d9774dfa639 100644 --- a/src/coreclr/jit/jit.h +++ b/src/coreclr/jit/jit.h @@ -772,7 +772,7 @@ extern int jitNativeCode(CORINFO_METHOD_HANDLE methodHnd, COMP_HANDLE compHnd, CORINFO_METHOD_INFO* methodInfo, void** methodCodePtr, - ULONG* methodCodeSize, + uint32_t* methodCodeSize, JitFlags* compileFlags, void* inlineInfoPtr); diff --git a/src/coreclr/jit/lower.cpp b/src/coreclr/jit/lower.cpp index a781fa5fcaada..8a4f96028761b 100644 --- a/src/coreclr/jit/lower.cpp +++ b/src/coreclr/jit/lower.cpp @@ -3880,8 +3880,9 @@ GenTree* Lowering::CreateReturnTrapSeq() // The only thing to do here is build up the expression that evaluates 'g_TrapReturningThreads'. - void* pAddrOfCaptureThreadGlobal = nullptr; - LONG* addrOfCaptureThreadGlobal = comp->info.compCompHnd->getAddrOfCaptureThreadGlobal(&pAddrOfCaptureThreadGlobal); + void* pAddrOfCaptureThreadGlobal = nullptr; + int32_t* addrOfCaptureThreadGlobal = + comp->info.compCompHnd->getAddrOfCaptureThreadGlobal(&pAddrOfCaptureThreadGlobal); GenTree* testTree; if (addrOfCaptureThreadGlobal != nullptr) diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp index 138c1caa8994f..f8708459ac8e1 100644 --- a/src/coreclr/jit/morph.cpp +++ b/src/coreclr/jit/morph.cpp @@ -5481,9 +5481,9 @@ GenTree* Compiler::fgMorphArrayIndex(GenTree* tree) const int cnsIndex = static_cast(asIndex->Index()->AsIntConCommon()->IconValue()); if (cnsIndex >= 0) { - int length; - LPCWSTR str = info.compCompHnd->getStringLiteral(asIndex->Arr()->AsStrCon()->gtScpHnd, - asIndex->Arr()->AsStrCon()->gtSconCPX, &length); + int length; + const char16_t* str = info.compCompHnd->getStringLiteral(asIndex->Arr()->AsStrCon()->gtScpHnd, + asIndex->Arr()->AsStrCon()->gtSconCPX, &length); if ((cnsIndex < length) && (str != nullptr)) { GenTree* cnsCharNode = gtNewIconNode(str[cnsIndex], elemTyp); diff --git a/src/coreclr/jit/simd.cpp b/src/coreclr/jit/simd.cpp index 9859534079865..0664089a834ef 100644 --- a/src/coreclr/jit/simd.cpp +++ b/src/coreclr/jit/simd.cpp @@ -258,7 +258,7 @@ var_types Compiler::getBaseTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, u WCHAR className[256] = {0}; WCHAR* pbuf = &className[0]; int len = _countof(className); - info.compCompHnd->appendClassName(&pbuf, &len, typeHnd, TRUE, FALSE, FALSE); + info.compCompHnd->appendClassName((char16_t**)&pbuf, &len, typeHnd, TRUE, FALSE, FALSE); noway_assert(pbuf < &className[256]); JITDUMP("SIMD Candidate Type %S\n", className); diff --git a/src/coreclr/md/compiler/assemblymd_emit.cpp b/src/coreclr/md/compiler/assemblymd_emit.cpp index 7a43a56259a36..161f9125e2bd0 100644 --- a/src/coreclr/md/compiler/assemblymd_emit.cpp +++ b/src/coreclr/md/compiler/assemblymd_emit.cpp @@ -36,7 +36,7 @@ STDMETHODIMP RegMeta::DefineAssembly( // S_OK or error. HRESULT hr = S_OK; AssemblyRec *pRecord = NULL; // The assembly record. - ULONG iRecord; // RID of the assembly record. + RID iRecord; // RID of the assembly record. if (szName == NULL || pMetaData == NULL || pma == NULL) return E_INVALIDARG; @@ -117,7 +117,7 @@ STDMETHODIMP RegMeta::DefineAssemblyRef( // S_OK or error. HRESULT hr = S_OK; AssemblyRefRec *pRecord = NULL; - ULONG iRecord; + RID iRecord; if (szName == NULL || pmar == NULL || pMetaData == NULL) return E_INVALIDARG; @@ -208,7 +208,7 @@ STDMETHODIMP RegMeta::DefineFile( // S_OK or error. BEGIN_ENTRYPOINT_NOTHROW; FileRec *pRecord = NULL; - ULONG iRecord; + RID iRecord; LOG((LOGMD, "RegMeta::DefineFile(%S, %#08x, %#08x, %#08x, %#08x)\n", MDSTR(szName), pbHashValue, cbHashValue, dwFileFlags, pmf)); @@ -281,7 +281,7 @@ STDMETHODIMP RegMeta::DefineExportedType( // S_OK or error. BEGIN_ENTRYPOINT_NOTHROW; ExportedTypeRec *pRecord = NULL; - ULONG iRecord; + RID iRecord; LPSTR szNameUTF8; LPCSTR szTypeNameUTF8; LPCSTR szTypeNamespaceUTF8; @@ -381,7 +381,7 @@ STDMETHODIMP RegMeta::DefineManifestResource( // S_OK or error. BEGIN_ENTRYPOINT_NOTHROW; ManifestResourceRec *pRecord = NULL; - ULONG iRecord; + RID iRecord; LOG((LOGMD, "RegMeta::DefineManifestResource(%S, %#08x, %#08x, %#08x, %#08x)\n", MDSTR(szName), tkImplementation, dwOffset, dwResourceFlags, pmmr)); diff --git a/src/coreclr/md/compiler/custattr_import.cpp b/src/coreclr/md/compiler/custattr_import.cpp index 56930bb5d3bc3..cc38921992e4e 100644 --- a/src/coreclr/md/compiler/custattr_import.cpp +++ b/src/coreclr/md/compiler/custattr_import.cpp @@ -106,8 +106,8 @@ STDMETHODIMP RegMeta::EnumCustomAttributes( BEGIN_ENTRYPOINT_NOTHROW; HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); - ULONG ridStart; - ULONG ridEnd; + RID ridStart; + RID ridEnd; HENUMInternal *pEnum = *ppmdEnum; CustomAttributeRec *pRec; ULONG index; diff --git a/src/coreclr/md/compiler/emit.cpp b/src/coreclr/md/compiler/emit.cpp index 4a7cf802022bf..3a2e5ff2f73f3 100644 --- a/src/coreclr/md/compiler/emit.cpp +++ b/src/coreclr/md/compiler/emit.cpp @@ -2211,7 +2211,7 @@ STDMETHODIMP RegMeta::DefineDocument( // S_OK or error. _ASSERTE(docNameBlobSize <= docNameBlobMaxSize); // Add record - ULONG docRecord; + RID docRecord; DocumentRec* pDocument; IfFailGo(m_pStgdb->m_MiniMd.AddDocumentRecord(&pDocument, &docRecord)); // Name column @@ -2261,7 +2261,7 @@ STDMETHODIMP RegMeta::DefineSequencePoints( // S_OK or error. IfFailGo(m_pStgdb->m_MiniMd.PreUpdate()); - ULONG methodDbgInfoRec; + RID methodDbgInfoRec; MethodDebugInformationRec* pMethodDbgInfo; IfFailGo(m_pStgdb->m_MiniMd.AddMethodDebugInformationRecord(&pMethodDbgInfo, &methodDbgInfoRec)); // Document column @@ -2304,7 +2304,7 @@ STDMETHODIMP RegMeta::DefineLocalScope( // S_OK or error. IfFailGo(m_pStgdb->m_MiniMd.PreUpdate()); - ULONG localScopeRecord; + RID localScopeRecord; LocalScopeRec* pLocalScope; IfFailGo(m_pStgdb->m_MiniMd.AddLocalScopeRecord(&pLocalScope, &localScopeRecord)); IfFailGo(m_pStgdb->m_MiniMd.PutCol(TBL_LocalScope, LocalScopeRec::COL_Method, pLocalScope, methodDefRid)); @@ -2348,7 +2348,7 @@ STDMETHODIMP RegMeta::DefineLocalVariable( // S_OK or error. IfFailGo(m_pStgdb->m_MiniMd.PreUpdate()); - ULONG localVariableRecord; + RID localVariableRecord; LocalVariableRec* pLocalVariable; IfFailGo(m_pStgdb->m_MiniMd.AddLocalVariableRecord(&pLocalVariable, &localVariableRecord)); IfFailGo(m_pStgdb->m_MiniMd.PutString(TBL_LocalVariable, LocalVariableRec::COL_Name, pLocalVariable, name)); @@ -2624,7 +2624,7 @@ HRESULT RegMeta::_DefinePinvokeMap( // Return hresult. return E_NOTIMPL; #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER ImplMapRec *pRecord; - ULONG iRecord; + RID iRecord; bool bDupFound = false; HRESULT hr = S_OK; @@ -2720,7 +2720,7 @@ STDMETHODIMP RegMeta::SetPinvokeMap( // Return code. BEGIN_ENTRYPOINT_NOTHROW; ImplMapRec *pRecord; - ULONG iRecord; + RID iRecord; LOG((LOGMD, "MD RegMeta::SetPinvokeMap(0x%08x, 0x%08x, %S, 0x%08x)\n", tk, dwMappingFlags, MDSTR(szImportName), mrImportDLL)); diff --git a/src/coreclr/md/compiler/filtermanager.cpp b/src/coreclr/md/compiler/filtermanager.cpp index 87df90334b7f1..1219bbeaabbfa 100644 --- a/src/coreclr/md/compiler/filtermanager.cpp +++ b/src/coreclr/md/compiler/filtermanager.cpp @@ -1063,8 +1063,8 @@ HRESULT FilterManager::MarkInterfaceImpls( mdTypeDef td) { HRESULT hr = NOERROR; - ULONG ridStart, ridEnd; - ULONG i; + RID ridStart, ridEnd; + RID i; InterfaceImplRec *pRec; // We know that the filter table is not null here. Tell PREFIX that we know it. diff --git a/src/coreclr/md/compiler/import.cpp b/src/coreclr/md/compiler/import.cpp index 9f3beded986ef..c0abc8f7f6397 100644 --- a/src/coreclr/md/compiler/import.cpp +++ b/src/coreclr/md/compiler/import.cpp @@ -37,12 +37,12 @@ STDMETHODIMP RegMeta::EnumMembers( // S_OK, S_FALSE, or error. BEGIN_ENTRYPOINT_NOTHROW; HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); - ULONG ridStartMethod; - ULONG ridEndMethod; - ULONG ridStartField; - ULONG ridEndField; - ULONG index; - ULONG indexField; + RID ridStartMethod; + RID ridEndMethod; + RID ridStartField; + RID ridEndField; + RID index; + RID indexField; TypeDefRec *pRec; HENUMInternal *pEnum = *ppmdEnum; @@ -126,9 +126,9 @@ STDMETHODIMP RegMeta::EnumMembersWithName( // S_OK, S_FALSE, or error. BEGIN_ENTRYPOINT_NOTHROW; HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); - ULONG ridStart; - ULONG ridEnd; - ULONG index; + RID ridStart; + RID ridEnd; + RID index; TypeDefRec *pRec; MethodRec *pMethod; FieldRec *pField; @@ -243,8 +243,8 @@ STDMETHODIMP RegMeta::EnumMethods( BEGIN_ENTRYPOINT_NOTHROW; HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); - ULONG ridStart; - ULONG ridEnd; + RID ridStart; + RID ridEnd; TypeDefRec *pRec; HENUMInternal *pEnum = *ppmdEnum; @@ -341,9 +341,9 @@ STDMETHODIMP RegMeta::EnumMethodsWithName( // S_OK, S_FALSE, or error. BEGIN_ENTRYPOINT_NOTHROW; HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); - ULONG ridStart; - ULONG ridEnd; - ULONG index; + RID ridStart; + RID ridEnd; + RID index; TypeDefRec *pRec; MethodRec *pMethod; HENUMInternal *pEnum = *ppmdEnum; @@ -442,8 +442,8 @@ RegMeta::EnumFields( BEGIN_ENTRYPOINT_NOTHROW; HENUMInternal **ppmdEnum = reinterpret_cast(phEnum); - ULONG ridStart; - ULONG ridEnd; + RID ridStart; + RID ridEnd; TypeDefRec *pRec; HENUMInternal *pEnum = *ppmdEnum; @@ -537,8 +537,8 @@ STDMETHODIMP RegMeta::EnumFieldsWithName( // S_OK, S_FALSE, or error. BEGIN_ENTRYPOINT_NOTHROW; HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); - ULONG ridStart; - ULONG ridEnd; + RID ridStart; + RID ridEnd; ULONG index; TypeDefRec *pRec; FieldRec *pField; @@ -634,8 +634,8 @@ STDMETHODIMP RegMeta::EnumParams( // S_OK, S_FALSE, or error. BEGIN_ENTRYPOINT_NOTHROW; HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); - ULONG ridStart; - ULONG ridEnd; + RID ridStart; + RID ridEnd; MethodRec *pRec; HENUMInternal *pEnum = *ppmdEnum; @@ -857,9 +857,9 @@ STDMETHODIMP RegMeta::EnumPermissionSets( // S_OK, S_FALSE, or error. BEGIN_ENTRYPOINT_NOTHROW; HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); - ULONG ridStart; - ULONG ridEnd; - ULONG index; + RID ridStart; + RID ridEnd; + RID index; DeclSecurityRec *pRec; HENUMInternal *pEnum = *ppmdEnum; bool fCompareParent = false; @@ -1314,9 +1314,9 @@ STDMETHODIMP RegMeta::EnumProperties( // S_OK, S_FALSE, or error. BEGIN_ENTRYPOINT_NOTHROW; HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); - ULONG ridStart = 0; - ULONG ridEnd = 0; - ULONG ridMax = 0; + RID ridStart = 0; + RID ridEnd = 0; + RID ridMax = 0; HENUMInternal *pEnum = *ppmdEnum; LOG((LOGMD, "MD RegMeta::EnumProperties(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", @@ -1423,9 +1423,9 @@ STDMETHODIMP RegMeta::EnumEvents( // S_OK, S_FALSE, or error. BEGIN_ENTRYPOINT_NOTHROW; HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); - ULONG ridStart = 0; - ULONG ridEnd = 0; - ULONG ridMax = 0; + RID ridStart = 0; + RID ridEnd = 0; + RID ridMax = 0; HENUMInternal *pEnum = *ppmdEnum; LOG((LOGMD, "MD RegMeta::EnumEvents(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", @@ -1794,9 +1794,9 @@ STDMETHODIMP RegMeta::GetClassLayout( if (rFieldOffset || pcFieldOffset) { ULONG iFieldOffset = 0; - ULONG ridFieldStart; - ULONG ridFieldEnd; - ULONG ridFieldLayout; + RID ridFieldStart; + RID ridFieldEnd; + RID ridFieldLayout; ULONG ulOffset; TypeDefRec *pTypeDefRec; FieldLayoutRec *pLayout2Rec; @@ -1955,7 +1955,7 @@ RegMeta::GetRVA( } else { // FieldDef token or invalid type of token (not mdtMethodDef) - ULONG iRecord; + uint32_t iRecord; IfFailGo(pMiniMd->FindFieldRVAHelper(tk, &iRecord)); @@ -2293,10 +2293,10 @@ STDMETHODIMP RegMeta::EnumUnresolvedMethods( // S_OK or error. BEGIN_ENTRYPOINT_NOTHROW; HENUMInternal ** ppmdEnum = reinterpret_cast (phEnum); - ULONG iCountTypeDef; // Count of TypeDefs. - ULONG ulStart, ulEnd; // Bounds of methods on a given TypeDef. - ULONG index; // For counting methods on a TypeDef. - ULONG indexTypeDef; // For counting TypeDefs. + uint32_t iCountTypeDef; // Count of TypeDefs. + uint32_t ulStart, ulEnd; // Bounds of methods on a given TypeDef. + uint32_t index; // For counting methods on a TypeDef. + uint32_t indexTypeDef; // For counting TypeDefs. bool bIsInterface; // Is a given TypeDef an interface? HENUMInternal * pEnum = *ppmdEnum; // Enum we're working with. CMiniMdRW * pMiniMd = &(m_pStgdb->m_MiniMd); @@ -2507,7 +2507,7 @@ STDMETHODIMP RegMeta::GetPinvokeMap( // S_OK or error. BEGIN_ENTRYPOINT_NOTHROW; ImplMapRec * pRecord; - ULONG iRecord; + uint32_t iRecord; LOG((LOGMD, "MD RegMeta::GetPinvokeMap(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", tk, pdwMappingFlags, szImportName, cchImportName, pchImportName, pmrImportDLL)); @@ -3468,7 +3468,7 @@ HRESULT RegMeta::GetNestedClassProps( // S_OK or error. BEGIN_ENTRYPOINT_NOTHROW; NestedClassRec *pRecord; - ULONG iRecord; + uint32_t iRecord; CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); diff --git a/src/coreclr/md/compiler/importhelper.cpp b/src/coreclr/md/compiler/importhelper.cpp index 5b5907c8e0373..743a78e67799f 100644 --- a/src/coreclr/md/compiler/importhelper.cpp +++ b/src/coreclr/md/compiler/importhelper.cpp @@ -188,9 +188,9 @@ HRESULT ImportHelper::FindMethod( void * pCompareContext) // = NULL // [IN] Optional context for the compare function { HRESULT hr = S_OK; - ULONG ridStart; // Start of td's methods. - ULONG ridEnd; // End of td's methods. - ULONG index; // Loop control. + RID ridStart; // Start of td's methods. + RID ridEnd; // End of td's methods. + RID index; // Loop control. TypeDefRec *pRec; // A TypeDef Record. MethodRec *pMethod; // A MethodDef Record. LPCUTF8 szNameUtf8Tmp; // A found MethodDef's name. @@ -294,9 +294,9 @@ HRESULT ImportHelper::FindField( RID rid) // = 0 // [IN] Optional rid to be ignored. { HRESULT hr = S_OK; // A result. - ULONG ridStart; // Start of td's methods. - ULONG ridEnd; // End of td's methods. - ULONG index; // Loop control. + RID ridStart; // Start of td's methods. + RID ridEnd; // End of td's methods. + RID index; // Loop control. TypeDefRec *pRec; // A TypeDef Record. FieldRec *pField; // A FieldDef Record. LPCUTF8 szNameUtf8Tmp; // A found FieldDef's name. @@ -962,8 +962,8 @@ HRESULT ImportHelper::FindInterfaceImpl( RID rid /* = 0*/) // [IN] Optional rid to be ignored. { HRESULT hr; - ULONG ridStart, ridEnd; - ULONG i; + RID ridStart, ridEnd; + RID i; InterfaceImplRec *pInterfaceImplRec; _ASSERTE(ptk); @@ -1010,8 +1010,8 @@ HRESULT ImportHelper::FindPermission( { HRESULT hr; DeclSecurityRec *pRec; - ULONG ridStart, ridEnd; - ULONG i; + RID ridStart, ridEnd; + RID i; mdToken tkParentTmp; _ASSERTE(ppm); @@ -1058,13 +1058,13 @@ HRESULT ImportHelper::FindProperty( RID ridPropertyMap; PropertyMapRec *pPropertyMapRec; PropertyRec *pRec; - ULONG ridStart; - ULONG ridEnd; - ULONG i; + RID ridStart; + RID ridEnd; + RID i; LPCUTF8 szNameTmp; PCCOR_SIGNATURE pbSigTmp; ULONG cbSigTmp; - ULONG pr; + RID pr; IfFailRet(pMiniMd->FindPropertyMapFor(RidFromToken(tkTypeDef), &ridPropertyMap)); if ( !InvalidRid(ridPropertyMap) ) @@ -1111,11 +1111,11 @@ HRESULT ImportHelper::FindEvent( RID ridEventMap; EventMapRec *pEventMapRec; EventRec *pRec; - ULONG ridStart; - ULONG ridEnd; - ULONG i; + RID ridStart; + RID ridEnd; + RID i; LPCUTF8 szNameTmp; - ULONG ev; + RID ev; IfFailRet(pMiniMd->FindEventMapFor(RidFromToken(tkTypeDef), &ridEventMap)); if ( !InvalidRid(ridEventMap) ) @@ -2292,7 +2292,7 @@ HRESULT ImportHelper::CreateNesterHierarchy( mdTypeRef *ptr) // [OUT] Token for the innermost TypeRef. { TypeRefRec *pRecEmit; - ULONG iRecord; + RID iRecord; LPCUTF8 szName; LPCUTF8 szNamespace; mdTypeRef trNester; diff --git a/src/coreclr/md/compiler/regmeta.cpp b/src/coreclr/md/compiler/regmeta.cpp index 11c1974c157dc..3753d248aa239 100644 --- a/src/coreclr/md/compiler/regmeta.cpp +++ b/src/coreclr/md/compiler/regmeta.cpp @@ -248,7 +248,7 @@ RegMeta::CreateNewMD() IfFailGo(m_pStgdb->InitNew()); // Set up the Module record. - ULONG iRecord; + uint32_t iRecord; ModuleRec *pModule; GUID mvid; IfFailGo(m_pStgdb->m_MiniMd.AddModuleRecord(&pModule, &iRecord)); diff --git a/src/coreclr/md/compiler/regmeta_emit.cpp b/src/coreclr/md/compiler/regmeta_emit.cpp index b2b53798f9691..303b0c62e7a56 100644 --- a/src/coreclr/md/compiler/regmeta_emit.cpp +++ b/src/coreclr/md/compiler/regmeta_emit.cpp @@ -306,7 +306,7 @@ HRESULT RegMeta::UnmarkAll() int i; int iCount; TypeDefRec *pRec; - ULONG ulEncloser; + RID ulEncloser; NestedClassRec *pNestedClass; CustomAttributeRec *pCARec; mdToken tkParent; diff --git a/src/coreclr/md/compiler/regmeta_import.cpp b/src/coreclr/md/compiler/regmeta_import.cpp index 93e2a50046651..a305c1dd2866e 100644 --- a/src/coreclr/md/compiler/regmeta_import.cpp +++ b/src/coreclr/md/compiler/regmeta_import.cpp @@ -253,11 +253,11 @@ STDMETHODIMP RegMeta::EnumInterfaceImpls( BEGIN_ENTRYPOINT_NOTHROW; HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); - ULONG ridStart; - ULONG ridEnd; + RID ridStart; + RID ridEnd; HENUMInternal *pEnum; InterfaceImplRec *pRec; - ULONG index; + RID index; LOG((LOGMD, "RegMeta::EnumInterfaceImpls(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", phEnum, td, rImpls, cMax, pcImpls)); @@ -325,11 +325,11 @@ STDMETHODIMP RegMeta::EnumGenericParams(HCORENUM *phEnum, mdToken tkOwner, BEGIN_ENTRYPOINT_NOTHROW; HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); - ULONG ridStart; - ULONG ridEnd; + RID ridStart; + RID ridEnd; HENUMInternal *pEnum; GenericParamRec *pRec; - ULONG index; + RID index; CMiniMdRW *pMiniMd = NULL; @@ -423,11 +423,11 @@ STDMETHODIMP RegMeta::EnumMethodSpecs( BEGIN_ENTRYPOINT_NOTHROW; HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); - ULONG ridStart; - ULONG ridEnd; + RID ridStart; + RID ridEnd; HENUMInternal *pEnum; MethodSpecRec *pRec; - ULONG index; + RID index; CMiniMdRW *pMiniMd = NULL; LOG((LOGMD, "RegMeta::EnumMethodSpecs(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", @@ -528,11 +528,11 @@ STDMETHODIMP RegMeta::EnumGenericParamConstraints( BEGIN_ENTRYPOINT_NOTHROW; HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); - ULONG ridStart; - ULONG ridEnd; + RID ridStart; + RID ridEnd; HENUMInternal *pEnum; GenericParamConstraintRec *pRec; - ULONG index; + RID index; CMiniMdRW *pMiniMd = NULL; LOG((LOGMD, "RegMeta::EnumGenericParamConstraints(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", diff --git a/src/coreclr/md/enc/mdinternalrw.cpp b/src/coreclr/md/enc/mdinternalrw.cpp index 511e529121ecf..629300415ae2a 100644 --- a/src/coreclr/md/enc/mdinternalrw.cpp +++ b/src/coreclr/md/enc/mdinternalrw.cpp @@ -957,8 +957,8 @@ HRESULT MDInternalRW::EnumInit( // return S_FALSE if record not found HENUMInternal *phEnum) // [OUT] the enumerator to fill { HRESULT hr = S_OK; - ULONG ulStart, ulEnd, ulMax; - ULONG index; + uint32_t ulStart, ulEnd, ulMax; + uint32_t index; LOCKREAD(); // Vars for query. @@ -2445,7 +2445,7 @@ HRESULT MDInternalRW::GetFieldRVA( { _ASSERTE(TypeFromToken(fd) == mdtFieldDef); _ASSERTE(pulCodeRVA); - ULONG iRecord; + uint32_t iRecord; HRESULT hr = NOERROR; LOCKREAD(); @@ -3802,7 +3802,7 @@ HRESULT MDInternalRW::GetPinvokeMap( mdModuleRef *pmrImportDLL) // [OUT] ModuleRef token for the target DLL. { ImplMapRec *pRecord; - ULONG iRecord; + uint32_t iRecord; HRESULT hr = S_OK; LOCKREAD(); diff --git a/src/coreclr/md/enc/metamodelenc.cpp b/src/coreclr/md/enc/metamodelenc.cpp index 5dc4b58bd596f..a44abeb815a44 100644 --- a/src/coreclr/md/enc/metamodelenc.cpp +++ b/src/coreclr/md/enc/metamodelenc.cpp @@ -216,8 +216,8 @@ CMiniMdRW::ApplyDelta( { HRESULT hr = S_OK; ULONG iENC; // Loop control. - ULONG iRid; // RID of some record. - ULONG iNew; // RID of a new record. + RID iRid; // RID of some record. + RID iNew; // RID of a new record. int i; // Loop control. ULONG ixTbl; // A table. diff --git a/src/coreclr/md/enc/metamodelrw.cpp b/src/coreclr/md/enc/metamodelrw.cpp index c48dc5a36b315..4a849afb91088 100644 --- a/src/coreclr/md/enc/metamodelrw.cpp +++ b/src/coreclr/md/enc/metamodelrw.cpp @@ -834,7 +834,7 @@ CMiniMdRW::CommonEnumCustomAttributeByName( { HRESULT hr = S_OK; HRESULT hrRet = S_FALSE; // Assume that we won't find any - ULONG ridStart, ridEnd; // Loop start and endpoints. + RID ridStart, ridEnd; // Loop start and endpoints. CLookUpHash *pHashTable = m_pLookUpHashs[TBL_CustomAttribute]; _ASSERTE(phEnum != NULL); @@ -3380,7 +3380,7 @@ CMiniMdRW::PreSaveEnc() for (ixTbl=0; ixTbl pParamMap = new (nothrow) TOKENMAP; IfNullGo(pParamMap); - ULONG nAllocateSize; - if (!ClrSafeInt::addition(m_Schema.m_cRecs[TBL_Param], 1, nAllocateSize)) + uint32_t nAllocateSize; + if (!ClrSafeInt::addition(m_Schema.m_cRecs[TBL_Param], 1, nAllocateSize)) { IfFailGo(COR_E_OVERFLOW); } diff --git a/src/coreclr/md/inc/metamodel.h b/src/coreclr/md/inc/metamodel.h index d06932e101103..a3a615fc6cd88 100644 --- a/src/coreclr/md/inc/metamodel.h +++ b/src/coreclr/md/inc/metamodel.h @@ -736,8 +736,8 @@ template class CMiniMdTemplate : public CMiniMdBase RID *pFoundRid) // First RID found, or 0. { HRESULT hr; - ULONG ridBegin; // RID of first entry. - ULONG ridEnd; // RID of first entry past last entry. + RID ridBegin; // RID of first entry. + RID ridEnd; // RID of first entry past last entry. // Search for any entry in the table. IfFailRet(static_cast(this)->vSearchTable(ixTbl, sColumn, ulTarget, &ridBegin)); diff --git a/src/coreclr/md/inc/metamodelrw.h b/src/coreclr/md/inc/metamodelrw.h index 51cb0707c8917..82b39f8861d81 100644 --- a/src/coreclr/md/inc/metamodelrw.h +++ b/src/coreclr/md/inc/metamodelrw.h @@ -409,7 +409,7 @@ class CMiniMdRW : public CMiniMdTemplate // translate index returned by getMethodListOfTypeDef to a rid into Method table __checkReturn - FORCEINLINE HRESULT GetMethodRid(ULONG index, ULONG *pRid) + FORCEINLINE HRESULT GetMethodRid(ULONG index, RID *pRid) { HRESULT hr; if (HasIndirectTable(TBL_Method)) @@ -430,7 +430,7 @@ class CMiniMdRW : public CMiniMdTemplate // translate index returned by getFieldListOfTypeDef to a rid into Field table __checkReturn - FORCEINLINE HRESULT GetFieldRid(ULONG index, ULONG *pRid) + FORCEINLINE HRESULT GetFieldRid(ULONG index, RID *pRid) { HRESULT hr; if (HasIndirectTable(TBL_Field)) @@ -451,7 +451,7 @@ class CMiniMdRW : public CMiniMdTemplate // translate index returned by getParamListOfMethod to a rid into Param table __checkReturn - FORCEINLINE HRESULT GetParamRid(ULONG index, ULONG *pRid) + FORCEINLINE HRESULT GetParamRid(ULONG index, RID *pRid) { HRESULT hr; if (HasIndirectTable(TBL_Param)) @@ -472,7 +472,7 @@ class CMiniMdRW : public CMiniMdTemplate // translate index returned by getEventListOfEventMap to a rid into Event table __checkReturn - FORCEINLINE HRESULT GetEventRid(ULONG index, ULONG *pRid) + FORCEINLINE HRESULT GetEventRid(ULONG index, RID *pRid) { HRESULT hr; if (HasIndirectTable(TBL_Event)) @@ -493,7 +493,7 @@ class CMiniMdRW : public CMiniMdTemplate // translate index returned by getPropertyListOfPropertyMap to a rid into Property table __checkReturn - FORCEINLINE HRESULT GetPropertyRid(ULONG index, ULONG *pRid) + FORCEINLINE HRESULT GetPropertyRid(ULONG index, RID *pRid) { HRESULT hr; if (HasIndirectTable(TBL_Property)) diff --git a/src/coreclr/md/runtime/metamodelro.cpp b/src/coreclr/md/runtime/metamodelro.cpp index 55ce8430a344e..f4554d3232c48 100644 --- a/src/coreclr/md/runtime/metamodelro.cpp +++ b/src/coreclr/md/runtime/metamodelro.cpp @@ -206,7 +206,7 @@ CMiniMd::CommonEnumCustomAttributeByName( { HRESULT hr = S_OK; HRESULT hrRet = S_FALSE; // Assume that we won't find any - ULONG ridStart, ridEnd; // Loop start and endpoints. + RID ridStart, ridEnd; // Loop start and endpoints. _ASSERTE(phEnum != NULL); @@ -405,7 +405,7 @@ CMiniMd::CommonGetCustomAttributeByNameEx( ULONG cbData; CustomAttributeRec *pRec; - ULONG ridStart, ridEnd; // Loop start and endpoints. + RID ridStart, ridEnd; // Loop start and endpoints. // Get the list of custom values for the parent object. diff --git a/src/coreclr/pal/inc/rt/ntimage.h b/src/coreclr/pal/inc/rt/ntimage.h index 931d528404d1f..1880375184f05 100644 --- a/src/coreclr/pal/inc/rt/ntimage.h +++ b/src/coreclr/pal/inc/rt/ntimage.h @@ -243,12 +243,16 @@ typedef struct _IMAGE_FILE_HEADER { // // Directory format. // +#ifndef IMAGE_DATA_DIRECTORY_DEFINED +#define IMAGE_DATA_DIRECTORY_DEFINED typedef struct _IMAGE_DATA_DIRECTORY { ULONG VirtualAddress; ULONG Size; } IMAGE_DATA_DIRECTORY, *PIMAGE_DATA_DIRECTORY; +#endif // IMAGE_DATA_DIRECTORY_DEFINED + #define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16 // diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs b/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs index bc56f2cda1fdc..cb7e7000b1076 100644 --- a/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs +++ b/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs @@ -61,10 +61,10 @@ private enum ImageFileMachine private ExceptionDispatchInfo _lastException; - [DllImport(JitLibrary, CallingConvention = CallingConvention.StdCall)] // stdcall in CoreCLR! + [DllImport(JitLibrary)] private extern static IntPtr jitStartup(IntPtr host); - [DllImport(JitLibrary, CallingConvention = CallingConvention.StdCall)] + [DllImport(JitLibrary)] private extern static IntPtr getJit(); [DllImport(JitSupportLibrary)] diff --git a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/Program.cs b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/Program.cs index 67f64f0339da6..5cd8cb6e66c31 100644 --- a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/Program.cs +++ b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/Program.cs @@ -375,6 +375,7 @@ static void WriteNativeWrapperInterface(TextWriter tw, IEnumerable tw.Write(@" #include ""corinfoexception.h"" +#include ""../../../inc/corjit.h"" struct JitInterfaceCallbacks { @@ -393,7 +394,7 @@ struct JitInterfaceCallbacks tw.Write(@" }; -class JitInterfaceWrapper +class JitInterfaceWrapper : public ICorJitInfo { void * _thisHandle; JitInterfaceCallbacks * _callbacks; diff --git a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt index 7824fae24b41a..d4640311e8818 100644 --- a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt +++ b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt @@ -35,137 +35,126 @@ ; NORMALTYPES void -LPVOID,void*,void* void* const void *,void* -HRESULT,,int -SIZE_T*,void*,size_t* +JITINTERFACE_HRESULT,HRESULT +size_t*,void* int -INT,int,int -INT32,int,int -UINT32,uint,unsigned int -ULONG32,uint,unsigned int -ULONG,uint,unsigned int -DWORD,uint,unsigned int +int32_t,int +uint32_t,uint unsigned,uint unsigned int, uint size_t,UIntPtr -SIZE_T,UIntPtr,size_t -WORD,ushort,unsigned short +uint16_t,ushort bool,[MarshalAs(UnmanagedType.I1)]bool const char *,byte* -mdMethodDef,mdToken,unsigned int +mdMethodDef,mdToken mdToken,,unsigned int -BYTE*,byte*,unsigned char* -BYTE**,byte**,unsigned char** -GSCookie*,IntPtr*,void* -GSCookie**,IntPtr**,void** +uint8_t*,byte* +uint8_t**,byte** +GSCookie*,IntPtr* +GSCookie**,IntPtr** bool*,ref bool BoolStar,byte*,bool*,bool* -UINT32*,ref uint,unsigned int* -ULONG*,ref uint,unsigned long* +uint32_t*,ref uint void **,ref void* VOIDSTARSTAR,void **,void **,void ** -ULONG32*,ref uint,unsigned int* -LONG*,int*,long* +int32_t*,int* char*,byte* const char**,byte** -WCHAR**,char**,wchar_t** -LPCSTR,byte*,const char* -LPWSTR,char*,wchar_t* -LPCWSTR,char*,const wchar_t* +char16_t**,char** +char16_t *,char* +const char16_t *,char* wchar_t*,char* const wchar_t*,String -DWORD**,ref uint*,unsigned int** +uint32_t**,ref uint* unsigned*,ref uint -DWORD*,ref uint,unsigned int* -CORJIT_FLAGS*,ref CORJIT_FLAGS,void* -CORINFO_CONST_LOOKUP*,ref CORINFO_CONST_LOOKUP,void* -CORINFO_LOOKUP*,ref CORINFO_LOOKUP,void* -CORINFO_LOOKUP_KIND*,ref CORINFO_LOOKUP_KIND,void* -CORINFO_EH_CLAUSE*,ref CORINFO_EH_CLAUSE,void* -const CORINFO_EH_CLAUSE*,ref CORINFO_EH_CLAUSE,void* -CORINFO_SIG_INFO*,,void* -CORINFO_RESOLVED_TOKEN*,ref CORINFO_RESOLVED_TOKEN,void* -CORINFO_RESOLVED_TOKEN_PTR,CORINFO_RESOLVED_TOKEN*,void*,CORINFO_RESOLVED_TOKEN* -CORINFO_EE_INFO*,ref CORINFO_EE_INFO,void* -CORINFO_TAILCALL_HELPERS*,ref CORINFO_TAILCALL_HELPERS,void* -CORINFO_GENERICHANDLE_RESULT*,ref CORINFO_GENERICHANDLE_RESULT,void* -CORINFO_METHOD_INFO*,CORINFO_METHOD_INFO*,void* -CORINFO_FIELD_INFO*,CORINFO_FIELD_INFO*,void* -CORINFO_CALL_INFO*,CORINFO_CALL_INFO*,void* -CORINFO_DEVIRTUALIZATION_INFO*,CORINFO_DEVIRTUALIZATION_INFO*,void* -PatchpointInfo*,PatchpointInfo*,void* -DelegateCtorArgs*,ref DelegateCtorArgs,void* -ICorDynamicInfo*,IntPtr,void* +CORJIT_FLAGS*,ref CORJIT_FLAGS +CORINFO_CONST_LOOKUP*,ref CORINFO_CONST_LOOKUP +CORINFO_LOOKUP*,ref CORINFO_LOOKUP +CORINFO_LOOKUP_KIND*,ref CORINFO_LOOKUP_KIND +CORINFO_EH_CLAUSE*,ref CORINFO_EH_CLAUSE +const CORINFO_EH_CLAUSE*,ref CORINFO_EH_CLAUSE +CORINFO_SIG_INFO* +CORINFO_RESOLVED_TOKEN*,ref CORINFO_RESOLVED_TOKEN +CORINFO_RESOLVED_TOKEN_PTR,CORINFO_RESOLVED_TOKEN*,CORINFO_RESOLVED_TOKEN*,CORINFO_RESOLVED_TOKEN* +CORINFO_EE_INFO*,ref CORINFO_EE_INFO +CORINFO_TAILCALL_HELPERS*,ref CORINFO_TAILCALL_HELPERS +CORINFO_GENERICHANDLE_RESULT*,ref CORINFO_GENERICHANDLE_RESULT +CORINFO_METHOD_INFO*,CORINFO_METHOD_INFO* +CORINFO_FIELD_INFO*,CORINFO_FIELD_INFO* +CORINFO_CALL_INFO*,CORINFO_CALL_INFO* +CORINFO_DEVIRTUALIZATION_INFO*,CORINFO_DEVIRTUALIZATION_INFO* +PatchpointInfo* +DelegateCtorArgs*,ref DelegateCtorArgs +ICorDynamicInfo*,IntPtr va_list,IntPtr -CORINFO_HELPER_DESC*,ref CORINFO_HELPER_DESC,void* -const CORINFO_HELPER_DESC*,ref CORINFO_HELPER_DESC,const void* +CORINFO_HELPER_DESC*,ref CORINFO_HELPER_DESC +const CORINFO_HELPER_DESC*,ref CORINFO_HELPER_DESC int*,ref int unsigned int*,ref uint -CORINFO_JUST_MY_CODE_HANDLE**,ref CORINFO_JUST_MY_CODE_HANDLE_*,void** +CORINFO_JUST_MY_CODE_HANDLE**,ref CORINFO_JUST_MY_CODE_HANDLE_* -ICorJitInfo::BlockCounts**,ref BlockCounts*,void** -PgoInstrumentationSchema**,ref PgoInstrumentationSchema*,void** -PgoInstrumentationSchema*,PgoInstrumentationSchema*,void* +ICorJitInfo::PgoInstrumentationSchema**,ref PgoInstrumentationSchema* +ICorJitInfo::PgoInstrumentationSchema*,PgoInstrumentationSchema* ; Enums -CorInfoClassId,,int -CorInfoHelpFunc,,int -CorInfoInitClassResult,,int -CorInfoInlineTypeCheck,,int -CorInfoInlineTypeCheckSource,,int -CorInfoInline,,int -CorInfoIntrinsics,,int -CorInfoIsAccessAllowedResult,,int -CorInfoMethodRuntimeFlags,,int -CorInfoTailCall,,int -CorInfoType,,int -CorInfoHFAElemType,,int -CorInfoTypeWithMod,,int -CorInfoCallConvExtension,,int -InfoAccessType,,int +CorInfoClassId +CorInfoHelpFunc +CorInfoInitClassResult +CorInfoInlineTypeCheck +CorInfoInlineTypeCheckSource +CorInfoInline +CorInfoIntrinsics +CorInfoIsAccessAllowedResult +CorInfoMethodRuntimeFlags +CorInfoTailCall +CorInfoType +CorInfoHFAElemType +CorInfoTypeWithMod +CorInfoCallConvExtension +InfoAccessType CORINFO_LOOKUP_KIND -CORINFO_ACCESS_FLAGS,,int -CORINFO_CALLINFO_FLAGS,,int -CORINFO_GET_TAILCALL_HELPERS_FLAGS,,int -CorJitAllocMemFlag,,int -CorJitFuncKind,,int -CorJitResult,,int -TypeCompareState,,int -CORINFO_InstructionSet,InstructionSet,int +CORINFO_ACCESS_FLAGS +CORINFO_CALLINFO_FLAGS +CORINFO_GET_TAILCALL_HELPERS_FLAGS +CorJitAllocMemFlag +CorJitFuncKind +CorJitResult +TypeCompareState +CORINFO_InstructionSet,InstructionSet ; Handle types -CORINFO_MODULE_HANDLE,CORINFO_MODULE_STRUCT_*,void* -CORINFO_METHOD_HANDLE,CORINFO_METHOD_STRUCT_*,void* -CORINFO_FIELD_HANDLE,CORINFO_FIELD_STRUCT_*,void* -CORINFO_CLASS_HANDLE,CORINFO_CLASS_STRUCT_*,void* -CORINFO_ASSEMBLY_HANDLE,CORINFO_ASSEMBLY_STRUCT_*,void* -CORINFO_JUST_MY_CODE_HANDLE,CORINFO_JUST_MY_CODE_HANDLE_*,void* -CORINFO_MODULE_HANDLE*,CORINFO_MODULE_STRUCT_**,void* -CORINFO_CLASS_HANDLE*,CORINFO_CLASS_STRUCT_**,void* -CORINFO_ARG_LIST_HANDLE,CORINFO_ARG_LIST_STRUCT_*,void* -CORINFO_VARARGS_HANDLE,IntPtr,void* -CORINFO_CONTEXT_HANDLE,CORINFO_CONTEXT_STRUCT*,void* -SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR*,SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR*,void* +CORINFO_MODULE_HANDLE,CORINFO_MODULE_STRUCT_* +CORINFO_METHOD_HANDLE,CORINFO_METHOD_STRUCT_* +CORINFO_FIELD_HANDLE,CORINFO_FIELD_STRUCT_* +CORINFO_CLASS_HANDLE,CORINFO_CLASS_STRUCT_* +CORINFO_ASSEMBLY_HANDLE,CORINFO_ASSEMBLY_STRUCT_* +CORINFO_JUST_MY_CODE_HANDLE,CORINFO_JUST_MY_CODE_HANDLE_* +CORINFO_MODULE_HANDLE*,CORINFO_MODULE_STRUCT_** +CORINFO_CLASS_HANDLE*,CORINFO_CLASS_STRUCT_** +CORINFO_ARG_LIST_HANDLE,CORINFO_ARG_LIST_STRUCT_* +CORINFO_VARARGS_HANDLE,IntPtr +CORINFO_CONTEXT_HANDLE,CORINFO_CONTEXT_STRUCT* +SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR*,SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR* -ICorDebugInfo::OffsetMapping*,OffsetMapping*,void* -ICorDebugInfo::ILVarInfo**,ILVarInfo**,void* -ICorDebugInfo::NativeVarInfo*,NativeVarInfo*,void* -ICorDebugInfo::BoundaryTypes*,BoundaryTypes*,void* +ICorDebugInfo::OffsetMapping*,OffsetMapping* +ICorDebugInfo::ILVarInfo**,ILVarInfo** +ICorDebugInfo::NativeVarInfo*,NativeVarInfo* +ICorDebugInfo::BoundaryTypes*,BoundaryTypes* -struct _EXCEPTION_POINTERS*,_EXCEPTION_POINTERS*,void* -ICorJitInfo::errorTrapFunction,void*,void* +struct _EXCEPTION_POINTERS*,_EXCEPTION_POINTERS* +ICorJitInfo::errorTrapFunction,void* FUNCTIONS - DWORD getMethodAttribs( CORINFO_METHOD_HANDLE ftn ); + uint32_t getMethodAttribs( CORINFO_METHOD_HANDLE ftn ); void setMethodAttribs( CORINFO_METHOD_HANDLE ftn, CorInfoMethodRuntimeFlags attribs ); void getMethodSig( CORINFO_METHOD_HANDLE ftn, CORINFO_SIG_INFO *sig, CORINFO_CLASS_HANDLE memberParent ); bool getMethodInfo( CORINFO_METHOD_HANDLE ftn, CORINFO_METHOD_INFO* info ); - CorInfoInline canInline( CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd, DWORD* pRestrictions ); + CorInfoInline canInline( CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd, uint32_t* pRestrictions ); void reportInliningDecision(CORINFO_METHOD_HANDLE inlinerHnd, CORINFO_METHOD_HANDLE inlineeHnd, CorInfoInline inlineResult, const char * reason); bool canTailCall( CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE declaredCalleeHnd, CORINFO_METHOD_HANDLE exactCalleeHnd, bool fIsTailPrefix ); void reportTailCallDecision(CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd, bool fIsTailPrefix, CorInfoTailCall tailCallResult, const char * reason); @@ -196,15 +185,15 @@ FUNCTIONS CORINFO_CLASS_HANDLE getTokenTypeAsHandle(CORINFO_RESOLVED_TOKEN* pResolvedToken) bool isValidToken(CORINFO_MODULE_HANDLE module, unsigned metaTOK) bool isValidStringRef(CORINFO_MODULE_HANDLE module, unsigned metaTOK) - LPCWSTR getStringLiteral(CORINFO_MODULE_HANDLE module, unsigned metaTOK, int* length) + const char16_t * getStringLiteral(CORINFO_MODULE_HANDLE module, unsigned metaTOK, int* length) CorInfoType asCorInfoType(CORINFO_CLASS_HANDLE cls) const char* getClassName(CORINFO_CLASS_HANDLE cls) const char* getClassNameFromMetadata(CORINFO_CLASS_HANDLE cls, const char **namespaceName) CORINFO_CLASS_HANDLE getTypeInstantiationArgument(CORINFO_CLASS_HANDLE cls, unsigned index) - int appendClassName(WCHAR** ppBuf, int* pnBufLen, CORINFO_CLASS_HANDLE cls, bool fNamespace, bool fFullInst, bool fAssembly) + int appendClassName(char16_t** ppBuf, int* pnBufLen, CORINFO_CLASS_HANDLE cls, bool fNamespace, bool fFullInst, bool fAssembly) bool isValueClass(CORINFO_CLASS_HANDLE cls) CorInfoInlineTypeCheck canInlineTypeCheck(CORINFO_CLASS_HANDLE cls, CorInfoInlineTypeCheckSource source) - DWORD getClassAttribs(CORINFO_CLASS_HANDLE cls) + uint32_t getClassAttribs(CORINFO_CLASS_HANDLE cls) bool isStructRequiringStackAllocRetBuf(CORINFO_CLASS_HANDLE cls) CORINFO_MODULE_HANDLE getClassModule(CORINFO_CLASS_HANDLE cls) CORINFO_ASSEMBLY_HANDLE getModuleAssembly(CORINFO_MODULE_HANDLE mod) @@ -216,10 +205,10 @@ FUNCTIONS unsigned getHeapClassSize(CORINFO_CLASS_HANDLE cls) bool canAllocateOnStack(CORINFO_CLASS_HANDLE cls) unsigned getClassAlignmentRequirement(CORINFO_CLASS_HANDLE cls, bool fDoubleAlignHint) - unsigned getClassGClayout(CORINFO_CLASS_HANDLE cls, BYTE* gcPtrs) + unsigned getClassGClayout(CORINFO_CLASS_HANDLE cls, uint8_t* gcPtrs) unsigned getClassNumInstanceFields(CORINFO_CLASS_HANDLE cls) - CORINFO_FIELD_HANDLE getFieldInClass(CORINFO_CLASS_HANDLE clsHnd, INT num) - bool checkMethodModifier(CORINFO_METHOD_HANDLE hMethod, LPCSTR modifier, bool fOptional) + CORINFO_FIELD_HANDLE getFieldInClass(CORINFO_CLASS_HANDLE clsHnd, int32_t num) + bool checkMethodModifier(CORINFO_METHOD_HANDLE hMethod, const char * modifier, bool fOptional) CorInfoHelpFunc getNewHelper(CORINFO_RESOLVED_TOKEN* pResolvedToken, CORINFO_METHOD_HANDLE callerHandle, bool* pHasSideEffects) CorInfoHelpFunc getNewArrHelper(CORINFO_CLASS_HANDLE arrayCls) CorInfoHelpFunc getCastingHelper(CORINFO_RESOLVED_TOKEN* pResolvedToken, bool fThrowing) @@ -246,7 +235,7 @@ FUNCTIONS bool satisfiesClassConstraints(CORINFO_CLASS_HANDLE cls) bool isSDArray(CORINFO_CLASS_HANDLE cls) unsigned getArrayRank(CORINFO_CLASS_HANDLE cls) - void* getArrayInitializationData(CORINFO_FIELD_HANDLE field, DWORD size) + void* getArrayInitializationData(CORINFO_FIELD_HANDLE field, uint32_t size) CorInfoIsAccessAllowedResult canAccessClass(CORINFO_RESOLVED_TOKEN* pResolvedToken, CORINFO_METHOD_HANDLE callerHandle, CORINFO_HELPER_DESC* pAccessHelper) const char* getFieldName(CORINFO_FIELD_HANDLE ftn, const char** moduleName) CORINFO_CLASS_HANDLE getFieldClass(CORINFO_FIELD_HANDLE field) @@ -254,34 +243,34 @@ FUNCTIONS unsigned getFieldOffset(CORINFO_FIELD_HANDLE field) void getFieldInfo(CORINFO_RESOLVED_TOKEN* pResolvedToken, CORINFO_METHOD_HANDLE callerHandle, CORINFO_ACCESS_FLAGS flags, CORINFO_FIELD_INFO* pResult) bool isFieldStatic(CORINFO_FIELD_HANDLE fldHnd) - void getBoundaries(CORINFO_METHOD_HANDLE ftn, unsigned int* cILOffsets, DWORD** pILOffsets, ICorDebugInfo::BoundaryTypes* implictBoundaries) - void setBoundaries(CORINFO_METHOD_HANDLE ftn, ULONG32 cMap, ICorDebugInfo::OffsetMapping* pMap) - void getVars(CORINFO_METHOD_HANDLE ftn, ULONG32* cVars, ICorDebugInfo::ILVarInfo** vars, bool* extendOthers) - void setVars(CORINFO_METHOD_HANDLE ftn, ULONG32 cVars, ICorDebugInfo::NativeVarInfo* vars) + void getBoundaries(CORINFO_METHOD_HANDLE ftn, unsigned int* cILOffsets, uint32_t** pILOffsets, ICorDebugInfo::BoundaryTypes* implictBoundaries) + void setBoundaries(CORINFO_METHOD_HANDLE ftn, uint32_t cMap, ICorDebugInfo::OffsetMapping* pMap) + void getVars(CORINFO_METHOD_HANDLE ftn, uint32_t* cVars, ICorDebugInfo::ILVarInfo** vars, bool* extendOthers) + void setVars(CORINFO_METHOD_HANDLE ftn, uint32_t cVars, ICorDebugInfo::NativeVarInfo* vars) void*allocateArray(size_t cBytes); void freeArray(void*array); CORINFO_ARG_LIST_HANDLE getArgNext(CORINFO_ARG_LIST_HANDLE args); CorInfoTypeWithMod getArgType(CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_HANDLE args, CORINFO_CLASS_HANDLE* vcTypeRet); CORINFO_CLASS_HANDLE getArgClass(CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_HANDLE args); CorInfoHFAElemType getHFAType(CORINFO_CLASS_HANDLE hClass); - HRESULT GetErrorHRESULT(struct _EXCEPTION_POINTERS *pExceptionPointers); - ULONG GetErrorMessage(LPWSTR buffer, ULONG bufferLength); + JITINTERFACE_HRESULT GetErrorHRESULT(struct _EXCEPTION_POINTERS *pExceptionPointers); + uint32_t GetErrorMessage(char16_t * buffer, uint32_t bufferLength); [ManualNativeWrapper] int FilterException(struct _EXCEPTION_POINTERS* pExceptionPointers); [ManualNativeWrapper] void HandleException(struct _EXCEPTION_POINTERS* pExceptionPointers); - void ThrowExceptionForJitResult(HRESULT result); + void ThrowExceptionForJitResult(JITINTERFACE_HRESULT result); void ThrowExceptionForHelper(const CORINFO_HELPER_DESC* throwHelper); [ManualNativeWrapper] bool runWithErrorTrap(ICorJitInfo::errorTrapFunction function, void* parameter); void getEEInfo(CORINFO_EE_INFO* pEEInfoOut); - LPCWSTR getJitTimeLogFilename(); + const char16_t * getJitTimeLogFilename(); mdMethodDef getMethodDefFromMethod(CORINFO_METHOD_HANDLE hMethod); const char* getMethodName(CORINFO_METHOD_HANDLE ftn, const char **moduleName); const char* getMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn, const char **className, const char **namespaceName, const char **enclosingClassName); unsigned getMethodHash(CORINFO_METHOD_HANDLE ftn); size_t findNameOfToken(CORINFO_MODULE_HANDLE moduleHandle,mdToken token, char * szFQName,size_t FQNameCapacity); bool getSystemVAmd64PassStructInRegisterDescriptor(CORINFO_CLASS_HANDLE structHnd, SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR* structPassInRegDescPtr); - DWORD getThreadTLSIndex(void **ppIndirection); + uint32_t getThreadTLSIndex(void **ppIndirection); const void * getInlinedCallFrameVptr(void **ppIndirection); - LONG * getAddrOfCaptureThreadGlobal(void **ppIndirection); + int32_t * getAddrOfCaptureThreadGlobal(void **ppIndirection); void* getHelperFtn (CorInfoHelpFunc ftnNum, void **ppIndirection); void getFunctionEntryPoint(CORINFO_METHOD_HANDLE ftn, CORINFO_CONST_LOOKUP * pResult, CORINFO_ACCESS_FLAGS accessFlags); void getFunctionFixedEntryPoint(CORINFO_METHOD_HANDLE ftn, CORINFO_CONST_LOOKUP * pResult); @@ -294,7 +283,7 @@ FUNCTIONS void embedGenericHandle(CORINFO_RESOLVED_TOKEN * pResolvedToken, bool fEmbedParent, CORINFO_GENERICHANDLE_RESULT * pResult); void getLocationOfThisType(CORINFO_METHOD_HANDLE context, CORINFO_LOOKUP_KIND* pLookupKind); void getAddressOfPInvokeTarget(CORINFO_METHOD_HANDLE method, CORINFO_CONST_LOOKUP *pLookup); - LPVOID GetCookieForPInvokeCalliSig(CORINFO_SIG_INFO* szMetaSig, void ** ppIndirection); + void* GetCookieForPInvokeCalliSig(CORINFO_SIG_INFO* szMetaSig, void ** ppIndirection); bool canGetCookieForPInvokeCalliSig(CORINFO_SIG_INFO* szMetaSig); CORINFO_JUST_MY_CODE_HANDLE getJustMyCodeHandle(CORINFO_METHOD_HANDLE method, CORINFO_JUST_MY_CODE_HANDLE**ppIndirection); void GetProfilingHandle(bool* pbHookFunction, void **pProfilerHandle, bool* pbIndirectedHandles); @@ -308,7 +297,7 @@ FUNCTIONS bool canGetVarArgsHandle(CORINFO_SIG_INFO *pSig); InfoAccessType constructStringLiteral(CORINFO_MODULE_HANDLE module, mdToken metaTok, void **ppValue); InfoAccessType emptyStringLiteral(void **ppValue); - DWORD getFieldThreadLocalStoreID (CORINFO_FIELD_HANDLE field, void **ppIndirection); + uint32_t getFieldThreadLocalStoreID (CORINFO_FIELD_HANDLE field, void **ppIndirection); void setOverride(ICorDynamicInfo *pOverride, CORINFO_METHOD_HANDLE currentMethod); void addActiveDependency(CORINFO_MODULE_HANDLE moduleFrom, CORINFO_MODULE_HANDLE moduleTo); CORINFO_METHOD_HANDLE GetDelegateCtor(CORINFO_METHOD_HANDLE methHnd, CORINFO_CLASS_HANDLE clsHnd, CORINFO_METHOD_HANDLE targetMethodHnd, DelegateCtorArgs * pCtorData); @@ -316,20 +305,21 @@ FUNCTIONS bool getTailCallHelpers(CORINFO_RESOLVED_TOKEN* callToken, CORINFO_SIG_INFO* sig, CORINFO_GET_TAILCALL_HELPERS_FLAGS flags, CORINFO_TAILCALL_HELPERS* pResult); bool convertPInvokeCalliToCall(CORINFO_RESOLVED_TOKEN * pResolvedToken, bool mustConvert); bool notifyInstructionSetUsage(CORINFO_InstructionSet instructionSet,bool supportEnabled); - void allocMem( ULONG hotCodeSize, ULONG coldCodeSize, ULONG roDataSize, ULONG xcptnsCount, CorJitAllocMemFlag flag, void** hotCodeBlock, void** coldCodeBlock, void** roDataBlock ); - void reserveUnwindInfo(bool isFunclet, bool isColdCode, ULONG unwindSize) - void allocUnwindInfo(BYTE* pHotCode, BYTE* pColdCode, ULONG startOffset, ULONG endOffset, ULONG unwindSize, BYTE* pUnwindBlock, CorJitFuncKind funcKind) + void allocMem( uint32_t hotCodeSize, uint32_t coldCodeSize, uint32_t roDataSize, uint32_t xcptnsCount, CorJitAllocMemFlag flag, void** hotCodeBlock, void** coldCodeBlock, void** roDataBlock ); + void reserveUnwindInfo(bool isFunclet, bool isColdCode, uint32_t unwindSize) + void allocUnwindInfo(uint8_t* pHotCode, uint8_t* pColdCode, uint32_t startOffset, uint32_t endOffset, uint32_t unwindSize, uint8_t* pUnwindBlock, CorJitFuncKind funcKind) void* allocGCInfo(size_t size) void setEHcount(unsigned cEH) void setEHinfo(unsigned EHnumber, const CORINFO_EH_CLAUSE* clause) bool logMsg(unsigned level, const char* fmt, va_list args) int doAssert(const char* szFile, int iLine, const char* szExpr) void reportFatalError(CorJitResult result) - HRESULT getPgoInstrumentationResults(CORINFO_METHOD_HANDLE ftnHnd, PgoInstrumentationSchema** pSchema, UINT32* pCountSchemaItems, BYTE**pInstrumentationData) - HRESULT allocPgoInstrumentationBySchema(CORINFO_METHOD_HANDLE ftnHnd, PgoInstrumentationSchema* pSchema, UINT32 countSchemaItems, BYTE** pInstrumentationData) - CORINFO_CLASS_HANDLE getLikelyClass(CORINFO_METHOD_HANDLE ftnHnd, CORINFO_CLASS_HANDLE baseHnd, UINT32 ilOffset, UINT32* pLikelihood, UINT32* pNumberOfClasses) - void recordCallSite(ULONG instrOffset, CORINFO_SIG_INFO* callSig, CORINFO_METHOD_HANDLE methodHandle) - void recordRelocation(void* location, void* target, WORD fRelocType, WORD slotNum, INT32 addlDelta) - WORD getRelocTypeHint(void* target) - DWORD getExpectedTargetArchitecture() - DWORD getJitFlags(CORJIT_FLAGS* flags, DWORD sizeInBytes) + JITINTERFACE_HRESULT getPgoInstrumentationResults(CORINFO_METHOD_HANDLE ftnHnd, ICorJitInfo::PgoInstrumentationSchema** pSchema, uint32_t* pCountSchemaItems, uint8_t**pInstrumentationData) + JITINTERFACE_HRESULT allocPgoInstrumentationBySchema(CORINFO_METHOD_HANDLE ftnHnd, ICorJitInfo::PgoInstrumentationSchema* pSchema, uint32_t countSchemaItems, uint8_t** pInstrumentationData) + CORINFO_CLASS_HANDLE getLikelyClass(CORINFO_METHOD_HANDLE ftnHnd, CORINFO_CLASS_HANDLE baseHnd, uint32_t ilOffset, uint32_t* pLikelihood, uint32_t* pNumberOfClasses) + void recordCallSite(uint32_t instrOffset, CORINFO_SIG_INFO* callSig, CORINFO_METHOD_HANDLE methodHandle) + void recordRelocation(void* location, void* target, uint16_t fRelocType, uint16_t slotNum, int32_t addlDelta) + uint16_t getRelocTypeHint(void* target) + uint32_t getExpectedTargetArchitecture() + uint32_t getJitFlags(CORJIT_FLAGS* flags, uint32_t sizeInBytes) + diff --git a/src/coreclr/tools/aot/jitinterface/jitinterface.cpp b/src/coreclr/tools/aot/jitinterface/jitinterface.cpp index d3cf1bdbf4b2b..cb185e75d9ad8 100644 --- a/src/coreclr/tools/aot/jitinterface/jitinterface.cpp +++ b/src/coreclr/tools/aot/jitinterface/jitinterface.cpp @@ -13,23 +13,22 @@ static void NotImplemented() abort(); } -int JitInterfaceWrapper::FilterException(void* pExceptionPointers) +int JitInterfaceWrapper::FilterException(struct _EXCEPTION_POINTERS* pExceptionPointers) { NotImplemented(); return 1; // EXCEPTION_EXECUTE_HANDLER } -void JitInterfaceWrapper::HandleException(void* pExceptionPointers) +void JitInterfaceWrapper::HandleException(struct _EXCEPTION_POINTERS* pExceptionPointers) { NotImplemented(); } -bool JitInterfaceWrapper::runWithErrorTrap(void* function, void* parameter) +bool JitInterfaceWrapper::runWithErrorTrap(ICorJitInfo::errorTrapFunction function, void* parameter) { - typedef void(*pfn)(void*); try { - (*(pfn)function)(parameter); + (*function)(parameter); } catch (CorInfoExceptionClass *) { diff --git a/src/coreclr/tools/aot/jitinterface/jitinterface.h b/src/coreclr/tools/aot/jitinterface/jitinterface.h index 3c1fe2d09fb66..3e61333832c25 100644 --- a/src/coreclr/tools/aot/jitinterface/jitinterface.h +++ b/src/coreclr/tools/aot/jitinterface/jitinterface.h @@ -7,185 +7,186 @@ #include "corinfoexception.h" +#include "../../../inc/corjit.h" struct JitInterfaceCallbacks { - unsigned int (* getMethodAttribs)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftn); - void (* setMethodAttribs)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftn, int attribs); - void (* getMethodSig)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftn, void* sig, void* memberParent); - bool (* getMethodInfo)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftn, void* info); - int (* canInline)(void * thisHandle, CorInfoExceptionClass** ppException, void* callerHnd, void* calleeHnd, unsigned int* pRestrictions); - void (* reportInliningDecision)(void * thisHandle, CorInfoExceptionClass** ppException, void* inlinerHnd, void* inlineeHnd, int inlineResult, const char* reason); - bool (* canTailCall)(void * thisHandle, CorInfoExceptionClass** ppException, void* callerHnd, void* declaredCalleeHnd, void* exactCalleeHnd, bool fIsTailPrefix); - void (* reportTailCallDecision)(void * thisHandle, CorInfoExceptionClass** ppException, void* callerHnd, void* calleeHnd, bool fIsTailPrefix, int tailCallResult, const char* reason); - void (* getEHinfo)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftn, unsigned EHnumber, void* clause); - void* (* getMethodClass)(void * thisHandle, CorInfoExceptionClass** ppException, void* method); - void* (* getMethodModule)(void * thisHandle, CorInfoExceptionClass** ppException, void* method); - void (* getMethodVTableOffset)(void * thisHandle, CorInfoExceptionClass** ppException, void* method, unsigned* offsetOfIndirection, unsigned* offsetAfterIndirection, bool* isRelative); - bool (* resolveVirtualMethod)(void * thisHandle, CorInfoExceptionClass** ppException, void* info); - void* (* getUnboxedEntry)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftn, bool* requiresInstMethodTableArg); - void* (* getDefaultComparerClass)(void * thisHandle, CorInfoExceptionClass** ppException, void* elemType); - void* (* getDefaultEqualityComparerClass)(void * thisHandle, CorInfoExceptionClass** ppException, void* elemType); - void (* expandRawHandleIntrinsic)(void * thisHandle, CorInfoExceptionClass** ppException, void* pResolvedToken, void* pResult); - int (* getIntrinsicID)(void * thisHandle, CorInfoExceptionClass** ppException, void* method, bool* pMustExpand); - bool (* isIntrinsicType)(void * thisHandle, CorInfoExceptionClass** ppException, void* classHnd); - int (* getUnmanagedCallConv)(void * thisHandle, CorInfoExceptionClass** ppException, void* method, void* callSiteSig, bool* pSuppressGCTransition); - bool (* pInvokeMarshalingRequired)(void * thisHandle, CorInfoExceptionClass** ppException, void* method, void* callSiteSig); - bool (* satisfiesMethodConstraints)(void * thisHandle, CorInfoExceptionClass** ppException, void* parent, void* method); - bool (* isCompatibleDelegate)(void * thisHandle, CorInfoExceptionClass** ppException, void* objCls, void* methodParentCls, void* method, void* delegateCls, bool* pfIsOpenDelegate); - void (* methodMustBeLoadedBeforeCodeIsRun)(void * thisHandle, CorInfoExceptionClass** ppException, void* method); - void* (* mapMethodDeclToMethodImpl)(void * thisHandle, CorInfoExceptionClass** ppException, void* method); - void (* getGSCookie)(void * thisHandle, CorInfoExceptionClass** ppException, void* pCookieVal, void** ppCookieVal); - void (* setPatchpointInfo)(void * thisHandle, CorInfoExceptionClass** ppException, void* patchpointInfo); - void* (* getOSRInfo)(void * thisHandle, CorInfoExceptionClass** ppException, unsigned* ilOffset); - void (* resolveToken)(void * thisHandle, CorInfoExceptionClass** ppException, void* pResolvedToken); - bool (* tryResolveToken)(void * thisHandle, CorInfoExceptionClass** ppException, void* pResolvedToken); - void (* findSig)(void * thisHandle, CorInfoExceptionClass** ppException, void* module, unsigned sigTOK, void* context, void* sig); - void (* findCallSiteSig)(void * thisHandle, CorInfoExceptionClass** ppException, void* module, unsigned methTOK, void* context, void* sig); - void* (* getTokenTypeAsHandle)(void * thisHandle, CorInfoExceptionClass** ppException, void* pResolvedToken); - bool (* isValidToken)(void * thisHandle, CorInfoExceptionClass** ppException, void* module, unsigned metaTOK); - bool (* isValidStringRef)(void * thisHandle, CorInfoExceptionClass** ppException, void* module, unsigned metaTOK); - const wchar_t* (* getStringLiteral)(void * thisHandle, CorInfoExceptionClass** ppException, void* module, unsigned metaTOK, int* length); - int (* asCorInfoType)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - const char* (* getClassName)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - const char* (* getClassNameFromMetadata)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls, const char** namespaceName); - void* (* getTypeInstantiationArgument)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls, unsigned index); - int (* appendClassName)(void * thisHandle, CorInfoExceptionClass** ppException, wchar_t** ppBuf, int* pnBufLen, void* cls, bool fNamespace, bool fFullInst, bool fAssembly); - bool (* isValueClass)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - int (* canInlineTypeCheck)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls, int source); - unsigned int (* getClassAttribs)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - bool (* isStructRequiringStackAllocRetBuf)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - void* (* getClassModule)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - void* (* getModuleAssembly)(void * thisHandle, CorInfoExceptionClass** ppException, void* mod); - const char* (* getAssemblyName)(void * thisHandle, CorInfoExceptionClass** ppException, void* assem); + uint32_t (* getMethodAttribs)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn); + void (* setMethodAttribs)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, CorInfoMethodRuntimeFlags attribs); + void (* getMethodSig)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, CORINFO_SIG_INFO* sig, CORINFO_CLASS_HANDLE memberParent); + bool (* getMethodInfo)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, CORINFO_METHOD_INFO* info); + CorInfoInline (* canInline)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd, uint32_t* pRestrictions); + void (* reportInliningDecision)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE inlinerHnd, CORINFO_METHOD_HANDLE inlineeHnd, CorInfoInline inlineResult, const char* reason); + bool (* canTailCall)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE declaredCalleeHnd, CORINFO_METHOD_HANDLE exactCalleeHnd, bool fIsTailPrefix); + void (* reportTailCallDecision)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd, bool fIsTailPrefix, CorInfoTailCall tailCallResult, const char* reason); + void (* getEHinfo)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, unsigned EHnumber, CORINFO_EH_CLAUSE* clause); + CORINFO_CLASS_HANDLE (* getMethodClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE method); + CORINFO_MODULE_HANDLE (* getMethodModule)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE method); + void (* getMethodVTableOffset)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE method, unsigned* offsetOfIndirection, unsigned* offsetAfterIndirection, bool* isRelative); + bool (* resolveVirtualMethod)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_DEVIRTUALIZATION_INFO* info); + CORINFO_METHOD_HANDLE (* getUnboxedEntry)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, bool* requiresInstMethodTableArg); + CORINFO_CLASS_HANDLE (* getDefaultComparerClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE elemType); + CORINFO_CLASS_HANDLE (* getDefaultEqualityComparerClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE elemType); + void (* expandRawHandleIntrinsic)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken, CORINFO_GENERICHANDLE_RESULT* pResult); + CorInfoIntrinsics (* getIntrinsicID)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE method, bool* pMustExpand); + bool (* isIntrinsicType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE classHnd); + CorInfoCallConvExtension (* getUnmanagedCallConv)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* callSiteSig, bool* pSuppressGCTransition); + bool (* pInvokeMarshalingRequired)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* callSiteSig); + bool (* satisfiesMethodConstraints)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE parent, CORINFO_METHOD_HANDLE method); + bool (* isCompatibleDelegate)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE objCls, CORINFO_CLASS_HANDLE methodParentCls, CORINFO_METHOD_HANDLE method, CORINFO_CLASS_HANDLE delegateCls, bool* pfIsOpenDelegate); + void (* methodMustBeLoadedBeforeCodeIsRun)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE method); + CORINFO_METHOD_HANDLE (* mapMethodDeclToMethodImpl)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE method); + void (* getGSCookie)(void * thisHandle, CorInfoExceptionClass** ppException, GSCookie* pCookieVal, GSCookie** ppCookieVal); + void (* setPatchpointInfo)(void * thisHandle, CorInfoExceptionClass** ppException, PatchpointInfo* patchpointInfo); + PatchpointInfo* (* getOSRInfo)(void * thisHandle, CorInfoExceptionClass** ppException, unsigned* ilOffset); + void (* resolveToken)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken); + bool (* tryResolveToken)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken); + void (* findSig)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_MODULE_HANDLE module, unsigned sigTOK, CORINFO_CONTEXT_HANDLE context, CORINFO_SIG_INFO* sig); + void (* findCallSiteSig)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_MODULE_HANDLE module, unsigned methTOK, CORINFO_CONTEXT_HANDLE context, CORINFO_SIG_INFO* sig); + CORINFO_CLASS_HANDLE (* getTokenTypeAsHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken); + bool (* isValidToken)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_MODULE_HANDLE module, unsigned metaTOK); + bool (* isValidStringRef)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_MODULE_HANDLE module, unsigned metaTOK); + const char16_t* (* getStringLiteral)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_MODULE_HANDLE module, unsigned metaTOK, int* length); + CorInfoType (* asCorInfoType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls); + const char* (* getClassName)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls); + const char* (* getClassNameFromMetadata)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls, const char** namespaceName); + CORINFO_CLASS_HANDLE (* getTypeInstantiationArgument)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls, unsigned index); + int (* appendClassName)(void * thisHandle, CorInfoExceptionClass** ppException, char16_t** ppBuf, int* pnBufLen, CORINFO_CLASS_HANDLE cls, bool fNamespace, bool fFullInst, bool fAssembly); + bool (* isValueClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls); + CorInfoInlineTypeCheck (* canInlineTypeCheck)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls, CorInfoInlineTypeCheckSource source); + uint32_t (* getClassAttribs)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls); + bool (* isStructRequiringStackAllocRetBuf)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls); + CORINFO_MODULE_HANDLE (* getClassModule)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls); + CORINFO_ASSEMBLY_HANDLE (* getModuleAssembly)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_MODULE_HANDLE mod); + const char* (* getAssemblyName)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_ASSEMBLY_HANDLE assem); void* (* LongLifetimeMalloc)(void * thisHandle, CorInfoExceptionClass** ppException, size_t sz); void (* LongLifetimeFree)(void * thisHandle, CorInfoExceptionClass** ppException, void* obj); - size_t (* getClassModuleIdForStatics)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls, void* pModule, void** ppIndirection); - unsigned (* getClassSize)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - unsigned (* getHeapClassSize)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - bool (* canAllocateOnStack)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - unsigned (* getClassAlignmentRequirement)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls, bool fDoubleAlignHint); - unsigned (* getClassGClayout)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls, unsigned char* gcPtrs); - unsigned (* getClassNumInstanceFields)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - void* (* getFieldInClass)(void * thisHandle, CorInfoExceptionClass** ppException, void* clsHnd, int num); - bool (* checkMethodModifier)(void * thisHandle, CorInfoExceptionClass** ppException, void* hMethod, const char* modifier, bool fOptional); - int (* getNewHelper)(void * thisHandle, CorInfoExceptionClass** ppException, void* pResolvedToken, void* callerHandle, bool* pHasSideEffects); - int (* getNewArrHelper)(void * thisHandle, CorInfoExceptionClass** ppException, void* arrayCls); - int (* getCastingHelper)(void * thisHandle, CorInfoExceptionClass** ppException, void* pResolvedToken, bool fThrowing); - int (* getSharedCCtorHelper)(void * thisHandle, CorInfoExceptionClass** ppException, void* clsHnd); - void* (* getTypeForBox)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - int (* getBoxHelper)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - int (* getUnBoxHelper)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - bool (* getReadyToRunHelper)(void * thisHandle, CorInfoExceptionClass** ppException, void* pResolvedToken, void* pGenericLookupKind, int id, void* pLookup); - void (* getReadyToRunDelegateCtorHelper)(void * thisHandle, CorInfoExceptionClass** ppException, void* pTargetMethod, void* delegateType, void* pLookup); - const char* (* getHelperName)(void * thisHandle, CorInfoExceptionClass** ppException, int helpFunc); - int (* initClass)(void * thisHandle, CorInfoExceptionClass** ppException, void* field, void* method, void* context); - void (* classMustBeLoadedBeforeCodeIsRun)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - void* (* getBuiltinClass)(void * thisHandle, CorInfoExceptionClass** ppException, int classId); - int (* getTypeForPrimitiveValueClass)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - int (* getTypeForPrimitiveNumericClass)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - bool (* canCast)(void * thisHandle, CorInfoExceptionClass** ppException, void* child, void* parent); - bool (* areTypesEquivalent)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls1, void* cls2); - int (* compareTypesForCast)(void * thisHandle, CorInfoExceptionClass** ppException, void* fromClass, void* toClass); - int (* compareTypesForEquality)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls1, void* cls2); - void* (* mergeClasses)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls1, void* cls2); - bool (* isMoreSpecificType)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls1, void* cls2); - void* (* getParentType)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - int (* getChildType)(void * thisHandle, CorInfoExceptionClass** ppException, void* clsHnd, void* clsRet); - bool (* satisfiesClassConstraints)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - bool (* isSDArray)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - unsigned (* getArrayRank)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - void* (* getArrayInitializationData)(void * thisHandle, CorInfoExceptionClass** ppException, void* field, unsigned int size); - int (* canAccessClass)(void * thisHandle, CorInfoExceptionClass** ppException, void* pResolvedToken, void* callerHandle, void* pAccessHelper); - const char* (* getFieldName)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftn, const char** moduleName); - void* (* getFieldClass)(void * thisHandle, CorInfoExceptionClass** ppException, void* field); - int (* getFieldType)(void * thisHandle, CorInfoExceptionClass** ppException, void* field, void* structType, void* memberParent); - unsigned (* getFieldOffset)(void * thisHandle, CorInfoExceptionClass** ppException, void* field); - void (* getFieldInfo)(void * thisHandle, CorInfoExceptionClass** ppException, void* pResolvedToken, void* callerHandle, int flags, void* pResult); - bool (* isFieldStatic)(void * thisHandle, CorInfoExceptionClass** ppException, void* fldHnd); - void (* getBoundaries)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftn, unsigned int* cILOffsets, unsigned int** pILOffsets, void* implictBoundaries); - void (* setBoundaries)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftn, unsigned int cMap, void* pMap); - void (* getVars)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftn, unsigned int* cVars, void* vars, bool* extendOthers); - void (* setVars)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftn, unsigned int cVars, void* vars); + size_t (* getClassModuleIdForStatics)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls, CORINFO_MODULE_HANDLE* pModule, void** ppIndirection); + unsigned (* getClassSize)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls); + unsigned (* getHeapClassSize)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls); + bool (* canAllocateOnStack)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls); + unsigned (* getClassAlignmentRequirement)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls, bool fDoubleAlignHint); + unsigned (* getClassGClayout)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls, uint8_t* gcPtrs); + unsigned (* getClassNumInstanceFields)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls); + CORINFO_FIELD_HANDLE (* getFieldInClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE clsHnd, int32_t num); + bool (* checkMethodModifier)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE hMethod, const char* modifier, bool fOptional); + CorInfoHelpFunc (* getNewHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken, CORINFO_METHOD_HANDLE callerHandle, bool* pHasSideEffects); + CorInfoHelpFunc (* getNewArrHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE arrayCls); + CorInfoHelpFunc (* getCastingHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken, bool fThrowing); + CorInfoHelpFunc (* getSharedCCtorHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE clsHnd); + 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); + 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, CORINFO_CLASS_HANDLE delegateType, CORINFO_LOOKUP* pLookup); + const char* (* getHelperName)(void * thisHandle, CorInfoExceptionClass** ppException, CorInfoHelpFunc helpFunc); + CorInfoInitClassResult (* initClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE field, CORINFO_METHOD_HANDLE method, CORINFO_CONTEXT_HANDLE context); + void (* classMustBeLoadedBeforeCodeIsRun)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls); + CORINFO_CLASS_HANDLE (* getBuiltinClass)(void * thisHandle, CorInfoExceptionClass** ppException, CorInfoClassId classId); + CorInfoType (* getTypeForPrimitiveValueClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls); + CorInfoType (* getTypeForPrimitiveNumericClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls); + bool (* canCast)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE child, CORINFO_CLASS_HANDLE parent); + bool (* areTypesEquivalent)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls1, CORINFO_CLASS_HANDLE cls2); + TypeCompareState (* compareTypesForCast)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE fromClass, CORINFO_CLASS_HANDLE toClass); + TypeCompareState (* compareTypesForEquality)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls1, CORINFO_CLASS_HANDLE cls2); + CORINFO_CLASS_HANDLE (* mergeClasses)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls1, CORINFO_CLASS_HANDLE cls2); + bool (* isMoreSpecificType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls1, CORINFO_CLASS_HANDLE cls2); + CORINFO_CLASS_HANDLE (* getParentType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls); + CorInfoType (* getChildType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE clsHnd, CORINFO_CLASS_HANDLE* clsRet); + bool (* satisfiesClassConstraints)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls); + bool (* isSDArray)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls); + unsigned (* getArrayRank)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls); + void* (* getArrayInitializationData)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE field, uint32_t size); + CorInfoIsAccessAllowedResult (* canAccessClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken, CORINFO_METHOD_HANDLE callerHandle, CORINFO_HELPER_DESC* pAccessHelper); + const char* (* getFieldName)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE ftn, const char** moduleName); + CORINFO_CLASS_HANDLE (* getFieldClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE field); + CorInfoType (* getFieldType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE field, CORINFO_CLASS_HANDLE* structType, CORINFO_CLASS_HANDLE memberParent); + unsigned (* getFieldOffset)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE field); + void (* getFieldInfo)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken, CORINFO_METHOD_HANDLE callerHandle, CORINFO_ACCESS_FLAGS flags, CORINFO_FIELD_INFO* pResult); + bool (* isFieldStatic)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE fldHnd); + void (* getBoundaries)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, unsigned int* cILOffsets, uint32_t** pILOffsets, ICorDebugInfo::BoundaryTypes* implictBoundaries); + void (* setBoundaries)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, uint32_t cMap, ICorDebugInfo::OffsetMapping* pMap); + void (* getVars)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, uint32_t* cVars, ICorDebugInfo::ILVarInfo** vars, bool* extendOthers); + void (* setVars)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, uint32_t cVars, ICorDebugInfo::NativeVarInfo* vars); void* (* allocateArray)(void * thisHandle, CorInfoExceptionClass** ppException, size_t cBytes); void (* freeArray)(void * thisHandle, CorInfoExceptionClass** ppException, void* array); - void* (* getArgNext)(void * thisHandle, CorInfoExceptionClass** ppException, void* args); - int (* getArgType)(void * thisHandle, CorInfoExceptionClass** ppException, void* sig, void* args, void* vcTypeRet); - void* (* getArgClass)(void * thisHandle, CorInfoExceptionClass** ppException, void* sig, void* args); - int (* getHFAType)(void * thisHandle, CorInfoExceptionClass** ppException, void* hClass); - int (* GetErrorHRESULT)(void * thisHandle, CorInfoExceptionClass** ppException, void* pExceptionPointers); - unsigned int (* GetErrorMessage)(void * thisHandle, CorInfoExceptionClass** ppException, wchar_t* buffer, unsigned int bufferLength); - int (* FilterException)(void * thisHandle, CorInfoExceptionClass** ppException, void* pExceptionPointers); - void (* HandleException)(void * thisHandle, CorInfoExceptionClass** ppException, void* pExceptionPointers); - void (* ThrowExceptionForJitResult)(void * thisHandle, CorInfoExceptionClass** ppException, int result); - void (* ThrowExceptionForHelper)(void * thisHandle, CorInfoExceptionClass** ppException, const void* throwHelper); - bool (* runWithErrorTrap)(void * thisHandle, CorInfoExceptionClass** ppException, void* function, void* parameter); - void (* getEEInfo)(void * thisHandle, CorInfoExceptionClass** ppException, void* pEEInfoOut); - const wchar_t* (* getJitTimeLogFilename)(void * thisHandle, CorInfoExceptionClass** ppException); - unsigned int (* getMethodDefFromMethod)(void * thisHandle, CorInfoExceptionClass** ppException, void* hMethod); - const char* (* getMethodName)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftn, const char** moduleName); - const char* (* getMethodNameFromMetadata)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftn, const char** className, const char** namespaceName, const char** enclosingClassName); - unsigned (* getMethodHash)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftn); - size_t (* findNameOfToken)(void * thisHandle, CorInfoExceptionClass** ppException, void* moduleHandle, unsigned int token, char* szFQName, size_t FQNameCapacity); - bool (* getSystemVAmd64PassStructInRegisterDescriptor)(void * thisHandle, CorInfoExceptionClass** ppException, void* structHnd, void* structPassInRegDescPtr); - unsigned int (* getThreadTLSIndex)(void * thisHandle, CorInfoExceptionClass** ppException, void** ppIndirection); + CORINFO_ARG_LIST_HANDLE (* getArgNext)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_ARG_LIST_HANDLE args); + CorInfoTypeWithMod (* getArgType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_HANDLE args, CORINFO_CLASS_HANDLE* vcTypeRet); + CORINFO_CLASS_HANDLE (* getArgClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_HANDLE args); + CorInfoHFAElemType (* getHFAType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE hClass); + JITINTERFACE_HRESULT (* GetErrorHRESULT)(void * thisHandle, CorInfoExceptionClass** ppException, struct _EXCEPTION_POINTERS* pExceptionPointers); + uint32_t (* GetErrorMessage)(void * thisHandle, CorInfoExceptionClass** ppException, char16_t* buffer, uint32_t bufferLength); + int (* FilterException)(void * thisHandle, CorInfoExceptionClass** ppException, struct _EXCEPTION_POINTERS* pExceptionPointers); + void (* HandleException)(void * thisHandle, CorInfoExceptionClass** ppException, struct _EXCEPTION_POINTERS* pExceptionPointers); + void (* ThrowExceptionForJitResult)(void * thisHandle, CorInfoExceptionClass** ppException, JITINTERFACE_HRESULT result); + void (* ThrowExceptionForHelper)(void * thisHandle, CorInfoExceptionClass** ppException, const CORINFO_HELPER_DESC* throwHelper); + bool (* runWithErrorTrap)(void * thisHandle, CorInfoExceptionClass** ppException, ICorJitInfo::errorTrapFunction function, void* parameter); + void (* getEEInfo)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_EE_INFO* pEEInfoOut); + const char16_t* (* getJitTimeLogFilename)(void * thisHandle, CorInfoExceptionClass** ppException); + mdMethodDef (* getMethodDefFromMethod)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE hMethod); + const char* (* getMethodName)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, const char** moduleName); + const char* (* getMethodNameFromMetadata)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, const char** className, const char** namespaceName, const char** enclosingClassName); + unsigned (* getMethodHash)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn); + size_t (* findNameOfToken)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_MODULE_HANDLE moduleHandle, unsigned int token, char* szFQName, size_t FQNameCapacity); + bool (* getSystemVAmd64PassStructInRegisterDescriptor)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE structHnd, SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR* structPassInRegDescPtr); + uint32_t (* getThreadTLSIndex)(void * thisHandle, CorInfoExceptionClass** ppException, void** ppIndirection); const void* (* getInlinedCallFrameVptr)(void * thisHandle, CorInfoExceptionClass** ppException, void** ppIndirection); - long* (* getAddrOfCaptureThreadGlobal)(void * thisHandle, CorInfoExceptionClass** ppException, void** ppIndirection); - void* (* getHelperFtn)(void * thisHandle, CorInfoExceptionClass** ppException, int ftnNum, void** ppIndirection); - void (* getFunctionEntryPoint)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftn, void* pResult, int accessFlags); - void (* getFunctionFixedEntryPoint)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftn, void* pResult); - void* (* getMethodSync)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftn, void** ppIndirection); - int (* getLazyStringLiteralHelper)(void * thisHandle, CorInfoExceptionClass** ppException, void* handle); - void* (* embedModuleHandle)(void * thisHandle, CorInfoExceptionClass** ppException, void* handle, void** ppIndirection); - void* (* embedClassHandle)(void * thisHandle, CorInfoExceptionClass** ppException, void* handle, void** ppIndirection); - void* (* embedMethodHandle)(void * thisHandle, CorInfoExceptionClass** ppException, void* handle, void** ppIndirection); - void* (* embedFieldHandle)(void * thisHandle, CorInfoExceptionClass** ppException, void* handle, void** ppIndirection); - void (* embedGenericHandle)(void * thisHandle, CorInfoExceptionClass** ppException, void* pResolvedToken, bool fEmbedParent, void* pResult); - void (* getLocationOfThisType)(void * thisHandle, CorInfoExceptionClass** ppException, void* context, void* pLookupKind); - void (* getAddressOfPInvokeTarget)(void * thisHandle, CorInfoExceptionClass** ppException, void* method, void* pLookup); - void* (* GetCookieForPInvokeCalliSig)(void * thisHandle, CorInfoExceptionClass** ppException, void* szMetaSig, void** ppIndirection); - bool (* canGetCookieForPInvokeCalliSig)(void * thisHandle, CorInfoExceptionClass** ppException, void* szMetaSig); - void* (* getJustMyCodeHandle)(void * thisHandle, CorInfoExceptionClass** ppException, void* method, void** ppIndirection); + int32_t* (* getAddrOfCaptureThreadGlobal)(void * thisHandle, CorInfoExceptionClass** ppException, void** ppIndirection); + void* (* getHelperFtn)(void * thisHandle, CorInfoExceptionClass** ppException, CorInfoHelpFunc ftnNum, void** ppIndirection); + void (* getFunctionEntryPoint)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, CORINFO_CONST_LOOKUP* pResult, CORINFO_ACCESS_FLAGS accessFlags); + void (* getFunctionFixedEntryPoint)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, CORINFO_CONST_LOOKUP* pResult); + void* (* getMethodSync)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, void** ppIndirection); + CorInfoHelpFunc (* getLazyStringLiteralHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_MODULE_HANDLE handle); + CORINFO_MODULE_HANDLE (* embedModuleHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_MODULE_HANDLE handle, void** ppIndirection); + CORINFO_CLASS_HANDLE (* embedClassHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE handle, void** ppIndirection); + CORINFO_METHOD_HANDLE (* embedMethodHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE handle, void** ppIndirection); + CORINFO_FIELD_HANDLE (* embedFieldHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE handle, void** ppIndirection); + void (* embedGenericHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken, bool fEmbedParent, CORINFO_GENERICHANDLE_RESULT* pResult); + void (* getLocationOfThisType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE context, CORINFO_LOOKUP_KIND* pLookupKind); + void (* getAddressOfPInvokeTarget)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE method, CORINFO_CONST_LOOKUP* pLookup); + void* (* GetCookieForPInvokeCalliSig)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_SIG_INFO* szMetaSig, void** ppIndirection); + bool (* canGetCookieForPInvokeCalliSig)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_SIG_INFO* szMetaSig); + CORINFO_JUST_MY_CODE_HANDLE (* getJustMyCodeHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE method, CORINFO_JUST_MY_CODE_HANDLE** ppIndirection); void (* GetProfilingHandle)(void * thisHandle, CorInfoExceptionClass** ppException, bool* pbHookFunction, void** pProfilerHandle, bool* pbIndirectedHandles); - void (* getCallInfo)(void * thisHandle, CorInfoExceptionClass** ppException, void* pResolvedToken, void* pConstrainedResolvedToken, void* callerHandle, int flags, void* pResult); - bool (* canAccessFamily)(void * thisHandle, CorInfoExceptionClass** ppException, void* hCaller, void* hInstanceType); - bool (* isRIDClassDomainID)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls); - unsigned (* getClassDomainID)(void * thisHandle, CorInfoExceptionClass** ppException, void* cls, void** ppIndirection); - void* (* getFieldAddress)(void * thisHandle, CorInfoExceptionClass** ppException, void* field, void** ppIndirection); - void* (* getStaticFieldCurrentClass)(void * thisHandle, CorInfoExceptionClass** ppException, void* field, bool* pIsSpeculative); - void* (* getVarArgsHandle)(void * thisHandle, CorInfoExceptionClass** ppException, void* pSig, void** ppIndirection); - bool (* canGetVarArgsHandle)(void * thisHandle, CorInfoExceptionClass** ppException, void* pSig); - int (* constructStringLiteral)(void * thisHandle, CorInfoExceptionClass** ppException, void* module, unsigned int metaTok, void** ppValue); - int (* emptyStringLiteral)(void * thisHandle, CorInfoExceptionClass** ppException, void** ppValue); - unsigned int (* getFieldThreadLocalStoreID)(void * thisHandle, CorInfoExceptionClass** ppException, void* field, void** ppIndirection); - void (* setOverride)(void * thisHandle, CorInfoExceptionClass** ppException, void* pOverride, void* currentMethod); - void (* addActiveDependency)(void * thisHandle, CorInfoExceptionClass** ppException, void* moduleFrom, void* moduleTo); - void* (* GetDelegateCtor)(void * thisHandle, CorInfoExceptionClass** ppException, void* methHnd, void* clsHnd, void* targetMethodHnd, void* pCtorData); - void (* MethodCompileComplete)(void * thisHandle, CorInfoExceptionClass** ppException, void* methHnd); - bool (* getTailCallHelpers)(void * thisHandle, CorInfoExceptionClass** ppException, void* callToken, void* sig, int flags, void* pResult); - bool (* convertPInvokeCalliToCall)(void * thisHandle, CorInfoExceptionClass** ppException, void* pResolvedToken, bool mustConvert); - bool (* notifyInstructionSetUsage)(void * thisHandle, CorInfoExceptionClass** ppException, int instructionSet, bool supportEnabled); - void (* allocMem)(void * thisHandle, CorInfoExceptionClass** ppException, unsigned int hotCodeSize, unsigned int coldCodeSize, unsigned int roDataSize, unsigned int xcptnsCount, int flag, void** hotCodeBlock, void** coldCodeBlock, void** roDataBlock); - void (* reserveUnwindInfo)(void * thisHandle, CorInfoExceptionClass** ppException, bool isFunclet, bool isColdCode, unsigned int unwindSize); - void (* allocUnwindInfo)(void * thisHandle, CorInfoExceptionClass** ppException, unsigned char* pHotCode, unsigned char* pColdCode, unsigned int startOffset, unsigned int endOffset, unsigned int unwindSize, unsigned char* pUnwindBlock, int funcKind); + void (* getCallInfo)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken, CORINFO_RESOLVED_TOKEN* pConstrainedResolvedToken, CORINFO_METHOD_HANDLE callerHandle, CORINFO_CALLINFO_FLAGS flags, CORINFO_CALL_INFO* pResult); + bool (* canAccessFamily)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE hCaller, CORINFO_CLASS_HANDLE hInstanceType); + bool (* isRIDClassDomainID)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls); + unsigned (* getClassDomainID)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls, void** ppIndirection); + void* (* getFieldAddress)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE field, void** ppIndirection); + CORINFO_CLASS_HANDLE (* getStaticFieldCurrentClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE field, bool* pIsSpeculative); + CORINFO_VARARGS_HANDLE (* getVarArgsHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_SIG_INFO* pSig, void** ppIndirection); + bool (* canGetVarArgsHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_SIG_INFO* pSig); + InfoAccessType (* constructStringLiteral)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_MODULE_HANDLE module, unsigned int metaTok, void** ppValue); + InfoAccessType (* emptyStringLiteral)(void * thisHandle, CorInfoExceptionClass** ppException, void** ppValue); + uint32_t (* getFieldThreadLocalStoreID)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE field, void** ppIndirection); + void (* setOverride)(void * thisHandle, CorInfoExceptionClass** ppException, ICorDynamicInfo* pOverride, CORINFO_METHOD_HANDLE currentMethod); + void (* addActiveDependency)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_MODULE_HANDLE moduleFrom, CORINFO_MODULE_HANDLE moduleTo); + CORINFO_METHOD_HANDLE (* GetDelegateCtor)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE methHnd, CORINFO_CLASS_HANDLE clsHnd, CORINFO_METHOD_HANDLE targetMethodHnd, DelegateCtorArgs* pCtorData); + void (* MethodCompileComplete)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE methHnd); + bool (* getTailCallHelpers)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* callToken, CORINFO_SIG_INFO* sig, CORINFO_GET_TAILCALL_HELPERS_FLAGS flags, CORINFO_TAILCALL_HELPERS* pResult); + bool (* convertPInvokeCalliToCall)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken, bool mustConvert); + bool (* notifyInstructionSetUsage)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_InstructionSet instructionSet, bool supportEnabled); + void (* allocMem)(void * thisHandle, CorInfoExceptionClass** ppException, uint32_t hotCodeSize, uint32_t coldCodeSize, uint32_t roDataSize, uint32_t xcptnsCount, CorJitAllocMemFlag flag, void** hotCodeBlock, void** coldCodeBlock, void** roDataBlock); + void (* reserveUnwindInfo)(void * thisHandle, CorInfoExceptionClass** ppException, bool isFunclet, bool isColdCode, uint32_t unwindSize); + void (* allocUnwindInfo)(void * thisHandle, CorInfoExceptionClass** ppException, uint8_t* pHotCode, uint8_t* pColdCode, uint32_t startOffset, uint32_t endOffset, uint32_t unwindSize, uint8_t* pUnwindBlock, CorJitFuncKind funcKind); void* (* allocGCInfo)(void * thisHandle, CorInfoExceptionClass** ppException, size_t size); void (* setEHcount)(void * thisHandle, CorInfoExceptionClass** ppException, unsigned cEH); - void (* setEHinfo)(void * thisHandle, CorInfoExceptionClass** ppException, unsigned EHnumber, void* clause); + void (* setEHinfo)(void * thisHandle, CorInfoExceptionClass** ppException, unsigned EHnumber, const CORINFO_EH_CLAUSE* clause); bool (* logMsg)(void * thisHandle, CorInfoExceptionClass** ppException, unsigned level, const char* fmt, va_list args); int (* doAssert)(void * thisHandle, CorInfoExceptionClass** ppException, const char* szFile, int iLine, const char* szExpr); - void (* reportFatalError)(void * thisHandle, CorInfoExceptionClass** ppException, int result); - int (* getPgoInstrumentationResults)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftnHnd, void** pSchema, unsigned int* pCountSchemaItems, unsigned char** pInstrumentationData); - int (* allocPgoInstrumentationBySchema)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftnHnd, void* pSchema, unsigned int countSchemaItems, unsigned char** pInstrumentationData); - void* (* getLikelyClass)(void * thisHandle, CorInfoExceptionClass** ppException, void* ftnHnd, void* baseHnd, unsigned int ilOffset, unsigned int* pLikelihood, unsigned int* pNumberOfClasses); - void (* recordCallSite)(void * thisHandle, CorInfoExceptionClass** ppException, unsigned int instrOffset, void* callSig, void* methodHandle); - void (* recordRelocation)(void * thisHandle, CorInfoExceptionClass** ppException, void* location, void* target, unsigned short fRelocType, unsigned short slotNum, int addlDelta); - unsigned short (* getRelocTypeHint)(void * thisHandle, CorInfoExceptionClass** ppException, void* target); - unsigned int (* getExpectedTargetArchitecture)(void * thisHandle, CorInfoExceptionClass** ppException); - unsigned int (* getJitFlags)(void * thisHandle, CorInfoExceptionClass** ppException, void* flags, unsigned int sizeInBytes); + void (* reportFatalError)(void * thisHandle, CorInfoExceptionClass** ppException, CorJitResult result); + JITINTERFACE_HRESULT (* getPgoInstrumentationResults)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftnHnd, ICorJitInfo::PgoInstrumentationSchema** pSchema, uint32_t* pCountSchemaItems, uint8_t** pInstrumentationData); + JITINTERFACE_HRESULT (* allocPgoInstrumentationBySchema)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftnHnd, ICorJitInfo::PgoInstrumentationSchema* pSchema, uint32_t countSchemaItems, uint8_t** pInstrumentationData); + CORINFO_CLASS_HANDLE (* getLikelyClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftnHnd, CORINFO_CLASS_HANDLE baseHnd, uint32_t ilOffset, uint32_t* pLikelihood, uint32_t* pNumberOfClasses); + void (* recordCallSite)(void * thisHandle, CorInfoExceptionClass** ppException, uint32_t instrOffset, CORINFO_SIG_INFO* callSig, CORINFO_METHOD_HANDLE methodHandle); + void (* recordRelocation)(void * thisHandle, CorInfoExceptionClass** ppException, void* location, void* target, uint16_t fRelocType, uint16_t slotNum, int32_t addlDelta); + uint16_t (* getRelocTypeHint)(void * thisHandle, CorInfoExceptionClass** ppException, void* target); + uint32_t (* getExpectedTargetArchitecture)(void * thisHandle, CorInfoExceptionClass** ppException); + uint32_t (* getJitFlags)(void * thisHandle, CorInfoExceptionClass** ppException, CORJIT_FLAGS* flags, uint32_t sizeInBytes); }; -class JitInterfaceWrapper +class JitInterfaceWrapper : public ICorJitInfo { void * _thisHandle; JitInterfaceCallbacks * _callbacks; @@ -197,18 +198,18 @@ class JitInterfaceWrapper } - virtual unsigned int getMethodAttribs( - void* ftn) + virtual uint32_t getMethodAttribs( + CORINFO_METHOD_HANDLE ftn) { CorInfoExceptionClass* pException = nullptr; - unsigned int temp = _callbacks->getMethodAttribs(_thisHandle, &pException, ftn); + uint32_t temp = _callbacks->getMethodAttribs(_thisHandle, &pException, ftn); if (pException != nullptr) throw pException; return temp; } virtual void setMethodAttribs( - void* ftn, - int attribs) + CORINFO_METHOD_HANDLE ftn, + CorInfoMethodRuntimeFlags attribs) { CorInfoExceptionClass* pException = nullptr; _callbacks->setMethodAttribs(_thisHandle, &pException, ftn, attribs); @@ -216,9 +217,9 @@ class JitInterfaceWrapper } virtual void getMethodSig( - void* ftn, - void* sig, - void* memberParent) + CORINFO_METHOD_HANDLE ftn, + CORINFO_SIG_INFO* sig, + CORINFO_CLASS_HANDLE memberParent) { CorInfoExceptionClass* pException = nullptr; _callbacks->getMethodSig(_thisHandle, &pException, ftn, sig, memberParent); @@ -226,8 +227,8 @@ class JitInterfaceWrapper } virtual bool getMethodInfo( - void* ftn, - void* info) + CORINFO_METHOD_HANDLE ftn, + CORINFO_METHOD_INFO* info) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->getMethodInfo(_thisHandle, &pException, ftn, info); @@ -235,21 +236,21 @@ class JitInterfaceWrapper return temp; } - virtual int canInline( - void* callerHnd, - void* calleeHnd, - unsigned int* pRestrictions) + virtual CorInfoInline canInline( + CORINFO_METHOD_HANDLE callerHnd, + CORINFO_METHOD_HANDLE calleeHnd, + uint32_t* pRestrictions) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->canInline(_thisHandle, &pException, callerHnd, calleeHnd, pRestrictions); + CorInfoInline temp = _callbacks->canInline(_thisHandle, &pException, callerHnd, calleeHnd, pRestrictions); if (pException != nullptr) throw pException; return temp; } virtual void reportInliningDecision( - void* inlinerHnd, - void* inlineeHnd, - int inlineResult, + CORINFO_METHOD_HANDLE inlinerHnd, + CORINFO_METHOD_HANDLE inlineeHnd, + CorInfoInline inlineResult, const char* reason) { CorInfoExceptionClass* pException = nullptr; @@ -258,9 +259,9 @@ class JitInterfaceWrapper } virtual bool canTailCall( - void* callerHnd, - void* declaredCalleeHnd, - void* exactCalleeHnd, + CORINFO_METHOD_HANDLE callerHnd, + CORINFO_METHOD_HANDLE declaredCalleeHnd, + CORINFO_METHOD_HANDLE exactCalleeHnd, bool fIsTailPrefix) { CorInfoExceptionClass* pException = nullptr; @@ -270,10 +271,10 @@ class JitInterfaceWrapper } virtual void reportTailCallDecision( - void* callerHnd, - void* calleeHnd, + CORINFO_METHOD_HANDLE callerHnd, + CORINFO_METHOD_HANDLE calleeHnd, bool fIsTailPrefix, - int tailCallResult, + CorInfoTailCall tailCallResult, const char* reason) { CorInfoExceptionClass* pException = nullptr; @@ -282,35 +283,35 @@ class JitInterfaceWrapper } virtual void getEHinfo( - void* ftn, + CORINFO_METHOD_HANDLE ftn, unsigned EHnumber, - void* clause) + CORINFO_EH_CLAUSE* clause) { CorInfoExceptionClass* pException = nullptr; _callbacks->getEHinfo(_thisHandle, &pException, ftn, EHnumber, clause); if (pException != nullptr) throw pException; } - virtual void* getMethodClass( - void* method) + virtual CORINFO_CLASS_HANDLE getMethodClass( + CORINFO_METHOD_HANDLE method) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getMethodClass(_thisHandle, &pException, method); + CORINFO_CLASS_HANDLE temp = _callbacks->getMethodClass(_thisHandle, &pException, method); if (pException != nullptr) throw pException; return temp; } - virtual void* getMethodModule( - void* method) + virtual CORINFO_MODULE_HANDLE getMethodModule( + CORINFO_METHOD_HANDLE method) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getMethodModule(_thisHandle, &pException, method); + CORINFO_MODULE_HANDLE temp = _callbacks->getMethodModule(_thisHandle, &pException, method); if (pException != nullptr) throw pException; return temp; } virtual void getMethodVTableOffset( - void* method, + CORINFO_METHOD_HANDLE method, unsigned* offsetOfIndirection, unsigned* offsetAfterIndirection, bool* isRelative) @@ -321,7 +322,7 @@ class JitInterfaceWrapper } virtual bool resolveVirtualMethod( - void* info) + CORINFO_DEVIRTUALIZATION_INFO* info) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->resolveVirtualMethod(_thisHandle, &pException, info); @@ -329,55 +330,55 @@ class JitInterfaceWrapper return temp; } - virtual void* getUnboxedEntry( - void* ftn, + virtual CORINFO_METHOD_HANDLE getUnboxedEntry( + CORINFO_METHOD_HANDLE ftn, bool* requiresInstMethodTableArg) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getUnboxedEntry(_thisHandle, &pException, ftn, requiresInstMethodTableArg); + CORINFO_METHOD_HANDLE temp = _callbacks->getUnboxedEntry(_thisHandle, &pException, ftn, requiresInstMethodTableArg); if (pException != nullptr) throw pException; return temp; } - virtual void* getDefaultComparerClass( - void* elemType) + virtual CORINFO_CLASS_HANDLE getDefaultComparerClass( + CORINFO_CLASS_HANDLE elemType) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getDefaultComparerClass(_thisHandle, &pException, elemType); + CORINFO_CLASS_HANDLE temp = _callbacks->getDefaultComparerClass(_thisHandle, &pException, elemType); if (pException != nullptr) throw pException; return temp; } - virtual void* getDefaultEqualityComparerClass( - void* elemType) + virtual CORINFO_CLASS_HANDLE getDefaultEqualityComparerClass( + CORINFO_CLASS_HANDLE elemType) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getDefaultEqualityComparerClass(_thisHandle, &pException, elemType); + CORINFO_CLASS_HANDLE temp = _callbacks->getDefaultEqualityComparerClass(_thisHandle, &pException, elemType); if (pException != nullptr) throw pException; return temp; } virtual void expandRawHandleIntrinsic( - void* pResolvedToken, - void* pResult) + CORINFO_RESOLVED_TOKEN* pResolvedToken, + CORINFO_GENERICHANDLE_RESULT* pResult) { CorInfoExceptionClass* pException = nullptr; _callbacks->expandRawHandleIntrinsic(_thisHandle, &pException, pResolvedToken, pResult); if (pException != nullptr) throw pException; } - virtual int getIntrinsicID( - void* method, + virtual CorInfoIntrinsics getIntrinsicID( + CORINFO_METHOD_HANDLE method, bool* pMustExpand) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->getIntrinsicID(_thisHandle, &pException, method, pMustExpand); + CorInfoIntrinsics temp = _callbacks->getIntrinsicID(_thisHandle, &pException, method, pMustExpand); if (pException != nullptr) throw pException; return temp; } virtual bool isIntrinsicType( - void* classHnd) + CORINFO_CLASS_HANDLE classHnd) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->isIntrinsicType(_thisHandle, &pException, classHnd); @@ -385,20 +386,20 @@ class JitInterfaceWrapper return temp; } - virtual int getUnmanagedCallConv( - void* method, - void* callSiteSig, + virtual CorInfoCallConvExtension getUnmanagedCallConv( + CORINFO_METHOD_HANDLE method, + CORINFO_SIG_INFO* callSiteSig, bool* pSuppressGCTransition) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->getUnmanagedCallConv(_thisHandle, &pException, method, callSiteSig, pSuppressGCTransition); + CorInfoCallConvExtension temp = _callbacks->getUnmanagedCallConv(_thisHandle, &pException, method, callSiteSig, pSuppressGCTransition); if (pException != nullptr) throw pException; return temp; } virtual bool pInvokeMarshalingRequired( - void* method, - void* callSiteSig) + CORINFO_METHOD_HANDLE method, + CORINFO_SIG_INFO* callSiteSig) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->pInvokeMarshalingRequired(_thisHandle, &pException, method, callSiteSig); @@ -407,8 +408,8 @@ class JitInterfaceWrapper } virtual bool satisfiesMethodConstraints( - void* parent, - void* method) + CORINFO_CLASS_HANDLE parent, + CORINFO_METHOD_HANDLE method) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->satisfiesMethodConstraints(_thisHandle, &pException, parent, method); @@ -417,10 +418,10 @@ class JitInterfaceWrapper } virtual bool isCompatibleDelegate( - void* objCls, - void* methodParentCls, - void* method, - void* delegateCls, + CORINFO_CLASS_HANDLE objCls, + CORINFO_CLASS_HANDLE methodParentCls, + CORINFO_METHOD_HANDLE method, + CORINFO_CLASS_HANDLE delegateCls, bool* pfIsOpenDelegate) { CorInfoExceptionClass* pException = nullptr; @@ -430,25 +431,25 @@ class JitInterfaceWrapper } virtual void methodMustBeLoadedBeforeCodeIsRun( - void* method) + CORINFO_METHOD_HANDLE method) { CorInfoExceptionClass* pException = nullptr; _callbacks->methodMustBeLoadedBeforeCodeIsRun(_thisHandle, &pException, method); if (pException != nullptr) throw pException; } - virtual void* mapMethodDeclToMethodImpl( - void* method) + virtual CORINFO_METHOD_HANDLE mapMethodDeclToMethodImpl( + CORINFO_METHOD_HANDLE method) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->mapMethodDeclToMethodImpl(_thisHandle, &pException, method); + CORINFO_METHOD_HANDLE temp = _callbacks->mapMethodDeclToMethodImpl(_thisHandle, &pException, method); if (pException != nullptr) throw pException; return temp; } virtual void getGSCookie( - void* pCookieVal, - void** ppCookieVal) + GSCookie* pCookieVal, + GSCookie** ppCookieVal) { CorInfoExceptionClass* pException = nullptr; _callbacks->getGSCookie(_thisHandle, &pException, pCookieVal, ppCookieVal); @@ -456,24 +457,24 @@ class JitInterfaceWrapper } virtual void setPatchpointInfo( - void* patchpointInfo) + PatchpointInfo* patchpointInfo) { CorInfoExceptionClass* pException = nullptr; _callbacks->setPatchpointInfo(_thisHandle, &pException, patchpointInfo); if (pException != nullptr) throw pException; } - virtual void* getOSRInfo( + virtual PatchpointInfo* getOSRInfo( unsigned* ilOffset) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getOSRInfo(_thisHandle, &pException, ilOffset); + PatchpointInfo* temp = _callbacks->getOSRInfo(_thisHandle, &pException, ilOffset); if (pException != nullptr) throw pException; return temp; } virtual void resolveToken( - void* pResolvedToken) + CORINFO_RESOLVED_TOKEN* pResolvedToken) { CorInfoExceptionClass* pException = nullptr; _callbacks->resolveToken(_thisHandle, &pException, pResolvedToken); @@ -481,7 +482,7 @@ class JitInterfaceWrapper } virtual bool tryResolveToken( - void* pResolvedToken) + CORINFO_RESOLVED_TOKEN* pResolvedToken) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->tryResolveToken(_thisHandle, &pException, pResolvedToken); @@ -490,10 +491,10 @@ class JitInterfaceWrapper } virtual void findSig( - void* module, + CORINFO_MODULE_HANDLE module, unsigned sigTOK, - void* context, - void* sig) + CORINFO_CONTEXT_HANDLE context, + CORINFO_SIG_INFO* sig) { CorInfoExceptionClass* pException = nullptr; _callbacks->findSig(_thisHandle, &pException, module, sigTOK, context, sig); @@ -501,27 +502,27 @@ class JitInterfaceWrapper } virtual void findCallSiteSig( - void* module, + CORINFO_MODULE_HANDLE module, unsigned methTOK, - void* context, - void* sig) + CORINFO_CONTEXT_HANDLE context, + CORINFO_SIG_INFO* sig) { CorInfoExceptionClass* pException = nullptr; _callbacks->findCallSiteSig(_thisHandle, &pException, module, methTOK, context, sig); if (pException != nullptr) throw pException; } - virtual void* getTokenTypeAsHandle( - void* pResolvedToken) + virtual CORINFO_CLASS_HANDLE getTokenTypeAsHandle( + CORINFO_RESOLVED_TOKEN* pResolvedToken) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getTokenTypeAsHandle(_thisHandle, &pException, pResolvedToken); + CORINFO_CLASS_HANDLE temp = _callbacks->getTokenTypeAsHandle(_thisHandle, &pException, pResolvedToken); if (pException != nullptr) throw pException; return temp; } virtual bool isValidToken( - void* module, + CORINFO_MODULE_HANDLE module, unsigned metaTOK) { CorInfoExceptionClass* pException = nullptr; @@ -531,7 +532,7 @@ class JitInterfaceWrapper } virtual bool isValidStringRef( - void* module, + CORINFO_MODULE_HANDLE module, unsigned metaTOK) { CorInfoExceptionClass* pException = nullptr; @@ -540,28 +541,28 @@ class JitInterfaceWrapper return temp; } - virtual const wchar_t* getStringLiteral( - void* module, + virtual const char16_t* getStringLiteral( + CORINFO_MODULE_HANDLE module, unsigned metaTOK, int* length) { CorInfoExceptionClass* pException = nullptr; - const wchar_t* temp = _callbacks->getStringLiteral(_thisHandle, &pException, module, metaTOK, length); + const char16_t* temp = _callbacks->getStringLiteral(_thisHandle, &pException, module, metaTOK, length); if (pException != nullptr) throw pException; return temp; } - virtual int asCorInfoType( - void* cls) + virtual CorInfoType asCorInfoType( + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->asCorInfoType(_thisHandle, &pException, cls); + CorInfoType temp = _callbacks->asCorInfoType(_thisHandle, &pException, cls); if (pException != nullptr) throw pException; return temp; } virtual const char* getClassName( - void* cls) + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; const char* temp = _callbacks->getClassName(_thisHandle, &pException, cls); @@ -570,7 +571,7 @@ class JitInterfaceWrapper } virtual const char* getClassNameFromMetadata( - void* cls, + CORINFO_CLASS_HANDLE cls, const char** namespaceName) { CorInfoExceptionClass* pException = nullptr; @@ -579,20 +580,20 @@ class JitInterfaceWrapper return temp; } - virtual void* getTypeInstantiationArgument( - void* cls, + virtual CORINFO_CLASS_HANDLE getTypeInstantiationArgument( + CORINFO_CLASS_HANDLE cls, unsigned index) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getTypeInstantiationArgument(_thisHandle, &pException, cls, index); + CORINFO_CLASS_HANDLE temp = _callbacks->getTypeInstantiationArgument(_thisHandle, &pException, cls, index); if (pException != nullptr) throw pException; return temp; } virtual int appendClassName( - wchar_t** ppBuf, + char16_t** ppBuf, int* pnBufLen, - void* cls, + CORINFO_CLASS_HANDLE cls, bool fNamespace, bool fFullInst, bool fAssembly) @@ -604,7 +605,7 @@ class JitInterfaceWrapper } virtual bool isValueClass( - void* cls) + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->isValueClass(_thisHandle, &pException, cls); @@ -612,27 +613,27 @@ class JitInterfaceWrapper return temp; } - virtual int canInlineTypeCheck( - void* cls, - int source) + virtual CorInfoInlineTypeCheck canInlineTypeCheck( + CORINFO_CLASS_HANDLE cls, + CorInfoInlineTypeCheckSource source) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->canInlineTypeCheck(_thisHandle, &pException, cls, source); + CorInfoInlineTypeCheck temp = _callbacks->canInlineTypeCheck(_thisHandle, &pException, cls, source); if (pException != nullptr) throw pException; return temp; } - virtual unsigned int getClassAttribs( - void* cls) + virtual uint32_t getClassAttribs( + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; - unsigned int temp = _callbacks->getClassAttribs(_thisHandle, &pException, cls); + uint32_t temp = _callbacks->getClassAttribs(_thisHandle, &pException, cls); if (pException != nullptr) throw pException; return temp; } virtual bool isStructRequiringStackAllocRetBuf( - void* cls) + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->isStructRequiringStackAllocRetBuf(_thisHandle, &pException, cls); @@ -640,26 +641,26 @@ class JitInterfaceWrapper return temp; } - virtual void* getClassModule( - void* cls) + virtual CORINFO_MODULE_HANDLE getClassModule( + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getClassModule(_thisHandle, &pException, cls); + CORINFO_MODULE_HANDLE temp = _callbacks->getClassModule(_thisHandle, &pException, cls); if (pException != nullptr) throw pException; return temp; } - virtual void* getModuleAssembly( - void* mod) + virtual CORINFO_ASSEMBLY_HANDLE getModuleAssembly( + CORINFO_MODULE_HANDLE mod) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getModuleAssembly(_thisHandle, &pException, mod); + CORINFO_ASSEMBLY_HANDLE temp = _callbacks->getModuleAssembly(_thisHandle, &pException, mod); if (pException != nullptr) throw pException; return temp; } virtual const char* getAssemblyName( - void* assem) + CORINFO_ASSEMBLY_HANDLE assem) { CorInfoExceptionClass* pException = nullptr; const char* temp = _callbacks->getAssemblyName(_thisHandle, &pException, assem); @@ -685,8 +686,8 @@ class JitInterfaceWrapper } virtual size_t getClassModuleIdForStatics( - void* cls, - void* pModule, + CORINFO_CLASS_HANDLE cls, + CORINFO_MODULE_HANDLE* pModule, void** ppIndirection) { CorInfoExceptionClass* pException = nullptr; @@ -696,7 +697,7 @@ class JitInterfaceWrapper } virtual unsigned getClassSize( - void* cls) + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; unsigned temp = _callbacks->getClassSize(_thisHandle, &pException, cls); @@ -705,7 +706,7 @@ class JitInterfaceWrapper } virtual unsigned getHeapClassSize( - void* cls) + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; unsigned temp = _callbacks->getHeapClassSize(_thisHandle, &pException, cls); @@ -714,7 +715,7 @@ class JitInterfaceWrapper } virtual bool canAllocateOnStack( - void* cls) + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->canAllocateOnStack(_thisHandle, &pException, cls); @@ -723,7 +724,7 @@ class JitInterfaceWrapper } virtual unsigned getClassAlignmentRequirement( - void* cls, + CORINFO_CLASS_HANDLE cls, bool fDoubleAlignHint) { CorInfoExceptionClass* pException = nullptr; @@ -733,8 +734,8 @@ class JitInterfaceWrapper } virtual unsigned getClassGClayout( - void* cls, - unsigned char* gcPtrs) + CORINFO_CLASS_HANDLE cls, + uint8_t* gcPtrs) { CorInfoExceptionClass* pException = nullptr; unsigned temp = _callbacks->getClassGClayout(_thisHandle, &pException, cls, gcPtrs); @@ -743,7 +744,7 @@ class JitInterfaceWrapper } virtual unsigned getClassNumInstanceFields( - void* cls) + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; unsigned temp = _callbacks->getClassNumInstanceFields(_thisHandle, &pException, cls); @@ -751,18 +752,18 @@ class JitInterfaceWrapper return temp; } - virtual void* getFieldInClass( - void* clsHnd, - int num) + virtual CORINFO_FIELD_HANDLE getFieldInClass( + CORINFO_CLASS_HANDLE clsHnd, + int32_t num) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getFieldInClass(_thisHandle, &pException, clsHnd, num); + CORINFO_FIELD_HANDLE temp = _callbacks->getFieldInClass(_thisHandle, &pException, clsHnd, num); if (pException != nullptr) throw pException; return temp; } virtual bool checkMethodModifier( - void* hMethod, + CORINFO_METHOD_HANDLE hMethod, const char* modifier, bool fOptional) { @@ -772,77 +773,77 @@ class JitInterfaceWrapper return temp; } - virtual int getNewHelper( - void* pResolvedToken, - void* callerHandle, + virtual CorInfoHelpFunc getNewHelper( + CORINFO_RESOLVED_TOKEN* pResolvedToken, + CORINFO_METHOD_HANDLE callerHandle, bool* pHasSideEffects) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->getNewHelper(_thisHandle, &pException, pResolvedToken, callerHandle, pHasSideEffects); + CorInfoHelpFunc temp = _callbacks->getNewHelper(_thisHandle, &pException, pResolvedToken, callerHandle, pHasSideEffects); if (pException != nullptr) throw pException; return temp; } - virtual int getNewArrHelper( - void* arrayCls) + virtual CorInfoHelpFunc getNewArrHelper( + CORINFO_CLASS_HANDLE arrayCls) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->getNewArrHelper(_thisHandle, &pException, arrayCls); + CorInfoHelpFunc temp = _callbacks->getNewArrHelper(_thisHandle, &pException, arrayCls); if (pException != nullptr) throw pException; return temp; } - virtual int getCastingHelper( - void* pResolvedToken, + virtual CorInfoHelpFunc getCastingHelper( + CORINFO_RESOLVED_TOKEN* pResolvedToken, bool fThrowing) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->getCastingHelper(_thisHandle, &pException, pResolvedToken, fThrowing); + CorInfoHelpFunc temp = _callbacks->getCastingHelper(_thisHandle, &pException, pResolvedToken, fThrowing); if (pException != nullptr) throw pException; return temp; } - virtual int getSharedCCtorHelper( - void* clsHnd) + virtual CorInfoHelpFunc getSharedCCtorHelper( + CORINFO_CLASS_HANDLE clsHnd) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->getSharedCCtorHelper(_thisHandle, &pException, clsHnd); + CorInfoHelpFunc temp = _callbacks->getSharedCCtorHelper(_thisHandle, &pException, clsHnd); if (pException != nullptr) throw pException; return temp; } - virtual void* getTypeForBox( - void* cls) + virtual CORINFO_CLASS_HANDLE getTypeForBox( + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getTypeForBox(_thisHandle, &pException, cls); + CORINFO_CLASS_HANDLE temp = _callbacks->getTypeForBox(_thisHandle, &pException, cls); if (pException != nullptr) throw pException; return temp; } - virtual int getBoxHelper( - void* cls) + virtual CorInfoHelpFunc getBoxHelper( + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->getBoxHelper(_thisHandle, &pException, cls); + CorInfoHelpFunc temp = _callbacks->getBoxHelper(_thisHandle, &pException, cls); if (pException != nullptr) throw pException; return temp; } - virtual int getUnBoxHelper( - void* cls) + virtual CorInfoHelpFunc getUnBoxHelper( + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->getUnBoxHelper(_thisHandle, &pException, cls); + CorInfoHelpFunc temp = _callbacks->getUnBoxHelper(_thisHandle, &pException, cls); if (pException != nullptr) throw pException; return temp; } virtual bool getReadyToRunHelper( - void* pResolvedToken, - void* pGenericLookupKind, - int id, - void* pLookup) + CORINFO_RESOLVED_TOKEN* pResolvedToken, + CORINFO_LOOKUP_KIND* pGenericLookupKind, + CorInfoHelpFunc id, + CORINFO_CONST_LOOKUP* pLookup) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->getReadyToRunHelper(_thisHandle, &pException, pResolvedToken, pGenericLookupKind, id, pLookup); @@ -851,9 +852,9 @@ class JitInterfaceWrapper } virtual void getReadyToRunDelegateCtorHelper( - void* pTargetMethod, - void* delegateType, - void* pLookup) + CORINFO_RESOLVED_TOKEN* pTargetMethod, + CORINFO_CLASS_HANDLE delegateType, + CORINFO_LOOKUP* pLookup) { CorInfoExceptionClass* pException = nullptr; _callbacks->getReadyToRunDelegateCtorHelper(_thisHandle, &pException, pTargetMethod, delegateType, pLookup); @@ -861,7 +862,7 @@ class JitInterfaceWrapper } virtual const char* getHelperName( - int helpFunc) + CorInfoHelpFunc helpFunc) { CorInfoExceptionClass* pException = nullptr; const char* temp = _callbacks->getHelperName(_thisHandle, &pException, helpFunc); @@ -869,55 +870,55 @@ class JitInterfaceWrapper return temp; } - virtual int initClass( - void* field, - void* method, - void* context) + virtual CorInfoInitClassResult initClass( + CORINFO_FIELD_HANDLE field, + CORINFO_METHOD_HANDLE method, + CORINFO_CONTEXT_HANDLE context) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->initClass(_thisHandle, &pException, field, method, context); + CorInfoInitClassResult temp = _callbacks->initClass(_thisHandle, &pException, field, method, context); if (pException != nullptr) throw pException; return temp; } virtual void classMustBeLoadedBeforeCodeIsRun( - void* cls) + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; _callbacks->classMustBeLoadedBeforeCodeIsRun(_thisHandle, &pException, cls); if (pException != nullptr) throw pException; } - virtual void* getBuiltinClass( - int classId) + virtual CORINFO_CLASS_HANDLE getBuiltinClass( + CorInfoClassId classId) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getBuiltinClass(_thisHandle, &pException, classId); + CORINFO_CLASS_HANDLE temp = _callbacks->getBuiltinClass(_thisHandle, &pException, classId); if (pException != nullptr) throw pException; return temp; } - virtual int getTypeForPrimitiveValueClass( - void* cls) + virtual CorInfoType getTypeForPrimitiveValueClass( + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->getTypeForPrimitiveValueClass(_thisHandle, &pException, cls); + CorInfoType temp = _callbacks->getTypeForPrimitiveValueClass(_thisHandle, &pException, cls); if (pException != nullptr) throw pException; return temp; } - virtual int getTypeForPrimitiveNumericClass( - void* cls) + virtual CorInfoType getTypeForPrimitiveNumericClass( + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->getTypeForPrimitiveNumericClass(_thisHandle, &pException, cls); + CorInfoType temp = _callbacks->getTypeForPrimitiveNumericClass(_thisHandle, &pException, cls); if (pException != nullptr) throw pException; return temp; } virtual bool canCast( - void* child, - void* parent) + CORINFO_CLASS_HANDLE child, + CORINFO_CLASS_HANDLE parent) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->canCast(_thisHandle, &pException, child, parent); @@ -926,8 +927,8 @@ class JitInterfaceWrapper } virtual bool areTypesEquivalent( - void* cls1, - void* cls2) + CORINFO_CLASS_HANDLE cls1, + CORINFO_CLASS_HANDLE cls2) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->areTypesEquivalent(_thisHandle, &pException, cls1, cls2); @@ -935,39 +936,39 @@ class JitInterfaceWrapper return temp; } - virtual int compareTypesForCast( - void* fromClass, - void* toClass) + virtual TypeCompareState compareTypesForCast( + CORINFO_CLASS_HANDLE fromClass, + CORINFO_CLASS_HANDLE toClass) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->compareTypesForCast(_thisHandle, &pException, fromClass, toClass); + TypeCompareState temp = _callbacks->compareTypesForCast(_thisHandle, &pException, fromClass, toClass); if (pException != nullptr) throw pException; return temp; } - virtual int compareTypesForEquality( - void* cls1, - void* cls2) + virtual TypeCompareState compareTypesForEquality( + CORINFO_CLASS_HANDLE cls1, + CORINFO_CLASS_HANDLE cls2) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->compareTypesForEquality(_thisHandle, &pException, cls1, cls2); + TypeCompareState temp = _callbacks->compareTypesForEquality(_thisHandle, &pException, cls1, cls2); if (pException != nullptr) throw pException; return temp; } - virtual void* mergeClasses( - void* cls1, - void* cls2) + virtual CORINFO_CLASS_HANDLE mergeClasses( + CORINFO_CLASS_HANDLE cls1, + CORINFO_CLASS_HANDLE cls2) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->mergeClasses(_thisHandle, &pException, cls1, cls2); + CORINFO_CLASS_HANDLE temp = _callbacks->mergeClasses(_thisHandle, &pException, cls1, cls2); if (pException != nullptr) throw pException; return temp; } virtual bool isMoreSpecificType( - void* cls1, - void* cls2) + CORINFO_CLASS_HANDLE cls1, + CORINFO_CLASS_HANDLE cls2) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->isMoreSpecificType(_thisHandle, &pException, cls1, cls2); @@ -975,27 +976,27 @@ class JitInterfaceWrapper return temp; } - virtual void* getParentType( - void* cls) + virtual CORINFO_CLASS_HANDLE getParentType( + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getParentType(_thisHandle, &pException, cls); + CORINFO_CLASS_HANDLE temp = _callbacks->getParentType(_thisHandle, &pException, cls); if (pException != nullptr) throw pException; return temp; } - virtual int getChildType( - void* clsHnd, - void* clsRet) + virtual CorInfoType getChildType( + CORINFO_CLASS_HANDLE clsHnd, + CORINFO_CLASS_HANDLE* clsRet) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->getChildType(_thisHandle, &pException, clsHnd, clsRet); + CorInfoType temp = _callbacks->getChildType(_thisHandle, &pException, clsHnd, clsRet); if (pException != nullptr) throw pException; return temp; } virtual bool satisfiesClassConstraints( - void* cls) + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->satisfiesClassConstraints(_thisHandle, &pException, cls); @@ -1004,7 +1005,7 @@ class JitInterfaceWrapper } virtual bool isSDArray( - void* cls) + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->isSDArray(_thisHandle, &pException, cls); @@ -1013,7 +1014,7 @@ class JitInterfaceWrapper } virtual unsigned getArrayRank( - void* cls) + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; unsigned temp = _callbacks->getArrayRank(_thisHandle, &pException, cls); @@ -1022,8 +1023,8 @@ class JitInterfaceWrapper } virtual void* getArrayInitializationData( - void* field, - unsigned int size) + CORINFO_FIELD_HANDLE field, + uint32_t size) { CorInfoExceptionClass* pException = nullptr; void* temp = _callbacks->getArrayInitializationData(_thisHandle, &pException, field, size); @@ -1031,19 +1032,19 @@ class JitInterfaceWrapper return temp; } - virtual int canAccessClass( - void* pResolvedToken, - void* callerHandle, - void* pAccessHelper) + virtual CorInfoIsAccessAllowedResult canAccessClass( + CORINFO_RESOLVED_TOKEN* pResolvedToken, + CORINFO_METHOD_HANDLE callerHandle, + CORINFO_HELPER_DESC* pAccessHelper) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->canAccessClass(_thisHandle, &pException, pResolvedToken, callerHandle, pAccessHelper); + CorInfoIsAccessAllowedResult temp = _callbacks->canAccessClass(_thisHandle, &pException, pResolvedToken, callerHandle, pAccessHelper); if (pException != nullptr) throw pException; return temp; } virtual const char* getFieldName( - void* ftn, + CORINFO_FIELD_HANDLE ftn, const char** moduleName) { CorInfoExceptionClass* pException = nullptr; @@ -1052,28 +1053,28 @@ class JitInterfaceWrapper return temp; } - virtual void* getFieldClass( - void* field) + virtual CORINFO_CLASS_HANDLE getFieldClass( + CORINFO_FIELD_HANDLE field) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getFieldClass(_thisHandle, &pException, field); + CORINFO_CLASS_HANDLE temp = _callbacks->getFieldClass(_thisHandle, &pException, field); if (pException != nullptr) throw pException; return temp; } - virtual int getFieldType( - void* field, - void* structType, - void* memberParent) + virtual CorInfoType getFieldType( + CORINFO_FIELD_HANDLE field, + CORINFO_CLASS_HANDLE* structType, + CORINFO_CLASS_HANDLE memberParent) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->getFieldType(_thisHandle, &pException, field, structType, memberParent); + CorInfoType temp = _callbacks->getFieldType(_thisHandle, &pException, field, structType, memberParent); if (pException != nullptr) throw pException; return temp; } virtual unsigned getFieldOffset( - void* field) + CORINFO_FIELD_HANDLE field) { CorInfoExceptionClass* pException = nullptr; unsigned temp = _callbacks->getFieldOffset(_thisHandle, &pException, field); @@ -1082,10 +1083,10 @@ class JitInterfaceWrapper } virtual void getFieldInfo( - void* pResolvedToken, - void* callerHandle, - int flags, - void* pResult) + CORINFO_RESOLVED_TOKEN* pResolvedToken, + CORINFO_METHOD_HANDLE callerHandle, + CORINFO_ACCESS_FLAGS flags, + CORINFO_FIELD_INFO* pResult) { CorInfoExceptionClass* pException = nullptr; _callbacks->getFieldInfo(_thisHandle, &pException, pResolvedToken, callerHandle, flags, pResult); @@ -1093,7 +1094,7 @@ class JitInterfaceWrapper } virtual bool isFieldStatic( - void* fldHnd) + CORINFO_FIELD_HANDLE fldHnd) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->isFieldStatic(_thisHandle, &pException, fldHnd); @@ -1102,10 +1103,10 @@ class JitInterfaceWrapper } virtual void getBoundaries( - void* ftn, + CORINFO_METHOD_HANDLE ftn, unsigned int* cILOffsets, - unsigned int** pILOffsets, - void* implictBoundaries) + uint32_t** pILOffsets, + ICorDebugInfo::BoundaryTypes* implictBoundaries) { CorInfoExceptionClass* pException = nullptr; _callbacks->getBoundaries(_thisHandle, &pException, ftn, cILOffsets, pILOffsets, implictBoundaries); @@ -1113,9 +1114,9 @@ class JitInterfaceWrapper } virtual void setBoundaries( - void* ftn, - unsigned int cMap, - void* pMap) + CORINFO_METHOD_HANDLE ftn, + uint32_t cMap, + ICorDebugInfo::OffsetMapping* pMap) { CorInfoExceptionClass* pException = nullptr; _callbacks->setBoundaries(_thisHandle, &pException, ftn, cMap, pMap); @@ -1123,9 +1124,9 @@ class JitInterfaceWrapper } virtual void getVars( - void* ftn, - unsigned int* cVars, - void* vars, + CORINFO_METHOD_HANDLE ftn, + uint32_t* cVars, + ICorDebugInfo::ILVarInfo** vars, bool* extendOthers) { CorInfoExceptionClass* pException = nullptr; @@ -1134,9 +1135,9 @@ class JitInterfaceWrapper } virtual void setVars( - void* ftn, - unsigned int cVars, - void* vars) + CORINFO_METHOD_HANDLE ftn, + uint32_t cVars, + ICorDebugInfo::NativeVarInfo* vars) { CorInfoExceptionClass* pException = nullptr; _callbacks->setVars(_thisHandle, &pException, ftn, cVars, vars); @@ -1160,72 +1161,72 @@ class JitInterfaceWrapper if (pException != nullptr) throw pException; } - virtual void* getArgNext( - void* args) + virtual CORINFO_ARG_LIST_HANDLE getArgNext( + CORINFO_ARG_LIST_HANDLE args) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getArgNext(_thisHandle, &pException, args); + CORINFO_ARG_LIST_HANDLE temp = _callbacks->getArgNext(_thisHandle, &pException, args); if (pException != nullptr) throw pException; return temp; } - virtual int getArgType( - void* sig, - void* args, - void* vcTypeRet) + virtual CorInfoTypeWithMod getArgType( + CORINFO_SIG_INFO* sig, + CORINFO_ARG_LIST_HANDLE args, + CORINFO_CLASS_HANDLE* vcTypeRet) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->getArgType(_thisHandle, &pException, sig, args, vcTypeRet); + CorInfoTypeWithMod temp = _callbacks->getArgType(_thisHandle, &pException, sig, args, vcTypeRet); if (pException != nullptr) throw pException; return temp; } - virtual void* getArgClass( - void* sig, - void* args) + virtual CORINFO_CLASS_HANDLE getArgClass( + CORINFO_SIG_INFO* sig, + CORINFO_ARG_LIST_HANDLE args) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getArgClass(_thisHandle, &pException, sig, args); + CORINFO_CLASS_HANDLE temp = _callbacks->getArgClass(_thisHandle, &pException, sig, args); if (pException != nullptr) throw pException; return temp; } - virtual int getHFAType( - void* hClass) + virtual CorInfoHFAElemType getHFAType( + CORINFO_CLASS_HANDLE hClass) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->getHFAType(_thisHandle, &pException, hClass); + CorInfoHFAElemType temp = _callbacks->getHFAType(_thisHandle, &pException, hClass); if (pException != nullptr) throw pException; return temp; } - virtual int GetErrorHRESULT( - void* pExceptionPointers) + virtual JITINTERFACE_HRESULT GetErrorHRESULT( + struct _EXCEPTION_POINTERS* pExceptionPointers) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->GetErrorHRESULT(_thisHandle, &pException, pExceptionPointers); + JITINTERFACE_HRESULT temp = _callbacks->GetErrorHRESULT(_thisHandle, &pException, pExceptionPointers); if (pException != nullptr) throw pException; return temp; } - virtual unsigned int GetErrorMessage( - wchar_t* buffer, - unsigned int bufferLength) + virtual uint32_t GetErrorMessage( + char16_t* buffer, + uint32_t bufferLength) { CorInfoExceptionClass* pException = nullptr; - unsigned int temp = _callbacks->GetErrorMessage(_thisHandle, &pException, buffer, bufferLength); + uint32_t temp = _callbacks->GetErrorMessage(_thisHandle, &pException, buffer, bufferLength); if (pException != nullptr) throw pException; return temp; } virtual int FilterException( - void* pExceptionPointers); + struct _EXCEPTION_POINTERS* pExceptionPointers); virtual void HandleException( - void* pExceptionPointers); + struct _EXCEPTION_POINTERS* pExceptionPointers); virtual void ThrowExceptionForJitResult( - int result) + JITINTERFACE_HRESULT result) { CorInfoExceptionClass* pException = nullptr; _callbacks->ThrowExceptionForJitResult(_thisHandle, &pException, result); @@ -1233,7 +1234,7 @@ class JitInterfaceWrapper } virtual void ThrowExceptionForHelper( - const void* throwHelper) + const CORINFO_HELPER_DESC* throwHelper) { CorInfoExceptionClass* pException = nullptr; _callbacks->ThrowExceptionForHelper(_thisHandle, &pException, throwHelper); @@ -1241,36 +1242,36 @@ class JitInterfaceWrapper } virtual bool runWithErrorTrap( - void* function, + ICorJitInfo::errorTrapFunction function, void* parameter); virtual void getEEInfo( - void* pEEInfoOut) + CORINFO_EE_INFO* pEEInfoOut) { CorInfoExceptionClass* pException = nullptr; _callbacks->getEEInfo(_thisHandle, &pException, pEEInfoOut); if (pException != nullptr) throw pException; } - virtual const wchar_t* getJitTimeLogFilename() + virtual const char16_t* getJitTimeLogFilename() { CorInfoExceptionClass* pException = nullptr; - const wchar_t* temp = _callbacks->getJitTimeLogFilename(_thisHandle, &pException); + const char16_t* temp = _callbacks->getJitTimeLogFilename(_thisHandle, &pException); if (pException != nullptr) throw pException; return temp; } - virtual unsigned int getMethodDefFromMethod( - void* hMethod) + virtual mdMethodDef getMethodDefFromMethod( + CORINFO_METHOD_HANDLE hMethod) { CorInfoExceptionClass* pException = nullptr; - unsigned int temp = _callbacks->getMethodDefFromMethod(_thisHandle, &pException, hMethod); + mdMethodDef temp = _callbacks->getMethodDefFromMethod(_thisHandle, &pException, hMethod); if (pException != nullptr) throw pException; return temp; } virtual const char* getMethodName( - void* ftn, + CORINFO_METHOD_HANDLE ftn, const char** moduleName) { CorInfoExceptionClass* pException = nullptr; @@ -1280,7 +1281,7 @@ class JitInterfaceWrapper } virtual const char* getMethodNameFromMetadata( - void* ftn, + CORINFO_METHOD_HANDLE ftn, const char** className, const char** namespaceName, const char** enclosingClassName) @@ -1292,7 +1293,7 @@ class JitInterfaceWrapper } virtual unsigned getMethodHash( - void* ftn) + CORINFO_METHOD_HANDLE ftn) { CorInfoExceptionClass* pException = nullptr; unsigned temp = _callbacks->getMethodHash(_thisHandle, &pException, ftn); @@ -1301,7 +1302,7 @@ class JitInterfaceWrapper } virtual size_t findNameOfToken( - void* moduleHandle, + CORINFO_MODULE_HANDLE moduleHandle, unsigned int token, char* szFQName, size_t FQNameCapacity) @@ -1313,8 +1314,8 @@ class JitInterfaceWrapper } virtual bool getSystemVAmd64PassStructInRegisterDescriptor( - void* structHnd, - void* structPassInRegDescPtr) + CORINFO_CLASS_HANDLE structHnd, + SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR* structPassInRegDescPtr) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->getSystemVAmd64PassStructInRegisterDescriptor(_thisHandle, &pException, structHnd, structPassInRegDescPtr); @@ -1322,11 +1323,11 @@ class JitInterfaceWrapper return temp; } - virtual unsigned int getThreadTLSIndex( + virtual uint32_t getThreadTLSIndex( void** ppIndirection) { CorInfoExceptionClass* pException = nullptr; - unsigned int temp = _callbacks->getThreadTLSIndex(_thisHandle, &pException, ppIndirection); + uint32_t temp = _callbacks->getThreadTLSIndex(_thisHandle, &pException, ppIndirection); if (pException != nullptr) throw pException; return temp; } @@ -1340,17 +1341,17 @@ class JitInterfaceWrapper return temp; } - virtual long* getAddrOfCaptureThreadGlobal( + virtual int32_t* getAddrOfCaptureThreadGlobal( void** ppIndirection) { CorInfoExceptionClass* pException = nullptr; - long* temp = _callbacks->getAddrOfCaptureThreadGlobal(_thisHandle, &pException, ppIndirection); + int32_t* temp = _callbacks->getAddrOfCaptureThreadGlobal(_thisHandle, &pException, ppIndirection); if (pException != nullptr) throw pException; return temp; } virtual void* getHelperFtn( - int ftnNum, + CorInfoHelpFunc ftnNum, void** ppIndirection) { CorInfoExceptionClass* pException = nullptr; @@ -1360,9 +1361,9 @@ class JitInterfaceWrapper } virtual void getFunctionEntryPoint( - void* ftn, - void* pResult, - int accessFlags) + CORINFO_METHOD_HANDLE ftn, + CORINFO_CONST_LOOKUP* pResult, + CORINFO_ACCESS_FLAGS accessFlags) { CorInfoExceptionClass* pException = nullptr; _callbacks->getFunctionEntryPoint(_thisHandle, &pException, ftn, pResult, accessFlags); @@ -1370,8 +1371,8 @@ class JitInterfaceWrapper } virtual void getFunctionFixedEntryPoint( - void* ftn, - void* pResult) + CORINFO_METHOD_HANDLE ftn, + CORINFO_CONST_LOOKUP* pResult) { CorInfoExceptionClass* pException = nullptr; _callbacks->getFunctionFixedEntryPoint(_thisHandle, &pException, ftn, pResult); @@ -1379,7 +1380,7 @@ class JitInterfaceWrapper } virtual void* getMethodSync( - void* ftn, + CORINFO_METHOD_HANDLE ftn, void** ppIndirection) { CorInfoExceptionClass* pException = nullptr; @@ -1388,59 +1389,59 @@ class JitInterfaceWrapper return temp; } - virtual int getLazyStringLiteralHelper( - void* handle) + virtual CorInfoHelpFunc getLazyStringLiteralHelper( + CORINFO_MODULE_HANDLE handle) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->getLazyStringLiteralHelper(_thisHandle, &pException, handle); + CorInfoHelpFunc temp = _callbacks->getLazyStringLiteralHelper(_thisHandle, &pException, handle); if (pException != nullptr) throw pException; return temp; } - virtual void* embedModuleHandle( - void* handle, + virtual CORINFO_MODULE_HANDLE embedModuleHandle( + CORINFO_MODULE_HANDLE handle, void** ppIndirection) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->embedModuleHandle(_thisHandle, &pException, handle, ppIndirection); + CORINFO_MODULE_HANDLE temp = _callbacks->embedModuleHandle(_thisHandle, &pException, handle, ppIndirection); if (pException != nullptr) throw pException; return temp; } - virtual void* embedClassHandle( - void* handle, + virtual CORINFO_CLASS_HANDLE embedClassHandle( + CORINFO_CLASS_HANDLE handle, void** ppIndirection) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->embedClassHandle(_thisHandle, &pException, handle, ppIndirection); + CORINFO_CLASS_HANDLE temp = _callbacks->embedClassHandle(_thisHandle, &pException, handle, ppIndirection); if (pException != nullptr) throw pException; return temp; } - virtual void* embedMethodHandle( - void* handle, + virtual CORINFO_METHOD_HANDLE embedMethodHandle( + CORINFO_METHOD_HANDLE handle, void** ppIndirection) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->embedMethodHandle(_thisHandle, &pException, handle, ppIndirection); + CORINFO_METHOD_HANDLE temp = _callbacks->embedMethodHandle(_thisHandle, &pException, handle, ppIndirection); if (pException != nullptr) throw pException; return temp; } - virtual void* embedFieldHandle( - void* handle, + virtual CORINFO_FIELD_HANDLE embedFieldHandle( + CORINFO_FIELD_HANDLE handle, void** ppIndirection) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->embedFieldHandle(_thisHandle, &pException, handle, ppIndirection); + CORINFO_FIELD_HANDLE temp = _callbacks->embedFieldHandle(_thisHandle, &pException, handle, ppIndirection); if (pException != nullptr) throw pException; return temp; } virtual void embedGenericHandle( - void* pResolvedToken, + CORINFO_RESOLVED_TOKEN* pResolvedToken, bool fEmbedParent, - void* pResult) + CORINFO_GENERICHANDLE_RESULT* pResult) { CorInfoExceptionClass* pException = nullptr; _callbacks->embedGenericHandle(_thisHandle, &pException, pResolvedToken, fEmbedParent, pResult); @@ -1448,8 +1449,8 @@ class JitInterfaceWrapper } virtual void getLocationOfThisType( - void* context, - void* pLookupKind) + CORINFO_METHOD_HANDLE context, + CORINFO_LOOKUP_KIND* pLookupKind) { CorInfoExceptionClass* pException = nullptr; _callbacks->getLocationOfThisType(_thisHandle, &pException, context, pLookupKind); @@ -1457,8 +1458,8 @@ class JitInterfaceWrapper } virtual void getAddressOfPInvokeTarget( - void* method, - void* pLookup) + CORINFO_METHOD_HANDLE method, + CORINFO_CONST_LOOKUP* pLookup) { CorInfoExceptionClass* pException = nullptr; _callbacks->getAddressOfPInvokeTarget(_thisHandle, &pException, method, pLookup); @@ -1466,7 +1467,7 @@ class JitInterfaceWrapper } virtual void* GetCookieForPInvokeCalliSig( - void* szMetaSig, + CORINFO_SIG_INFO* szMetaSig, void** ppIndirection) { CorInfoExceptionClass* pException = nullptr; @@ -1476,7 +1477,7 @@ class JitInterfaceWrapper } virtual bool canGetCookieForPInvokeCalliSig( - void* szMetaSig) + CORINFO_SIG_INFO* szMetaSig) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->canGetCookieForPInvokeCalliSig(_thisHandle, &pException, szMetaSig); @@ -1484,12 +1485,12 @@ class JitInterfaceWrapper return temp; } - virtual void* getJustMyCodeHandle( - void* method, - void** ppIndirection) + virtual CORINFO_JUST_MY_CODE_HANDLE getJustMyCodeHandle( + CORINFO_METHOD_HANDLE method, + CORINFO_JUST_MY_CODE_HANDLE** ppIndirection) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getJustMyCodeHandle(_thisHandle, &pException, method, ppIndirection); + CORINFO_JUST_MY_CODE_HANDLE temp = _callbacks->getJustMyCodeHandle(_thisHandle, &pException, method, ppIndirection); if (pException != nullptr) throw pException; return temp; } @@ -1505,11 +1506,11 @@ class JitInterfaceWrapper } virtual void getCallInfo( - void* pResolvedToken, - void* pConstrainedResolvedToken, - void* callerHandle, - int flags, - void* pResult) + CORINFO_RESOLVED_TOKEN* pResolvedToken, + CORINFO_RESOLVED_TOKEN* pConstrainedResolvedToken, + CORINFO_METHOD_HANDLE callerHandle, + CORINFO_CALLINFO_FLAGS flags, + CORINFO_CALL_INFO* pResult) { CorInfoExceptionClass* pException = nullptr; _callbacks->getCallInfo(_thisHandle, &pException, pResolvedToken, pConstrainedResolvedToken, callerHandle, flags, pResult); @@ -1517,8 +1518,8 @@ class JitInterfaceWrapper } virtual bool canAccessFamily( - void* hCaller, - void* hInstanceType) + CORINFO_METHOD_HANDLE hCaller, + CORINFO_CLASS_HANDLE hInstanceType) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->canAccessFamily(_thisHandle, &pException, hCaller, hInstanceType); @@ -1527,7 +1528,7 @@ class JitInterfaceWrapper } virtual bool isRIDClassDomainID( - void* cls) + CORINFO_CLASS_HANDLE cls) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->isRIDClassDomainID(_thisHandle, &pException, cls); @@ -1536,7 +1537,7 @@ class JitInterfaceWrapper } virtual unsigned getClassDomainID( - void* cls, + CORINFO_CLASS_HANDLE cls, void** ppIndirection) { CorInfoExceptionClass* pException = nullptr; @@ -1546,7 +1547,7 @@ class JitInterfaceWrapper } virtual void* getFieldAddress( - void* field, + CORINFO_FIELD_HANDLE field, void** ppIndirection) { CorInfoExceptionClass* pException = nullptr; @@ -1555,28 +1556,28 @@ class JitInterfaceWrapper return temp; } - virtual void* getStaticFieldCurrentClass( - void* field, + virtual CORINFO_CLASS_HANDLE getStaticFieldCurrentClass( + CORINFO_FIELD_HANDLE field, bool* pIsSpeculative) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getStaticFieldCurrentClass(_thisHandle, &pException, field, pIsSpeculative); + CORINFO_CLASS_HANDLE temp = _callbacks->getStaticFieldCurrentClass(_thisHandle, &pException, field, pIsSpeculative); if (pException != nullptr) throw pException; return temp; } - virtual void* getVarArgsHandle( - void* pSig, + virtual CORINFO_VARARGS_HANDLE getVarArgsHandle( + CORINFO_SIG_INFO* pSig, void** ppIndirection) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getVarArgsHandle(_thisHandle, &pException, pSig, ppIndirection); + CORINFO_VARARGS_HANDLE temp = _callbacks->getVarArgsHandle(_thisHandle, &pException, pSig, ppIndirection); if (pException != nullptr) throw pException; return temp; } virtual bool canGetVarArgsHandle( - void* pSig) + CORINFO_SIG_INFO* pSig) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->canGetVarArgsHandle(_thisHandle, &pException, pSig); @@ -1584,39 +1585,39 @@ class JitInterfaceWrapper return temp; } - virtual int constructStringLiteral( - void* module, + virtual InfoAccessType constructStringLiteral( + CORINFO_MODULE_HANDLE module, unsigned int metaTok, void** ppValue) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->constructStringLiteral(_thisHandle, &pException, module, metaTok, ppValue); + InfoAccessType temp = _callbacks->constructStringLiteral(_thisHandle, &pException, module, metaTok, ppValue); if (pException != nullptr) throw pException; return temp; } - virtual int emptyStringLiteral( + virtual InfoAccessType emptyStringLiteral( void** ppValue) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->emptyStringLiteral(_thisHandle, &pException, ppValue); + InfoAccessType temp = _callbacks->emptyStringLiteral(_thisHandle, &pException, ppValue); if (pException != nullptr) throw pException; return temp; } - virtual unsigned int getFieldThreadLocalStoreID( - void* field, + virtual uint32_t getFieldThreadLocalStoreID( + CORINFO_FIELD_HANDLE field, void** ppIndirection) { CorInfoExceptionClass* pException = nullptr; - unsigned int temp = _callbacks->getFieldThreadLocalStoreID(_thisHandle, &pException, field, ppIndirection); + uint32_t temp = _callbacks->getFieldThreadLocalStoreID(_thisHandle, &pException, field, ppIndirection); if (pException != nullptr) throw pException; return temp; } virtual void setOverride( - void* pOverride, - void* currentMethod) + ICorDynamicInfo* pOverride, + CORINFO_METHOD_HANDLE currentMethod) { CorInfoExceptionClass* pException = nullptr; _callbacks->setOverride(_thisHandle, &pException, pOverride, currentMethod); @@ -1624,28 +1625,28 @@ class JitInterfaceWrapper } virtual void addActiveDependency( - void* moduleFrom, - void* moduleTo) + CORINFO_MODULE_HANDLE moduleFrom, + CORINFO_MODULE_HANDLE moduleTo) { CorInfoExceptionClass* pException = nullptr; _callbacks->addActiveDependency(_thisHandle, &pException, moduleFrom, moduleTo); if (pException != nullptr) throw pException; } - virtual void* GetDelegateCtor( - void* methHnd, - void* clsHnd, - void* targetMethodHnd, - void* pCtorData) + virtual CORINFO_METHOD_HANDLE GetDelegateCtor( + CORINFO_METHOD_HANDLE methHnd, + CORINFO_CLASS_HANDLE clsHnd, + CORINFO_METHOD_HANDLE targetMethodHnd, + DelegateCtorArgs* pCtorData) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->GetDelegateCtor(_thisHandle, &pException, methHnd, clsHnd, targetMethodHnd, pCtorData); + CORINFO_METHOD_HANDLE temp = _callbacks->GetDelegateCtor(_thisHandle, &pException, methHnd, clsHnd, targetMethodHnd, pCtorData); if (pException != nullptr) throw pException; return temp; } virtual void MethodCompileComplete( - void* methHnd) + CORINFO_METHOD_HANDLE methHnd) { CorInfoExceptionClass* pException = nullptr; _callbacks->MethodCompileComplete(_thisHandle, &pException, methHnd); @@ -1653,10 +1654,10 @@ class JitInterfaceWrapper } virtual bool getTailCallHelpers( - void* callToken, - void* sig, - int flags, - void* pResult) + CORINFO_RESOLVED_TOKEN* callToken, + CORINFO_SIG_INFO* sig, + CORINFO_GET_TAILCALL_HELPERS_FLAGS flags, + CORINFO_TAILCALL_HELPERS* pResult) { CorInfoExceptionClass* pException = nullptr; bool temp = _callbacks->getTailCallHelpers(_thisHandle, &pException, callToken, sig, flags, pResult); @@ -1665,7 +1666,7 @@ class JitInterfaceWrapper } virtual bool convertPInvokeCalliToCall( - void* pResolvedToken, + CORINFO_RESOLVED_TOKEN* pResolvedToken, bool mustConvert) { CorInfoExceptionClass* pException = nullptr; @@ -1675,7 +1676,7 @@ class JitInterfaceWrapper } virtual bool notifyInstructionSetUsage( - int instructionSet, + CORINFO_InstructionSet instructionSet, bool supportEnabled) { CorInfoExceptionClass* pException = nullptr; @@ -1685,11 +1686,11 @@ class JitInterfaceWrapper } virtual void allocMem( - unsigned int hotCodeSize, - unsigned int coldCodeSize, - unsigned int roDataSize, - unsigned int xcptnsCount, - int flag, + uint32_t hotCodeSize, + uint32_t coldCodeSize, + uint32_t roDataSize, + uint32_t xcptnsCount, + CorJitAllocMemFlag flag, void** hotCodeBlock, void** coldCodeBlock, void** roDataBlock) @@ -1702,7 +1703,7 @@ class JitInterfaceWrapper virtual void reserveUnwindInfo( bool isFunclet, bool isColdCode, - unsigned int unwindSize) + uint32_t unwindSize) { CorInfoExceptionClass* pException = nullptr; _callbacks->reserveUnwindInfo(_thisHandle, &pException, isFunclet, isColdCode, unwindSize); @@ -1710,13 +1711,13 @@ class JitInterfaceWrapper } virtual void allocUnwindInfo( - unsigned char* pHotCode, - unsigned char* pColdCode, - unsigned int startOffset, - unsigned int endOffset, - unsigned int unwindSize, - unsigned char* pUnwindBlock, - int funcKind) + uint8_t* pHotCode, + uint8_t* pColdCode, + uint32_t startOffset, + uint32_t endOffset, + uint32_t unwindSize, + uint8_t* pUnwindBlock, + CorJitFuncKind funcKind) { CorInfoExceptionClass* pException = nullptr; _callbacks->allocUnwindInfo(_thisHandle, &pException, pHotCode, pColdCode, startOffset, endOffset, unwindSize, pUnwindBlock, funcKind); @@ -1742,7 +1743,7 @@ class JitInterfaceWrapper virtual void setEHinfo( unsigned EHnumber, - void* clause) + const CORINFO_EH_CLAUSE* clause) { CorInfoExceptionClass* pException = nullptr; _callbacks->setEHinfo(_thisHandle, &pException, EHnumber, clause); @@ -1772,54 +1773,54 @@ class JitInterfaceWrapper } virtual void reportFatalError( - int result) + CorJitResult result) { CorInfoExceptionClass* pException = nullptr; _callbacks->reportFatalError(_thisHandle, &pException, result); if (pException != nullptr) throw pException; } - virtual int getPgoInstrumentationResults( - void* ftnHnd, - void** pSchema, - unsigned int* pCountSchemaItems, - unsigned char** pInstrumentationData) + virtual JITINTERFACE_HRESULT getPgoInstrumentationResults( + CORINFO_METHOD_HANDLE ftnHnd, + ICorJitInfo::PgoInstrumentationSchema** pSchema, + uint32_t* pCountSchemaItems, + uint8_t** pInstrumentationData) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->getPgoInstrumentationResults(_thisHandle, &pException, ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData); + JITINTERFACE_HRESULT temp = _callbacks->getPgoInstrumentationResults(_thisHandle, &pException, ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData); if (pException != nullptr) throw pException; return temp; } - virtual int allocPgoInstrumentationBySchema( - void* ftnHnd, - void* pSchema, - unsigned int countSchemaItems, - unsigned char** pInstrumentationData) + virtual JITINTERFACE_HRESULT allocPgoInstrumentationBySchema( + CORINFO_METHOD_HANDLE ftnHnd, + ICorJitInfo::PgoInstrumentationSchema* pSchema, + uint32_t countSchemaItems, + uint8_t** pInstrumentationData) { CorInfoExceptionClass* pException = nullptr; - int temp = _callbacks->allocPgoInstrumentationBySchema(_thisHandle, &pException, ftnHnd, pSchema, countSchemaItems, pInstrumentationData); + JITINTERFACE_HRESULT temp = _callbacks->allocPgoInstrumentationBySchema(_thisHandle, &pException, ftnHnd, pSchema, countSchemaItems, pInstrumentationData); if (pException != nullptr) throw pException; return temp; } - virtual void* getLikelyClass( - void* ftnHnd, - void* baseHnd, - unsigned int ilOffset, - unsigned int* pLikelihood, - unsigned int* pNumberOfClasses) + virtual CORINFO_CLASS_HANDLE getLikelyClass( + CORINFO_METHOD_HANDLE ftnHnd, + CORINFO_CLASS_HANDLE baseHnd, + uint32_t ilOffset, + uint32_t* pLikelihood, + uint32_t* pNumberOfClasses) { CorInfoExceptionClass* pException = nullptr; - void* temp = _callbacks->getLikelyClass(_thisHandle, &pException, ftnHnd, baseHnd, ilOffset, pLikelihood, pNumberOfClasses); + CORINFO_CLASS_HANDLE temp = _callbacks->getLikelyClass(_thisHandle, &pException, ftnHnd, baseHnd, ilOffset, pLikelihood, pNumberOfClasses); if (pException != nullptr) throw pException; return temp; } virtual void recordCallSite( - unsigned int instrOffset, - void* callSig, - void* methodHandle) + uint32_t instrOffset, + CORINFO_SIG_INFO* callSig, + CORINFO_METHOD_HANDLE methodHandle) { CorInfoExceptionClass* pException = nullptr; _callbacks->recordCallSite(_thisHandle, &pException, instrOffset, callSig, methodHandle); @@ -1829,38 +1830,38 @@ class JitInterfaceWrapper virtual void recordRelocation( void* location, void* target, - unsigned short fRelocType, - unsigned short slotNum, - int addlDelta) + uint16_t fRelocType, + uint16_t slotNum, + int32_t addlDelta) { CorInfoExceptionClass* pException = nullptr; _callbacks->recordRelocation(_thisHandle, &pException, location, target, fRelocType, slotNum, addlDelta); if (pException != nullptr) throw pException; } - virtual unsigned short getRelocTypeHint( + virtual uint16_t getRelocTypeHint( void* target) { CorInfoExceptionClass* pException = nullptr; - unsigned short temp = _callbacks->getRelocTypeHint(_thisHandle, &pException, target); + uint16_t temp = _callbacks->getRelocTypeHint(_thisHandle, &pException, target); if (pException != nullptr) throw pException; return temp; } - virtual unsigned int getExpectedTargetArchitecture() + virtual uint32_t getExpectedTargetArchitecture() { CorInfoExceptionClass* pException = nullptr; - unsigned int temp = _callbacks->getExpectedTargetArchitecture(_thisHandle, &pException); + uint32_t temp = _callbacks->getExpectedTargetArchitecture(_thisHandle, &pException); if (pException != nullptr) throw pException; return temp; } - virtual unsigned int getJitFlags( - void* flags, - unsigned int sizeInBytes) + virtual uint32_t getJitFlags( + CORJIT_FLAGS* flags, + uint32_t sizeInBytes) { CorInfoExceptionClass* pException = nullptr; - unsigned int temp = _callbacks->getJitFlags(_thisHandle, &pException, flags, sizeInBytes); + uint32_t temp = _callbacks->getJitFlags(_thisHandle, &pException, flags, sizeInBytes); if (pException != nullptr) throw pException; return temp; } diff --git a/src/coreclr/tools/aot/jitinterface/jitwrapper.cpp b/src/coreclr/tools/aot/jitinterface/jitwrapper.cpp index b1b78ef8ec34d..b76dabf97c867 100644 --- a/src/coreclr/tools/aot/jitinterface/jitwrapper.cpp +++ b/src/coreclr/tools/aot/jitinterface/jitwrapper.cpp @@ -8,59 +8,15 @@ #include "dllexport.h" #include "jitinterface.h" -typedef struct _GUID { - unsigned int Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; -} GUID; - -class CORJIT_FLAGS -{ -public: - CORJIT_FLAGS(const CORJIT_FLAGS& other) - { - corJitFlags = other.corJitFlags; - } -private: - uint64_t corJitFlags; -}; - -#include "../../../inc/jiteeversionguid.h" - -class Jit -{ -public: - virtual int STDMETHODCALLTYPE compileMethod( - void* compHnd, - void* methodInfo, - unsigned flags, - void* entryAddress, - void* nativeSizeOfCode) = 0; - - virtual void ProcessShutdownWork(void* info) = 0; - - // The EE asks the JIT for a "version identifier". This represents the version of the JIT/EE interface. - // If the JIT doesn't implement the same JIT/EE interface expected by the EE (because the JIT doesn't - // return the version identifier that the EE expects), then the EE fails to load the JIT. - // - virtual void getVersionIdentifier(GUID* versionIdentifier) = 0; - - // When the EE loads the System.Numerics.Vectors assembly, it asks the JIT what length (in bytes) of - // SIMD vector it supports as an intrinsic type. Zero means that the JIT does not support SIMD - // intrinsics, so the EE should use the default size (i.e. the size of the IL implementation). - virtual unsigned getMaxIntrinsicSIMDVectorLength(CORJIT_FLAGS cpuCompileFlags) = 0; -}; - DLL_EXPORT int JitCompileMethod( CorInfoExceptionClass **ppException, - Jit * pJit, + ICorJitCompiler * pJit, void * thisHandle, void ** callbacks, - void* methodInfo, + CORINFO_METHOD_INFO* methodInfo, unsigned flags, - void* entryAddress, - void* nativeSizeOfCode) + uint8_t** entryAddress, + uint32_t* nativeSizeOfCode) { *ppException = nullptr; @@ -88,7 +44,7 @@ DLL_EXPORT int JitCompileMethod( } DLL_EXPORT unsigned GetMaxIntrinsicSIMDVectorLength( - Jit * pJit, + ICorJitCompiler * pJit, CORJIT_FLAGS * flags) { return pJit->getMaxIntrinsicSIMDVectorLength(*flags); diff --git a/src/coreclr/utilcode/sigparser.cpp b/src/coreclr/utilcode/sigparser.cpp index 890d508c7aa5b..99fbe0a083ace 100644 --- a/src/coreclr/utilcode/sigparser.cpp +++ b/src/coreclr/utilcode/sigparser.cpp @@ -74,18 +74,18 @@ HRESULT SigParser::SkipExactlyOne() case ELEMENT_TYPE_ARRAY: { IfFailRet(SkipExactlyOne()); // Skip element type - ULONG rank; + uint32_t rank; IfFailRet(GetData(&rank)); // Get rank if (rank) { - ULONG nsizes; + uint32_t nsizes; IfFailRet(GetData(&nsizes)); // Get # of sizes while (nsizes--) { IfFailRet(GetData(NULL)); // Skip size } - ULONG nlbounds; + uint32_t nlbounds; IfFailRet(GetData(&nlbounds)); // Get # of lower bounds while (nlbounds--) { @@ -106,7 +106,7 @@ HRESULT SigParser::SkipExactlyOne() case ELEMENT_TYPE_GENERICINST: IfFailRet(SkipExactlyOne()); // Skip generic type - ULONG argCnt; + uint32_t argCnt; IfFailRet(GetData(&argCnt)); // Get number of parameters while (argCnt--) { @@ -126,7 +126,7 @@ HRESULT SigParser::SkipExactlyOne() // HRESULT SigParser::SkipMethodHeaderSignature( - ULONG * pcArgs) + uint32_t * pcArgs) { CONTRACTL { @@ -141,7 +141,7 @@ SigParser::SkipMethodHeaderSignature( HRESULT hr = S_OK; // Skip calling convention - ULONG uCallConv; + uint32_t uCallConv; IfFailRet(GetCallingConvInfo(&uCallConv)); if ((uCallConv == IMAGE_CEE_CS_CALLCONV_FIELD) || @@ -180,7 +180,7 @@ HRESULT SigParser::SkipSignature() HRESULT hr = S_OK; - ULONG cArgs; + uint32_t cArgs; IfFailRet(SkipMethodHeaderSignature(&cArgs)); diff --git a/src/coreclr/utilcode/util.cpp b/src/coreclr/utilcode/util.cpp index cabe535e03c3d..018ea351c5308 100644 --- a/src/coreclr/utilcode/util.cpp +++ b/src/coreclr/utilcode/util.cpp @@ -1850,12 +1850,12 @@ HRESULT validateOneArg( BYTE elementType; // Current element type being processed. mdToken token; // Embedded token. - ULONG ulArgCnt; // Argument count for function pointer. - ULONG ulIndex; // Index for type parameters - ULONG ulRank; // Rank of the array. - ULONG ulSizes; // Count of sized dimensions of the array. - ULONG ulLbnds; // Count of lower bounds of the array. - ULONG ulCallConv; + uint32_t ulArgCnt; // Argument count for function pointer. + uint32_t ulIndex; // Index for type parameters + uint32_t ulRank; // Rank of the array. + uint32_t ulSizes; // Count of sized dimensions of the array. + uint32_t ulLbnds; // Count of lower bounds of the array. + uint32_t ulCallConv; HRESULT hr = S_OK; // Value returned. BOOL bRepeat = TRUE; // MODOPT and MODREQ belong to the arg after them @@ -2077,9 +2077,9 @@ HRESULT validateTokenSig( } CONTRACTL_END; - ULONG ulCallConv; // Calling convention. - ULONG ulArgCount = 1; // Count of arguments (1 because of the return type) - ULONG ulTyArgCount = 0; // Count of type arguments + uint32_t ulCallConv; // Calling convention. + uint32_t ulArgCount = 1; // Count of arguments (1 because of the return type) + uint32_t ulTyArgCount = 0; // Count of type arguments ULONG ulArgIx = 0; // Starting index of argument (standalone sig: 1) ULONG i; // Looping index. HRESULT hr = S_OK; // Value returned. diff --git a/src/coreclr/vm/assembly.cpp b/src/coreclr/vm/assembly.cpp index d653e702bdadd..3c6833f7a2a6e 100644 --- a/src/coreclr/vm/assembly.cpp +++ b/src/coreclr/vm/assembly.cpp @@ -1426,14 +1426,14 @@ void ValidateMainMethod(MethodDesc * pFD, CorEntryPointType *pType) // Check for types SigPointer sig(pFD->GetSigPointer()); - ULONG nCallConv; + uint32_t nCallConv; if (FAILED(sig.GetData(&nCallConv))) ThrowMainMethodException(pFD, BFA_BAD_SIGNATURE); if (nCallConv != IMAGE_CEE_CS_CALLCONV_DEFAULT) ThrowMainMethodException(pFD, IDS_EE_LOAD_BAD_MAIN_SIG); - ULONG nParamCount; + uint32_t nParamCount; if (FAILED(sig.GetData(&nParamCount))) ThrowMainMethodException(pFD, BFA_BAD_SIGNATURE); diff --git a/src/coreclr/vm/ceeload.cpp b/src/coreclr/vm/ceeload.cpp index 2de5b75ca000f..c17f64e9ff456 100644 --- a/src/coreclr/vm/ceeload.cpp +++ b/src/coreclr/vm/ceeload.cpp @@ -7012,7 +7012,7 @@ MethodDesc* Module::LoadIBCMethodHelper(DataImage *image, CORBBTPROF_BLOB_PARAM_ _ASSERTE(pOwnerMT != NULL); // decode flags - DWORD methodFlags; + uint32_t methodFlags; IfFailThrow(p.GetData(&methodFlags)); BOOL isInstantiatingStub = ((methodFlags & ENCODE_METHOD_SIG_InstantiatingStub) == ENCODE_METHOD_SIG_InstantiatingStub); BOOL isUnboxingStub = ((methodFlags & ENCODE_METHOD_SIG_UnboxingStub) == ENCODE_METHOD_SIG_UnboxingStub); @@ -7022,7 +7022,7 @@ MethodDesc* Module::LoadIBCMethodHelper(DataImage *image, CORBBTPROF_BLOB_PARAM_ if ( fMethodUsesSlotEncoding ) { // get the method desc using slot number - DWORD slot; + uint32_t slot; IfFailThrow(p.GetData(&slot)); if (slot >= pOwnerMT->GetNumVtableSlots()) diff --git a/src/coreclr/vm/class.cpp b/src/coreclr/vm/class.cpp index 9665f1d9017d7..f947e85dab7aa 100644 --- a/src/coreclr/vm/class.cpp +++ b/src/coreclr/vm/class.cpp @@ -714,7 +714,7 @@ EEClass::CheckVarianceInSig( case ELEMENT_TYPE_VAR: { - DWORD index; + uint32_t index; IfFailThrow(psig.GetData(&index)); // This will be checked later anyway; so give up and don't indicate a variance failure @@ -736,7 +736,7 @@ EEClass::CheckVarianceInSig( IfFailThrow(psig.GetToken(&typeref)); // The number of type parameters follows - DWORD ntypars; + uint32_t ntypars; IfFailThrow(psig.GetData(&ntypars)); // If this is a value type, or position == gpNonVariant, then @@ -810,7 +810,7 @@ EEClass::CheckVarianceInSig( IfFailThrow(psig.GetData(NULL)); // Get arg count; - ULONG cArgs; + uint32_t cArgs; IfFailThrow(psig.GetData(&cArgs)); // Conservatively, assume non-variance of function pointer types diff --git a/src/coreclr/vm/codeman.cpp b/src/coreclr/vm/codeman.cpp index f9338f7875160..97a4d5a7cffb8 100644 --- a/src/coreclr/vm/codeman.cpp +++ b/src/coreclr/vm/codeman.cpp @@ -1677,7 +1677,7 @@ static void LoadAndInitializeJIT(LPCWSTR pwzJitName, OUT HINSTANCE* phJit, OUT I EX_TRY { - typedef void (__stdcall* pjitStartup)(ICorJitHost*); + typedef void (* pjitStartup)(ICorJitHost*); pjitStartup jitStartupFn = (pjitStartup) GetProcAddress(*phJit, "jitStartup"); if (jitStartupFn) diff --git a/src/coreclr/vm/compile.cpp b/src/coreclr/vm/compile.cpp index 616c0e58e019a..8c5bef669e623 100644 --- a/src/coreclr/vm/compile.cpp +++ b/src/coreclr/vm/compile.cpp @@ -1314,7 +1314,7 @@ void EncodeTypeInDictionarySignature( // SigParser expects ELEMENT_TYPE_MODULE_ZAPSIG to be before ELEMENT_TYPE_GENERICINST // SigPointer peek(ptr); - ULONG instType = 0; + uint32_t instType = 0; IfFailThrow(peek.GetData(&instType)); _ASSERTE(instType == ELEMENT_TYPE_INTERNAL); @@ -1342,7 +1342,7 @@ void EncodeTypeInDictionarySignature( EncodeTypeInDictionarySignature(pTypeHandleModule, ptr, pSigBuilder, encodeContext, pfnEncodeModule); IfFailThrow(ptr.SkipExactlyOne()); - ULONG argCnt = 0; // Get number of parameters + uint32_t argCnt = 0; // Get number of parameters IfFailThrow(ptr.GetData(&argCnt)); pSigBuilder->AppendData(argCnt); @@ -1364,7 +1364,7 @@ void EncodeTypeInDictionarySignature( case ELEMENT_TYPE_VAR: case ELEMENT_TYPE_MVAR: { - ULONG varNum; + uint32_t varNum; // Skip variable number IfFailThrow(ptr.GetData(&varNum)); pSigBuilder->AppendData(varNum); @@ -1388,30 +1388,30 @@ void EncodeTypeInDictionarySignature( EncodeTypeInDictionarySignature(pInfoModule, ptr, pSigBuilder, encodeContext, pfnEncodeModule); IfFailThrow(ptr.SkipExactlyOne()); - ULONG rank = 0; // Get rank + uint32_t rank = 0; // Get rank IfFailThrow(ptr.GetData(&rank)); pSigBuilder->AppendData(rank); if (rank) { - ULONG nsizes = 0; + uint32_t nsizes = 0; IfFailThrow(ptr.GetData(&nsizes)); pSigBuilder->AppendData(nsizes); while (nsizes--) { - ULONG data = 0; + uint32_t data = 0; IfFailThrow(ptr.GetData(&data)); pSigBuilder->AppendData(data); } - ULONG nlbounds = 0; + uint32_t nlbounds = 0; IfFailThrow(ptr.GetData(&nlbounds)); pSigBuilder->AppendData(nlbounds); while (nlbounds--) { - ULONG data = 0; + uint32_t data = 0; IfFailThrow(ptr.GetData(&data)); pSigBuilder->AppendData(data); } @@ -1438,13 +1438,13 @@ void CEECompileInfo::EncodeGenericSignature( SigPointer ptr((PCCOR_SIGNATURE)signature); - ULONG entryKind; // DictionaryEntryKind + uint32_t entryKind; // DictionaryEntryKind IfFailThrow(ptr.GetData(&entryKind)); pSigBuilder->AppendData(entryKind); if (!fMethod) { - ULONG dictionaryIndex = 0; + uint32_t dictionaryIndex = 0; IfFailThrow(ptr.GetData(&dictionaryIndex)); pSigBuilder->AppendData(dictionaryIndex); @@ -1474,7 +1474,7 @@ void CEECompileInfo::EncodeGenericSignature( EncodeTypeInDictionarySignature(pInfoModule, ptr, pSigBuilder, encodeContext, pfnEncodeModule); IfFailThrow(ptr.SkipExactlyOne()); - ULONG methodFlags; + uint32_t methodFlags; IfFailThrow(ptr.GetData(&methodFlags)); pSigBuilder->AppendData(methodFlags); @@ -1484,13 +1484,13 @@ void CEECompileInfo::EncodeGenericSignature( IfFailThrow(ptr.SkipExactlyOne()); } - ULONG tokenOrSlot; + uint32_t tokenOrSlot; IfFailThrow(ptr.GetData(&tokenOrSlot)); pSigBuilder->AppendData(tokenOrSlot); if (methodFlags & ENCODE_METHOD_SIG_MethodInstantiation) { - DWORD nGenericMethodArgs; + uint32_t nGenericMethodArgs; IfFailThrow(ptr.GetData(&nGenericMethodArgs)); pSigBuilder->AppendData(nGenericMethodArgs); @@ -1508,7 +1508,7 @@ void CEECompileInfo::EncodeGenericSignature( EncodeTypeInDictionarySignature(pInfoModule, ptr, pSigBuilder, encodeContext, pfnEncodeModule); IfFailThrow(ptr.SkipExactlyOne()); - DWORD fieldIndex; + uint32_t fieldIndex; IfFailThrow(ptr.GetData(&fieldIndex)); pSigBuilder->AppendData(fieldIndex); } @@ -1518,7 +1518,7 @@ void CEECompileInfo::EncodeGenericSignature( _ASSERTE(false); } - ULONG dictionarySlot; + uint32_t dictionarySlot; IfFailThrow(ptr.GetData(&dictionarySlot)); pSigBuilder->AppendData(dictionarySlot); } diff --git a/src/coreclr/vm/debuginfostore.cpp b/src/coreclr/vm/debuginfostore.cpp index 0d5b42a74faf4..6092a5d75700a 100644 --- a/src/coreclr/vm/debuginfostore.cpp +++ b/src/coreclr/vm/debuginfostore.cpp @@ -50,10 +50,10 @@ class TransferWriter } // Write an raw U32 in nibble encoded form. - void DoEncodedU32(DWORD dw) { m_w.WriteEncodedU32(dw); } + void DoEncodedU32(uint32_t dw) { m_w.WriteEncodedU32(dw); } // Use to encode a monotonically increasing delta. - void DoEncodedDeltaU32(DWORD & dw, DWORD dwLast) + void DoEncodedDeltaU32(uint32_t & dw, uint32_t dwLast) { CONTRACTL { @@ -63,7 +63,7 @@ class TransferWriter } CONTRACTL_END; _ASSERTE(dw >= dwLast); - DWORD dwDelta = dw - dwLast; + uint32_t dwDelta = dw - dwLast; m_w.WriteEncodedU32(dwDelta); } @@ -71,7 +71,7 @@ class TransferWriter // Some U32 may have a few sentinal negative values . // We adjust it to be a real U32 and then encode that. // dwAdjust should be the lower bound on the enum. - void DoEncodedAdjustedU32(DWORD dw, DWORD dwAdjust) + void DoEncodedAdjustedU32(uint32_t dw, uint32_t dwAdjust) { //_ASSERTE(dwAdjust < 0); // some negative lower bound. m_w.WriteEncodedU32(dw - dwAdjust); @@ -130,7 +130,7 @@ class TransferReader SUPPORTS_DAC; } - void DoEncodedU32(DWORD & dw) + void DoEncodedU32(uint32_t & dw) { SUPPORTS_DAC; dw = m_r.ReadEncodedU32(); @@ -138,14 +138,14 @@ class TransferReader // Use to decode a monotonically increasing delta. // dwLast was the last value; we update it to the current value on output. - void DoEncodedDeltaU32(DWORD & dw, DWORD dwLast) + void DoEncodedDeltaU32(uint32_t & dw, uint32_t dwLast) { SUPPORTS_DAC; - DWORD dwDelta = m_r.ReadEncodedU32(); + uint32_t dwDelta = m_r.ReadEncodedU32(); dw = dwLast + dwDelta; } - void DoEncodedAdjustedU32(DWORD & dw, DWORD dwAdjust) + void DoEncodedAdjustedU32(uint32_t & dw, uint32_t dwAdjust) { SUPPORTS_DAC; //_ASSERTE(dwAdjust < 0); @@ -246,8 +246,8 @@ void DoBounds( // - flags is 3 indepedent bits. // Loop through and transfer each Entry in the Mapping. - DWORD dwLastNativeOffset = 0; - for(DWORD i = 0; i < cMap; i++) + uint32_t dwLastNativeOffset = 0; + for(uint32_t i = 0; i < cMap; i++) { ICorDebugInfo::OffsetMapping * pBound = &pMap[i]; diff --git a/src/coreclr/vm/dllimport.cpp b/src/coreclr/vm/dllimport.cpp index 45a7cf208aa14..04b87ac17b6bf 100644 --- a/src/coreclr/vm/dllimport.cpp +++ b/src/coreclr/vm/dllimport.cpp @@ -454,7 +454,7 @@ class ILStubState : public StubState pStubMD->AsDynamicMethodDesc()->SetStoredMethodSig(pNewSig, cbNewSig); SigPointer sigPtr(pNewSig, cbNewSig); - ULONG callConvInfo; + uint32_t callConvInfo; IfFailThrow(sigPtr.GetCallingConvInfo(&callConvInfo)); if (callConvInfo & CORINFO_CALLCONV_HASTHIS) @@ -2367,10 +2367,10 @@ void NDirectStubLinker::EmitObjectValidation(ILCodeStream* pcsEmit, DWORD dwStub IfFailThrow(ptr.GetData(NULL)); // IMAGE_CEE_CS_CALLCONV_LOCAL_SIG - ULONG numLocals; + uint32_t numLocals; IfFailThrow(ptr.GetData(&numLocals)); - for (ULONG i = 0; i < numLocals; i++) + for (uint32_t i = 0; i < numLocals; i++) { BYTE modifier; IfFailThrow(ptr.PeekByte(&modifier)); @@ -3119,7 +3119,7 @@ BOOL NDirect::MarshalingRequired( // Check to make certain that the signature only contains types that marshal trivially SigPointer ptr(pSig); IfFailThrow(ptr.GetCallingConvInfo(NULL)); - ULONG numArgs; + uint32_t numArgs; IfFailThrow(ptr.GetData(&numArgs)); numArgs++; // +1 for return type @@ -4660,7 +4660,7 @@ MethodDesc* CreateInteropILStub( { SigPointer ptr = pSigDesc->m_sig.CreateSigPointer(); - ULONG callConvInfo; + uint32_t callConvInfo; IfFailThrow(ptr.GetCallingConvInfo(&callConvInfo)); BOOL fSigIsStatic = !(callConvInfo & IMAGE_CEE_CS_CALLCONV_HASTHIS); diff --git a/src/coreclr/vm/field.cpp b/src/coreclr/vm/field.cpp index 8256640de0639..025d9ab8d0b3b 100644 --- a/src/coreclr/vm/field.cpp +++ b/src/coreclr/vm/field.cpp @@ -853,7 +853,7 @@ TypeHandle FieldDesc::GetExactFieldType(TypeHandle owner) GetSig(&pSig, &cSig); SigPointer sig(pSig, cSig); - ULONG callConv; + uint32_t callConv; IfFailThrow(sig.GetCallingConv(&callConv)); _ASSERTE(callConv == IMAGE_CEE_CS_CALLCONV_FIELD); diff --git a/src/coreclr/vm/genericdict.cpp b/src/coreclr/vm/genericdict.cpp index ea53be3277b9e..fd6ef6d57c288 100644 --- a/src/coreclr/vm/genericdict.cpp +++ b/src/coreclr/vm/genericdict.cpp @@ -487,7 +487,7 @@ DictionaryEntryLayout::GetKind() SigPointer ptr((PCCOR_SIGNATURE)dac_cast(m_signature)); - ULONG kind; // DictionaryEntryKind + uint32_t kind; // DictionaryEntryKind IfFailThrow(ptr.GetData(&kind)); return (DictionaryEntryKind)kind; @@ -926,7 +926,7 @@ Dictionary::PopulateEntry( ZapSig::Context zapSigContext(NULL, NULL, ZapSig::NormalTokens); ZapSig::Context * pZapSigContext = NULL; - ULONG kind = DictionaryEntryKind::EmptySlot; + uint32_t kind = DictionaryEntryKind::EmptySlot; SigPointer ptr((PCCOR_SIGNATURE)signature); @@ -1010,7 +1010,7 @@ Dictionary::PopulateEntry( // instantiated (non-shared) super-type of the class passed in. - ULONG dictionaryIndex = 0; + uint32_t dictionaryIndex = 0; if (isReadyToRunModule) { @@ -1127,12 +1127,12 @@ Dictionary::PopulateEntry( MethodTable * pOwnerMT = NULL; MethodDesc * pMethod = NULL; - DWORD methodFlags = 0; + uint32_t methodFlags = 0; BOOL isInstantiatingStub = 0; BOOL isUnboxingStub = 0; BOOL fMethodNeedsInstantiation = 0; - DWORD methodSlot = -1; + uint32_t methodSlot = -1; BOOL fRequiresDispatchStub = 0; if (isReadyToRunModule) @@ -1326,7 +1326,7 @@ Dictionary::PopulateEntry( // Instantiate the method if needed, or create a stub to a static method in a generic class. if (fMethodNeedsInstantiation) { - DWORD nargs; + uint32_t nargs; IfFailThrow(ptr.GetData(&nargs)); SIZE_T cbMem; @@ -1335,7 +1335,7 @@ Dictionary::PopulateEntry( ThrowHR(COR_E_OVERFLOW); TypeHandle * pInst = (TypeHandle*)_alloca(cbMem); - for (DWORD i = 0; i < nargs; i++) + for (uint32_t i = 0; i < nargs; i++) { pInst[i] = ptr.GetTypeHandleThrowing( pLookupModule, @@ -1475,7 +1475,7 @@ Dictionary::PopulateEntry( } IfFailThrow(ptr.SkipExactlyOne()); - DWORD fieldIndex; + uint32_t fieldIndex; IfFailThrow(ptr.GetData(&fieldIndex)); if (!IsCompilationProcess()) @@ -1491,11 +1491,11 @@ Dictionary::PopulateEntry( break; } - ULONG slotIndex; + uint32_t slotIndex; if (isReadyToRunModule) { - _ASSERT(dictionaryIndexAndSlot != (DWORD)-1); - slotIndex = (ULONG)(dictionaryIndexAndSlot & 0xFFFF); + _ASSERT(dictionaryIndexAndSlot != (uint32_t)-1); + slotIndex = (uint32_t)(dictionaryIndexAndSlot & 0xFFFF); } else { diff --git a/src/coreclr/vm/i386/asmhelpers.S b/src/coreclr/vm/i386/asmhelpers.S index f6b016cbe4105..e6c76662a352d 100644 --- a/src/coreclr/vm/i386/asmhelpers.S +++ b/src/coreclr/vm/i386/asmhelpers.S @@ -169,7 +169,7 @@ LOCAL_LABEL(CpuTypeDone): ret LEAF_END GetSpecificCpuTypeAsm, _TEXT -// DWORD __stdcall GetSpecificCpuFeaturesAsm(DWORD *pInfo); +// uint32_t __stdcall GetSpecificCpuFeaturesAsm(uint32_t *pInfo); LEAF_ENTRY GetSpecificCpuFeaturesAsm, _TEXT push ebx // ebx is trashed by the cpuid calls diff --git a/src/coreclr/vm/i386/asmhelpers.asm b/src/coreclr/vm/i386/asmhelpers.asm index 81794312dca64..987f5b0c7717d 100644 --- a/src/coreclr/vm/i386/asmhelpers.asm +++ b/src/coreclr/vm/i386/asmhelpers.asm @@ -436,7 +436,7 @@ CpuTypeDone: retn _GetSpecificCpuTypeAsm@0 ENDP -; DWORD __stdcall GetSpecificCpuFeaturesAsm(DWORD *pInfo); +; uint32_t __stdcall GetSpecificCpuFeaturesAsm(uint32_t *pInfo); _GetSpecificCpuFeaturesAsm@4 PROC public push ebx ; ebx is trashed by the cpuid calls diff --git a/src/coreclr/vm/i386/cgenx86.cpp b/src/coreclr/vm/i386/cgenx86.cpp index 75ff1b7dff17b..caab476b15faf 100644 --- a/src/coreclr/vm/i386/cgenx86.cpp +++ b/src/coreclr/vm/i386/cgenx86.cpp @@ -44,7 +44,7 @@ #include "stublink.inl" extern "C" DWORD STDCALL GetSpecificCpuTypeAsm(void); -extern "C" DWORD STDCALL GetSpecificCpuFeaturesAsm(DWORD *pInfo); +extern "C" uint32_t STDCALL GetSpecificCpuFeaturesAsm(uint32_t *pInfo); // NOTE on Frame Size C_ASSERT usage in this file // if the frame size changes then the stubs have to be revisited for correctness diff --git a/src/coreclr/vm/ilstubcache.cpp b/src/coreclr/vm/ilstubcache.cpp index 35044556b287f..04c18d379d223 100644 --- a/src/coreclr/vm/ilstubcache.cpp +++ b/src/coreclr/vm/ilstubcache.cpp @@ -184,7 +184,7 @@ MethodDesc* ILStubCache::CreateNewMethodDesc(LoaderHeap* pCreationHeap, MethodTa pMD->SetStoredMethodSig(pNewSig, cbNewSig); SigPointer sigPtr(pNewSig, cbNewSig); - ULONG callConvInfo; + uint32_t callConvInfo; IfFailThrow(sigPtr.GetCallingConvInfo(&callConvInfo)); if (!(callConvInfo & CORINFO_CALLCONV_HASTHIS)) diff --git a/src/coreclr/vm/jithelpers.cpp b/src/coreclr/vm/jithelpers.cpp index 5fe2fd3c6c85d..3a8a77d0969e5 100644 --- a/src/coreclr/vm/jithelpers.cpp +++ b/src/coreclr/vm/jithelpers.cpp @@ -3160,7 +3160,7 @@ CORINFO_GENERIC_HANDLE JIT_GenericHandleWorker(MethodDesc * pMD, MethodTable * p GC_TRIGGERS; } CONTRACTL_END; - ULONG dictionaryIndex = 0; + uint32_t dictionaryIndex = 0; MethodTable * pDeclaringMT = NULL; if (pMT != NULL) @@ -3178,7 +3178,7 @@ CORINFO_GENERIC_HANDLE JIT_GenericHandleWorker(MethodDesc * pMD, MethodTable * p { SigPointer ptr((PCCOR_SIGNATURE)signature); - ULONG kind; // DictionaryEntryKind + uint32_t kind; // DictionaryEntryKind IfFailThrow(ptr.GetData(&kind)); // We need to normalize the class passed in (if any) for reliability purposes. That's because preparation of a code region that diff --git a/src/coreclr/vm/jitinterface.cpp b/src/coreclr/vm/jitinterface.cpp index c464d3cdd14a5..8253eb9ddc007 100644 --- a/src/coreclr/vm/jitinterface.cpp +++ b/src/coreclr/vm/jitinterface.cpp @@ -492,7 +492,7 @@ CEEInfo::ConvToJitSig( _ASSERTE(!sig.IsNull()); Module * module = GetModule(scopeHnd); - ULONG data; + uint32_t data; IfFailThrow(sig.GetCallingConvInfo(&data)); sigRet->callConv = (CorInfoCallConv) data; @@ -509,7 +509,7 @@ CEEInfo::ConvToJitSig( if (sigRet->callConv & IMAGE_CEE_CS_CALLCONV_GENERIC) IfFailThrow(sig.GetData(NULL)); - ULONG numArgs; + uint32_t numArgs; IfFailThrow(sig.GetData(&numArgs)); if (numArgs != (unsigned short) numArgs) COMPlusThrowHR(COR_E_INVALIDPROGRAM); @@ -546,14 +546,14 @@ CEEInfo::ConvToJitSig( sigRet->numArgs = 0; if (!sig.IsNull()) { - ULONG callConv; + uint32_t callConv; IfFailThrow(sig.GetCallingConvInfo(&callConv)); if (callConv != IMAGE_CEE_CS_CALLCONV_LOCAL_SIG) { COMPlusThrowHR(COR_E_BADIMAGEFORMAT, BFA_CALLCONV_NOT_LOCAL_SIG); } - ULONG numArgs; + uint32_t numArgs; IfFailThrow(sig.GetData(&numArgs)); if (numArgs != (unsigned short) numArgs) @@ -782,7 +782,7 @@ bool CEEInfo::isValidStringRef ( return result; } -LPCWSTR CEEInfo::getStringLiteral ( +const char16_t* CEEInfo::getStringLiteral ( CORINFO_MODULE_HANDLE moduleHnd, mdToken metaTOK, int* length) @@ -795,7 +795,7 @@ LPCWSTR CEEInfo::getStringLiteral ( Module* module = GetModule(moduleHnd); - LPCWSTR result = nullptr; + const char16_t* result = nullptr; JIT_TO_EE_TRANSITION(); @@ -805,13 +805,13 @@ LPCWSTR CEEInfo::getStringLiteral ( } else { - DWORD dwCharCount; + ULONG dwCharCount; LPCWSTR pString; if (!FAILED((module)->GetMDImport()->GetUserString(metaTOK, &dwCharCount, NULL, &pString))) { // For string.Empty pString will be null *length = dwCharCount; - result = pString; + result = (const char16_t *)pString; } else { @@ -1099,7 +1099,7 @@ void CEEInfo::resolveToken(/* IN, OUT */ CORINFO_RESOLVED_TOKEN * pResolvedToken if ((tokenType & CORINFO_TOKENKIND_Class) == 0) ThrowBadTokenException(pResolvedToken); - IfFailThrow(pModule->GetMDImport()->GetTypeSpecFromToken(metaTOK, &pResolvedToken->pTypeSpec, &pResolvedToken->cbTypeSpec)); + IfFailThrow(pModule->GetMDImport()->GetTypeSpecFromToken(metaTOK, &pResolvedToken->pTypeSpec, (ULONG*)&pResolvedToken->cbTypeSpec)); SigTypeContext typeContext; GetTypeContext(pResolvedToken->tokenContext, &typeContext); @@ -1133,7 +1133,7 @@ void CEEInfo::resolveToken(/* IN, OUT */ CORINFO_RESOLVED_TOKEN * pResolvedToken GetTypeContext(pResolvedToken->tokenContext, &typeContext); MemberLoader::GetDescFromMemberRef(pModule, metaTOK, &pMD, &pFD, &typeContext, (tokenType != CORINFO_TOKENKIND_Ldtoken), - &th, TRUE, &pResolvedToken->pTypeSpec, &pResolvedToken->cbTypeSpec); + &th, TRUE, &pResolvedToken->pTypeSpec, (ULONG*)&pResolvedToken->cbTypeSpec); _ASSERTE((pMD != NULL) ^ (pFD != NULL)); _ASSERTE(!th.IsNull()); @@ -1161,7 +1161,7 @@ void CEEInfo::resolveToken(/* IN, OUT */ CORINFO_RESOLVED_TOKEN * pResolvedToken // We need the method desc to carry exact instantiation, thus allowInstParam == FALSE. pMD = MemberLoader::GetMethodDescFromMethodSpec(pModule, metaTOK, &typeContext, (tokenType != CORINFO_TOKENKIND_Ldtoken), FALSE /* allowInstParam */, - &th, TRUE, &pResolvedToken->pTypeSpec, &pResolvedToken->cbTypeSpec, &pResolvedToken->pMethodSpec, &pResolvedToken->cbMethodSpec); + &th, TRUE, &pResolvedToken->pTypeSpec, (ULONG*)&pResolvedToken->cbTypeSpec, &pResolvedToken->pMethodSpec, (ULONG*)&pResolvedToken->cbMethodSpec); } break; @@ -1794,7 +1794,7 @@ CEEInfo::findCallSiteSig( JIT_TO_EE_TRANSITION(); PCCOR_SIGNATURE pSig = NULL; - DWORD cbSig = 0; + uint32_t cbSig = 0; if (IsDynamicScope(scopeHnd)) { @@ -1837,11 +1837,11 @@ CEEInfo::findCallSiteSig( if (TypeFromToken(sigMethTok) == mdtMemberRef) { - IfFailThrow(module->GetMDImport()->GetNameAndSigOfMemberRef(sigMethTok, &pSig, &cbSig, &szName)); + IfFailThrow(module->GetMDImport()->GetNameAndSigOfMemberRef(sigMethTok, &pSig, (ULONG*)&cbSig, &szName)); } else if (TypeFromToken(sigMethTok) == mdtMethodDef) { - IfFailThrow(module->GetMDImport()->GetSigOfMethodDef(sigMethTok, &cbSig, &pSig)); + IfFailThrow(module->GetMDImport()->GetSigOfMethodDef(sigMethTok, (ULONG*)&cbSig, &pSig)); } } @@ -1877,7 +1877,7 @@ CEEInfo::findSig( JIT_TO_EE_TRANSITION(); PCCOR_SIGNATURE pSig = NULL; - DWORD cbSig = 0; + uint32_t cbSig = 0; if (IsDynamicScope(scopeHnd)) { @@ -1892,7 +1892,7 @@ CEEInfo::findSig( // We need to resolve this stand alone sig IfFailThrow(module->GetMDImport()->GetSigFromToken( (mdSignature)sigTok, - &cbSig, + (ULONG*)(&cbSig), &pSig)); } @@ -2704,9 +2704,9 @@ void CEEInfo::ScanForModuleDependencies(Module* pModule, SigPointer psig) ScanForModuleDependencies(pModule,psig); IfFailThrow(psig.SkipExactlyOne()); - ULONG ntypars; + uint32_t ntypars; IfFailThrow(psig.GetData(&ntypars)); - for (ULONG i = 0; i < ntypars; i++) + for (uint32_t i = 0; i < ntypars; i++) { ScanForModuleDependencies(pModule,psig); IfFailThrow(psig.SkipExactlyOne()); @@ -2751,10 +2751,10 @@ void CEEInfo::ScanMethodSpec(Module * pModule, PCCOR_SIGNATURE pMethodSpec, ULON _ASSERT(etype == (BYTE)IMAGE_CEE_CS_CALLCONV_GENERICINST); - ULONG nGenericMethodArgs; + uint32_t nGenericMethodArgs; IfFailThrow(sp.GetData(&nGenericMethodArgs)); - for (ULONG i = 0; i < nGenericMethodArgs; i++) + for (uint32_t i = 0; i < nGenericMethodArgs; i++) { ScanForModuleDependencies(pModule,sp); IfFailThrow(sp.SkipExactlyOne()); @@ -2781,10 +2781,10 @@ bool CEEInfo::ScanTypeSpec(Module * pModule, PCCOR_SIGNATURE pTypeSpec, ULONG cb IfFailThrow(sp.SkipExactlyOne()); - ULONG ntypars; + uint32_t ntypars; IfFailThrow(sp.GetData(&ntypars)); - for (ULONG i = 0; i < ntypars; i++) + for (uint32_t i = 0; i < ntypars; i++) { ScanForModuleDependencies(pModule,sp); IfFailThrow(sp.SkipExactlyOne()); @@ -2967,14 +2967,14 @@ static bool IsSignatureForTypicalInstantiation(SigPointer sigptr, CorElementType { STANDARD_VM_CONTRACT; - for (ULONG i = 0; i < ntypars; i++) + for (uint32_t i = 0; i < ntypars; i++) { CorElementType type; IfFailThrow(sigptr.GetElemType(&type)); if (type != varType) return false; - ULONG data; + uint32_t data; IfFailThrow(sigptr.GetData(&data)); if (data != i) @@ -2993,7 +2993,7 @@ static bool IsMethodSpecForTypicalInstantation(SigPointer sigptr) IfFailThrow(sigptr.GetByte(&etype)); _ASSERTE(etype == (BYTE)IMAGE_CEE_CS_CALLCONV_GENERICINST); - ULONG ntypars; + uint32_t ntypars; IfFailThrow(sigptr.GetData(&ntypars)); return IsSignatureForTypicalInstantiation(sigptr, ELEMENT_TYPE_MVAR, ntypars); @@ -3011,7 +3011,7 @@ static bool IsTypeSpecForTypicalInstantiation(SigPointer sigptr) IfFailThrow(sigptr.SkipExactlyOne()); - ULONG ntypars; + uint32_t ntypars; IfFailThrow(sigptr.GetData(&ntypars)); return IsSignatureForTypicalInstantiation(sigptr, ELEMENT_TYPE_VAR, ntypars); @@ -3169,7 +3169,7 @@ void CEEInfo::ComputeRuntimeLookupForSharedGenericToken(DictionaryEntryKind entr pResult->indirectFirstOffset = 1; } - ULONG data; + uint32_t data; IfFailThrow(sigptr.GetData(&data)); pResult->offsets[1] = sizeof(TypeHandle) * data; @@ -3250,7 +3250,7 @@ void CEEInfo::ComputeRuntimeLookupForSharedGenericToken(DictionaryEntryKind entr #endif pResult->offsets[0] = MethodTable::GetOffsetOfPerInstInfo(); pResult->offsets[1] = sizeof(TypeHandle*) * (pContextMT->GetNumDicts() - 1); - ULONG data; + uint32_t data; IfFailThrow(sigptr.GetData(&data)); pResult->offsets[2] = sizeof(TypeHandle) * data; @@ -3426,7 +3426,7 @@ void CEEInfo::ComputeRuntimeLookupForSharedGenericToken(DictionaryEntryKind entr // Load the generic method instantiation THROW_BAD_FORMAT_MAYBE(etype == (BYTE)IMAGE_CEE_CS_CALLCONV_GENERICINST, 0, pModule); - DWORD nGenericMethodArgs; + uint32_t nGenericMethodArgs; IfFailThrow(sigptr.GetData(&nGenericMethodArgs)); sigBuilder.AppendData(nGenericMethodArgs); @@ -3596,7 +3596,7 @@ const char* CEEInfo::getHelperName (CorInfoHelpFunc ftnNum) /*********************************************************************/ -int CEEInfo::appendClassName(__deref_inout_ecount(*pnBufLen) WCHAR** ppBuf, +int CEEInfo::appendClassName(__deref_inout_ecount(*pnBufLen) char16_t** ppBuf, int* pnBufLen, CORINFO_CLASS_HANDLE clsHnd, bool fNamespace, @@ -3623,7 +3623,7 @@ int CEEInfo::appendClassName(__deref_inout_ecount(*pnBufLen) WCHAR** ppBuf, nLen = (int)wcslen(szString); if (*pnBufLen > 0) { - wcscpy_s(*ppBuf, *pnBufLen, szString ); + wcscpy_s((WCHAR*)*ppBuf, *pnBufLen, szString ); (*ppBuf)[(*pnBufLen) - 1] = W('\0'); (*ppBuf) += nLen; (*pnBufLen) -= nLen; @@ -3797,7 +3797,7 @@ CorInfoInlineTypeCheck CEEInfo::canInlineTypeCheck(CORINFO_CLASS_HANDLE clsHnd, } /*********************************************************************/ -DWORD CEEInfo::getClassAttribs (CORINFO_CLASS_HANDLE clsHnd) +uint32_t CEEInfo::getClassAttribs (CORINFO_CLASS_HANDLE clsHnd) { CONTRACTL { THROWS; @@ -3807,7 +3807,7 @@ DWORD CEEInfo::getClassAttribs (CORINFO_CLASS_HANDLE clsHnd) // @todo FIX need to really fetch the class atributes. at present // we don't need to because the JIT only cares in the case of COM classes - DWORD ret = 0; + uint32_t ret = 0; JIT_TO_EE_TRANSITION(); @@ -3842,7 +3842,7 @@ bool CEEInfo::isStructRequiringStackAllocRetBuf(CORINFO_CLASS_HANDLE clsHnd) } /*********************************************************************/ -DWORD CEEInfo::getClassAttribsInternal (CORINFO_CLASS_HANDLE clsHnd) +uint32_t CEEInfo::getClassAttribsInternal (CORINFO_CLASS_HANDLE clsHnd) { STANDARD_VM_CONTRACT; @@ -4946,7 +4946,7 @@ unsigned CEEInfo::getArrayRank(CORINFO_CLASS_HANDLE cls) // the inline optimization (thus preserving the original behavior). void * CEEInfo::getArrayInitializationData( CORINFO_FIELD_HANDLE field, - DWORD size + uint32_t size ) { CONTRACTL { @@ -5574,7 +5574,7 @@ void CEEInfo::getCallInfo( else if (pResolvedToken->pMethodSpec != NULL) { - DWORD nGenericMethodArgs = 0; + uint32_t nGenericMethodArgs = 0; CQuickBytes qbGenericMethodArgs; TypeHandle *genericMethodArgs = NULL; @@ -5596,7 +5596,7 @@ void CEEInfo::getCallInfo( genericMethodArgs = reinterpret_cast(qbGenericMethodArgs.AllocThrows(cbAllocSize)); - for (DWORD i = 0; i < nGenericMethodArgs; i++) + for (uint32_t i = 0; i < nGenericMethodArgs; i++) { genericMethodArgs[i] = sp.GetTypeHandleThrowing((Module *)pResolvedToken->tokenScope, &typeContext); _ASSERTE (!genericMethodArgs[i].IsNull()); @@ -6619,7 +6619,7 @@ CORINFO_CLASS_HANDLE CEEInfo::getTypeInstantiationArgument(CORINFO_CLASS_HANDLE } /*********************************************************************/ -DWORD CEEInfo::getMethodAttribs (CORINFO_METHOD_HANDLE ftn) +uint32_t CEEInfo::getMethodAttribs (CORINFO_METHOD_HANDLE ftn) { CONTRACTL { THROWS; @@ -7588,7 +7588,7 @@ getMethodInfoHelper( /* Grab information from the IL header */ PCCOR_SIGNATURE pLocalSig = NULL; - DWORD cbLocalSig = 0; + uint32_t cbLocalSig = 0; if (NULL != header) { @@ -7834,10 +7834,10 @@ bool containsStackCrawlMarkLocal(MethodDesc* ftn) IfFailThrow(ptr.GetData(NULL)); // IMAGE_CEE_CS_CALLCONV_LOCAL_SIG - ULONG numLocals; + uint32_t numLocals; IfFailThrow(ptr.GetData(&numLocals)); - for(ULONG i = 0; i < numLocals; i++) + for(uint32_t i = 0; i < numLocals; i++) { CorElementType eType; IfFailThrow(ptr.PeekElemType(&eType)); @@ -7869,7 +7869,7 @@ bool containsStackCrawlMarkLocal(MethodDesc* ftn) CorInfoInline CEEInfo::canInline (CORINFO_METHOD_HANDLE hCaller, CORINFO_METHOD_HANDLE hCallee, - DWORD* pRestrictions) + uint32_t* pRestrictions) { CONTRACTL { THROWS; @@ -9543,7 +9543,7 @@ unsigned CEEInfo::getFieldOffset (CORINFO_FIELD_HANDLE fieldHnd) } /*********************************************************************/ -DWORD CEEInfo::getFieldThreadLocalStoreID(CORINFO_FIELD_HANDLE fieldHnd, void **ppIndirection) +uint32_t CEEInfo::getFieldThreadLocalStoreID(CORINFO_FIELD_HANDLE fieldHnd, void **ppIndirection) { CONTRACTL { THROWS; @@ -9551,7 +9551,7 @@ DWORD CEEInfo::getFieldThreadLocalStoreID(CORINFO_FIELD_HANDLE fieldHnd, void ** MODE_PREEMPTIVE; } CONTRACTL_END; - DWORD result = 0; + uint32_t result = 0; if (ppIndirection != NULL) *ppIndirection = NULL; @@ -9606,7 +9606,7 @@ void CEEInfo::freeArray(void *array) } void CEEInfo::getBoundaries(CORINFO_METHOD_HANDLE ftn, - unsigned int *cILOffsets, DWORD **pILOffsets, + unsigned int *cILOffsets, uint32_t **pILOffsets, ICorDebugInfo::BoundaryTypes *implicitBoundaries) { CONTRACTL { @@ -9620,7 +9620,7 @@ void CEEInfo::getBoundaries(CORINFO_METHOD_HANDLE ftn, #ifdef DEBUGGING_SUPPORTED if (g_pDebugInterface && !IsCompilationProcess()) { - g_pDebugInterface->getBoundaries(GetMethod(ftn), cILOffsets, pILOffsets, + g_pDebugInterface->getBoundaries(GetMethod(ftn), cILOffsets, (DWORD**)pILOffsets, implicitBoundaries); } else @@ -9862,7 +9862,7 @@ namespace STANDARD_VM_CONTRACT; SigParser parser(pSig, cbSig); - ULONG rawCallConv; + uint32_t rawCallConv; if (FAILED(parser.GetCallingConv(&rawCallConv))) { COMPlusThrowHR(COR_E_BADIMAGEFORMAT); @@ -9910,7 +9910,7 @@ namespace { STANDARD_VM_CONTRACT; - ULONG methodCallConv; + uint32_t methodCallConv; PCCOR_SIGNATURE pSig; DWORD cbSig; pMD->GetSig(&pSig, &cbSig); @@ -10346,7 +10346,7 @@ void CEEInfo::getEEInfo(CORINFO_EE_INFO *pEEInfoOut) EE_TO_JIT_TRANSITION(); } -LPCWSTR CEEInfo::getJitTimeLogFilename() +const char16_t * CEEInfo::getJitTimeLogFilename() { CONTRACTL { THROWS; @@ -10360,13 +10360,13 @@ LPCWSTR CEEInfo::getJitTimeLogFilename() result = CLRConfig::GetConfigValue(CLRConfig::INTERNAL_JitTimeLogFile); EE_TO_JIT_TRANSITION(); - return result; + return (const char16_t *)result; } // Return details about EE internal data structures -DWORD CEEInfo::getThreadTLSIndex(void **ppIndirection) +uint32_t CEEInfo::getThreadTLSIndex(void **ppIndirection) { CONTRACTL { THROWS; @@ -10374,7 +10374,7 @@ DWORD CEEInfo::getThreadTLSIndex(void **ppIndirection) MODE_PREEMPTIVE; } CONTRACTL_END; - DWORD result = (DWORD)-1; + uint32_t result = (uint32_t)-1; if (ppIndirection != NULL) *ppIndirection = NULL; @@ -10408,7 +10408,7 @@ const void * CEEInfo::getInlinedCallFrameVptr(void **ppIndirection) return result; } -LONG * CEEInfo::getAddrOfCaptureThreadGlobal(void **ppIndirection) +int32_t * CEEInfo::getAddrOfCaptureThreadGlobal(void **ppIndirection) { CONTRACTL { NOTHROW; @@ -10416,14 +10416,14 @@ LONG * CEEInfo::getAddrOfCaptureThreadGlobal(void **ppIndirection) MODE_PREEMPTIVE; } CONTRACTL_END; - LONG * result = NULL; + int32_t * result = NULL; if (ppIndirection != NULL) *ppIndirection = NULL; JIT_TO_EE_TRANSITION_LEAF(); - result = (LONG *)&g_TrapReturningThreads; + result = (int32_t *)&g_TrapReturningThreads; EE_TO_JIT_TRANSITION_LEAF(); @@ -10462,7 +10462,7 @@ HRESULT CEEInfo::GetErrorHRESULT(struct _EXCEPTION_POINTERS *pExceptionPointers) } -ULONG CEEInfo::GetErrorMessage(__inout_ecount(bufferLength) LPWSTR buffer, ULONG bufferLength) +uint32_t CEEInfo::GetErrorMessage(__inout_ecount(bufferLength) char16_t* buffer, uint32_t bufferLength) { CONTRACTL { THROWS; @@ -10470,7 +10470,7 @@ ULONG CEEInfo::GetErrorMessage(__inout_ecount(bufferLength) LPWSTR buffer, ULONG MODE_PREEMPTIVE; } CONTRACTL_END; - ULONG result = 0; + uint32_t result = 0; #ifndef CROSSGEN_COMPILE JIT_TO_EE_TRANSITION(); @@ -10483,7 +10483,7 @@ ULONG CEEInfo::GetErrorMessage(__inout_ecount(bufferLength) LPWSTR buffer, ULONG { EX_TRY { - result = GetExceptionMessage(throwable, buffer, bufferLength); + result = GetExceptionMessage(throwable, (LPWSTR)buffer, bufferLength); } EX_CATCH { @@ -10782,7 +10782,7 @@ void CEEInfo::setJitFlags(const CORJIT_FLAGS& jitFlags) } /*********************************************************************/ -DWORD CEEInfo::getJitFlags(CORJIT_FLAGS* jitFlags, DWORD sizeInBytes) +uint32_t CEEInfo::getJitFlags(CORJIT_FLAGS* jitFlags, uint32_t sizeInBytes) { CONTRACTL { NOTHROW; @@ -11136,7 +11136,7 @@ void CEEJitInfo::BackoutJitData(EEJitManager * jitMgr) /*********************************************************************/ // Route jit information to the Jit Debug store. -void CEEJitInfo::setBoundaries(CORINFO_METHOD_HANDLE ftn, ULONG32 cMap, +void CEEJitInfo::setBoundaries(CORINFO_METHOD_HANDLE ftn, uint32_t cMap, ICorDebugInfo::OffsetMapping *pMap) { CONTRACTL { @@ -11155,7 +11155,7 @@ void CEEJitInfo::setBoundaries(CORINFO_METHOD_HANDLE ftn, ULONG32 cMap, EE_TO_JIT_TRANSITION(); } -void CEEJitInfo::setVars(CORINFO_METHOD_HANDLE ftn, ULONG32 cVars, ICorDebugInfo::NativeVarInfo *vars) +void CEEJitInfo::setVars(CORINFO_METHOD_HANDLE ftn, uint32_t cVars, ICorDebugInfo::NativeVarInfo *vars) { CONTRACTL { THROWS; @@ -11263,7 +11263,7 @@ void CEEJitInfo::CompressDebugInfo() EE_TO_JIT_TRANSITION(); } -void reservePersonalityRoutineSpace(ULONG &unwindSize) +void reservePersonalityRoutineSpace(uint32_t &unwindSize) { #if defined(TARGET_X86) // Do nothing @@ -11301,7 +11301,7 @@ void reservePersonalityRoutineSpace(ULONG &unwindSize) // For prejitted code we split up the unwinding information into // separate sections .rdata and .pdata. // -void CEEJitInfo::reserveUnwindInfo(bool isFunclet, bool isColdCode, ULONG unwindSize) +void CEEJitInfo::reserveUnwindInfo(bool isFunclet, bool isColdCode, uint32_t unwindSize) { #ifdef FEATURE_EH_FUNCLETS CONTRACTL { @@ -11319,7 +11319,7 @@ void CEEJitInfo::reserveUnwindInfo(bool isFunclet, bool isColdCode, ULONG unwind "This may indicate the JIT has hit a NO_WAY assert after calling allocMem(), and is re-JITting. " "Set COMPlus_JitBreakOnBadCode=1 and rerun to get the real error."); - ULONG currentSize = unwindSize; + uint32_t currentSize = unwindSize; reservePersonalityRoutineSpace(currentSize); @@ -11355,12 +11355,12 @@ void CEEJitInfo::reserveUnwindInfo(bool isFunclet, bool isColdCode, ULONG unwind // funcKind type of funclet (main method code, handler, filter) // void CEEJitInfo::allocUnwindInfo ( - BYTE * pHotCode, /* IN */ - BYTE * pColdCode, /* IN */ - ULONG startOffset, /* IN */ - ULONG endOffset, /* IN */ - ULONG unwindSize, /* IN */ - BYTE * pUnwindBlock, /* IN */ + uint8_t * pHotCode, /* IN */ + uint8_t * pColdCode, /* IN */ + uint32_t startOffset, /* IN */ + uint32_t endOffset, /* IN */ + uint32_t unwindSize, /* IN */ + uint8_t * pUnwindBlock, /* IN */ CorJitFuncKind funcKind /* IN */ ) { @@ -11511,7 +11511,7 @@ void CEEJitInfo::allocUnwindInfo ( #endif // FEATURE_EH_FUNCLETS } -void CEEJitInfo::recordCallSite(ULONG instrOffset, +void CEEJitInfo::recordCallSite(uint32_t instrOffset, CORINFO_SIG_INFO * callSig, CORINFO_METHOD_HANDLE methodHandle) { @@ -11746,7 +11746,7 @@ WORD CEEJitInfo::getRelocTypeHint(void * target) return (WORD)-1; } -DWORD CEEJitInfo::getExpectedTargetArchitecture() +uint32_t CEEJitInfo::getExpectedTargetArchitecture() { LIMITED_METHOD_CONTRACT; @@ -12008,8 +12008,8 @@ void* CEEJitInfo::getMethodSync(CORINFO_METHOD_HANDLE ftnHnd, HRESULT CEEJitInfo::allocPgoInstrumentationBySchema( CORINFO_METHOD_HANDLE ftnHnd, /* IN */ PgoInstrumentationSchema* pSchema, /* IN/OUT */ - UINT32 countSchemaItems, /* IN */ - BYTE** pInstrumentationData /* OUT */ + uint32_t countSchemaItems, /* IN */ + uint8_t** pInstrumentationData /* OUT */ ) { CONTRACTL { @@ -12058,12 +12058,11 @@ HRESULT CEEJitInfo::allocPgoInstrumentationBySchema( // Consider implementing getBBProfileData on CEEJitInfo. This will allow us // to use profile info in codegen for non zapped images. - HRESULT CEEJitInfo::getPgoInstrumentationResults( CORINFO_METHOD_HANDLE ftnHnd, PgoInstrumentationSchema **pSchema, // pointer to the schema table which describes the instrumentation results (pointer will not remain valid after jit completes) - UINT32 * pCountSchemaItems, // pointer to the count schema items - BYTE ** pInstrumentationData // pointer to the actual instrumentation data (pointer will not remain valid after jit completes) + uint32_t * pCountSchemaItems, // pointer to the count schema items + uint8_t ** pInstrumentationData // pointer to the actual instrumentation data (pointer will not remain valid after jit completes) ) { CONTRACTL { @@ -12121,9 +12120,9 @@ HRESULT CEEJitInfo::getPgoInstrumentationResults( CORINFO_CLASS_HANDLE CEEJitInfo::getLikelyClass( CORINFO_METHOD_HANDLE ftnHnd, CORINFO_CLASS_HANDLE baseHnd, - UINT32 ilOffset, - UINT32 * pLikelihood, - UINT32 * pNumberOfClasses + uint32_t ilOffset, + uint32_t * pLikelihood, + uint32_t * pNumberOfClasses ) { CONTRACTL { @@ -12167,10 +12166,10 @@ CORINFO_CLASS_HANDLE CEEJitInfo::getLikelyClass( } void CEEJitInfo::allocMem ( - ULONG hotCodeSize, /* IN */ - ULONG coldCodeSize, /* IN */ - ULONG roDataSize, /* IN */ - ULONG xcptnsCount, /* IN */ + uint32_t hotCodeSize, /* IN */ + uint32_t coldCodeSize, /* IN */ + uint32_t roDataSize, /* IN */ + uint32_t xcptnsCount, /* IN */ CorJitAllocMemFlag flag, /* IN */ void ** hotCodeBlock, /* OUT */ void ** coldCodeBlock, /* OUT */ @@ -12477,7 +12476,7 @@ CorJitResult invokeCompileMethodHelper(EEJitManager *jitMgr, struct CORINFO_METHOD_INFO *info, CORJIT_FLAGS jitFlags, BYTE **nativeEntry, - ULONG *nativeSizeOfCode) + uint32_t *nativeSizeOfCode) { STATIC_CONTRACT_THROWS; STATIC_CONTRACT_GC_TRIGGERS; @@ -12627,7 +12626,7 @@ CorJitResult invokeCompileMethod(EEJitManager *jitMgr, struct CORINFO_METHOD_INFO *info, CORJIT_FLAGS jitFlags, BYTE **nativeEntry, - ULONG *nativeSizeOfCode) + uint32_t *nativeSizeOfCode) { CONTRACTL { THROWS; @@ -12657,7 +12656,7 @@ CorJitResult CallCompileMethodWithSEHWrapper(EEJitManager *jitMgr, struct CORINFO_METHOD_INFO *info, CORJIT_FLAGS flags, BYTE **nativeEntry, - ULONG *nativeSizeOfCode, + uint32_t *nativeSizeOfCode, NativeCodeVersion nativeCodeVersion) { // no dynamic contract here because SEH is used, with a finally clause @@ -12675,7 +12674,7 @@ CorJitResult CallCompileMethodWithSEHWrapper(EEJitManager *jitMgr, struct CORINFO_METHOD_INFO *info; CORJIT_FLAGS flags; BYTE **nativeEntry; - ULONG *nativeSizeOfCode; + uint32_t *nativeSizeOfCode; MethodDesc *ftn; CorJitResult res; }; Param param; @@ -13208,7 +13207,7 @@ PCODE UnsafeJitFunction(PrepareCodeConfig* config, CorJitResult res; PBYTE nativeEntry; - ULONG sizeOfCode; + uint32_t sizeOfCode; { GCX_COOP(); @@ -13515,11 +13514,11 @@ BOOL TypeLayoutCheck(MethodTable * pMT, PCCOR_SIGNATURE pBlob) SigPointer p(pBlob); IfFailThrow(p.SkipExactlyOne()); - DWORD dwFlags; + uint32_t dwFlags; IfFailThrow(p.GetData(&dwFlags)); // Size is checked unconditionally - DWORD dwExpectedSize; + uint32_t dwExpectedSize; IfFailThrow(p.GetData(&dwExpectedSize)); DWORD dwActualSize = pMT->GetNumInstanceFieldBytes(); @@ -13529,7 +13528,7 @@ BOOL TypeLayoutCheck(MethodTable * pMT, PCCOR_SIGNATURE pBlob) #ifdef FEATURE_HFA if (dwFlags & READYTORUN_LAYOUT_HFA) { - DWORD dwExpectedHFAType; + uint32_t dwExpectedHFAType; IfFailThrow(p.GetData(&dwExpectedHFAType)); DWORD dwActualHFAType = pMT->GetHFAType(); @@ -13547,7 +13546,7 @@ BOOL TypeLayoutCheck(MethodTable * pMT, PCCOR_SIGNATURE pBlob) if (dwFlags & READYTORUN_LAYOUT_Alignment) { - DWORD dwExpectedAlignment = TARGET_POINTER_SIZE; + uint32_t dwExpectedAlignment = TARGET_POINTER_SIZE; if (!(dwFlags & READYTORUN_LAYOUT_Alignment_Native)) { IfFailThrow(p.GetData(&dwExpectedAlignment)); @@ -14252,10 +14251,10 @@ bool CEEInfo::convertPInvokeCalliToCall(CORINFO_RESOLVED_TOKEN * pResolvedToken, } void CEEInfo::allocMem ( - ULONG hotCodeSize, /* IN */ - ULONG coldCodeSize, /* IN */ - ULONG roDataSize, /* IN */ - ULONG xcptnsCount, /* IN */ + uint32_t hotCodeSize, /* IN */ + uint32_t coldCodeSize, /* IN */ + uint32_t roDataSize, /* IN */ + uint32_t xcptnsCount, /* IN */ CorJitAllocMemFlag flag, /* IN */ void ** hotCodeBlock, /* OUT */ void ** coldCodeBlock, /* OUT */ @@ -14269,7 +14268,7 @@ void CEEInfo::allocMem ( void CEEInfo::reserveUnwindInfo ( bool isFunclet, /* IN */ bool isColdCode, /* IN */ - ULONG unwindSize /* IN */ + uint32_t unwindSize /* IN */ ) { LIMITED_METHOD_CONTRACT; @@ -14277,12 +14276,12 @@ void CEEInfo::reserveUnwindInfo ( } void CEEInfo::allocUnwindInfo ( - BYTE * pHotCode, /* IN */ - BYTE * pColdCode, /* IN */ - ULONG startOffset, /* IN */ - ULONG endOffset, /* IN */ - ULONG unwindSize, /* IN */ - BYTE * pUnwindBlock, /* IN */ + uint8_t * pHotCode, /* IN */ + uint8_t * pColdCode, /* IN */ + uint32_t startOffset, /* IN */ + uint32_t endOffset, /* IN */ + uint32_t unwindSize, /* IN */ + uint8_t * pUnwindBlock, /* IN */ CorJitFuncKind funcKind /* IN */ ) { @@ -14384,20 +14383,19 @@ void* CEEInfo::getMethodSync(CORINFO_METHOD_HANDLE ftnHnd, HRESULT CEEInfo::allocPgoInstrumentationBySchema( CORINFO_METHOD_HANDLE ftnHnd, /* IN */ PgoInstrumentationSchema* pSchema, /* IN/OUT */ - UINT32 countSchemaItems, /* IN */ - BYTE** pInstrumentationData /* OUT */ + uint32_t countSchemaItems, /* IN */ + uint8_t** pInstrumentationData /* OUT */ ) { LIMITED_METHOD_CONTRACT; UNREACHABLE_RET(); // only called on derived class. } - HRESULT CEEInfo::getPgoInstrumentationResults( CORINFO_METHOD_HANDLE ftnHnd, PgoInstrumentationSchema **pSchema, // pointer to the schema table which describes the instrumentation results (pointer will not remain valid after jit completes) - UINT32 * pCountSchemaItems, // pointer to the count schema items - BYTE ** pInstrumentationData // pointer to the actual instrumentation data (pointer will not remain valid after jit completes) + uint32_t * pCountSchemaItems, // pointer to the count schema items + uint8_t ** pInstrumentationData // pointer to the actual instrumentation data (pointer will not remain valid after jit completes) ) { LIMITED_METHOD_CONTRACT; @@ -14407,9 +14405,9 @@ HRESULT CEEInfo::getPgoInstrumentationResults( CORINFO_CLASS_HANDLE CEEInfo::getLikelyClass( CORINFO_METHOD_HANDLE ftnHnd, CORINFO_CLASS_HANDLE baseHnd, - UINT32 ilOffset, - UINT32* pLikelihood, - UINT32* pNumberOfCases + uint32_t ilOffset, + uint32_t* pLikelihood, + uint32_t* pNumberOfCases ) { LIMITED_METHOD_CONTRACT; @@ -14417,7 +14415,7 @@ CORINFO_CLASS_HANDLE CEEInfo::getLikelyClass( } void CEEInfo::recordCallSite( - ULONG instrOffset, /* IN */ + uint32_t instrOffset, /* IN */ CORINFO_SIG_INFO * callSig, /* IN */ CORINFO_METHOD_HANDLE methodHandle /* IN */ ) @@ -14444,7 +14442,7 @@ WORD CEEInfo::getRelocTypeHint(void * target) UNREACHABLE_RET(); // only called on derived class. } -DWORD CEEInfo::getExpectedTargetArchitecture() +uint32_t CEEInfo::getExpectedTargetArchitecture() { LIMITED_METHOD_CONTRACT; diff --git a/src/coreclr/vm/jitinterface.h b/src/coreclr/vm/jitinterface.h index bed91204d365a..e98cd19ca8100 100644 --- a/src/coreclr/vm/jitinterface.h +++ b/src/coreclr/vm/jitinterface.h @@ -420,7 +420,7 @@ class CEEInfo : public ICorJitInfo public: #include "icorjitinfoimpl_generated.h" - DWORD getClassAttribsInternal (CORINFO_CLASS_HANDLE cls); + uint32_t getClassAttribsInternal (CORINFO_CLASS_HANDLE cls); static unsigned getClassAlignmentRequirementStatic(TypeHandle clsHnd); @@ -637,25 +637,25 @@ class CEEJitInfo : public CEEInfo // ICorJitInfo stuff void allocMem ( - ULONG hotCodeSize, /* IN */ - ULONG coldCodeSize, /* IN */ - ULONG roDataSize, /* IN */ - ULONG xcptnsCount, /* IN */ + uint32_t hotCodeSize, /* IN */ + uint32_t coldCodeSize, /* IN */ + uint32_t roDataSize, /* IN */ + uint32_t xcptnsCount, /* IN */ CorJitAllocMemFlag flag, /* IN */ void ** hotCodeBlock, /* OUT */ void ** coldCodeBlock, /* OUT */ void ** roDataBlock /* OUT */ ) override final; - void reserveUnwindInfo(bool isFunclet, bool isColdCode, ULONG unwindSize) override final; + void reserveUnwindInfo(bool isFunclet, bool isColdCode, uint32_t unwindSize) override final; void allocUnwindInfo ( - BYTE * pHotCode, /* IN */ - BYTE * pColdCode, /* IN */ - ULONG startOffset, /* IN */ - ULONG endOffset, /* IN */ - ULONG unwindSize, /* IN */ - BYTE * pUnwindBlock, /* IN */ + uint8_t * pHotCode, /* IN */ + uint8_t * pColdCode, /* IN */ + uint32_t startOffset, /* IN */ + uint32_t endOffset, /* IN */ + uint32_t unwindSize, /* IN */ + uint8_t * pUnwindBlock, /* IN */ CorJitFuncKind funcKind /* IN */ ) override final; @@ -676,27 +676,27 @@ class CEEJitInfo : public CEEInfo HRESULT allocPgoInstrumentationBySchema( CORINFO_METHOD_HANDLE ftnHnd, /* IN */ PgoInstrumentationSchema* pSchema, /* IN/OUT */ - UINT32 countSchemaItems, /* IN */ - BYTE** pInstrumentationData /* OUT */ + uint32_t countSchemaItems, /* IN */ + uint8_t** pInstrumentationData /* OUT */ ) override final; HRESULT getPgoInstrumentationResults( CORINFO_METHOD_HANDLE ftnHnd, /* IN */ PgoInstrumentationSchema** pSchema, /* OUT */ - UINT32* pCountSchemaItems, /* OUT */ - BYTE**pInstrumentationData /* OUT */ + uint32_t* pCountSchemaItems, /* OUT */ + uint8_t**pInstrumentationData /* OUT */ ) override final; CORINFO_CLASS_HANDLE getLikelyClass( CORINFO_METHOD_HANDLE ftnHnd, CORINFO_CLASS_HANDLE baseHnd, - UINT32 ilOffset, - UINT32 * pLikelihood, - UINT32 * pNumberOfClasses + uint32_t ilOffset, + uint32_t * pLikelihood, + uint32_t * pNumberOfClasses ) override final; void recordCallSite( - ULONG instrOffset, /* IN */ + uint32_t instrOffset, /* IN */ CORINFO_SIG_INFO * callSig, /* IN */ CORINFO_METHOD_HANDLE methodHandle /* IN */ ) override final; @@ -704,13 +704,13 @@ class CEEJitInfo : public CEEInfo void recordRelocation( void *location, void *target, - WORD fRelocType, - WORD slot, - INT32 addlDelta) override final; + uint16_t fRelocType, + uint16_t slot, + int32_t addlDelta) override final; - WORD getRelocTypeHint(void * target) override final; + uint16_t getRelocTypeHint(void * target) override final; - DWORD getExpectedTargetArchitecture() override final; + uint32_t getExpectedTargetArchitecture() override final; CodeHeader* GetCodeHeader() { @@ -965,7 +965,7 @@ protected : #ifdef FEATURE_EH_FUNCLETS TADDR m_moduleBase; // Base for unwind Infos ULONG m_totalUnwindSize; // Total reserved unwind space - ULONG m_usedUnwindSize; // used space in m_theUnwindBlock + uint32_t m_usedUnwindSize; // used space in m_theUnwindBlock BYTE * m_theUnwindBlock; // start of the unwind memory block ULONG m_totalUnwindInfos; // Number of RUNTIME_FUNCTION needed ULONG m_usedUnwindInfos; diff --git a/src/coreclr/vm/memberload.cpp b/src/coreclr/vm/memberload.cpp index eec23198c21c1..313e616568d2d 100644 --- a/src/coreclr/vm/memberload.cpp +++ b/src/coreclr/vm/memberload.cpp @@ -824,7 +824,7 @@ MethodDesc * MemberLoader::GetMethodDescFromMethodSpec(Module * pModule, // Load the generic method instantiation THROW_BAD_FORMAT_MAYBE(etype == (BYTE)IMAGE_CEE_CS_CALLCONV_GENERICINST, 0, pModule); - DWORD nGenericMethodArgs = 0; + uint32_t nGenericMethodArgs = 0; IfFailThrow(sp.GetData(&nGenericMethodArgs)); DWORD cbAllocSize = 0; @@ -835,7 +835,7 @@ MethodDesc * MemberLoader::GetMethodDescFromMethodSpec(Module * pModule, TypeHandle *genericMethodArgs = reinterpret_cast(qbGenericMethodArgs.AllocThrows(cbAllocSize)); - for (DWORD i = 0; i < nGenericMethodArgs; i++) + for (uint32_t i = 0; i < nGenericMethodArgs; i++) { genericMethodArgs[i] = sp.GetTypeHandleThrowing(pModule, pTypeContext); _ASSERTE (!genericMethodArgs[i].IsNull()); diff --git a/src/coreclr/vm/method.cpp b/src/coreclr/vm/method.cpp index 5408e2029ed44..6b07924ba0f5f 100644 --- a/src/coreclr/vm/method.cpp +++ b/src/coreclr/vm/method.cpp @@ -2965,10 +2965,10 @@ FixupSignatureContainingInternalTypesParseType( bool needsRestore = FixupSignatureContainingInternalTypesParseType(image, pOriginalSig, psig, checkOnly); // Get generic arg count - ULONG nArgs; + uint32_t nArgs; IfFailThrow(psig.GetData(&nArgs)); - for (ULONG i = 0; i < nArgs; i++) + for (uint32_t i = 0; i < nArgs; i++) { if (FixupSignatureContainingInternalTypesParseType(image, pOriginalSig, psig, checkOnly)) { @@ -3016,7 +3016,7 @@ FixupSignatureContainingInternalTypes( } CONTRACTL_END; - ULONG nArgs; + uint32_t nArgs; bool needsRestore = false; SigPointer psig(pSig, cSig); @@ -3041,7 +3041,7 @@ FixupSignatureContainingInternalTypes( nArgs++; // be sure to handle the return type - for (ULONG i = 0; i < nArgs; i++) + for (uint32_t i = 0; i < nArgs; i++) { if (FixupSignatureContainingInternalTypesParseType(image, pSig, psig, checkOnly)) { @@ -3093,10 +3093,10 @@ RestoreSignatureContainingInternalTypesParseType( RestoreSignatureContainingInternalTypesParseType(psig); // Get generic arg count - ULONG nArgs; + uint32_t nArgs; IfFailThrow(psig.GetData(&nArgs)); - for (ULONG i = 0; i < nArgs; i++) + for (uint32_t i = 0; i < nArgs; i++) { RestoreSignatureContainingInternalTypesParseType(psig); } @@ -3138,7 +3138,7 @@ RestoreSignatureContainingInternalTypes( Volatile * pVolatileSig = (Volatile *)pSig; if (*pVolatileSig & IMAGE_CEE_CS_CALLCONV_NEEDSRESTORE) { - ULONG nArgs; + uint32_t nArgs; SigPointer psig(pSig, cSig); // Skip calling convention @@ -5743,12 +5743,12 @@ void MethodDesc::WalkValueTypeParameters(MethodTable *pMT, WalkValueTypeParamete } CONTRACTL_END; - ULONG numArgs = 0; + uint32_t numArgs = 0; Module *pModule = this->GetModule(); SigPointer ptr = this->GetSigPointer(); // skip over calling convention. - ULONG callConv = 0; + uint32_t callConv = 0; IfFailThrowBF(ptr.GetCallingConvInfo(&callConv), BFA_BAD_SIGNATURE, pModule); // If calling convention is generic, skip GenParamCount diff --git a/src/coreclr/vm/methodtable.cpp b/src/coreclr/vm/methodtable.cpp index ad7a9e9905912..ac097cdec2fb8 100644 --- a/src/coreclr/vm/methodtable.cpp +++ b/src/coreclr/vm/methodtable.cpp @@ -5174,7 +5174,7 @@ void WalkValueTypeTypeDefOrRefs( IfFailThrow(sig.SkipExactlyOne()); // Get number of parameters - ULONG argCnt; + uint32_t argCnt; IfFailThrow(sig.GetData(&argCnt)); while (argCnt-- != 0) { // Process and skip generic parameter diff --git a/src/coreclr/vm/methodtablebuilder.cpp b/src/coreclr/vm/methodtablebuilder.cpp index 3fa72fe5a71b4..afae54246186b 100644 --- a/src/coreclr/vm/methodtablebuilder.cpp +++ b/src/coreclr/vm/methodtablebuilder.cpp @@ -2722,7 +2722,7 @@ MethodTableBuilder::EnumerateClassMethods() { SigParser genericArgParser(pMemberSignature, cMemberSignature); - ULONG ulCallConv; + uint32_t ulCallConv; hr = genericArgParser.GetCallingConvInfo(&ulCallConv); if (FAILED(hr)) { @@ -3031,13 +3031,13 @@ MethodTableBuilder::EnumerateClassMethods() if ((bmtGenerics->pVarianceInfo != NULL) && !IsMdStatic(dwMemberAttrs)) { SigPointer sp(pMemberSignature, cMemberSignature); - ULONG callConv; + uint32_t callConv; IfFailThrow(sp.GetCallingConvInfo(&callConv)); if (callConv & IMAGE_CEE_CS_CALLCONV_GENERIC) IfFailThrow(sp.GetData(NULL)); - DWORD numArgs; + uint32_t numArgs; IfFailThrow(sp.GetData(&numArgs)); // Return type behaves covariantly @@ -3051,7 +3051,7 @@ MethodTableBuilder::EnumerateClassMethods() BuildMethodTableThrowException(IDS_CLASSLOAD_VARIANCE_IN_METHOD_RESULT, tok); } IfFailThrow(sp.SkipExactlyOne()); - for (DWORD j = 0; j < numArgs; j++) + for (uint32_t j = 0; j < numArgs; j++) { // Argument types behave contravariantly if (!EEClass::CheckVarianceInSig(bmtGenerics->GetNumGenericArgs(), diff --git a/src/coreclr/vm/prestub.cpp b/src/coreclr/vm/prestub.cpp index 87bc13678dd75..375691aabbef6 100644 --- a/src/coreclr/vm/prestub.cpp +++ b/src/coreclr/vm/prestub.cpp @@ -3085,7 +3085,7 @@ void ProcessDynamicDictionaryLookup(TransitionBlock * pTransitionBlock pResult->indirectFirstOffset = 1; } - ULONG data; + uint32_t data; IfFailThrow(sigptr.GetData(&data)); pResult->offsets[1] = sizeof(TypeHandle) * data; @@ -3097,7 +3097,7 @@ void ProcessDynamicDictionaryLookup(TransitionBlock * pTransitionBlock pResult->offsets[0] = MethodTable::GetOffsetOfPerInstInfo(); pResult->offsets[1] = sizeof(TypeHandle*) * (pContextMT->GetNumDicts() - 1); - ULONG data; + uint32_t data; IfFailThrow(sigptr.GetData(&data)); pResult->offsets[2] = sizeof(TypeHandle) * data; diff --git a/src/coreclr/vm/readytoruninfo.cpp b/src/coreclr/vm/readytoruninfo.cpp index 17b587612e28b..d91a48ada7323 100644 --- a/src/coreclr/vm/readytoruninfo.cpp +++ b/src/coreclr/vm/readytoruninfo.cpp @@ -784,13 +784,13 @@ static bool SigMatchesMethodDesc(MethodDesc* pMD, SigPointer &sig, Module * pMod ZapSig::Context zapSigContext(pModule, (void *)pModule, ZapSig::NormalTokens); ZapSig::Context * pZapSigContext = &zapSigContext; - DWORD methodFlags; + uint32_t methodFlags; IfFailThrow(sig.GetData(&methodFlags)); if (methodFlags & ENCODE_METHOD_SIG_OwnerType) { PCCOR_SIGNATURE pSigType; - DWORD cbSigType; + uint32_t cbSigType; sig.GetSignature(&pSigType, &cbSigType); if (!ZapSig::CompareSignatureToTypeHandle(pSigType, pModule, TypeHandle(pMD->GetMethodTable()), pZapSigContext)) return false; @@ -808,16 +808,16 @@ static bool SigMatchesMethodDesc(MethodDesc* pMD, SigPointer &sig, Module * pMod if (methodFlags & ENCODE_METHOD_SIG_MethodInstantiation) { - DWORD numGenericArgs; + uint32_t numGenericArgs; IfFailThrow(sig.GetData(&numGenericArgs)); Instantiation inst = pMD->GetMethodInstantiation(); if (numGenericArgs != inst.GetNumArgs()) return false; - for (DWORD i = 0; i < numGenericArgs; i++) + for (uint32_t i = 0; i < numGenericArgs; i++) { PCCOR_SIGNATURE pSigArg; - DWORD cbSigArg; + uint32_t cbSigArg; sig.GetSignature(&pSigArg, &cbSigArg); if (!ZapSig::CompareSignatureToTypeHandle(pSigArg, pModule, inst[i], pZapSigContext)) return false; @@ -1046,7 +1046,7 @@ void ReadyToRunInfo::MethodIterator::ParseGenericMethodSignatureAndRid(uint *pOf PCCOR_SIGNATURE pBlob = (PCCOR_SIGNATURE)m_genericParser.GetBlob(); SigPointer sig(pBlob); - DWORD methodFlags = 0; + uint32_t methodFlags = 0; // Skip the signature so we can get to the offset hr = sig.GetData(&methodFlags); if (FAILED(hr)) @@ -1074,7 +1074,7 @@ void ReadyToRunInfo::MethodIterator::ParseGenericMethodSignatureAndRid(uint *pOf if (methodFlags & ENCODE_METHOD_SIG_MethodInstantiation) { - DWORD numGenericArgs; + uint32_t numGenericArgs; hr = sig.GetData(&numGenericArgs); if (FAILED(hr)) { @@ -1093,7 +1093,7 @@ void ReadyToRunInfo::MethodIterator::ParseGenericMethodSignatureAndRid(uint *pOf // Now that we have the size of the signature we can grab the offset and decode it PCCOR_SIGNATURE pSigNew; - DWORD cbSigNew; + uint32_t cbSigNew; sig.GetSignature(&pSigNew, &cbSigNew); m_genericCurrentSig = pBlob; diff --git a/src/coreclr/vm/sigformat.cpp b/src/coreclr/vm/sigformat.cpp index acb95b9ce2455..f506eedf2032b 100644 --- a/src/coreclr/vm/sigformat.cpp +++ b/src/coreclr/vm/sigformat.cpp @@ -226,7 +226,7 @@ void SigFormat::AddTypeString(Module* pModule, SigPointer sig, const SigTypeCont case ELEMENT_TYPE_MVAR : { - DWORD ix; + uint32_t ix; IfFailThrow(sig.GetData(&ix)); if (pTypeContext && !pTypeContext->m_methodInst.IsEmpty() && ix >= 0 && ix < pTypeContext->m_methodInst.GetNumArgs()) { @@ -243,7 +243,7 @@ void SigFormat::AddTypeString(Module* pModule, SigPointer sig, const SigTypeCont case ELEMENT_TYPE_VAR : { - DWORD ix; + uint32_t ix; IfFailThrow(sig.GetData(&ix)); if (pTypeContext && !pTypeContext->m_classInst.IsEmpty() && ix >= 0 && ix < pTypeContext->m_classInst.GetNumArgs()) @@ -264,11 +264,11 @@ void SigFormat::AddTypeString(Module* pModule, SigPointer sig, const SigTypeCont AddTypeString(pModule, sig, pTypeContext); IfFailThrow(sig.SkipExactlyOne()); - DWORD n; + uint32_t n; IfFailThrow(sig.GetData(&n)); AddString("<"); - for (DWORD i = 0; i < n; i++) + for (uint32_t i = 0; i < n; i++) { if (i > 0) AddString(","); @@ -288,10 +288,10 @@ void SigFormat::AddTypeString(Module* pModule, SigPointer sig, const SigTypeCont if (type == ELEMENT_TYPE_ARRAY) { AddString("["); - ULONG len; + uint32_t len; IfFailThrow(sig.GetData(&len)); - for (ULONG i=1;iAppendData(varNum); @@ -248,30 +248,30 @@ void SigPointer::ConvertToInternalExactlyOne(Module* pSigModule, SigTypeContext { ConvertToInternalExactlyOne(pSigModule, pTypeContext, pSigBuilder, bSkipCustomModifier); - ULONG rank = 0; // Get rank + uint32_t rank = 0; // Get rank IfFailThrowBF(GetData(&rank), BFA_BAD_COMPLUS_SIG, pSigModule); pSigBuilder->AppendData(rank); if (rank) { - ULONG nsizes = 0; + uint32_t nsizes = 0; IfFailThrowBF(GetData(&nsizes), BFA_BAD_COMPLUS_SIG, pSigModule); pSigBuilder->AppendData(nsizes); while (nsizes--) { - ULONG data = 0; + uint32_t data = 0; IfFailThrowBF(GetData(&data), BFA_BAD_COMPLUS_SIG, pSigModule); pSigBuilder->AppendData(data); } - ULONG nlbounds = 0; + uint32_t nlbounds = 0; IfFailThrowBF(GetData(&nlbounds), BFA_BAD_COMPLUS_SIG, pSigModule); pSigBuilder->AppendData(nlbounds); while (nlbounds--) { - ULONG data = 0; + uint32_t data = 0; IfFailThrowBF(GetData(&data), BFA_BAD_COMPLUS_SIG, pSigModule); pSigBuilder->AppendData(data); } @@ -303,7 +303,7 @@ void SigPointer::ConvertToInternalExactlyOne(Module* pSigModule, SigTypeContext pSigBuilder->AppendElementType(ELEMENT_TYPE_INTERNAL); pSigBuilder->AppendPointer(genericType.AsPtr()); - ULONG argCnt = 0; // Get number of parameters + uint32_t argCnt = 0; // Get number of parameters IfFailThrowBF(GetData(&argCnt), BFA_BAD_COMPLUS_SIG, pSigModule); pSigBuilder->AppendData(argCnt); @@ -353,13 +353,13 @@ void SigPointer::ConvertToInternalSignature(Module* pSigModule, SigTypeContext * // Skip type parameter count if (uCallConv & IMAGE_CEE_CS_CALLCONV_GENERIC) { - ULONG nParams = 0; + uint32_t nParams = 0; IfFailThrowBF(GetData(&nParams), BFA_BAD_COMPLUS_SIG, pSigModule); pSigBuilder->AppendData(nParams); } // Get arg count; - ULONG cArgs = 0; + uint32_t cArgs = 0; IfFailThrowBF(GetData(&cArgs), BFA_BAD_COMPLUS_SIG, pSigModule); pSigBuilder->AppendData(cArgs); @@ -577,7 +577,7 @@ void MetaSig::Init( { case sigLocalVars: { - ULONG data = 0; + uint32_t data = 0; IfFailGo(psig.GetCallingConvInfo(&data)); // Store calling convention m_CallConv = (BYTE)data; @@ -589,7 +589,7 @@ void MetaSig::Init( } case sigMember: { - ULONG data = 0; + uint32_t data = 0; IfFailGo(psig.GetCallingConvInfo(&data)); // Store calling convention m_CallConv = (BYTE)data; @@ -607,7 +607,7 @@ void MetaSig::Init( } case sigField: { - ULONG data = 0; + uint32_t data = 0; IfFailGo(psig.GetCallingConvInfo(&data)); // Store calling convention m_CallConv = (BYTE)data; @@ -1166,7 +1166,7 @@ TypeHandle SigPointer::GetTypeHandleThrowing( case ELEMENT_TYPE_MODULE_ZAPSIG: { #ifndef DACCESS_COMPILE - DWORD ix; + uint32_t ix; IfFailThrowBF(psig.GetData(&ix), BFA_BAD_SIGNATURE, pModule); #ifdef FEATURE_MULTICOREJIT if (pZapSigContext->externalTokens == ZapSig::MulticoreJitTokens) @@ -1205,7 +1205,7 @@ TypeHandle SigPointer::GetTypeHandleThrowing( case ELEMENT_TYPE_VAR_ZAPSIG: { #ifndef DACCESS_COMPILE - DWORD rid; + RID rid; IfFailThrowBF(psig.GetData(&rid), BFA_BAD_SIGNATURE, pModule); mdGenericParam tkTyPar = TokenFromRid(rid, mdtGenericParam); @@ -1248,11 +1248,11 @@ TypeHandle SigPointer::GetTypeHandleThrowing( #ifdef _DEBUG_IMPL _ASSERTE(!FORBIDGC_LOADER_USE_ENABLED()); #endif - DWORD index; + uint32_t index; IfFailThrow(psig.GetData(&index)); SigPointer inst = pSubst->GetInst(); - for (DWORD i = 0; i < index; i++) + for (uint32_t i = 0; i < index; i++) { IfFailThrowBF(inst.SkipExactlyOne(), BFA_BAD_SIGNATURE, pOrigModule); } @@ -1323,7 +1323,7 @@ TypeHandle SigPointer::GetTypeHandleThrowing( } // The number of type parameters follows - DWORD ntypars = 0; + uint32_t ntypars = 0; IfFailThrowBF(psig.GetData(&ntypars), BFA_BAD_SIGNATURE, pOrigModule); DWORD dwAllocaSize = 0; @@ -1546,7 +1546,7 @@ TypeHandle SigPointer::GetTypeHandleThrowing( break; } - ULONG rank = 0; + uint32_t rank = 0; if (typ == ELEMENT_TYPE_ARRAY) { IfFailThrowBF(psig.SkipExactlyOne(), BFA_BAD_SIGNATURE, pOrigModule); IfFailThrowBF(psig.GetData(&rank), BFA_BAD_SIGNATURE, pOrigModule); @@ -1592,7 +1592,7 @@ TypeHandle SigPointer::GetTypeHandleThrowing( case ELEMENT_TYPE_FNPTR: { #ifndef DACCESS_COMPILE - ULONG uCallConv = 0; + uint32_t uCallConv = 0; IfFailThrowBF(psig.GetData(&uCallConv), BFA_BAD_SIGNATURE, pOrigModule); if ((uCallConv & IMAGE_CEE_CS_CALLCONV_MASK) == IMAGE_CEE_CS_CALLCONV_FIELD) @@ -1602,12 +1602,12 @@ TypeHandle SigPointer::GetTypeHandleThrowing( THROW_BAD_FORMAT(BFA_FNPTR_CANNOT_BE_GENERIC, pOrigModule); // Get arg count; - ULONG cArgs = 0; + uint32_t cArgs = 0; IfFailThrowBF(psig.GetData(&cArgs), BFA_BAD_SIGNATURE, pOrigModule); - ULONG cAllocaSize; - if (!ClrSafeInt::addition(cArgs, 1, cAllocaSize) || - !ClrSafeInt::multiply(cAllocaSize, sizeof(TypeHandle), cAllocaSize)) + uint32_t cAllocaSize; + if (!ClrSafeInt::addition(cArgs, 1, cAllocaSize) || + !ClrSafeInt::multiply(cAllocaSize, sizeof(TypeHandle), cAllocaSize)) { ThrowHR(COR_E_OVERFLOW); } @@ -1858,7 +1858,7 @@ TypeHandle SigPointer::GetTypeVariable(CorElementType et, } CONTRACT_END - DWORD index; + uint32_t index; if (FAILED(GetData(&index))) { TypeHandle thNull; @@ -1954,11 +1954,11 @@ VarKind SigPointer::IsPolyType(const SigTypeContext *pTypeContext) const if (FAILED(psig.SkipExactlyOne())) return hasNoVars; - ULONG ntypars; + uint32_t ntypars; if(FAILED(psig.GetData(&ntypars))) return hasNoVars; - for (ULONG i = 0; i < ntypars; i++) + for (uint32_t i = 0; i < ntypars; i++) { k = (VarKind) (psig.IsPolyType(pTypeContext) | k); if (FAILED(psig.SkipExactlyOne())) @@ -1982,7 +1982,7 @@ VarKind SigPointer::IsPolyType(const SigTypeContext *pTypeContext) const return hasNoVars; // Get arg count; - ULONG cArgs; + uint32_t cArgs; if (FAILED(psig.GetData(&cArgs))) return hasNoVars; @@ -5128,7 +5128,7 @@ void MetaSig::EnsureSigValueTypesLoaded(MethodDesc *pMD) // Skip over calling convention. IfFailThrowBF(ptr.GetCallingConv(NULL), BFA_BAD_SIGNATURE, pModule); - ULONG numArgs = 0; + uint32_t numArgs = 0; IfFailThrowBF(ptr.GetData(&numArgs), BFA_BAD_SIGNATURE, pModule); // Force a load of value type arguments. @@ -5167,14 +5167,14 @@ void MetaSig::CheckSigTypesCanBeLoaded(MethodDesc * pMD) // Skip over calling convention. IfFailThrowBF(ptr.GetCallingConv(NULL), BFA_BAD_SIGNATURE, pModule); - ULONG numArgs = 0; + uint32_t numArgs = 0; IfFailThrowBF(ptr.GetData(&numArgs), BFA_BAD_SIGNATURE, pModule); // must do a skip so we skip any class tokens associated with the return type IfFailThrowBF(ptr.SkipExactlyOne(), BFA_BAD_SIGNATURE, pModule); // Force a load of value type arguments. - for(ULONG i=0; i < numArgs; i++) + for(uint32_t i=0; i < numArgs; i++) { unsigned type = ptr.PeekElemTypeNormalized(pModule,&typeContext); if (type == ELEMENT_TYPE_VALUETYPE || type == ELEMENT_TYPE_CLASS) @@ -5338,7 +5338,7 @@ MetaSig::TryGetUnmanagedCallingConventionFromModOpt( // Instantiations aren't relevant here SigPointer sigPtr(pSig, cSig); - ULONG sigCallConv = 0; + uint32_t sigCallConv = 0; IfFailRet(sigPtr.GetCallingConvInfo(&sigCallConv)); // call conv if (sigCallConv & IMAGE_CEE_CS_CALLCONV_GENERIC) { diff --git a/src/coreclr/vm/stubgen.cpp b/src/coreclr/vm/stubgen.cpp index 9077635906e5b..7da6a1b7c8748 100644 --- a/src/coreclr/vm/stubgen.cpp +++ b/src/coreclr/vm/stubgen.cpp @@ -117,7 +117,7 @@ void ILStubLinker::DumpIL_FormatToken(mdToken token, SString &strTokenFormatting { CQuickBytes qbTargetSigBytes; PCCOR_SIGNATURE pSig; - DWORD cbSig; + uint32_t cbSig; if (token == TOKEN_ILSTUB_TARGET_SIG) { @@ -2131,7 +2131,7 @@ void FunctionSigBuilder::SetSig(PCCOR_SIGNATURE pSig, DWORD cSig) SigPointer sigPtr(pSig, cSig); // 1) calling convention - ULONG callConv; + uint32_t callConv; IfFailThrow(sigPtr.GetCallingConvInfo(&callConv)); SetCallingConv((CorCallingConvention)callConv); @@ -2322,7 +2322,7 @@ static BOOL SigHasVoidReturnType(const Signature &signature) SigPointer ptr = signature.CreateSigPointer(); - ULONG data; + uint32_t data; IfFailThrow(ptr.GetCallingConvInfo(&data)); // Skip number of type arguments if (data & IMAGE_CEE_CS_CALLCONV_GENERIC) @@ -2400,7 +2400,7 @@ ILStubLinker::ILStubLinker(Module* pStubSigModule, const Signature &signature, S // IMAGE_CEE_CS_CALLCONV_HASTHIS. // - ULONG uStubCallingConvInfo; + uint32_t uStubCallingConvInfo; IfFailThrow(m_managedSigPtr.GetCallingConvInfo(&uStubCallingConvInfo)); m_fHasThis = (flags & ILSTUB_LINKER_FLAG_STUB_HAS_THIS) != 0; @@ -2410,10 +2410,10 @@ ILStubLinker::ILStubLinker(Module* pStubSigModule, const Signature &signature, S // Otherwise, derive one based on the stub's signature. // - ULONG uCallingConvInfo = uStubCallingConvInfo; + uint32_t uCallingConvInfo = uStubCallingConvInfo; - ULONG uCallingConv = (uCallingConvInfo & IMAGE_CEE_CS_CALLCONV_MASK); - ULONG uNativeCallingConv; + uint32_t uCallingConv = (uCallingConvInfo & IMAGE_CEE_CS_CALLCONV_MASK); + uint32_t uNativeCallingConv; if (IMAGE_CEE_CS_CALLCONV_VARARG == uCallingConv) { @@ -2483,7 +2483,7 @@ ILStubLinker::ILStubLinker(Module* pStubSigModule, const Signature &signature, S if (uStubCallingConvInfo & IMAGE_CEE_CS_CALLCONV_GENERIC) IfFailThrow(m_managedSigPtr.GetData(NULL)); // skip number of type parameters - ULONG numParams = 0; + uint32_t numParams = 0; IfFailThrow(m_managedSigPtr.GetData(&numParams)); // If we are a reverse stub, then the target signature called in the stub // is the managed signature. In that case, we calculate the target IL stack delta @@ -2587,16 +2587,16 @@ void ILStubLinker::GetStubReturnType(LocalDesc* pLoc, Module* pModule) { STANDARD_VM_CONTRACT; SigPointer ptr = m_stubSig.CreateSigPointer(); - ULONG uCallingConv; - int nTypeArgs = 0; - int nArgs; + uint32_t uCallingConv; + uint32_t nTypeArgs = 0; + uint32_t nArgs; IfFailThrow(ptr.GetCallingConvInfo(&uCallingConv)); if (uCallingConv & IMAGE_CEE_CS_CALLCONV_GENERIC) - IfFailThrow(ptr.GetData((ULONG*)&nTypeArgs)); + IfFailThrow(ptr.GetData(&nTypeArgs)); - IfFailThrow(ptr.GetData((ULONG*)&nArgs)); + IfFailThrow(ptr.GetData(&nArgs)); GetManagedTypeHelper(pLoc, pModule, ptr.GetPtr(), m_pTypeContext, m_pMD); } @@ -2942,7 +2942,7 @@ void ILStubLinker::GetManagedTypeHelper(LocalDesc* pLoc, Module* pModule, PCCOR_ case ELEMENT_TYPE_MVAR: { IfFailThrow(ptr.GetElemType(NULL)); // skip ET - ULONG varNum; + uint32_t varNum; IfFailThrowBF(ptr.GetData(&varNum), BFA_BAD_COMPLUS_SIG, pModule); DWORD varCount = (eType == ELEMENT_TYPE_VAR ? pTypeContext->m_classInst.GetNumArgs() : diff --git a/src/coreclr/vm/stubgen.h b/src/coreclr/vm/stubgen.h index a8b716063f23c..257bd245ec798 100644 --- a/src/coreclr/vm/stubgen.h +++ b/src/coreclr/vm/stubgen.h @@ -175,7 +175,7 @@ class StubSigBuilder protected: CQuickBytes m_qbSigBuffer; - DWORD m_nItems; + uint32_t m_nItems; BYTE* m_pbSigCursor; size_t m_cbSig; diff --git a/src/coreclr/vm/threadsuspend.cpp b/src/coreclr/vm/threadsuspend.cpp index 0d4a1605ab862..c753a3eb81542 100644 --- a/src/coreclr/vm/threadsuspend.cpp +++ b/src/coreclr/vm/threadsuspend.cpp @@ -2484,7 +2484,7 @@ void ThreadStore::TrapReturningThreads(BOOL yes) #endif GCHeapUtilities::GetGCHeap()->SetSuspensionPending(true); - FastInterlockIncrement (&g_TrapReturningThreads); + FastInterlockIncrement ((LONG *)&g_TrapReturningThreads); _ASSERTE(g_TrapReturningThreads > 0); #ifdef _DEBUG @@ -2493,7 +2493,7 @@ void ThreadStore::TrapReturningThreads(BOOL yes) } else { - FastInterlockDecrement (&g_TrapReturningThreads); + FastInterlockDecrement ((LONG *)&g_TrapReturningThreads); GCHeapUtilities::GetGCHeap()->SetSuspensionPending(false); _ASSERTE(g_TrapReturningThreads >= 0); } diff --git a/src/coreclr/vm/typehash.cpp b/src/coreclr/vm/typehash.cpp index 343ae7378a70b..4ef4c6723ebd0 100644 --- a/src/coreclr/vm/typehash.cpp +++ b/src/coreclr/vm/typehash.cpp @@ -407,7 +407,7 @@ EETypeHashEntry_t *EETypeHashTable::FindItem(TypeKey* pKey) if (FAILED(sp.SkipExactlyOne())) break; // return NULL; - ULONG data; + uint32_t data; if (FAILED(sp.GetData(&data))) break; // return NULL; diff --git a/src/coreclr/vm/vars.cpp b/src/coreclr/vm/vars.cpp index 346f187147cb4..3fdc90ebf0511 100644 --- a/src/coreclr/vm/vars.cpp +++ b/src/coreclr/vm/vars.cpp @@ -27,9 +27,9 @@ const char g_psBaseLibrary[] = CoreLibName_IL_A; const char g_psBaseLibraryName[] = CoreLibName_A; const char g_psBaseLibrarySatelliteAssemblyName[] = CoreLibSatelliteName_A; -Volatile g_TrapReturningThreads; +Volatile g_TrapReturningThreads; -BBSweep g_BBSweep; +BBSweep g_BBSweep; #ifdef _DEBUG // next two variables are used to enforce an ASSERT in Thread::DbgFindThread diff --git a/src/coreclr/vm/vars.hpp b/src/coreclr/vm/vars.hpp index d3c00a7a0d09c..5c287716ff398 100644 --- a/src/coreclr/vm/vars.hpp +++ b/src/coreclr/vm/vars.hpp @@ -333,7 +333,7 @@ class Module; // For [ g_TrapReturningThreads; +extern "C" Volatile g_TrapReturningThreads; EXTERN BBSweep g_BBSweep; EXTERN IBCLogger g_IBCLogger; diff --git a/src/coreclr/vm/zapsig.cpp b/src/coreclr/vm/zapsig.cpp index c2ba0ac4e215b..87fad284f0242 100644 --- a/src/coreclr/vm/zapsig.cpp +++ b/src/coreclr/vm/zapsig.cpp @@ -537,7 +537,7 @@ BOOL ZapSig::GetSignatureForTypeHandle(TypeHandle handle, if (FAILED(sp.SkipExactlyOne())) RETURN(FALSE); - DWORD rank; + uint32_t rank; if (FAILED(sp.GetData(&rank))) RETURN(FALSE); @@ -796,7 +796,7 @@ MethodDesc *ZapSig::DecodeMethod(Module *pInfoModule, SigPointer sig(pBuffer); // decode flags - DWORD methodFlags; + uint32_t methodFlags; IfFailThrow(sig.GetData(&methodFlags)); TypeHandle thOwner = NULL; @@ -820,7 +820,7 @@ MethodDesc *ZapSig::DecodeMethod(Module *pInfoModule, if ( methodFlags & ENCODE_METHOD_SIG_SlotInsteadOfToken ) { // get the method desc using slot number - DWORD slot; + uint32_t slot; IfFailThrow(sig.GetData(&slot)); _ASSERTE(!thOwner.IsNull()); @@ -886,7 +886,7 @@ MethodDesc *ZapSig::DecodeMethod(Module *pInfoModule, if (ppMethodSpecWithVars != NULL) *ppMethodSpecWithVars = sig.GetPtr(); - DWORD nargs; + uint32_t nargs; IfFailThrow(sig.GetData(&nargs)); _ASSERTE(nargs > 0); @@ -897,7 +897,7 @@ MethodDesc *ZapSig::DecodeMethod(Module *pInfoModule, TypeHandle * pInst = (TypeHandle*) _alloca(cbMem); - for (DWORD i = 0; i < nargs; i++) + for (uint32_t i = 0; i < nargs; i++) { pInst[i] = sig.GetTypeHandleThrowing(pInfoModule, pContext, @@ -999,7 +999,7 @@ FieldDesc * ZapSig::DecodeField(Module *pReferencingModule, SigPointer sig(pBuffer); - DWORD fieldFlags; + uint32_t fieldFlags; IfFailThrow(sig.GetData(&fieldFlags)); MethodTable *pOwnerMT = NULL; @@ -1023,7 +1023,7 @@ FieldDesc * ZapSig::DecodeField(Module *pReferencingModule, if (fieldFlags & ENCODE_FIELD_SIG_IndexInsteadOfToken) { // get the field desc using index - DWORD fieldIndex; + uint32_t fieldIndex; IfFailThrow(sig.GetData(&fieldIndex)); _ASSERTE(pOwnerMT != NULL); @@ -1094,33 +1094,33 @@ void ZapSig::CopyTypeSignature(SigParser* pSigParser, SigBuilder* pSigBuilder, D if (type == ELEMENT_TYPE_ARRAY) { // Copy rank - ULONG rank; + uint32_t rank; IfFailThrow(pSigParser->GetData(&rank)); pSigBuilder->AppendData(rank); if (rank) { // Copy # of sizes - ULONG nsizes; + uint32_t nsizes; IfFailThrow(pSigParser->GetData(&nsizes)); pSigBuilder->AppendData(nsizes); while (nsizes--) { // Copy size - ULONG size; + uint32_t size; IfFailThrow(pSigParser->GetData(&size)); pSigBuilder->AppendData(size); } // Copy # of lower bounds - ULONG nlbounds; + uint32_t nlbounds; IfFailThrow(pSigParser->GetData(&nlbounds)); pSigBuilder->AppendData(nlbounds); while (nlbounds--) { // Copy lower bound - ULONG lbound; + uint32_t lbound; IfFailThrow(pSigParser->GetData(&lbound)); pSigBuilder->AppendData(lbound); } @@ -1160,7 +1160,7 @@ void ZapSig::CopyTypeSignature(SigParser* pSigParser, SigBuilder* pSigBuilder, D IfFailThrow(pSigParser->GetToken(&token)); pSigBuilder->AppendToken(token); - ULONG argCnt; // Get number of generic parameters + uint32_t argCnt; // Get number of generic parameters IfFailThrow(pSigParser->GetData(&argCnt)); pSigBuilder->AppendData(argCnt); @@ -1505,7 +1505,7 @@ BOOL ZapSig::EncodeMethod( ThrowHR(COR_E_BADIMAGEFORMAT); } - ULONG numGenArgs; + uint32_t numGenArgs; IfFailThrow(sigParser.GetData(&numGenArgs)); pSigBuilder->AppendData(numGenArgs); diff --git a/src/coreclr/zap/zapinfo.cpp b/src/coreclr/zap/zapinfo.cpp index afa68c6f3e871..73a162497fcaa 100644 --- a/src/coreclr/zap/zapinfo.cpp +++ b/src/coreclr/zap/zapinfo.cpp @@ -499,8 +499,8 @@ void ZapInfo::CompileMethod() CorJitResult res = CORJIT_SKIPPED; // FAILED() returns true for this value - BYTE *pCode; - ULONG cCode; + uint8_t *pCode; + uint32_t cCode; bool doNormalCompile = true; #ifdef ALLOW_SXS_JIT_NGEN @@ -897,7 +897,7 @@ void ZapInfo::getGSCookie(GSCookie * pCookieVal, GSCookie ** ppCookieVal) offsetof(CORCOMPILE_EE_INFO_TABLE, gsCookie)); } -DWORD ZapInfo::getJitFlags(CORJIT_FLAGS* jitFlags, DWORD sizeInBytes) +uint32_t ZapInfo::getJitFlags(CORJIT_FLAGS* jitFlags, uint32_t sizeInBytes) { _ASSERTE(jitFlags != NULL); _ASSERTE(sizeInBytes >= sizeof(m_jitFlags)); @@ -913,8 +913,8 @@ bool ZapInfo::runWithErrorTrap(void (*function)(void*), void* param) HRESULT ZapInfo::allocPgoInstrumentationBySchema(CORINFO_METHOD_HANDLE ftnHnd, PgoInstrumentationSchema* pSchema, - UINT32 countSchemaItems, - BYTE** pInstrumentationData) + uint32_t countSchemaItems, + uint8_t** pInstrumentationData) { HRESULT hr; @@ -996,8 +996,8 @@ HRESULT ZapInfo::allocPgoInstrumentationBySchema(CORINFO_METHOD_HANDLE ftnHnd, HRESULT ZapInfo::getPgoInstrumentationResults(CORINFO_METHOD_HANDLE ftnHnd, PgoInstrumentationSchema **pSchema, // pointer to the schema table which describes the instrumentation results (pointer will not remain valid after jit completes) - UINT32 * pCountSchemaItems, // pointer to the count schema items - BYTE ** pInstrumentationData) // pointer to the actual instrumentation data (pointer will not remain valid after jit completes) + uint32_t * pCountSchemaItems, // pointer to the count schema items + uint8_t ** pInstrumentationData) // pointer to the actual instrumentation data (pointer will not remain valid after jit completes) { _ASSERTE(pCountSchemaItems != nullptr); _ASSERTE(pInstrumentationData != nullptr); @@ -1145,10 +1145,10 @@ CORINFO_CLASS_HANDLE ZapInfo::getLikelyClass( } void ZapInfo::allocMem( - ULONG hotCodeSize, /* IN */ - ULONG coldCodeSize, /* IN */ - ULONG roDataSize, /* IN */ - ULONG xcptnsCount, /* IN */ + uint32_t hotCodeSize, /* IN */ + uint32_t coldCodeSize, /* IN */ + uint32_t roDataSize, /* IN */ + uint32_t xcptnsCount, /* IN */ CorJitAllocMemFlag flag, /* IN */ void ** hotCodeBlock, /* OUT */ void ** coldCodeBlock, /* OUT */ @@ -1363,7 +1363,7 @@ void ZapInfo::reportFatalError(CorJitResult result) // For prejitted code we need to count how many funclet regions // we have so that we can allocate and sort a contiguous .rdata block. // -void ZapInfo::reserveUnwindInfo(bool isFunclet, bool isColdCode, ULONG unwindSize) +void ZapInfo::reserveUnwindInfo(bool isFunclet, bool isColdCode, uint32_t unwindSize) { // Nothing to do } @@ -1393,12 +1393,12 @@ void ZapInfo::reserveUnwindInfo(bool isFunclet, bool isColdCode, ULONG unwindSiz // funcKind type of funclet (main method code, handler, filter) // void ZapInfo::allocUnwindInfo ( - BYTE * pHotCode, /* IN */ - BYTE * pColdCode, /* IN */ - ULONG startOffset, /* IN */ - ULONG endOffset, /* IN */ - ULONG unwindSize, /* IN */ - BYTE * pUnwindBlock, /* IN */ + uint8_t * pHotCode, /* IN */ + uint8_t * pColdCode, /* IN */ + uint32_t startOffset, /* IN */ + uint32_t endOffset, /* IN */ + uint32_t unwindSize, /* IN */ + uint8_t * pUnwindBlock, /* IN */ CorJitFuncKind funcKind /* IN */ ) { @@ -1489,12 +1489,12 @@ bool ZapInfo::logMsg(unsigned level, const char *fmt, va_list args) // ICorDynamicInfo // -DWORD ZapInfo::getThreadTLSIndex(void **ppIndirection) +uint32_t ZapInfo::getThreadTLSIndex(void **ppIndirection) { _ASSERTE(ppIndirection != NULL); *ppIndirection = NULL; - return (DWORD)-1; + return (uint32_t)-1; } const void * ZapInfo::getInlinedCallFrameVptr(void **ppIndirection) @@ -1506,7 +1506,7 @@ const void * ZapInfo::getInlinedCallFrameVptr(void **ppIndirection) return NULL; } -LONG * ZapInfo::getAddrOfCaptureThreadGlobal(void **ppIndirection) +int32_t * ZapInfo::getAddrOfCaptureThreadGlobal(void **ppIndirection) { _ASSERTE(ppIndirection != NULL); @@ -2688,7 +2688,7 @@ CORINFO_CLASS_HANDLE ZapInfo::getStaticFieldCurrentClass(CORINFO_FIELD_HANDLE fi return NULL; } -DWORD ZapInfo::getFieldThreadLocalStoreID(CORINFO_FIELD_HANDLE field, +uint32_t ZapInfo::getFieldThreadLocalStoreID(CORINFO_FIELD_HANDLE field, void **ppIndirection) { _ASSERTE(ppIndirection != NULL); @@ -2801,13 +2801,13 @@ InfoAccessType ZapInfo::emptyStringLiteral(void **ppValue) return IAT_PPVALUE; } -void ZapInfo::recordCallSite(ULONG instrOffset, CORINFO_SIG_INFO *callSig, CORINFO_METHOD_HANDLE methodHandle) +void ZapInfo::recordCallSite(uint32_t instrOffset, CORINFO_SIG_INFO *callSig, CORINFO_METHOD_HANDLE methodHandle) { return; } void ZapInfo::recordRelocation(void *location, void *target, - WORD fRelocType, WORD slotNum, INT32 addlDelta) + uint16_t fRelocType, uint16_t slotNum, int32_t addlDelta) { // Factor slotNum into the location address switch (fRelocType) @@ -3009,7 +3009,7 @@ WORD ZapInfo::getRelocTypeHint(void * target) #endif } -DWORD ZapInfo::getExpectedTargetArchitecture() +uint32_t ZapInfo::getExpectedTargetArchitecture() { return IMAGE_FILE_MACHINE_NATIVE; } @@ -3056,7 +3056,7 @@ void ZapInfo::getEEInfo(CORINFO_EE_INFO *pEEInfoOut) m_pEEJitInfo->getEEInfo(pEEInfoOut); } -LPCWSTR ZapInfo::getJitTimeLogFilename() +const char16_t * ZapInfo::getJitTimeLogFilename() { return m_pEEJitInfo->getJitTimeLogFilename(); } @@ -3093,7 +3093,7 @@ CorInfoHFAElemType ZapInfo::getHFAType(CORINFO_CLASS_HANDLE hClass) // void ZapInfo::getBoundaries(CORINFO_METHOD_HANDLE ftn, unsigned int *cILOffsets, - DWORD **pILOffsets, ICorDebugInfo::BoundaryTypes *implicitBoundaries) + uint32_t **pILOffsets, ICorDebugInfo::BoundaryTypes *implicitBoundaries) { m_pEEJitInfo->getBoundaries(ftn, cILOffsets, pILOffsets, implicitBoundaries); @@ -3411,7 +3411,7 @@ const char* ZapInfo::getHelperName(CorInfoHelpFunc func) return m_pEEJitInfo->getHelperName(func); } -int ZapInfo::appendClassName(__deref_inout_ecount(*pnBufLen) WCHAR** ppBuf, int* pnBufLen, +int ZapInfo::appendClassName(__deref_inout_ecount(*pnBufLen) char16_t** ppBuf, int* pnBufLen, CORINFO_CLASS_HANDLE cls, bool fNamespace, bool fFullInst, @@ -3430,7 +3430,7 @@ CorInfoInlineTypeCheck ZapInfo::canInlineTypeCheck (CORINFO_CLASS_HANDLE cls, Co return m_pEEJitInfo->canInlineTypeCheck(cls, source); } -DWORD ZapInfo::getClassAttribs(CORINFO_CLASS_HANDLE cls) +uint32_t ZapInfo::getClassAttribs(CORINFO_CLASS_HANDLE cls) { return m_pEEJitInfo->getClassAttribs(cls); } @@ -3546,7 +3546,7 @@ unsigned ZapInfo::getArrayRank(CORINFO_CLASS_HANDLE cls) return m_pEEJitInfo->getArrayRank(cls); } -void * ZapInfo::getArrayInitializationData(CORINFO_FIELD_HANDLE field, DWORD size) +void * ZapInfo::getArrayInitializationData(CORINFO_FIELD_HANDLE field, uint32_t size) { if (m_pEEJitInfo->getClassModule(m_pEEJitInfo->getFieldClass(field)) != m_pImage->m_hModule) return NULL; @@ -3928,7 +3928,7 @@ bool ZapInfo::isValidStringRef ( return m_pEEJitInfo->isValidStringRef(tokenScope, token); } -LPCWSTR ZapInfo::getStringLiteral ( +const char16_t* ZapInfo::getStringLiteral ( CORINFO_MODULE_HANDLE tokenScope, unsigned token, int* length) @@ -3955,7 +3955,7 @@ unsigned ZapInfo::getMethodHash(CORINFO_METHOD_HANDLE ftn) return m_pEEJitInfo->getMethodHash(ftn); } -DWORD ZapInfo::getMethodAttribs(CORINFO_METHOD_HANDLE ftn) +uint32_t ZapInfo::getMethodAttribs(CORINFO_METHOD_HANDLE ftn) { DWORD result = m_pEEJitInfo->getMethodAttribs(ftn); return FilterNamedIntrinsicMethodAttribs(this, result, ftn, m_pEEJitInfo); @@ -3980,7 +3980,7 @@ bool ZapInfo::getMethodInfo(CORINFO_METHOD_HANDLE ftn,CORINFO_METHOD_INFO* info) CorInfoInline ZapInfo::canInline(CORINFO_METHOD_HANDLE caller, CORINFO_METHOD_HANDLE callee, - DWORD* pRestrictions) + uint32_t* pRestrictions) { return m_pEEJitInfo->canInline(caller, callee, pRestrictions); @@ -4162,7 +4162,7 @@ HRESULT ZapInfo::GetErrorHRESULT(struct _EXCEPTION_POINTERS *pExceptionPointers) return m_pEEJitInfo->GetErrorHRESULT(pExceptionPointers); } -ULONG ZapInfo::GetErrorMessage(__in_ecount(bufferLength) LPWSTR buffer, ULONG bufferLength) +uint32_t ZapInfo::GetErrorMessage(__in_ecount(bufferLength) char16_t* buffer, uint32_t bufferLength) { return m_pEEJitInfo->GetErrorMessage(buffer, bufferLength); } diff --git a/src/coreclr/zap/zapinfo.h b/src/coreclr/zap/zapinfo.h index 3a72d2f46a5d2..2731bdc8954d1 100644 --- a/src/coreclr/zap/zapinfo.h +++ b/src/coreclr/zap/zapinfo.h @@ -282,10 +282,7 @@ class ZapInfo int canHandleException(struct _EXCEPTION_POINTERS *pExceptionPointers); void * getAddressOfPInvokeFixup(CORINFO_METHOD_HANDLE method, void **ppIndirection); - ZapImport * GetProfilingHandleImport(); - - - + ZapImport * GetProfilingHandleImport(); }; #endif // __ZAPINFO_H__