diff --git a/docs/design/coreclr/botr/readytorun-format.md b/docs/design/coreclr/botr/readytorun-format.md index c19150ea667ee0..08d58deb0ab7bc 100644 --- a/docs/design/coreclr/botr/readytorun-format.md +++ b/docs/design/coreclr/botr/readytorun-format.md @@ -872,7 +872,7 @@ enum ReadyToRunHelper READYTORUN_HELPER_MemCpy = 0x41, // Get string handle lazily - READYTORUN_HELPER_GetString = 0x50, + READYTORUN_HELPER_GetString = 0x50, // Unused since READYTORUN_MAJOR_VERSION 17.0 // Used by /Tuning for Profile optimizations READYTORUN_HELPER_LogMethodEnter = 0x51, // Unused since READYTORUN_MAJOR_VERSION 10.0 diff --git a/src/coreclr/System.Private.CoreLib/src/System/String.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/String.CoreCLR.cs index a2c9f4f6e4e98c..3396efc142d0af 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/String.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/String.CoreCLR.cs @@ -10,20 +10,6 @@ namespace System { public partial class String { - [LibraryImport(RuntimeHelpers.QCall, EntryPoint = "String_StrCns")] - private static unsafe partial string* StrCnsInternal(uint rid, IntPtr scopeHandle); - - // implementation of CORINFO_HELP_STRCNS - [StackTraceHidden] - [DebuggerStepThrough] - [DebuggerHidden] - internal static unsafe string StrCns(uint rid, IntPtr scopeHandle) - { - string* ptr = StrCnsInternal(rid, scopeHandle); - Debug.Assert(ptr != null); - return *ptr; - } - [MethodImpl(MethodImplOptions.InternalCall)] internal static extern unsafe string FastAllocateString(MethodTable *pMT, nint length); diff --git a/src/coreclr/inc/corinfo.h b/src/coreclr/inc/corinfo.h index 7cd408af5905bb..babbcebe096e52 100644 --- a/src/coreclr/inc/corinfo.h +++ b/src/coreclr/inc/corinfo.h @@ -367,8 +367,6 @@ enum CorInfoHelpFunc CORINFO_HELP_NEWARR_1_VC, // optimized 1-D value class arrays CORINFO_HELP_NEWARR_1_ALIGN8, // like VC, but aligns the array start - CORINFO_HELP_STRCNS, // create a new string literal - /* Object model */ CORINFO_HELP_INITCLASS, // Initialize class if not already initialized @@ -3223,12 +3221,6 @@ class ICorDynamicInfo : public ICorStaticInfo CORINFO_CONST_LOOKUP * pResult ) = 0; - // get slow lazy string literal helper to use (CORINFO_HELP_STRCNS*). - // Returns CORINFO_HELP_UNDEF if lazy string literal helper cannot be used. - virtual CorInfoHelpFunc getLazyStringLiteralHelper( - CORINFO_MODULE_HANDLE handle - ) = 0; - virtual CORINFO_MODULE_HANDLE embedModuleHandle( CORINFO_MODULE_HANDLE handle, void **ppIndirection = NULL diff --git a/src/coreclr/inc/icorjitinfoimpl_generated.h b/src/coreclr/inc/icorjitinfoimpl_generated.h index 0be459ad10d94a..dcc4865513acf1 100644 --- a/src/coreclr/inc/icorjitinfoimpl_generated.h +++ b/src/coreclr/inc/icorjitinfoimpl_generated.h @@ -556,9 +556,6 @@ void getFunctionFixedEntryPoint( bool isUnsafeFunctionPointer, CORINFO_CONST_LOOKUP* pResult) override; -CorInfoHelpFunc getLazyStringLiteralHelper( - CORINFO_MODULE_HANDLE handle) override; - CORINFO_MODULE_HANDLE embedModuleHandle( CORINFO_MODULE_HANDLE handle, void** ppIndirection) override; diff --git a/src/coreclr/inc/jiteeversionguid.h b/src/coreclr/inc/jiteeversionguid.h index 45fffd0935c944..c85fafc1d7d5aa 100644 --- a/src/coreclr/inc/jiteeversionguid.h +++ b/src/coreclr/inc/jiteeversionguid.h @@ -37,11 +37,11 @@ #include -constexpr GUID JITEEVersionIdentifier = { /* 567f89f4-2ddb-4d80-9107-0ce8c30a18ff */ - 0x567f89f4, - 0x2ddb, - 0x4d80, - {0x91, 0x07, 0x0c, 0xe8, 0xc3, 0x0a, 0x18, 0xff} +constexpr GUID JITEEVersionIdentifier = { /* 4a42a64a-d034-44d4-8f0d-b7f67b3ea4dc */ + 0x4a42a64a, + 0xd034, + 0x44d4, + {0x8f, 0x0d, 0xb7, 0xf6, 0x7b, 0x3e, 0xa4, 0xdc} }; #endif // JIT_EE_VERSIONING_GUID_H diff --git a/src/coreclr/inc/jithelpers.h b/src/coreclr/inc/jithelpers.h index 9cc5c7e709158d..24ce3b00085129 100644 --- a/src/coreclr/inc/jithelpers.h +++ b/src/coreclr/inc/jithelpers.h @@ -112,8 +112,6 @@ DYNAMICJITHELPER(CORINFO_HELP_NEWARR_1_VC, RhpNewVariableSizeObject, METHOD__NIL) DYNAMICJITHELPER(CORINFO_HELP_NEWARR_1_ALIGN8, RhpNewVariableSizeObject, METHOD__NIL) - DYNAMICJITHELPER(CORINFO_HELP_STRCNS, NULL, METHOD__STRING__STRCNS) - // Object model DYNAMICJITHELPER(CORINFO_HELP_INITCLASS, NULL, METHOD__INITHELPERS__INITCLASS) DYNAMICJITHELPER(CORINFO_HELP_INITINSTCLASS, NULL, METHOD__INITHELPERS__INITINSTANTIATEDCLASS) diff --git a/src/coreclr/inc/readytorun.h b/src/coreclr/inc/readytorun.h index 2f2ec3a0a577ac..db88393b101576 100644 --- a/src/coreclr/inc/readytorun.h +++ b/src/coreclr/inc/readytorun.h @@ -360,7 +360,7 @@ enum ReadyToRunHelper READYTORUN_HELPER_ReversePInvokeExit = 0x46, // Get string handle lazily - READYTORUN_HELPER_GetString = 0x50, + READYTORUN_HELPER_GetString = 0x50, // No longer supported as of READYTORUN_MAJOR_VERSION 17.0 // Used by /Tuning for Profile optimizations READYTORUN_HELPER_LogMethodEnter = 0x51, // No longer supported as of READYTORUN_MAJOR_VERSION 10.0 diff --git a/src/coreclr/jit/ICorJitInfo_names_generated.h b/src/coreclr/jit/ICorJitInfo_names_generated.h index ec4b01cf8899cc..2d1ce082f8d53f 100644 --- a/src/coreclr/jit/ICorJitInfo_names_generated.h +++ b/src/coreclr/jit/ICorJitInfo_names_generated.h @@ -137,7 +137,6 @@ DEF_CLR_API(getAddrOfCaptureThreadGlobal) DEF_CLR_API(getHelperFtn) DEF_CLR_API(getFunctionEntryPoint) DEF_CLR_API(getFunctionFixedEntryPoint) -DEF_CLR_API(getLazyStringLiteralHelper) DEF_CLR_API(embedModuleHandle) DEF_CLR_API(embedClassHandle) DEF_CLR_API(embedMethodHandle) diff --git a/src/coreclr/jit/ICorJitInfo_wrapper_generated.hpp b/src/coreclr/jit/ICorJitInfo_wrapper_generated.hpp index 0f1ff35e09c461..b8073df5e97987 100644 --- a/src/coreclr/jit/ICorJitInfo_wrapper_generated.hpp +++ b/src/coreclr/jit/ICorJitInfo_wrapper_generated.hpp @@ -1310,15 +1310,6 @@ void WrapICorJitInfo::getFunctionFixedEntryPoint( API_LEAVE(getFunctionFixedEntryPoint); } -CorInfoHelpFunc WrapICorJitInfo::getLazyStringLiteralHelper( - CORINFO_MODULE_HANDLE handle) -{ - API_ENTER(getLazyStringLiteralHelper); - CorInfoHelpFunc temp = wrapHnd->getLazyStringLiteralHelper(handle); - API_LEAVE(getLazyStringLiteralHelper); - return temp; -} - CORINFO_MODULE_HANDLE WrapICorJitInfo::embedModuleHandle( CORINFO_MODULE_HANDLE handle, void** ppIndirection) diff --git a/src/coreclr/jit/compiler.hpp b/src/coreclr/jit/compiler.hpp index 47e7823164dd75..148b87544d1f95 100644 --- a/src/coreclr/jit/compiler.hpp +++ b/src/coreclr/jit/compiler.hpp @@ -4057,7 +4057,7 @@ inline bool Compiler::IsSharedStaticHelper(GenTree* tree) bool result1 = // More helpers being added to IsSharedStaticHelper (that have similar behaviors but are not true // ShareStaticHelpers) - helper == CORINFO_HELP_STRCNS || helper == CORINFO_HELP_BOX || + helper == CORINFO_HELP_BOX || // helpers being added to IsSharedStaticHelper helper == CORINFO_HELP_GETSTATICFIELDADDR_TLS || diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp index 4ff8ab98614953..b235704b37d2ce 100644 --- a/src/coreclr/jit/morph.cpp +++ b/src/coreclr/jit/morph.cpp @@ -6714,36 +6714,6 @@ GenTree* Compiler::fgMorphConst(GenTree* tree) return fgMorphTree(gtNewStringLiteralNode(iat, pValue)); } - // TODO-CQ: Do this for compCurBB->isRunRarely(). Doing that currently will - // guarantee slow performance for that block. Instead cache the return value - // of CORINFO_HELP_STRCNS and go to cache first giving reasonable perf. - - bool useLazyStrCns = false; - if (compCurBB->KindIs(BBJ_THROW)) - { - useLazyStrCns = true; - } - else if (fgGlobalMorph && compCurStmt->GetRootNode()->IsCall()) - { - // Quick check: if the root node of the current statement happens to be a noreturn call. - GenTreeCall* call = compCurStmt->GetRootNode()->AsCall(); - useLazyStrCns = call->IsNoReturn() || fgIsThrow(call); - } - - if (useLazyStrCns) - { - CorInfoHelpFunc helper = info.compCompHnd->getLazyStringLiteralHelper(tree->AsStrCon()->gtScpHnd); - if (helper != CORINFO_HELP_UNDEF) - { - // For un-important blocks, we want to construct the string lazily - - tree = - gtNewHelperCallNode(helper, TYP_REF, gtNewIconNode(RidFromToken(tree->AsStrCon()->gtSconCPX), TYP_INT), - gtNewIconEmbScpHndNode(tree->AsStrCon()->gtScpHnd)); - return fgMorphTree(tree); - } - } - assert(tree->AsStrCon()->gtScpHnd == info.compScopeHnd || !IsUninitialized(tree->AsStrCon()->gtScpHnd)); LPVOID pValue; diff --git a/src/coreclr/jit/utils.cpp b/src/coreclr/jit/utils.cpp index aeb3c76f2e18be..5923cafe07657a 100644 --- a/src/coreclr/jit/utils.cpp +++ b/src/coreclr/jit/utils.cpp @@ -1606,15 +1606,6 @@ void HelperCallProperties::init() nonNullReturn = true; break; - // Heap Allocation helpers that are also pure - case CORINFO_HELP_STRCNS: - - isPure = true; - isAllocator = true; - nonNullReturn = true; - exceptions = ExceptionSetFlags::None; // only can throw OutOfMemory - break; - case CORINFO_HELP_BOX_NULLABLE: // Box Nullable is not a 'pure' function // It has a Byref argument that it reads the contents of. diff --git a/src/coreclr/jit/valuenum.cpp b/src/coreclr/jit/valuenum.cpp index cd358f7af99952..0f969a1af32b69 100644 --- a/src/coreclr/jit/valuenum.cpp +++ b/src/coreclr/jit/valuenum.cpp @@ -14291,10 +14291,6 @@ VNFunc Compiler::fgValueNumberJitHelperMethodVNFunc(CorInfoHelpFunc helpFunc) vnf = VNF_RuntimeHandleClass; break; - case CORINFO_HELP_STRCNS: - vnf = VNF_LazyStrCns; - break; - case CORINFO_HELP_CHKCASTCLASS: case CORINFO_HELP_CHKCASTCLASS_SPECIAL: case CORINFO_HELP_CHKCASTARRAY: diff --git a/src/coreclr/jit/valuenumfuncs.h b/src/coreclr/jit/valuenumfuncs.h index a1b31849ace079..d2df32ae4e2db4 100644 --- a/src/coreclr/jit/valuenumfuncs.h +++ b/src/coreclr/jit/valuenumfuncs.h @@ -165,7 +165,6 @@ ValueNumFuncDef(JitReadyToRunNewLclArr, 3, false, true, false) ValueNumFuncDef(Box, 3, false, true, false) ValueNumFuncDef(BoxNullable, 3, false, false, false) -ValueNumFuncDef(LazyStrCns, 2, false, true, false) // Lazy-initialized string literal (helper) ValueNumFuncDef(InvariantLoad, 1, false, false, false) // Args: 0: (VN of) the address. ValueNumFuncDef(InvariantNonNullLoad, 1, false, true, false) // Args: 0: (VN of) the address. ValueNumFuncDef(Unbox, 2, false, false, false) diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs b/src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs index 2a8e08fe327cd0..55faa2e79b64de 100644 --- a/src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs +++ b/src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs @@ -59,7 +59,6 @@ which is the right helper to use to allocate an object of a given type. */ CORINFO_HELP_NEWARR_1_VC, // optimized 1-D value class arrays CORINFO_HELP_NEWARR_1_ALIGN8, // like VC, but aligns the array start - CORINFO_HELP_STRCNS, // create a new string literal /* Object model */ CORINFO_HELP_INITCLASS, // Initialize class if not already initialized diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs b/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs index 5ca092d1e5eae0..48395561a9c816 100644 --- a/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs +++ b/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs @@ -3655,14 +3655,6 @@ public static ReadyToRunHelperId GetReadyToRunHelperFromStaticBaseHelper(CorInfo private void getFunctionFixedEntryPoint(CORINFO_METHOD_STRUCT_* ftn, bool isUnsafeFunctionPointer, ref CORINFO_CONST_LOOKUP pResult) { throw new NotImplementedException("getFunctionFixedEntryPoint"); } -#pragma warning disable CA1822 // Mark members as static - private CorInfoHelpFunc getLazyStringLiteralHelper(CORINFO_MODULE_STRUCT_* handle) -#pragma warning restore CA1822 // Mark members as static - { - // TODO: Lazy string literal helper - return CorInfoHelpFunc.CORINFO_HELP_UNDEF; - } - private CORINFO_MODULE_STRUCT_* embedModuleHandle(CORINFO_MODULE_STRUCT_* handle, ref void* ppIndirection) { throw new NotImplementedException("embedModuleHandle"); } diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoImpl_generated.cs b/src/coreclr/tools/Common/JitInterface/CorInfoImpl_generated.cs index 772c840e422a37..56d2ca213c963a 100644 --- a/src/coreclr/tools/Common/JitInterface/CorInfoImpl_generated.cs +++ b/src/coreclr/tools/Common/JitInterface/CorInfoImpl_generated.cs @@ -1972,21 +1972,6 @@ private static void _getFunctionFixedEntryPoint(IntPtr thisHandle, IntPtr* ppExc } } - [UnmanagedCallersOnly] - private static CorInfoHelpFunc _getLazyStringLiteralHelper(IntPtr thisHandle, IntPtr* ppException, CORINFO_MODULE_STRUCT_* handle) - { - var _this = GetThis(thisHandle); - try - { - return _this.getLazyStringLiteralHelper(handle); - } - catch (Exception ex) - { - *ppException = _this.AllocException(ex); - return default; - } - } - [UnmanagedCallersOnly] private static CORINFO_MODULE_STRUCT_* _embedModuleHandle(IntPtr thisHandle, IntPtr* ppException, CORINFO_MODULE_STRUCT_* handle, void** ppIndirection) { @@ -2635,7 +2620,7 @@ private static uint _getJitFlags(IntPtr thisHandle, IntPtr* ppException, CORJIT_ private static IntPtr GetUnmanagedCallbacks() { - void** callbacks = (void**)NativeMemory.Alloc((nuint)(sizeof(void*) * 178)); + void** callbacks = (void**)NativeMemory.Alloc((nuint)(sizeof(void*) * 177)); callbacks[0] = (delegate* unmanaged)&_isIntrinsic; callbacks[1] = (delegate* unmanaged)&_notifyMethodInfoUsage; @@ -2770,51 +2755,50 @@ private static IntPtr GetUnmanagedCallbacks() callbacks[130] = (delegate* unmanaged)&_getHelperFtn; callbacks[131] = (delegate* unmanaged)&_getFunctionEntryPoint; callbacks[132] = (delegate* unmanaged)&_getFunctionFixedEntryPoint; - callbacks[133] = (delegate* unmanaged)&_getLazyStringLiteralHelper; - callbacks[134] = (delegate* unmanaged)&_embedModuleHandle; - callbacks[135] = (delegate* unmanaged)&_embedClassHandle; - callbacks[136] = (delegate* unmanaged)&_embedMethodHandle; - callbacks[137] = (delegate* unmanaged)&_embedFieldHandle; - callbacks[138] = (delegate* unmanaged)&_embedGenericHandle; - callbacks[139] = (delegate* unmanaged)&_getLocationOfThisType; - callbacks[140] = (delegate* unmanaged)&_getAddressOfPInvokeTarget; - callbacks[141] = (delegate* unmanaged)&_GetCookieForPInvokeCalliSig; - callbacks[142] = (delegate* unmanaged)&_GetCookieForInterpreterCalliSig; - callbacks[143] = (delegate* unmanaged)&_getJustMyCodeHandle; - callbacks[144] = (delegate* unmanaged)&_GetProfilingHandle; - callbacks[145] = (delegate* unmanaged)&_getCallInfo; - callbacks[146] = (delegate* unmanaged)&_getStaticFieldContent; - callbacks[147] = (delegate* unmanaged)&_getObjectContent; - callbacks[148] = (delegate* unmanaged)&_getStaticFieldCurrentClass; - callbacks[149] = (delegate* unmanaged)&_getVarArgsHandle; - callbacks[150] = (delegate* unmanaged)&_constructStringLiteral; - callbacks[151] = (delegate* unmanaged)&_emptyStringLiteral; - callbacks[152] = (delegate* unmanaged)&_getFieldThreadLocalStoreID; - callbacks[153] = (delegate* unmanaged)&_GetDelegateCtor; - callbacks[154] = (delegate* unmanaged)&_MethodCompileComplete; - callbacks[155] = (delegate* unmanaged)&_getTailCallHelpers; - callbacks[156] = (delegate* unmanaged)&_getContinuationType; - callbacks[157] = (delegate* unmanaged)&_getAsyncResumptionStub; - callbacks[158] = (delegate* unmanaged)&_convertPInvokeCalliToCall; - callbacks[159] = (delegate* unmanaged)&_notifyInstructionSetUsage; - callbacks[160] = (delegate* unmanaged)&_updateEntryPointForTailCall; - callbacks[161] = (delegate* unmanaged)&_allocMem; - callbacks[162] = (delegate* unmanaged)&_reserveUnwindInfo; - callbacks[163] = (delegate* unmanaged)&_allocUnwindInfo; - callbacks[164] = (delegate* unmanaged)&_allocGCInfo; - callbacks[165] = (delegate* unmanaged)&_setEHcount; - callbacks[166] = (delegate* unmanaged)&_setEHinfo; - callbacks[167] = (delegate* unmanaged)&_logMsg; - callbacks[168] = (delegate* unmanaged)&_doAssert; - callbacks[169] = (delegate* unmanaged)&_reportFatalError; - callbacks[170] = (delegate* unmanaged)&_getPgoInstrumentationResults; - callbacks[171] = (delegate* unmanaged)&_allocPgoInstrumentationBySchema; - callbacks[172] = (delegate* unmanaged)&_recordCallSite; - callbacks[173] = (delegate* unmanaged)&_recordRelocation; - callbacks[174] = (delegate* unmanaged)&_getRelocTypeHint; - callbacks[175] = (delegate* unmanaged)&_getExpectedTargetArchitecture; - callbacks[176] = (delegate* unmanaged)&_getJitFlags; - callbacks[177] = (delegate* unmanaged)&_getSpecialCopyHelper; + callbacks[133] = (delegate* unmanaged)&_embedModuleHandle; + callbacks[134] = (delegate* unmanaged)&_embedClassHandle; + callbacks[135] = (delegate* unmanaged)&_embedMethodHandle; + callbacks[136] = (delegate* unmanaged)&_embedFieldHandle; + callbacks[137] = (delegate* unmanaged)&_embedGenericHandle; + callbacks[138] = (delegate* unmanaged)&_getLocationOfThisType; + callbacks[139] = (delegate* unmanaged)&_getAddressOfPInvokeTarget; + callbacks[140] = (delegate* unmanaged)&_GetCookieForPInvokeCalliSig; + callbacks[141] = (delegate* unmanaged)&_GetCookieForInterpreterCalliSig; + callbacks[142] = (delegate* unmanaged)&_getJustMyCodeHandle; + callbacks[143] = (delegate* unmanaged)&_GetProfilingHandle; + callbacks[144] = (delegate* unmanaged)&_getCallInfo; + callbacks[145] = (delegate* unmanaged)&_getStaticFieldContent; + callbacks[146] = (delegate* unmanaged)&_getObjectContent; + callbacks[147] = (delegate* unmanaged)&_getStaticFieldCurrentClass; + callbacks[148] = (delegate* unmanaged)&_getVarArgsHandle; + callbacks[149] = (delegate* unmanaged)&_constructStringLiteral; + callbacks[150] = (delegate* unmanaged)&_emptyStringLiteral; + callbacks[151] = (delegate* unmanaged)&_getFieldThreadLocalStoreID; + callbacks[152] = (delegate* unmanaged)&_GetDelegateCtor; + callbacks[153] = (delegate* unmanaged)&_MethodCompileComplete; + callbacks[154] = (delegate* unmanaged)&_getTailCallHelpers; + callbacks[155] = (delegate* unmanaged)&_getContinuationType; + callbacks[156] = (delegate* unmanaged)&_getAsyncResumptionStub; + callbacks[157] = (delegate* unmanaged)&_convertPInvokeCalliToCall; + callbacks[158] = (delegate* unmanaged)&_notifyInstructionSetUsage; + callbacks[159] = (delegate* unmanaged)&_updateEntryPointForTailCall; + callbacks[160] = (delegate* unmanaged)&_allocMem; + callbacks[161] = (delegate* unmanaged)&_reserveUnwindInfo; + callbacks[162] = (delegate* unmanaged)&_allocUnwindInfo; + callbacks[163] = (delegate* unmanaged)&_allocGCInfo; + callbacks[164] = (delegate* unmanaged)&_setEHcount; + callbacks[165] = (delegate* unmanaged)&_setEHinfo; + callbacks[166] = (delegate* unmanaged)&_logMsg; + callbacks[167] = (delegate* unmanaged)&_doAssert; + callbacks[168] = (delegate* unmanaged)&_reportFatalError; + callbacks[169] = (delegate* unmanaged)&_getPgoInstrumentationResults; + callbacks[170] = (delegate* unmanaged)&_allocPgoInstrumentationBySchema; + callbacks[171] = (delegate* unmanaged)&_recordCallSite; + callbacks[172] = (delegate* unmanaged)&_recordRelocation; + callbacks[173] = (delegate* unmanaged)&_getRelocTypeHint; + callbacks[174] = (delegate* unmanaged)&_getExpectedTargetArchitecture; + callbacks[175] = (delegate* unmanaged)&_getJitFlags; + callbacks[176] = (delegate* unmanaged)&_getSpecialCopyHelper; return (IntPtr)callbacks; } diff --git a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt index c584192347b3e1..1212351dbcdb5d 100644 --- a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt +++ b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt @@ -303,7 +303,6 @@ FUNCTIONS void getHelperFtn (CorInfoHelpFunc ftnNum, CORINFO_CONST_LOOKUP* pNativeEntrypoint, CORINFO_METHOD_HANDLE *pMethod); void getFunctionEntryPoint(CORINFO_METHOD_HANDLE ftn, REF_CORINFO_CONST_LOOKUP pResult, CORINFO_ACCESS_FLAGS accessFlags); void getFunctionFixedEntryPoint(CORINFO_METHOD_HANDLE ftn, bool isUnsafeFunctionPointer, REF_CORINFO_CONST_LOOKUP pResult); - CorInfoHelpFunc getLazyStringLiteralHelper(CORINFO_MODULE_HANDLE handle); CORINFO_MODULE_HANDLE embedModuleHandle(CORINFO_MODULE_HANDLE handle, void **ppIndirection); CORINFO_CLASS_HANDLE embedClassHandle(CORINFO_CLASS_HANDLE handle, void **ppIndirection); CORINFO_METHOD_HANDLE embedMethodHandle(CORINFO_METHOD_HANDLE handle, void **ppIndirection); diff --git a/src/coreclr/tools/aot/jitinterface/jitinterface_generated.h b/src/coreclr/tools/aot/jitinterface/jitinterface_generated.h index 7d83f1102afc80..a2c772f0199586 100644 --- a/src/coreclr/tools/aot/jitinterface/jitinterface_generated.h +++ b/src/coreclr/tools/aot/jitinterface/jitinterface_generated.h @@ -144,7 +144,6 @@ struct JitInterfaceCallbacks void (* getHelperFtn)(void * thisHandle, CorInfoExceptionClass** ppException, CorInfoHelpFunc ftnNum, CORINFO_CONST_LOOKUP* pNativeEntrypoint, CORINFO_METHOD_HANDLE* pMethod); void (* getFunctionEntryPoint)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, CORINFO_CONST_LOOKUP* pResult, CORINFO_ACCESS_FLAGS accessFlags); void (* getFunctionFixedEntryPoint)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, bool isUnsafeFunctionPointer, CORINFO_CONST_LOOKUP* pResult); - CorInfoHelpFunc (* getLazyStringLiteralHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_MODULE_HANDLE handle); CORINFO_MODULE_HANDLE (* embedModuleHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_MODULE_HANDLE handle, void** ppIndirection); CORINFO_CLASS_HANDLE (* embedClassHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE handle, void** ppIndirection); CORINFO_METHOD_HANDLE (* embedMethodHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE handle, void** ppIndirection); @@ -1490,15 +1489,6 @@ class JitInterfaceWrapper : public ICorJitInfo if (pException != nullptr) throw pException; } - virtual CorInfoHelpFunc getLazyStringLiteralHelper( - CORINFO_MODULE_HANDLE handle) -{ - CorInfoExceptionClass* pException = nullptr; - CorInfoHelpFunc temp = _callbacks->getLazyStringLiteralHelper(_thisHandle, &pException, handle); - if (pException != nullptr) throw pException; - return temp; -} - virtual CORINFO_MODULE_HANDLE embedModuleHandle( CORINFO_MODULE_HANDLE handle, void** ppIndirection) diff --git a/src/coreclr/tools/superpmi/superpmi-shared/lwmlist.h b/src/coreclr/tools/superpmi/superpmi-shared/lwmlist.h index 12272fc9e0d63b..22449f398bdad6 100644 --- a/src/coreclr/tools/superpmi/superpmi-shared/lwmlist.h +++ b/src/coreclr/tools/superpmi/superpmi-shared/lwmlist.h @@ -98,7 +98,6 @@ LWM(GetHFAType, DWORDLONG, DWORD) LWM(GetIntConfigValue, Agnostic_ConfigIntInfo, DWORD) LWM(GetJitFlags, DWORD, DD) LWM(GetJustMyCodeHandle, DWORDLONG, DLDL) -LWM(GetLazyStringLiteralHelper, DWORDLONG, DWORD) LWM(GetLocationOfThisType, DWORDLONG, Agnostic_CORINFO_LOOKUP_KIND) LWM(IsIntrinsic, DWORDLONG, DWORD) LWM(NotifyMethodInfoUsage, DWORDLONG, DWORD) diff --git a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp index 9dbb8b8d6a40ff..a3acbfa86f21ad 100644 --- a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp +++ b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp @@ -2099,29 +2099,6 @@ unsigned MethodContext::repGetFieldOffset(CORINFO_FIELD_HANDLE field) return result; } -void MethodContext::recGetLazyStringLiteralHelper(CORINFO_MODULE_HANDLE handle, CorInfoHelpFunc result) -{ - if (GetLazyStringLiteralHelper == nullptr) - GetLazyStringLiteralHelper = new LightWeightMap(); - - DWORDLONG key = CastHandle(handle); - DWORD value = (DWORD)result; - GetLazyStringLiteralHelper->Add(key, value); - DEBUG_REC(dmpGetLazyStringLiteralHelper(key, value)); -} -void MethodContext::dmpGetLazyStringLiteralHelper(DWORDLONG key, DWORD value) -{ - printf("GetLazyStringLiteralHelper key mod-%016" PRIX64 ", value res-%u", key, value); -} -CorInfoHelpFunc MethodContext::repGetLazyStringLiteralHelper(CORINFO_MODULE_HANDLE handle) -{ - DWORDLONG key = CastHandle(handle); - DWORD value = LookupByKeyOrMiss(GetLazyStringLiteralHelper, key, ": key %016" PRIX64 "", key); - DEBUG_REP(dmpGetLazyStringLiteralHelper(key, value)); - CorInfoHelpFunc result = (CorInfoHelpFunc)value; - return result; -} - void MethodContext::recGetUnBoxHelper(CORINFO_CLASS_HANDLE cls, CorInfoHelpFunc result) { if (GetUnBoxHelper == nullptr) diff --git a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h index e8c9ee85cd80f9..61bbdff04fb5d6 100644 --- a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h +++ b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h @@ -282,10 +282,6 @@ class MethodContext void dmpGetFieldOffset(DWORDLONG key, DWORD value); unsigned repGetFieldOffset(CORINFO_FIELD_HANDLE field); - void recGetLazyStringLiteralHelper(CORINFO_MODULE_HANDLE handle, CorInfoHelpFunc result); - void dmpGetLazyStringLiteralHelper(DWORDLONG key, DWORD value); - CorInfoHelpFunc repGetLazyStringLiteralHelper(CORINFO_MODULE_HANDLE handle); - void recGetUnBoxHelper(CORINFO_CLASS_HANDLE cls, CorInfoHelpFunc result); void dmpGetUnBoxHelper(DWORDLONG key, DWORD value); CorInfoHelpFunc repGetUnBoxHelper(CORINFO_CLASS_HANDLE cls); @@ -1125,7 +1121,7 @@ enum mcPackets //Packet_IsValidToken = 144, //Packet_FindNameOfToken = 145, //PacketCR_RecordCallSite = 146, - Packet_GetLazyStringLiteralHelper = 147, + //Packet_GetLazyStringLiteralHelper = 147, Packet_IsIntrinsicType = 148, Packet_PrintClassName = 149, Packet_GetReadyToRunHelper = 150, diff --git a/src/coreclr/tools/superpmi/superpmi-shim-collector/icorjitinfo.cpp b/src/coreclr/tools/superpmi/superpmi-shim-collector/icorjitinfo.cpp index 333c425d9af715..34c4cefbaa00f5 100644 --- a/src/coreclr/tools/superpmi/superpmi-shim-collector/icorjitinfo.cpp +++ b/src/coreclr/tools/superpmi/superpmi-shim-collector/icorjitinfo.cpp @@ -1518,16 +1518,6 @@ void interceptor_ICJI::getFunctionFixedEntryPoint( // the code to be passed to a JIT helper function. (as opposed to just // being passed back into the ICorInfo interface.) -// get slow lazy string literal helper to use (CORINFO_HELP_STRCNS*). -// Returns CORINFO_HELP_UNDEF if lazy string literal helper cannot be used. -CorInfoHelpFunc interceptor_ICJI::getLazyStringLiteralHelper(CORINFO_MODULE_HANDLE handle) -{ - mc->cr->AddCall("getLazyStringLiteralHelper"); - CorInfoHelpFunc temp = original_ICorJitInfo->getLazyStringLiteralHelper(handle); - mc->recGetLazyStringLiteralHelper(handle, temp); - return temp; -} - CORINFO_MODULE_HANDLE interceptor_ICJI::embedModuleHandle(CORINFO_MODULE_HANDLE handle, void** ppIndirection) { mc->cr->AddCall("embedModuleHandle"); diff --git a/src/coreclr/tools/superpmi/superpmi-shim-counter/icorjitinfo_generated.cpp b/src/coreclr/tools/superpmi/superpmi-shim-counter/icorjitinfo_generated.cpp index c261b9c0bbe217..1dd2a9520464ae 100644 --- a/src/coreclr/tools/superpmi/superpmi-shim-counter/icorjitinfo_generated.cpp +++ b/src/coreclr/tools/superpmi/superpmi-shim-counter/icorjitinfo_generated.cpp @@ -1079,13 +1079,6 @@ void interceptor_ICJI::getFunctionFixedEntryPoint( original_ICorJitInfo->getFunctionFixedEntryPoint(ftn, isUnsafeFunctionPointer, pResult); } -CorInfoHelpFunc interceptor_ICJI::getLazyStringLiteralHelper( - CORINFO_MODULE_HANDLE handle) -{ - mcs->AddCall("getLazyStringLiteralHelper"); - return original_ICorJitInfo->getLazyStringLiteralHelper(handle); -} - CORINFO_MODULE_HANDLE interceptor_ICJI::embedModuleHandle( CORINFO_MODULE_HANDLE handle, void** ppIndirection) diff --git a/src/coreclr/tools/superpmi/superpmi-shim-simple/icorjitinfo_generated.cpp b/src/coreclr/tools/superpmi/superpmi-shim-simple/icorjitinfo_generated.cpp index 5fda8e24f1c5cf..59f9a7dc4140b8 100644 --- a/src/coreclr/tools/superpmi/superpmi-shim-simple/icorjitinfo_generated.cpp +++ b/src/coreclr/tools/superpmi/superpmi-shim-simple/icorjitinfo_generated.cpp @@ -946,12 +946,6 @@ void interceptor_ICJI::getFunctionFixedEntryPoint( original_ICorJitInfo->getFunctionFixedEntryPoint(ftn, isUnsafeFunctionPointer, pResult); } -CorInfoHelpFunc interceptor_ICJI::getLazyStringLiteralHelper( - CORINFO_MODULE_HANDLE handle) -{ - return original_ICorJitInfo->getLazyStringLiteralHelper(handle); -} - CORINFO_MODULE_HANDLE interceptor_ICJI::embedModuleHandle( CORINFO_MODULE_HANDLE handle, void** ppIndirection) diff --git a/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp b/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp index ce1cdf2ecad824..4e7c6dc9e8b1a5 100644 --- a/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp +++ b/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp @@ -1315,14 +1315,6 @@ void MyICJI::getFunctionFixedEntryPoint( // the code to be passed to a JIT helper function. (as opposed to just // being passed back into the ICorInfo interface.) -// get slow lazy string literal helper to use (CORINFO_HELP_STRCNS*). -// Returns CORINFO_HELP_UNDEF if lazy string literal helper cannot be used. -CorInfoHelpFunc MyICJI::getLazyStringLiteralHelper(CORINFO_MODULE_HANDLE handle) -{ - jitInstance->mc->cr->AddCall("getLazyStringLiteralHelper"); - return jitInstance->mc->repGetLazyStringLiteralHelper(handle); -} - CORINFO_MODULE_HANDLE MyICJI::embedModuleHandle(CORINFO_MODULE_HANDLE handle, void** ppIndirection) { jitInstance->mc->cr->AddCall("embedModuleHandle"); diff --git a/src/coreclr/vm/appdomainnative.cpp b/src/coreclr/vm/appdomainnative.cpp index 0a447f284b11a3..ada5e6c7b689a0 100644 --- a/src/coreclr/vm/appdomainnative.cpp +++ b/src/coreclr/vm/appdomainnative.cpp @@ -129,22 +129,6 @@ extern "C" void QCALLTYPE String_IsInterned(QCall::StringHandleOnStack str) END_QCALL; } -extern "C" STRINGREF* QCALLTYPE String_StrCns(UINT32 rid, Module* pModule) -{ - QCALL_CONTRACT; - - STRINGREF* hndStr = NULL; - - BEGIN_QCALL; - - // Retrieve the handle to the CLR string object. - hndStr = pModule->ResolveStringRef(RidToToken(rid, mdtString)); - - END_QCALL; - - return hndStr; -} - extern "C" void QCALLTYPE String_Intern(QCall::StringHandleOnStack str) { QCALL_CONTRACT; diff --git a/src/coreclr/vm/appdomainnative.hpp b/src/coreclr/vm/appdomainnative.hpp index 682341b5a0e0b7..7fb86136bf196b 100644 --- a/src/coreclr/vm/appdomainnative.hpp +++ b/src/coreclr/vm/appdomainnative.hpp @@ -16,7 +16,6 @@ #include "qcall.h" -extern "C" STRINGREF* QCALLTYPE String_StrCns(UINT32 rid, Module* pModule); extern "C" void QCALLTYPE String_Intern(QCall::StringHandleOnStack str); extern "C" void QCALLTYPE String_IsInterned(QCall::StringHandleOnStack str); diff --git a/src/coreclr/vm/corelib.h b/src/coreclr/vm/corelib.h index 4fef8092eabb32..6354c13c17476f 100644 --- a/src/coreclr/vm/corelib.h +++ b/src/coreclr/vm/corelib.h @@ -946,7 +946,6 @@ DEFINE_METHOD(STRING, CTORF_SBYTEPTR_START_LEN_ENCODING, Ctor, DEFINE_METHOD(STRING, INTERNAL_COPY, InternalCopy, SM_Str_IntPtr_Int_RetVoid) DEFINE_METHOD(STRING, WCSLEN, wcslen, SM_PtrChar_RetInt) DEFINE_METHOD(STRING, STRLEN, strlen, SM_PtrByte_RetInt) -DEFINE_METHOD(STRING, STRCNS, StrCns, SM_UInt_IntPtr_RetStr) DEFINE_PROPERTY(STRING, LENGTH, Length, Int) DEFINE_CLASS(STRING_BUILDER, Text, StringBuilder) diff --git a/src/coreclr/vm/jitinterface.cpp b/src/coreclr/vm/jitinterface.cpp index 76bf7390d5848a..26da6129358c85 100644 --- a/src/coreclr/vm/jitinterface.cpp +++ b/src/coreclr/vm/jitinterface.cpp @@ -783,25 +783,6 @@ size_t CEEInfo::findNameOfToken (Module* module, return strlen (szFQName); } -CorInfoHelpFunc CEEInfo::getLazyStringLiteralHelper(CORINFO_MODULE_HANDLE handle) -{ - CONTRACTL { - NOTHROW; - GC_NOTRIGGER; - MODE_PREEMPTIVE; - } CONTRACTL_END; - - CorInfoHelpFunc result = CORINFO_HELP_UNDEF; - - JIT_TO_EE_TRANSITION_LEAF(); - - result = IsDynamicScope(handle) ? CORINFO_HELP_UNDEF : CORINFO_HELP_STRCNS; - - EE_TO_JIT_TRANSITION_LEAF(); - - return result; -} - CHECK CheckContext(CORINFO_MODULE_HANDLE scopeHnd, CORINFO_CONTEXT_HANDLE context) { @@ -13601,8 +13582,6 @@ CorInfoHelpFunc MapReadyToRunHelper(ReadyToRunHelper helperNum) case readyToRunHelper: return corInfoHelpFunc; #include "readytorunhelpers.h" - case READYTORUN_HELPER_GetString: return CORINFO_HELP_STRCNS; - default: return CORINFO_HELP_UNDEF; } } diff --git a/src/coreclr/vm/qcallentrypoints.cpp b/src/coreclr/vm/qcallentrypoints.cpp index eeb41a5efa2b32..bd78785da5c106 100644 --- a/src/coreclr/vm/qcallentrypoints.cpp +++ b/src/coreclr/vm/qcallentrypoints.cpp @@ -277,7 +277,6 @@ static const Entry s_QCall[] = DllImportEntry(MultiCoreJIT_InternalStartProfile) #endif DllImportEntry(LoaderAllocator_Destroy) - DllImportEntry(String_StrCns) DllImportEntry(String_Intern) DllImportEntry(String_IsInterned) DllImportEntry(AppDomain_CreateDynamicAssembly)