Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 58561e4

Browse files
author
Sergey Andreenko
authored
format spmi source (#15144)
1 parent 30d20fd commit 58561e4

File tree

4 files changed

+23
-29
lines changed

4 files changed

+23
-29
lines changed

src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,10 +1886,10 @@ void MethodContext::dmpGetBuiltinClass(DWORD key, DWORDLONG value)
18861886
}
18871887
CORINFO_CLASS_HANDLE MethodContext::repGetBuiltinClass(CorInfoClassId classId)
18881888
{
1889-
AssertCodeMsg(GetBuiltinClass != nullptr, EXCEPTIONCODE_MC,
1890-
"Encountered an empty LWM while looking for %016llX", (DWORDLONG)classId);
1891-
AssertCodeMsg(GetBuiltinClass->GetIndex((DWORDLONG)classId) != -1, EXCEPTIONCODE_MC,
1892-
"Didn't find %016llX", (DWORDLONG)classId);
1889+
AssertCodeMsg(GetBuiltinClass != nullptr, EXCEPTIONCODE_MC, "Encountered an empty LWM while looking for %016llX",
1890+
(DWORDLONG)classId);
1891+
AssertCodeMsg(GetBuiltinClass->GetIndex((DWORDLONG)classId) != -1, EXCEPTIONCODE_MC, "Didn't find %016llX",
1892+
(DWORDLONG)classId);
18931893
CORINFO_CLASS_HANDLE value = (CORINFO_CLASS_HANDLE)GetBuiltinClass->Get((DWORD)classId);
18941894
DEBUG_REP(dmpGetBuiltinClass((DWORDLONG)classId, (DWORDLONG)value));
18951895
return value;
@@ -2147,13 +2147,14 @@ void MethodContext::recGetHelperFtn(CorInfoHelpFunc ftnNum, void** ppIndirection
21472147
value.A = (DWORDLONG)*ppIndirection;
21482148
value.B = (DWORDLONG)result;
21492149

2150-
if (GetHelperFtn->GetIndex((DWORD)ftnNum) != -1)
2151-
{
2152-
DLDL oldValue = GetHelperFtn->Get((DWORD)ftnNum);
2150+
if (GetHelperFtn->GetIndex((DWORD)ftnNum) != -1)
2151+
{
2152+
DLDL oldValue = GetHelperFtn->Get((DWORD)ftnNum);
21532153

2154-
AssertCodeMsg(oldValue.A == value.A && oldValue.B == oldValue.B, EXCEPTIONCODE_MC, "collision! old: %016llX %016llX, new: %016llX %016llX \n", oldValue.A, oldValue.B, value.A, value.B);
2155-
2156-
}
2154+
AssertCodeMsg(oldValue.A == value.A && oldValue.B == oldValue.B, EXCEPTIONCODE_MC,
2155+
"collision! old: %016llX %016llX, new: %016llX %016llX \n", oldValue.A, oldValue.B, value.A,
2156+
value.B);
2157+
}
21572158

21582159
GetHelperFtn->Add((DWORD)ftnNum, value);
21592160
DEBUG_REC(dmpGetHelperFtn((DWORD)ftnNum, value));
@@ -3031,20 +3032,20 @@ CORINFO_METHOD_HANDLE MethodContext::repResolveVirtualMethod(CORINFO_METHOD_HAND
30313032
}
30323033

30333034
void MethodContext::recGetUnboxedEntry(CORINFO_METHOD_HANDLE ftn,
3034-
bool *requiresInstMethodTableArg,
3035+
bool* requiresInstMethodTableArg,
30353036
CORINFO_METHOD_HANDLE result)
30363037
{
30373038
if (GetUnboxedEntry == nullptr)
30383039
{
30393040
GetUnboxedEntry = new LightWeightMap<DWORDLONG, DLD>();
30403041
}
30413042

3042-
DWORDLONG key = (DWORDLONG) ftn;
3043-
DLD value;
3044-
value.A = (DWORDLONG) result;
3043+
DWORDLONG key = (DWORDLONG)ftn;
3044+
DLD value;
3045+
value.A = (DWORDLONG)result;
30453046
if (requiresInstMethodTableArg != nullptr)
30463047
{
3047-
value.B = (DWORD) *requiresInstMethodTableArg ? 1 : 0;
3048+
value.B = (DWORD)*requiresInstMethodTableArg ? 1 : 0;
30483049
}
30493050
else
30503051
{
@@ -3056,12 +3057,10 @@ void MethodContext::recGetUnboxedEntry(CORINFO_METHOD_HANDLE ftn,
30563057

30573058
void MethodContext::dmpGetUnboxedEntry(DWORDLONG key, DLD value)
30583059
{
3059-
printf("GetUnboxedEntry ftn-%016llX, result-%016llX, requires-inst-%u",
3060-
key, value.A, value.B);
3060+
printf("GetUnboxedEntry ftn-%016llX, result-%016llX, requires-inst-%u", key, value.A, value.B);
30613061
}
30623062

3063-
CORINFO_METHOD_HANDLE MethodContext::repGetUnboxedEntry(CORINFO_METHOD_HANDLE ftn,
3064-
bool* requiresInstMethodTableArg)
3063+
CORINFO_METHOD_HANDLE MethodContext::repGetUnboxedEntry(CORINFO_METHOD_HANDLE ftn, bool* requiresInstMethodTableArg)
30653064
{
30663065
DWORDLONG key = (DWORDLONG)ftn;
30673066

src/ToolBox/superpmi/superpmi-shared/methodcontext.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -877,12 +877,9 @@ class MethodContext
877877
CORINFO_CLASS_HANDLE implClass,
878878
CORINFO_CONTEXT_HANDLE ownerType);
879879

880-
void recGetUnboxedEntry(CORINFO_METHOD_HANDLE ftn,
881-
bool* requiresInstMethodTableArg,
882-
CORINFO_METHOD_HANDLE result);
880+
void recGetUnboxedEntry(CORINFO_METHOD_HANDLE ftn, bool* requiresInstMethodTableArg, CORINFO_METHOD_HANDLE result);
883881
void dmpGetUnboxedEntry(DWORDLONG key, DLD value);
884-
CORINFO_METHOD_HANDLE repGetUnboxedEntry(CORINFO_METHOD_HANDLE ftn,
885-
bool* requiresInstMethodTableArg);
882+
CORINFO_METHOD_HANDLE repGetUnboxedEntry(CORINFO_METHOD_HANDLE ftn, bool* requiresInstMethodTableArg);
886883

887884
void recGetDefaultEqualityComparerClass(CORINFO_CLASS_HANDLE cls, CORINFO_CLASS_HANDLE result);
888885
void dmpGetDefaultEqualityComparerClass(DWORDLONG key, DWORDLONG value);

src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,8 @@ CORINFO_METHOD_HANDLE interceptor_ICJI::resolveVirtualMethod(CORINFO_METHOD_HAND
246246
CORINFO_METHOD_HANDLE interceptor_ICJI::getUnboxedEntry(CORINFO_METHOD_HANDLE ftn, bool* requiresInstMethodTableArg)
247247
{
248248
mc->cr->AddCall("getUnboxedEntry");
249-
bool localRequiresInstMethodTableArg = false;
250-
CORINFO_METHOD_HANDLE result =
251-
original_ICorJitInfo->getUnboxedEntry(ftn, &localRequiresInstMethodTableArg);
249+
bool localRequiresInstMethodTableArg = false;
250+
CORINFO_METHOD_HANDLE result = original_ICorJitInfo->getUnboxedEntry(ftn, &localRequiresInstMethodTableArg);
252251
mc->recGetUnboxedEntry(ftn, &localRequiresInstMethodTableArg, result);
253252
if (requiresInstMethodTableArg != nullptr)
254253
{

src/ToolBox/superpmi/superpmi/icorjitinfo.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ CORINFO_METHOD_HANDLE MyICJI::resolveVirtualMethod(CORINFO_METHOD_HANDLE virtua
189189
CORINFO_METHOD_HANDLE MyICJI::getUnboxedEntry(CORINFO_METHOD_HANDLE ftn, bool* requiresInstMethodTableArg)
190190
{
191191
jitInstance->mc->cr->AddCall("getUnboxedEntry");
192-
CORINFO_METHOD_HANDLE result =
193-
jitInstance->mc->repGetUnboxedEntry(ftn, requiresInstMethodTableArg);
192+
CORINFO_METHOD_HANDLE result = jitInstance->mc->repGetUnboxedEntry(ftn, requiresInstMethodTableArg);
194193
return result;
195194
}
196195

0 commit comments

Comments
 (0)