Skip to content

Commit c1ae86d

Browse files
authored
Share some CEEJitInfo methods with the CInterpreterInfo (#114110)
Some of the methods that were left on the CEEJitInfo during the code manager split are actually still useful for the interpreter, so I am moving their implementation to the common CEECodeGenInfo.
1 parent ce930c2 commit c1ae86d

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

src/coreclr/vm/jitinterface.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10682,8 +10682,8 @@ bool CEEInfo::logMsg(unsigned level, const char* fmt, va_list args)
1068210682

1068310683
/*********************************************************************/
1068410684

10685-
void* CEEJitInfo::getHelperFtn(CorInfoHelpFunc ftnNum, /* IN */
10686-
void ** ppIndirection) /* OUT */
10685+
void* CEECodeGenInfo::getHelperFtn(CorInfoHelpFunc ftnNum, /* IN */
10686+
void ** ppIndirection) /* OUT */
1068710687
{
1068810688
CONTRACTL {
1068910689
THROWS;
@@ -10808,7 +10808,7 @@ exit: ;
1080810808
return result;
1080910809
}
1081010810

10811-
PCODE CEEJitInfo::getHelperFtnStatic(CorInfoHelpFunc ftnNum)
10811+
PCODE CEECodeGenInfo::getHelperFtnStatic(CorInfoHelpFunc ftnNum)
1081210812
{
1081310813
CONTRACTL {
1081410814
THROWS;
@@ -11912,9 +11912,9 @@ void CEEInfo::JitProcessShutdownWork()
1191211912
}
1191311913

1191411914
/*********************************************************************/
11915-
InfoAccessType CEEJitInfo::constructStringLiteral(CORINFO_MODULE_HANDLE scopeHnd,
11916-
mdToken metaTok,
11917-
void **ppValue)
11915+
InfoAccessType CEECodeGenInfo::constructStringLiteral(CORINFO_MODULE_HANDLE scopeHnd,
11916+
mdToken metaTok,
11917+
void **ppValue)
1191811918
{
1191911919
CONTRACTL {
1192011920
THROWS;
@@ -11955,7 +11955,7 @@ InfoAccessType CEEJitInfo::constructStringLiteral(CORINFO_MODULE_HANDLE scopeHnd
1195511955
}
1195611956

1195711957
/*********************************************************************/
11958-
InfoAccessType CEEJitInfo::emptyStringLiteral(void ** ppValue)
11958+
InfoAccessType CEECodeGenInfo::emptyStringLiteral(void ** ppValue)
1195911959
{
1196011960
CONTRACTL {
1196111961
THROWS;
@@ -12185,8 +12185,8 @@ bool CEEInfo::getObjectContent(CORINFO_OBJECT_HANDLE handle, uint8_t* buffer, in
1218512185
}
1218612186

1218712187
/*********************************************************************/
12188-
CORINFO_CLASS_HANDLE CEEJitInfo::getStaticFieldCurrentClass(CORINFO_FIELD_HANDLE fieldHnd,
12189-
bool* pIsSpeculative)
12188+
CORINFO_CLASS_HANDLE CEECodeGenInfo::getStaticFieldCurrentClass(CORINFO_FIELD_HANDLE fieldHnd,
12189+
bool* pIsSpeculative)
1219012190
{
1219112191
CONTRACTL {
1219212192
THROWS;
@@ -12275,8 +12275,8 @@ static void *GetClassSync(MethodTable *pMT)
1227512275
}
1227612276

1227712277
/*********************************************************************/
12278-
void* CEEJitInfo::getMethodSync(CORINFO_METHOD_HANDLE ftnHnd,
12279-
void **ppIndirection)
12278+
void* CEECodeGenInfo::getMethodSync(CORINFO_METHOD_HANDLE ftnHnd,
12279+
void **ppIndirection)
1228012280
{
1228112281
CONTRACTL {
1228212282
THROWS;
@@ -13939,7 +13939,7 @@ BOOL LoadDynamicInfoEntry(Module *currentModule,
1393913939
CorInfoHelpFunc corInfoHelpFunc = MapReadyToRunHelper((ReadyToRunHelper)helperNum);
1394013940
if (corInfoHelpFunc != CORINFO_HELP_UNDEF)
1394113941
{
13942-
result = (size_t)CEEJitInfo::getHelperFtnStatic(corInfoHelpFunc);
13942+
result = (size_t)CEECodeGenInfo::getHelperFtnStatic(corInfoHelpFunc);
1394313943
}
1394413944
else
1394513945
{

src/coreclr/vm/jitinterface.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,15 @@ class CEECodeGenInfo : public CEEInfo
631631

632632
virtual void WriteCode(EECodeGenManager * jitMgr) = 0;
633633

634+
void* getHelperFtn(CorInfoHelpFunc ftnNum, /* IN */
635+
void ** ppIndirection) override; /* OUT */
636+
static PCODE getHelperFtnStatic(CorInfoHelpFunc ftnNum);
637+
638+
InfoAccessType constructStringLiteral(CORINFO_MODULE_HANDLE scopeHnd, mdToken metaTok, void **ppValue) override;
639+
InfoAccessType emptyStringLiteral(void ** ppValue) override;
640+
CORINFO_CLASS_HANDLE getStaticFieldCurrentClass(CORINFO_FIELD_HANDLE field, bool* pIsSpeculative) override;
641+
void* getMethodSync(CORINFO_METHOD_HANDLE ftnHnd, void **ppIndirection) override;
642+
634643
protected:
635644

636645
template <typename TCodeHeader>
@@ -924,10 +933,6 @@ class CEEJitInfo final : public CEECodeGenInfo
924933
#endif
925934
}
926935

927-
void* getHelperFtn(CorInfoHelpFunc ftnNum, /* IN */
928-
void ** ppIndirection) override; /* OUT */
929-
static PCODE getHelperFtnStatic(CorInfoHelpFunc ftnNum);
930-
931936
// Override of CEEInfo::GetProfilingHandle. The first time this is called for a
932937
// method desc, it calls through to CEEInfo::GetProfilingHandle and caches the
933938
// result in CEEJitInfo::GetProfilingHandleCache. Thereafter, this wrapper regurgitates the cached values
@@ -939,11 +944,6 @@ class CEEJitInfo final : public CEECodeGenInfo
939944
bool *pbIndirectedHandles
940945
) override;
941946

942-
InfoAccessType constructStringLiteral(CORINFO_MODULE_HANDLE scopeHnd, mdToken metaTok, void **ppValue) override;
943-
InfoAccessType emptyStringLiteral(void ** ppValue) override;
944-
CORINFO_CLASS_HANDLE getStaticFieldCurrentClass(CORINFO_FIELD_HANDLE field, bool* pIsSpeculative) override;
945-
void* getMethodSync(CORINFO_METHOD_HANDLE ftnHnd, void **ppIndirection) override;
946-
947947
void setPatchpointInfo(PatchpointInfo* patchpointInfo) override;
948948
PatchpointInfo* getOSRInfo(unsigned* ilOffset) override;
949949

0 commit comments

Comments
 (0)