PVOID mdBaseHost = NULL;
bool isAlternate = false;
- _ASSERTE(peFile == NULL && reflectionModule != NULL || peFile != NULL && reflectionModule == NULL);
+ _ASSERTE((peFile == NULL && reflectionModule != NULL) || (peFile != NULL && reflectionModule == NULL));
TADDR peFileAddr = (peFile != NULL) ? dac_cast<TADDR>(peFile) : dac_cast<TADDR>(reflectionModule);
//
// This is the legacy entrypoint to DAC, used by dbgeng/dbghelp (windbg, SOS, watson, etc).
//
//----------------------------------------------------------------------------
-DLLEXPORT
STDAPI
+DLLEXPORT
CLRDataCreateInstance(REFIID iid,
ICLRDataTarget * pLegacyTarget,
void ** iface)
// Must call Destroy to on interface to free its resources.
//
//---------------------------------------------------------------------------------------
-DLLEXPORT
STDAPI
+DLLEXPORT
DacDbiInterfaceInstance(
ICorDebugDataTarget * pTarget,
CORDB_ADDRESS baseAddress,
// Prototype for creation functions
-DLLEXPORT
STDAPI
+DLLEXPORT
CLRDataCreateInstance(REFIID iid,
ICLRDataTarget * pLegacyTarget,
void ** iface);
-DLLEXPORT
STDAPI
+DLLEXPORT
DacDbiInterfaceInstance(
ICorDebugDataTarget * pTarget,
CORDB_ADDRESS baseAddress,
///
// Implementation of ICorDebugManagedCallback4::BeforeGarbageCollection
- COM_METHOD ShimProxyCallback::BeforeGarbageCollection(ICorDebugProcess* pProcess);
+ COM_METHOD BeforeGarbageCollection(ICorDebugProcess* pProcess);
// Implementation of ICorDebugManagedCallback4::AfterGarbageCollection
- COM_METHOD ShimProxyCallback::AfterGarbageCollection(ICorDebugProcess* pProcess);
+ COM_METHOD AfterGarbageCollection(ICorDebugProcess* pProcess);
// Implementation of ICorDebugManagedCallback4::DataBreakpoint
- COM_METHOD ShimProxyCallback::DataBreakpoint(ICorDebugProcess* pProcess, ICorDebugThread* pThread, BYTE* pContext, ULONG32 contextSize);
+ COM_METHOD DataBreakpoint(ICorDebugProcess* pProcess, ICorDebugThread* pThread, BYTE* pContext, ULONG32 contextSize);
};
#if !defined(FEATURE_MERGE_JIT_AND_ENGINE)
// Reference to the global holding the path to the JIT
-extern "C" LPCWSTR g_CLRJITPath;
+extern LPCWSTR g_CLRJITPath;
#endif // !defined(FEATURE_MERGE_JIT_AND_ENGINE)
#ifdef FEATURE_GDBJIT
# Clang also produces a bad-codegen on this prebuilt file with optimization.
# https://github.com/dotnet/coreclr/issues/2305
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-delete-non-virtual-dtor")
- add_compile_options(-Wno-deprecated-register)
+ add_compile_options(-Wno-register)
add_compile_options(-Wno-array-bounds)
add_compile_options(-Wno-unused-label)
set_source_files_properties( prebuilt/asmparse.cpp PROPERTIES COMPILE_FLAGS "-O0" )
m_szExportAlias = NULL;
m_dwExportOrdinal = 0xFFFFFFFF;
m_ulLines[0]=m_ulLines[1]=0;
- m_ulColumns[0]=m_ulColumns[0]=0;
+ m_ulColumns[0]=m_ulColumns[1]=0;
m_pbsBody = NULL;
m_fNewBody = TRUE;
m_fNew = TRUE;
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#define INVALIDGCVALUE 0CCCCCCCDh
+#define INVALIDGCVALUE 0xCCCCCCCD
#if defined(__APPLE__)
#define C_FUNC(name) _##name
// Update the write watch table if necessary
mov rax, rdi
movabs r10, 0xF0F0F0F0F0F0F0F0
- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift
+ shr rax, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift
NOP_2_BYTE // padding for alignment of constant
movabs r11, 0xF0F0F0F0F0F0F0F0
add rax, r10
- cmp byte ptr [rax], 0h
+ cmp byte ptr [rax], 0x0
.byte 0x75, 0x06
// jne CheckCardTable
- mov byte ptr [rax], 0FFh
+ mov byte ptr [rax], 0xFF
NOP_3_BYTE // padding for alignment of constant
// Touch the card table entry, if not already dirty.
shr rdi, 0x0B
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardTable
REPRET
UpdateCardTable:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
NOP_2_BYTE // padding for alignment of constant
shr rdi, 0x0A
movabs rax, 0xF0F0F0F0F0F0F0F0
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardBundle_WriteWatch_PostGrow64
REPRET
UpdateCardBundle_WriteWatch_PostGrow64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#endif
ret
#ifdef FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP
// Update the write watch table if necessary
PREPARE_EXTERNAL_VAR g_sw_ww_enabled_for_gc_heap, rax
- cmp byte ptr [rax], 0h
+ cmp byte ptr [rax], 0x0
je CheckCardTable_ByRefWriteBarrier
mov rax, rdi
- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift
+ shr rax, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift
PREPARE_EXTERNAL_VAR g_sw_ww_table, r10
add rax, qword ptr [r10]
- cmp byte ptr [rax], 0h
+ cmp byte ptr [rax], 0x0
jne CheckCardTable_ByRefWriteBarrier
- mov byte ptr [rax], 0FFh
+ mov byte ptr [rax], 0xFF
#endif
CheckCardTable_ByRefWriteBarrier:
// move current rdi value into rcx and then increment the pointers
mov rcx, rdi
- add rsi, 8h
- add rdi, 8h
+ add rsi, 0x8
+ add rdi, 0x8
// Check if we need to update the card table
// Calc pCardByte
mov rax, [rax]
// Check if this card is dirty
- cmp byte ptr [rcx + rax], 0FFh
+ cmp byte ptr [rcx + rax], 0xFF
jne UpdateCardTable_ByRefWriteBarrier
REPRET
UpdateCardTable_ByRefWriteBarrier:
- mov byte ptr [rcx + rax], 0FFh
+ mov byte ptr [rcx + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
// Shift rcx by 0x0A more to get the card bundle byte (we shifted by 0x0B already)
add rcx, [rax]
// Check if this bundle byte is dirty
- cmp byte ptr [rcx], 0FFh
+ cmp byte ptr [rcx], 0xFF
jne UpdateCardBundle_ByRefWriteBarrier
REPRET
UpdateCardBundle_ByRefWriteBarrier:
- mov byte ptr [rcx], 0FFh
+ mov byte ptr [rcx], 0xFF
#endif
ret
#endif
Exit_ByRefWriteBarrier:
// Increment the pointers before leaving
- add rdi, 8h
- add rsi, 8h
+ add rdi, 0x8
+ add rsi, 0x8
ret
LEAF_END_MARKED JIT_ByRefWriteBarrier, _TEXT
// Touch the card table entry, if not already dirty.
shr rdi, 0x0B
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardTable_PreGrow64
REPRET
UpdateCardTable_PreGrow64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
NOP_6_BYTE // padding for alignment of constant
// Touch the card bundle, if not already dirty.
// rdi is already shifted by 0xB, so shift by 0xA more
shr rdi, 0x0A
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardBundle_PreGrow64
REPRET
UpdateCardBundle_PreGrow64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#endif
ret
// Touch the card table entry, if not already dirty.
shr rdi, 0x0B
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardTable_PostGrow64
REPRET
UpdateCardTable_PostGrow64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
NOP_6_BYTE // padding for alignment of constant
// Touch the card bundle, if not already dirty.
// rdi is already shifted by 0xB, so shift by 0xA more
shr rdi, 0x0A
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardBundle_PostGrow64
REPRET
UpdateCardBundle_PostGrow64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#endif
ret
shr rdi, 0x0B
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardTable_SVR64
REPRET
UpdateCardTable_SVR64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
NOP_6_BYTE // padding for alignment of constant
// Shift the address by 0xA more since already shifted by 0xB
shr rdi, 0x0A
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardBundle_SVR64
REPRET
UpdateCardBundle_SVR64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#endif
ret
mov rax, rdi
PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_WriteWatchTable
movabs r10, 0xF0F0F0F0F0F0F0F0
- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift
+ shr rax, 0x0C // SoftwareWriteWatch::AddressToTableByteIndexShift
NOP_2_BYTE // padding for alignment of constant
PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_Lower
movabs r11, 0xF0F0F0F0F0F0F0F0
add rax, r10
- cmp byte ptr [rax], 0h
+ cmp byte ptr [rax], 0x0
.byte 0x75, 0x03
// jne CheckCardTable_WriteWatch_PreGrow64
- mov byte ptr [rax], 0FFh
+ mov byte ptr [rax], 0xFF
CheckCardTable_WriteWatch_PreGrow64:
// Check the lower ephemeral region bound.
NOP_2_BYTE // padding for alignment of constant
PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_CardTable
movabs rax, 0xF0F0F0F0F0F0F0F0
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardTable_WriteWatch_PreGrow64
REPRET
UpdateCardTable_WriteWatch_PreGrow64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
NOP_2_BYTE // padding for alignment of constant
movabs rax, 0xF0F0F0F0F0F0F0F0
shr rdi, 0x0A
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardBundle_WriteWatch_PreGrow64
REPRET
UpdateCardBundle_WriteWatch_PreGrow64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#endif
ret
mov rax, rdi
PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_WriteWatchTable
movabs r10, 0xF0F0F0F0F0F0F0F0
- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift
+ shr rax, 0x0C // SoftwareWriteWatch::AddressToTableByteIndexShift
NOP_2_BYTE // padding for alignment of constant
PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_Lower
movabs r11, 0xF0F0F0F0F0F0F0F0
add rax, r10
- cmp byte ptr [rax], 0h
+ cmp byte ptr [rax], 0x0
.byte 0x75, 0x06
// jne CheckCardTable_WriteWatch_PostGrow64
- mov byte ptr [rax], 0FFh
+ mov byte ptr [rax], 0xFF
NOP_3_BYTE // padding for alignment of constant
// Touch the card table entry, if not already dirty.
shr rdi, 0x0B
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardTable_WriteWatch_PostGrow64
REPRET
UpdateCardTable_WriteWatch_PostGrow64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
NOP_2_BYTE // padding for alignment of constant
PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_CardBundleTable
movabs rax, 0xF0F0F0F0F0F0F0F0
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardBundle_WriteWatch_PostGrow64
REPRET
UpdateCardBundle_WriteWatch_PostGrow64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#endif
ret
mov rax, rdi
PATCH_LABEL JIT_WriteBarrier_WriteWatch_SVR64_PatchLabel_WriteWatchTable
movabs r10, 0xF0F0F0F0F0F0F0F0
- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift
+ shr rax, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift
NOP_2_BYTE // padding for alignment of constant
PATCH_LABEL JIT_WriteBarrier_WriteWatch_SVR64_PatchLabel_CardTable
movabs r11, 0xF0F0F0F0F0F0F0F0
add rax, r10
- cmp byte ptr [rax], 0h
+ cmp byte ptr [rax], 0x0
.byte 0x75, 0x03
// jne CheckCardTable_WriteWatch_SVR64
- mov byte ptr [rax], 0FFh
+ mov byte ptr [rax], 0xFF
CheckCardTable_WriteWatch_SVR64:
shr rdi, 0x0B
- cmp byte ptr [rdi + r11], 0FFh
+ cmp byte ptr [rdi + r11], 0xFF
.byte 0x75, 0x02
// jne UpdateCardTable_WriteWatch_SVR64
REPRET
UpdateCardTable_WriteWatch_SVR64:
- mov byte ptr [rdi + r11], 0FFh
+ mov byte ptr [rdi + r11], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
NOP // padding for alignment of constant
movabs r11, 0xF0F0F0F0F0F0F0F0
shr rdi, 0x0A
- cmp byte ptr [rdi + r11], 0FFh
+ cmp byte ptr [rdi + r11], 0xFF
.byte 0x75, 0x02
// jne UpdateCardBundle_WriteWatch_SVR64
REPRET
UpdateCardBundle_WriteWatch_SVR64:
- mov byte ptr [rdi + r11], 0FFh
+ mov byte ptr [rdi + r11], 0xFF
#endif
ret
#ifdef FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP
// Update the write watch table if necessary
PREPARE_EXTERNAL_VAR g_sw_ww_enabled_for_gc_heap, r10
- cmp byte ptr [r10], 0h
+ cmp byte ptr [r10], 0x0
je CheckCardTable_Debug
mov r10, rdi
- shr r10, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift
+ shr r10, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift
PREPARE_EXTERNAL_VAR g_sw_ww_table, r11
add r10, qword ptr [r11]
- cmp byte ptr [r10], 0h
+ cmp byte ptr [r10], 0x0
jne CheckCardTable_Debug
- mov byte ptr [r10], 0FFh
+ mov byte ptr [r10], 0xFF
#endif
CheckCardTable_Debug:
mov r10, [r10]
// Check if this card is dirty
- cmp byte ptr [rdi + r10], 0FFh
+ cmp byte ptr [rdi + r10], 0xFF
jne UpdateCardTable_Debug
REPRET
UpdateCardTable_Debug:
- mov byte ptr [rdi + r10], 0FFh
+ mov byte ptr [rdi + r10], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
// Shift rdi by 0x0A more to get the card bundle byte (we shifted by 0x0B already)
add rdi, [r10]
// Check if this bundle byte is dirty
- cmp byte ptr [rdi], 0FFh
+ cmp byte ptr [rdi], 0xFF
jne UpdateCardBundle_Debug
REPRET
UpdateCardBundle_Debug:
- mov byte ptr [rdi], 0FFh
+ mov byte ptr [rdi], 0xFF
#endif
ret
jnz Fail_RWCLAS // If the BACKPATCH_FLAGS is set we will go directly to the ResolveWorkerAsmStub
MainLoop_RWCLAS:
- mov rax, [rax+18h] // get the next entry in the chain (don't bother checking the first entry again)
+ mov rax, [rax+0x18] // get the next entry in the chain (don't bother checking the first entry again)
test rax,rax // test if we hit a terminating NULL
jz Fail_RWCLAS
- cmp rdx, [rax+00h] // compare our MT with the one in the ResolveCacheElem
+ cmp rdx, [rax+0x00] // compare our MT with the one in the ResolveCacheElem
jne MainLoop_RWCLAS
- cmp r10, [rax+08h] // compare our DispatchToken with one in the ResolveCacheElem
+ cmp r10, [rax+0x08] // compare our DispatchToken with one in the ResolveCacheElem
jne MainLoop_RWCLAS
Success_RWCLAS:
PREPARE_EXTERNAL_VAR CHAIN_SUCCESS_COUNTER, rdx
sub qword ptr [rdx],1 // decrement success counter
jl Promote_RWCLAS
- mov rax, [rax+10h] // get the ImplTarget
+ mov rax, [rax+0x10] // get the ImplTarget
pop rdx
jmp rax
return 3 + (offsetOfIndirection >= 0x80 ? 7 : 4) + (offsetAfterIndirection >= 0x80 ? 6 : 3) + 4;
}
- static VTableCallHolder* VTableCallHolder::FromVTableCallEntry(PCODE entry) { LIMITED_METHOD_CONTRACT; return (VTableCallHolder*)entry; }
+ static VTableCallHolder* FromVTableCallEntry(PCODE entry) { LIMITED_METHOD_CONTRACT; return (VTableCallHolder*)entry; }
private:
// VTableCallStub follows here. It is dynamically sized on allocation because it could
resolveInit.part4 [2] = 0x50;
resolveInit.mtOffset = offsetof(ResolveCacheElem,pMT) & 0xFF;
resolveInit.part5 [0] = 0x75;
- resolveInit.toMiss1 = offsetof(ResolveStub,miss)-(offsetof(ResolveStub,toMiss1)+1) & 0xFF;
+ resolveInit.toMiss1 = (offsetof(ResolveStub,miss)-(offsetof(ResolveStub,toMiss1)+1)) & 0xFF;
resolveInit.part6 [0] = 0x4C;
resolveInit.part6 [1] = 0x3B;
resolveInit.part6 [2] = 0x50;
resolveInit.tokenOffset = offsetof(ResolveCacheElem,token) & 0xFF;
resolveInit.part7 [0] = 0x75;
- resolveInit.toMiss2 = offsetof(ResolveStub,miss)-(offsetof(ResolveStub,toMiss2)+1) & 0xFF;
+ resolveInit.toMiss2 = (offsetof(ResolveStub,miss)-(offsetof(ResolveStub,toMiss2)+1)) & 0xFF;
resolveInit.part8 [0] = 0x48;
resolveInit.part8 [1] = 0x8B;
resolveInit.part8 [2] = 0x40;
#if !defined(FEATURE_MERGE_JIT_AND_ENGINE)
// Global that holds the path to custom JIT location
-extern "C" LPCWSTR g_CLRJITPath = nullptr;
+LPCWSTR g_CLRJITPath = nullptr;
#endif // !defined(FEATURE_MERGE_JIT_AND_ENGINE)
union
{
PTR_NativeCodeVersionNode m_pVersionNode;
- struct SyntheticStorage
+ struct
{
PTR_MethodDesc m_pMethodDesc;
} m_synthetic;
union
{
PTR_ILCodeVersionNode m_pVersionNode;
- struct SyntheticStorage
+ struct
{
PTR_Module m_pModule;
mdMethodDef m_methodDef;
/*static*/ inline INT32 GCHeapHashDependentHashTrackerHashTraits::Hash(PtrTypeKey *pValue)
{
LIMITED_METHOD_CONTRACT;
- return (INT32)*pValue;
+ return (INT32)(SIZE_T)*pValue;
}
/*static*/ inline INT32 GCHeapHashDependentHashTrackerHashTraits::Hash(PTRARRAYREF arr, INT32 index)
/*static*/ INT32 KeyToValuesGCHeapHashTraits<TRAITS>::Hash(TKey *pValue)
{
LIMITED_METHOD_CONTRACT;
- return (INT32)(DWORD)*pValue;
+ return (INT32)(SIZE_T)*pValue;
}
template<class TRAITS>
WRAPPER_NO_CONTRACT;
m_pKeysToValueHash->GetElement(index, *m_pKeyValueStore);
- return VisitKeyValueStore(m_pLoaderAllocatorRef, m_pKeyValueStore, visitor);
+ return VisitKeyValueStore(m_pLoaderAllocatorRef, m_pKeyValueStore, m_pVisitor);
}
};
// rvaInfo->size are monotonically decreasing if rva are the same.
_ASSERTE(previousRvaInfo==NULL ||
previousRvaInfo->rva < rvaInfo->rva ||
- previousRvaInfo->rva == rvaInfo->rva && previousRvaInfo->size >= rvaInfo->size
+ ((previousRvaInfo->rva == rvaInfo->rva) && (previousRvaInfo->size >= rvaInfo->size))
);
if (previousRvaInfo==NULL || previousRvaInfo->rva != rvaInfo->rva) {
#ifdef FEATURE_PERFTRACING
-#ifndef __llvm__
+#ifndef __GNUC__
__declspec(thread) ThreadEventBufferList ThreadEventBufferList::gCurrentThreadEventBufferList;
-#else // !__llvm__
+#else // !__GNUC__
thread_local ThreadEventBufferList ThreadEventBufferList::gCurrentThreadEventBufferList;
-#endif // !__llvm__
+#endif // !__GNUC__
EventPipeBufferManager::EventPipeBufferManager()
{
// when the thread dies so we can free EventPipeBufferList in the destructor.
class ThreadEventBufferList
{
-#ifndef __llvm__
+#ifndef __GNUC__
__declspec(thread) static ThreadEventBufferList gCurrentThreadEventBufferList;
-#else // !__llvm__
+#else // !__GNUC__
thread_local static ThreadEventBufferList gCurrentThreadEventBufferList;
-#endif // !__llvm__
+#endif // !__GNUC__
EventPipeBufferList * m_pThreadEventBufferList = NULL;
~ThreadEventBufferList();
static count_t Hash(key_t k)
{
LIMITED_METHOD_DAC_CONTRACT;
- return ((count_t)k.m_methodDef ^ (count_t)k.m_module);
+ return ((count_t)k.m_methodDef ^ (count_t)(SIZE_T)k.m_module);
}
static const element_t Null()
{
void RecordAndBackpatchEntryPointSlot_Locked(LoaderAllocator *mdLoaderAllocator, LoaderAllocator *slotLoaderAllocator, TADDR slot, EntryPointSlots::SlotType slotType, PCODE currentEntryPoint);
public:
- void MethodDesc::BackpatchEntryPointSlots(PCODE entryPoint)
+ void BackpatchEntryPointSlots(PCODE entryPoint)
{
WRAPPER_NO_CONTRACT;
_ASSERTE(entryPoint != GetPrestubEntryPointToBackpatch());
BackpatchEntryPointSlots(entryPoint, false /* isPrestubEntryPoint */);
}
- void MethodDesc::BackpatchToResetEntryPointSlots()
+ void BackpatchToResetEntryPointSlots()
{
WRAPPER_NO_CONTRACT;
_ASSERTE(MayHaveEntryPointSlotsToBackpatch());
typedef CodeVersionManager * key_t;
static key_t GetKey(const element_t &e) { return e->m_pCodeVersionManager; }
static BOOL Equals(key_t k1, key_t k2) { return (k1 == k2); }
- static count_t Hash(key_t k) { return (count_t)k; }
+ static count_t Hash(key_t k) { return (count_t)(SIZE_T)k; }
static bool IsNull(const element_t &e) { return (e == NULL); }
};
CORCOMPILE_FIXUP_BLOB_KIND GetKind()
{
- int kind = (int)GetHandle();
+ int kind = (int)(SIZE_T)GetHandle();
if ((kind & 1) == 1)
{
case ZapNodeType_Import_ClassHandle:
case ZapNodeType_MethodHandle:
case ZapNodeType_Import_MethodHandle:
- hash = ((hash << 5) + hash) ^ (COUNT_T)(pTarget);
+ hash = ((hash << 5) + hash) ^ (COUNT_T)((SIZE_T)pTarget);
break;
default:
break;
static count_t Hash(key_t k)
{
LIMITED_METHOD_CONTRACT;
- return (count_t)k;
+ return (count_t)(SIZE_T)k;
}
static element_t Null() { LIMITED_METHOD_CONTRACT; return NULL; }
#include <windows.h>
+#ifndef DLLEXPORT
+#ifdef _MSC_VER
+#define DLLEXPORT __declspec(dllexport)
+#else
+#define DLLEXPORT __attribute__((visibility("default")))
+#endif
+#endif
+
// Entrypoint jumped to by IJW dlls when their dllmain is called
-extern "C" __declspec(dllexport) BOOL WINAPI _CorDllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpReserved)
+extern "C" DLLEXPORT BOOL WINAPI _CorDllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpReserved)
{
return TRUE;
}