From 894f22d768e510fddb34259eca1107a5b26c9415 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Sat, 20 Jul 2024 18:03:22 -0800 Subject: [PATCH] Delete dead code related to intercept stubs (#105127) --- src/coreclr/vm/dllimport.cpp | 12 ------------ src/coreclr/vm/stubmgr.cpp | 8 -------- 2 files changed, 20 deletions(-) diff --git a/src/coreclr/vm/dllimport.cpp b/src/coreclr/vm/dllimport.cpp index 2d36566a3fb2f..d6ebd11a59c37 100644 --- a/src/coreclr/vm/dllimport.cpp +++ b/src/coreclr/vm/dllimport.cpp @@ -688,16 +688,6 @@ class ILStubState : public StubState pcsDispatch->EmitCALL(METHOD__STUBHELPERS__SET_LAST_ERROR, 0, 0); } -#if defined(TARGET_X86) - if (SF_IsForwardDelegateStub(m_dwStubFlags)) - { - // the delegate may have an intercept stub attached to its sync block so we should - // prevent it from being garbage collected when the call is in progress - pcsDispatch->EmitLoadThis(); - pcsDispatch->EmitCALL(METHOD__GC__KEEP_ALIVE, 1, 0); - } -#endif // defined(TARGET_X86) - #ifdef VERIFY_HEAP if (SF_IsForwardStub(m_dwStubFlags) && g_pConfig->InteropValidatePinnedObjects()) { @@ -5143,8 +5133,6 @@ namespace // copy the stack arg byte count from the stub MD to the target MD - this number is computed // during stub generation and is copied to all target MDs that share the stub // (we don't set it for varargs - the number is call site specific) - // also copy the "takes parameters with copy constructors" flag which is needed to generate - // appropriate intercept stub WORD cbStackArgSize = pStubMD->AsDynamicMethodDesc()->GetNativeStackArgSize(); if (pTargetMD->IsNDirect()) diff --git a/src/coreclr/vm/stubmgr.cpp b/src/coreclr/vm/stubmgr.cpp index a916f00a27605..f70756f8b1aa6 100644 --- a/src/coreclr/vm/stubmgr.cpp +++ b/src/coreclr/vm/stubmgr.cpp @@ -1258,14 +1258,6 @@ BOOL StubLinkStubManager::DoTraceStub(PCODE stubStartAddress, LOG((LF_CORDB, LL_INFO10000, "StubLinkStubManager::DoTraceStub: stub=%p\n", stub)); - // - // If this is an intercept stub, we may be able to step - // into the intercepted stub. - // - // !!! Note that this case should not be necessary, it's just - // here until I get all of the patch offsets & frame patch - // methods in place. - // TADDR pRealAddr = 0; if (stub->IsMulticastDelegate()) {