diff --git a/src/coreclr/inc/corinfo.h b/src/coreclr/inc/corinfo.h index 5b2eb0798cc4ff..2128b8cabe7c32 100644 --- a/src/coreclr/inc/corinfo.h +++ b/src/coreclr/inc/corinfo.h @@ -594,8 +594,6 @@ enum CorInfoHelpFunc CORINFO_HELP_VALIDATE_INDIRECT_CALL, // CFG: Validate function pointer CORINFO_HELP_DISPATCH_INDIRECT_CALL, // CFG: Validate and dispatch to pointer - CORINFO_HELP_ENSURE_NONHEAP, // Ensure that the target was not in the heap. - CORINFO_HELP_COUNT, }; diff --git a/src/coreclr/inc/jithelpers.h b/src/coreclr/inc/jithelpers.h index 9976016820dd90..38114a9bbfcada 100644 --- a/src/coreclr/inc/jithelpers.h +++ b/src/coreclr/inc/jithelpers.h @@ -341,7 +341,6 @@ JITHELPER(CORINFO_HELP_VALIDATE_INDIRECT_CALL, NULL, METHOD__NIL) JITHELPER(CORINFO_HELP_DISPATCH_INDIRECT_CALL, NULL, METHOD__NIL) #endif - JITHELPER(CORINFO_HELP_ENSURE_NONHEAP, JIT_EnsureNonHeapTarget,METHOD__NIL) #undef JITHELPER #undef DYNAMICJITHELPER diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index 0757280bd3aa89..b2abdfdc0498f7 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -10795,7 +10795,6 @@ class Compiler STRESS_MODE(POISON_IMPLICIT_BYREFS) \ STRESS_MODE(STORE_BLOCK_UNROLLING) \ STRESS_MODE(THREE_OPT_LAYOUT) \ - STRESS_MODE(NONHEAP_RET_BUFFER) \ STRESS_MODE(COUNT) enum compStressArea diff --git a/src/coreclr/jit/flowgraph.cpp b/src/coreclr/jit/flowgraph.cpp index 892f0919df26e5..369b7b7a30241c 100644 --- a/src/coreclr/jit/flowgraph.cpp +++ b/src/coreclr/jit/flowgraph.cpp @@ -2457,17 +2457,6 @@ PhaseStatus Compiler::fgAddInternal() noway_assert(!dbgHandle || !pDbgHandle); -#if DEBUG - // JitStress: Insert a helper call to ensure that the return buffer is not on the GC heap. - if (compStressCompile(STRESS_NONHEAP_RET_BUFFER, 50) && (info.compRetBuffArg != BAD_VAR_NUM) && - !opts.IsReadyToRun()) - { - GenTree* retBuffAddr = gtNewLclvNode(info.compRetBuffArg, TYP_BYREF); - fgNewStmtAtBeg(fgFirstBB, gtNewHelperCallNode(CORINFO_HELP_ENSURE_NONHEAP, TYP_VOID, retBuffAddr)); - madeChanges = true; - } -#endif - if (dbgHandle || pDbgHandle) { // Test the JustMyCode VM global state variable diff --git a/src/coreclr/jit/utils.cpp b/src/coreclr/jit/utils.cpp index bb0d62af848f77..b308408a47e5d5 100644 --- a/src/coreclr/jit/utils.cpp +++ b/src/coreclr/jit/utils.cpp @@ -1770,7 +1770,6 @@ void HelperCallProperties::init() isNoGC = true; FALLTHROUGH; case CORINFO_HELP_ASSIGN_REF_ENSURE_NONHEAP: - case CORINFO_HELP_ENSURE_NONHEAP: case CORINFO_HELP_BULK_WRITEBARRIER: mutatesHeap = true; break; diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs b/src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs index 88cd51c01e16b9..04bca41e476671 100644 --- a/src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs +++ b/src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs @@ -284,8 +284,6 @@ which is the right helper to use to allocate an object of a given type. */ CORINFO_HELP_VALIDATE_INDIRECT_CALL, // CFG: Validate function pointer CORINFO_HELP_DISPATCH_INDIRECT_CALL, // CFG: Validate and dispatch to pointer - CORINFO_HELP_ENSURE_NONHEAP, // Ensure that the target was not in the heap. - CORINFO_HELP_COUNT, } } diff --git a/src/coreclr/vm/gchelpers.cpp b/src/coreclr/vm/gchelpers.cpp index 048e840728feda..f002fbe1b59a27 100644 --- a/src/coreclr/vm/gchelpers.cpp +++ b/src/coreclr/vm/gchelpers.cpp @@ -1466,16 +1466,6 @@ extern "C" HCIMPL2_RAW(VOID, JIT_WriteBarrierEnsureNonHeapTarget, Object **dst, } HCIMPLEND_RAW -extern "C" HCIMPL1_RAW(VOID, JIT_EnsureNonHeapTarget, void *dst) -{ - STATIC_CONTRACT_MODE_COOPERATIVE; - STATIC_CONTRACT_THROWS; - STATIC_CONTRACT_GC_NOTRIGGER; - - _ASSERT(!GCHeapUtilities::GetGCHeap()->IsHeapPointer(dst)); -} -HCIMPLEND_RAW - // This function sets the card table with the granularity of 1 byte, to avoid ghost updates // that could occur if multiple threads were trying to set different bits in the same card. diff --git a/src/coreclr/vm/jitinterface.h b/src/coreclr/vm/jitinterface.h index 1f8986619ab303..7f1835e458a53a 100644 --- a/src/coreclr/vm/jitinterface.h +++ b/src/coreclr/vm/jitinterface.h @@ -235,7 +235,6 @@ extern "C" FCDECL2(VOID, JIT_CheckedWriteBarrier, Object **dst, Object *ref); extern "C" FCDECL2(VOID, JIT_WriteBarrier, Object **dst, Object *ref); extern "C" FCDECL2(VOID, JIT_WriteBarrierEnsureNonHeapTarget, Object **dst, Object *ref); -extern "C" FCDECL1(VOID, JIT_EnsureNonHeapTarget, void *dst); // ARM64 JIT_WriteBarrier uses special ABI and thus is not callable directly // Copied write barriers must be called at a different location