@@ -445,7 +445,7 @@ bool InitializeInterfaceDispatch()
445445 return true ;
446446}
447447
448- COOP_PINVOKE_HELPER (PTR_Code , RhpUpdateDispatchCellCache, (InterfaceDispatchCell * pCell, PTR_Code pTargetCode, MethodTable* pInstanceType, DispatchCellInfo *pNewCellInfo))
448+ COOP_PINVOKE_HELPER (PCODE , RhpUpdateDispatchCellCache, (InterfaceDispatchCell * pCell, PCODE pTargetCode, MethodTable* pInstanceType, DispatchCellInfo *pNewCellInfo))
449449{
450450 // Attempt to update the cache with this new mapping (if we have any cache at all, the initial state
451451 // is none).
@@ -458,8 +458,8 @@ COOP_PINVOKE_HELPER(PTR_Code, RhpUpdateDispatchCellCache, (InterfaceDispatchCell
458458 {
459459 if (pCacheEntry->m_pInstanceType == NULL )
460460 {
461- if (UpdateCacheEntryAtomically (pCacheEntry, pInstanceType, pTargetCode))
462- return (PTR_Code )pTargetCode;
461+ if (UpdateCacheEntryAtomically (pCacheEntry, pInstanceType, dac_cast<PTR_VOID>( pTargetCode) ))
462+ return (PCODE )pTargetCode;
463463 }
464464 }
465465
@@ -479,7 +479,7 @@ COOP_PINVOKE_HELPER(PTR_Code, RhpUpdateDispatchCellCache, (InterfaceDispatchCell
479479 // but it's not clear whether we should do this or re-tune the cache max size, we need to measure
480480 // this.
481481 CID_COUNTER_INC (CacheSizeOverflows);
482- return (PTR_Code )pTargetCode;
482+ return (PCODE )pTargetCode;
483483 }
484484
485485 uint32_t cNewCacheEntries = cOldCacheEntries ? cOldCacheEntries * 2 : 1 ;
@@ -488,7 +488,7 @@ COOP_PINVOKE_HELPER(PTR_Code, RhpUpdateDispatchCellCache, (InterfaceDispatchCell
488488 if (newCacheValue == 0 )
489489 {
490490 CID_COUNTER_INC (CacheOutOfMemory);
491- return (PTR_Code )pTargetCode;
491+ return (PCODE )pTargetCode;
492492 }
493493
494494 if (InterfaceDispatchCell::IsCache (newCacheValue))
@@ -513,10 +513,10 @@ COOP_PINVOKE_HELPER(PTR_Code, RhpUpdateDispatchCellCache, (InterfaceDispatchCell
513513 if (pDiscardedCache)
514514 DiscardCache (pDiscardedCache);
515515
516- return (PTR_Code )pTargetCode;
516+ return (PCODE )pTargetCode;
517517}
518518
519- COOP_PINVOKE_HELPER (PTR_Code , RhpSearchDispatchCellCache, (InterfaceDispatchCell * pCell, MethodTable* pInstanceType))
519+ COOP_PINVOKE_HELPER (PCODE , RhpSearchDispatchCellCache, (InterfaceDispatchCell * pCell, MethodTable* pInstanceType))
520520{
521521 // This function must be implemented in native code so that we do not take a GC while walking the cache
522522 InterfaceDispatchCache * pCache = (InterfaceDispatchCache*)pCell->GetCache ();
@@ -525,10 +525,10 @@ COOP_PINVOKE_HELPER(PTR_Code, RhpSearchDispatchCellCache, (InterfaceDispatchCell
525525 InterfaceDispatchCacheEntry * pCacheEntry = pCache->m_rgEntries ;
526526 for (uint32_t i = 0 ; i < pCache->m_cEntries ; i++, pCacheEntry++)
527527 if (pCacheEntry->m_pInstanceType == pInstanceType)
528- return (PTR_Code) pCacheEntry->m_pTargetCode ;
528+ return pCacheEntry->m_pTargetCode ;
529529 }
530530
531- return nullptr ;
531+ return (PCODE) nullptr ;
532532}
533533
534534// Given a dispatch cell, get the type and slot associated with it. This function MUST be implemented
0 commit comments