Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Commit

Permalink
Delete ProjectN leftovers from the native runtime (#8049)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalStrehovsky authored Mar 23, 2020
1 parent 4cdb69a commit f83e42d
Show file tree
Hide file tree
Showing 51 changed files with 30 additions and 6,114 deletions.
1 change: 0 additions & 1 deletion src/Native/Runtime/AsmOffsetsVerify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "RuntimeInstance.h"
#include "CachedInterfaceDispatch.h"
#include "shash.h"
#include "module.h"
#include "CallDescr.h"

class AsmOffsets
Expand Down
7 changes: 0 additions & 7 deletions src/Native/Runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ set(COMMON_RUNTIME_SOURCES
gcrhenv.cpp
gcrhscan.cpp
GcStressControl.cpp
GenericUnification.cpp
HandleTableHelpers.cpp
MathHelpers.cpp
MiscHelpers.cpp
Expand All @@ -30,7 +29,6 @@ set(COMMON_RUNTIME_SOURCES
RhConfig.cpp
RuntimeInstance.cpp
RWLock.cpp
SectionMethodList.cpp
sha1.cpp
StackFrameIterator.cpp
startup.cpp
Expand All @@ -42,11 +40,6 @@ set(COMMON_RUNTIME_SOURCES
UniversalTransitionHelpers.cpp
yieldprocessornormalized.cpp

# ProjectN only
# gcdump.cpp
# module.cpp
# RHCodeMan.cpp

../gc/gceventstatus.cpp
../gc/gcload.cpp
../gc/gcconfig.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/Native/Runtime/CachedInterfaceDispatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "gcrhinterface.h"
#include "shash.h"
#include "RWLock.h"
#include "module.h"
#include "TypeManager.h"
#include "RuntimeInstance.h"
#include "eetype.inl"

Expand Down
21 changes: 0 additions & 21 deletions src/Native/Runtime/DebugEventSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "RuntimeInstance.h"
#include "gcrhinterface.h"
#include "shash.h"
#include "module.h"
#include "DebugEventSource.h"

#include "slist.inl"
Expand All @@ -33,16 +32,6 @@ bool EventEnabled(DebugEventType eventType)
((g_DebuggerEventsFilter & (1 << ((int)eventType-1))) != 0);
}

void DebugEventSource::SendModuleLoadEvent(Module* pModule)
{
if(!EventEnabled(DEBUG_EVENT_TYPE_LOAD_MODULE))
return;
DebugEventPayload payload;
payload.type = DEBUG_EVENT_TYPE_LOAD_MODULE;
payload.ModuleLoadUnload.pModuleHeader = (CORDB_ADDRESS)pModule->GetModuleHeader();
SendRawEvent(&payload);
}

void DebugEventSource::SendModuleLoadEvent(void* pAddressInModule)
{
if(!EventEnabled(DEBUG_EVENT_TYPE_LOAD_MODULE))
Expand All @@ -53,16 +42,6 @@ void DebugEventSource::SendModuleLoadEvent(void* pAddressInModule)
SendRawEvent(&payload);
}

void DebugEventSource::SendModuleUnloadEvent(Module* pModule)
{
if(!EventEnabled(DEBUG_EVENT_TYPE_UNLOAD_MODULE))
return;
DebugEventPayload payload;
payload.type = DEBUG_EVENT_TYPE_UNLOAD_MODULE;
payload.ModuleLoadUnload.pModuleHeader = (CORDB_ADDRESS)pModule->GetModuleHeader();
SendRawEvent(&payload);
}

void DebugEventSource::SendExceptionThrownEvent(CORDB_ADDRESS faultingIP, CORDB_ADDRESS faultingFrameSP)
{
if(!EventEnabled(DEBUG_EVENT_TYPE_EXCEPTION_THROWN))
Expand Down
3 changes: 0 additions & 3 deletions src/Native/Runtime/DebugEventSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@ typedef UInt64 CORDB_ADDRESS;
#ifndef DACCESS_COMPILE

struct DebugEventPayload;
class Module;

class DebugEventSource
{
public:
static void SendModuleLoadEvent(void* addressInModule);
static void SendModuleLoadEvent(Module* pModule);
static void SendModuleUnloadEvent(Module* pModule);
static void SendExceptionThrownEvent(CORDB_ADDRESS faultingIP, CORDB_ADDRESS faultingFrameSP);
static void SendExceptionCatchHandlerFoundEvent(CORDB_ADDRESS handlerIP, CORDB_ADDRESS HandlerFrameSP);
static void SendExceptionUnhandledEvent();
Expand Down
13 changes: 1 addition & 12 deletions src/Native/Runtime/EHHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "gcrhinterface.h"
#include "shash.h"
#include "RWLock.h"
#include "module.h"
#include "TypeManager.h"
#include "varint.h"
#include "PalRedhawkCommon.h"
#include "PalRedhawk.h"
Expand Down Expand Up @@ -309,19 +309,8 @@ static bool InWriteBarrierHelper(UIntNative faultingIP)
(UIntNative)&RhpCheckedAssignRefAVLocation,
(UIntNative)&RhpCheckedLockCmpXchgAVLocation,
(UIntNative)&RhpCheckedXchgAVLocation,
#ifdef PROJECTN
(UIntNative)&RhpCopyMultibyteDestAVLocation,
(UIntNative)&RhpCopyMultibyteSrcAVLocation,
(UIntNative)&RhpCopyMultibyteNoGCRefsDestAVLocation,
(UIntNative)&RhpCopyMultibyteNoGCRefsSrcAVLocation,
(UIntNative)&RhpCopyMultibyteWithWriteBarrierDestAVLocation,
(UIntNative)&RhpCopyMultibyteWithWriteBarrierSrcAVLocation,
(UIntNative)&RhpCopyAnyWithWriteBarrierDestAVLocation,
(UIntNative)&RhpCopyAnyWithWriteBarrierSrcAVLocation,
#else
(UIntNative)&RhpLockCmpXchg32AVLocation,
(UIntNative)&RhpLockCmpXchg64AVLocation,
#endif
};

// compare the IP against the list of known possible AV locations in the write barrier helpers
Expand Down
27 changes: 0 additions & 27 deletions src/Native/Runtime/FinalizerHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "RWLock.h"
#include "RuntimeInstance.h"
#include "shash.h"
#include "module.h"

#include "regdisplay.h"
#include "StackFrameIterator.h"
Expand Down Expand Up @@ -262,29 +261,3 @@ COOP_PINVOKE_HELPER(OBJECTREF, RhpGetNextFinalizableObject, ())
return refNext;
}
}

// This function walks the list of modules looking for any module that is a class library and has not yet
// had its finalizer init callback invoked. It gets invoked in a loop, so it's technically O(n*m), but the
// number of classlibs subscribing to this callback is almost certainly going to be 1.
COOP_PINVOKE_HELPER(void *, RhpGetNextFinalizerInitCallback, ())
{
FOREACH_MODULE(pModule)
{
if (pModule->IsClasslibModule()
&& !pModule->IsFinalizerInitComplete())
{
pModule->SetFinalizerInitComplete();
void * retval = pModule->GetClasslibInitializeFinalizerThread();

// The caller loops until we return null, so we should only be returning null if we've walked all
// the modules and found no callbacks yet to be made.
if (retval != NULL)
{
return retval;
}
}
}
END_FOREACH_MODULE;

return NULL;
}
Loading

0 comments on commit f83e42d

Please sign in to comment.