@@ -129,13 +129,13 @@ static bool UpdateCacheEntryAtomically(InterfaceDispatchCacheEntry *pEntry,
129129// supplied (in the case where another thread raced with us for the update and won). In any case, if the
130130// returned pointer is non-NULL it represents a cache that should be scheduled for release.
131131static InterfaceDispatchCache * UpdateCellStubAndCache (InterfaceDispatchCell * pCell,
132- void * pStub,
132+ PCODE pStub,
133133 uintptr_t newCacheValue)
134134{
135135 static_assert (offsetof (InterfaceDispatchCell, m_pStub) == 0 );
136136 static_assert (offsetof (InterfaceDispatchCell, m_pCache) == sizeof (void *));
137137
138- uintptr_t oldCacheValue = (uintptr_t )UpdatePointerPairAtomically (pCell, pStub, (void *)newCacheValue, false );
138+ uintptr_t oldCacheValue = (uintptr_t )UpdatePointerPairAtomically (pCell, ( void *) pStub, (void *)newCacheValue, false );
139139
140140 if (InterfaceDispatchCell::IsCache (oldCacheValue))
141141 {
@@ -204,14 +204,14 @@ extern "C" void RhpVTableOffsetDispatch();
204204
205205typedef void (*InterfaceDispatchStub)();
206206
207- static void * g_rgDispatchStubs[CID_MAX_CACHE_SIZE_LOG2 + 1 ] = {
208- (void * )&RhpInterfaceDispatch1,
209- (void * )&RhpInterfaceDispatch2,
210- (void * )&RhpInterfaceDispatch4,
211- (void * )&RhpInterfaceDispatch8,
212- (void * )&RhpInterfaceDispatch16,
213- (void * )&RhpInterfaceDispatch32,
214- (void * )&RhpInterfaceDispatch64,
207+ static const PCODE g_rgDispatchStubs[CID_MAX_CACHE_SIZE_LOG2 + 1 ] = {
208+ (PCODE )&RhpInterfaceDispatch1,
209+ (PCODE )&RhpInterfaceDispatch2,
210+ (PCODE )&RhpInterfaceDispatch4,
211+ (PCODE )&RhpInterfaceDispatch8,
212+ (PCODE )&RhpInterfaceDispatch16,
213+ (PCODE )&RhpInterfaceDispatch32,
214+ (PCODE )&RhpInterfaceDispatch64,
215215};
216216
217217// Map a cache size into a linear index.
@@ -241,12 +241,12 @@ static uint32_t CacheSizeToIndex(uint32_t cCacheEntries)
241241// Allocates and initializes new cache of the given size. If given a previous version of the cache (guaranteed
242242// to be smaller) it will also pre-populate the new cache with the contents of the old. Additionally the
243243// address of the interface dispatch stub associated with this size of cache is returned.
244- static uintptr_t AllocateCache (uint32_t cCacheEntries, InterfaceDispatchCache * pExistingCache, const DispatchCellInfo *pNewCellInfo, void * * ppStub)
244+ static uintptr_t AllocateCache (uint32_t cCacheEntries, InterfaceDispatchCache * pExistingCache, const DispatchCellInfo *pNewCellInfo, PCODE * ppStub)
245245{
246246#ifndef FEATURE_NATIVEAOT
247247 if (pNewCellInfo->CellType == DispatchCellType::VTableOffset)
248248 {
249- *ppStub = (void * )&RhpVTableOffsetDispatch;
249+ *ppStub = (PCODE )&RhpVTableOffsetDispatch;
250250 ASSERT (!InterfaceDispatchCell::IsCache (pNewCellInfo->GetVTableOffset ()));
251251 return pNewCellInfo->GetVTableOffset ();
252252 }
@@ -455,7 +455,7 @@ PCODE InterfaceDispatch_UpdateDispatchCellCache(InterfaceDispatchCell * pCell, P
455455 }
456456
457457 uint32_t cNewCacheEntries = cOldCacheEntries ? cOldCacheEntries * 2 : 1 ;
458- void * pStub;
458+ PCODE pStub;
459459 uintptr_t newCacheValue = AllocateCache (cNewCacheEntries, pCache, pNewCellInfo, &pStub);
460460 if (newCacheValue == 0 )
461461 {
0 commit comments