diff options
author | Sergey Andreenko <seandree@microsoft.com> | 2018-11-19 21:39:49 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-19 21:39:49 -0800 |
commit | 1cf1282c22c4a8bbe8656ca6020817b84cf48a4b (patch) | |
tree | d1015755690ae5b4b04746b03fb21fbdde66f411 /src/ToolBox | |
parent | 3eeb737b30fac70b4f1f2e13ec504a0709ae8dce (diff) | |
download | coreclr-1cf1282c22c4a8bbe8656ca6020817b84cf48a4b.tar.gz coreclr-1cf1282c22c4a8bbe8656ca6020817b84cf48a4b.tar.bz2 coreclr-1cf1282c22c4a8bbe8656ca6020817b84cf48a4b.zip |
format spmi sources (#21094)
We do not do it automatically because we do not change it often.
Diffstat (limited to 'src/ToolBox')
6 files changed, 36 insertions, 28 deletions
diff --git a/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp b/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp index 6729367701..11c73365a3 100644 --- a/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp +++ b/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp @@ -1738,7 +1738,7 @@ unsigned MethodContext::repGetHeapClassSize(CORINFO_CLASS_HANDLE cls) { AssertCodeMsg(GetHeapClassSize != nullptr, EXCEPTIONCODE_MC, "Didn't find %016llX", (DWORDLONG)cls); AssertCodeMsg(GetHeapClassSize->GetIndex((DWORDLONG)cls) != -1, EXCEPTIONCODE_MC, "Didn't find %016llX", - (DWORDLONG)cls); + (DWORDLONG)cls); unsigned result = (unsigned)GetHeapClassSize->Get((DWORDLONG)cls); DEBUG_REP(dmpGetHeapClassSize((DWORDLONG)cls, (DWORD)result)); return result; @@ -1760,7 +1760,7 @@ BOOL MethodContext::repCanAllocateOnStack(CORINFO_CLASS_HANDLE cls) { AssertCodeMsg(CanAllocateOnStack != nullptr, EXCEPTIONCODE_MC, "Didn't find %016llX", (DWORDLONG)cls); AssertCodeMsg(CanAllocateOnStack->GetIndex((DWORDLONG)cls) != -1, EXCEPTIONCODE_MC, "Didn't find %016llX", - (DWORDLONG)cls); + (DWORDLONG)cls); BOOL result = (BOOL)CanAllocateOnStack->Get((DWORDLONG)cls); DEBUG_REP(dmpCanAllocateOnStack((DWORDLONG)cls, (DWORD)result)); return result; @@ -3466,14 +3466,16 @@ void* MethodContext::repGetFieldAddress(CORINFO_FIELD_HANDLE field, void** ppInd return temp; } -void MethodContext::recGetStaticFieldCurrentClass(CORINFO_FIELD_HANDLE field, bool isSpeculative, CORINFO_CLASS_HANDLE result) +void MethodContext::recGetStaticFieldCurrentClass(CORINFO_FIELD_HANDLE field, + bool isSpeculative, + CORINFO_CLASS_HANDLE result) { if (GetStaticFieldCurrentClass == nullptr) GetStaticFieldCurrentClass = new LightWeightMap<DWORDLONG, Agnostic_GetStaticFieldCurrentClass>(); Agnostic_GetStaticFieldCurrentClass value; - - value.classHandle = (DWORDLONG)result; + + value.classHandle = (DWORDLONG)result; value.isSpeculative = isSpeculative; GetStaticFieldCurrentClass->Add((DWORDLONG)field, value); @@ -3481,18 +3483,19 @@ void MethodContext::recGetStaticFieldCurrentClass(CORINFO_FIELD_HANDLE field, bo } void MethodContext::dmpGetStaticFieldCurrentClass(DWORDLONG key, const Agnostic_GetStaticFieldCurrentClass& value) { - printf("GetStaticFieldCurrentClass key fld-%016llX, value clsHnd-%016llX isSpeculative-%u", key, value.classHandle, value.isSpeculative); + printf("GetStaticFieldCurrentClass key fld-%016llX, value clsHnd-%016llX isSpeculative-%u", key, value.classHandle, + value.isSpeculative); } CORINFO_CLASS_HANDLE MethodContext::repGetStaticFieldCurrentClass(CORINFO_FIELD_HANDLE field, bool* pIsSpeculative) { - Agnostic_GetStaticFieldCurrentClass value = GetStaticFieldCurrentClass->Get((DWORDLONG) field); + Agnostic_GetStaticFieldCurrentClass value = GetStaticFieldCurrentClass->Get((DWORDLONG)field); if (pIsSpeculative != nullptr) { *pIsSpeculative = value.isSpeculative; } - CORINFO_CLASS_HANDLE result = (CORINFO_CLASS_HANDLE) value.classHandle; + CORINFO_CLASS_HANDLE result = (CORINFO_CLASS_HANDLE)value.classHandle; DEBUG_REP(dmpGetStaticFieldCurrentValue((DWORDLONG)field, value)); return result; } @@ -4402,7 +4405,9 @@ const char* MethodContext::repGetFieldName(CORINFO_FIELD_HANDLE ftn, const char* return (const char*)GetFieldName->GetBuffer(value.A); } -void MethodContext::recCanInlineTypeCheck(CORINFO_CLASS_HANDLE cls, CorInfoInlineTypeCheckSource source, CorInfoInlineTypeCheck result) +void MethodContext::recCanInlineTypeCheck(CORINFO_CLASS_HANDLE cls, + CorInfoInlineTypeCheckSource source, + CorInfoInlineTypeCheck result) { if (CanInlineTypeCheck == nullptr) CanInlineTypeCheck = new LightWeightMap<DLD, DWORD>(); @@ -4420,10 +4425,10 @@ void MethodContext::dmpCanInlineTypeCheck(DLD key, DWORD value) { printf("CanInlineTypeCheck key cls-%016llX src-%08X, value res-%u", key.A, key.B, value); } -CorInfoInlineTypeCheck MethodContext::repCanInlineTypeCheck(CORINFO_CLASS_HANDLE cls, CorInfoInlineTypeCheckSource source) +CorInfoInlineTypeCheck MethodContext::repCanInlineTypeCheck(CORINFO_CLASS_HANDLE cls, + CorInfoInlineTypeCheckSource source) { - AssertCodeMsg(CanInlineTypeCheck != nullptr, EXCEPTIONCODE_MC, - "No map for CanInlineTypeCheck"); + AssertCodeMsg(CanInlineTypeCheck != nullptr, EXCEPTIONCODE_MC, "No map for CanInlineTypeCheck"); DLD key; ZeroMemory(&key, sizeof(DLD)); // We use the input structs as a key and use memcmp to compare.. so we need to zero diff --git a/src/ToolBox/superpmi/superpmi-shared/methodcontext.h b/src/ToolBox/superpmi/superpmi-shared/methodcontext.h index 33903ee312..cde16adc12 100644 --- a/src/ToolBox/superpmi/superpmi-shared/methodcontext.h +++ b/src/ToolBox/superpmi/superpmi-shared/methodcontext.h @@ -1044,7 +1044,9 @@ public: void dmpGetFieldName(DWORDLONG key, DD value); const char* repGetFieldName(CORINFO_FIELD_HANDLE ftn, const char** moduleName); - void recCanInlineTypeCheck(CORINFO_CLASS_HANDLE cls, CorInfoInlineTypeCheckSource source, CorInfoInlineTypeCheck result); + void recCanInlineTypeCheck(CORINFO_CLASS_HANDLE cls, + CorInfoInlineTypeCheckSource source, + CorInfoInlineTypeCheck result); void dmpCanInlineTypeCheck(DLD key, DWORD value); CorInfoInlineTypeCheck repCanInlineTypeCheck(CORINFO_CLASS_HANDLE cls, CorInfoInlineTypeCheckSource source); void recCanInlineTypeCheckWithObjectVTable(CORINFO_CLASS_HANDLE cls, BOOL result); @@ -1341,10 +1343,10 @@ enum mcPackets Packet_CanCast = 5, Retired8 = 6, Packet_GetLazyStringLiteralHelper = 147, // Added 12/20/2013 - as a replacement for CanEmbedModuleHandleForHelper - Packet_CanGetCookieForPInvokeCalliSig = 7, - Packet_CanGetVarArgsHandle = 8, - Packet_CanInline = 9, - Packet_CanInlineTypeCheck = 173, // Added 11/15/2018 as a replacement for CanInlineTypeCheckWithObjectVTable + Packet_CanGetCookieForPInvokeCalliSig = 7, + Packet_CanGetVarArgsHandle = 8, + Packet_CanInline = 9, + Packet_CanInlineTypeCheck = 173, // Added 11/15/2018 as a replacement for CanInlineTypeCheckWithObjectVTable Packet_CanInlineTypeCheckWithObjectVTable = 10, Packet_CanSkipMethodVerification = 11, Packet_CanTailCall = 12, diff --git a/src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp b/src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp index c1e42f9b81..1b1ba5d565 100644 --- a/src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp +++ b/src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp @@ -598,7 +598,8 @@ BOOL interceptor_ICJI::isValueClass(CORINFO_CLASS_HANDLE cls) // Decides how the JIT should do the optimization to inline the check for // GetTypeFromHandle(handle) == obj.GetType() (for CORINFO_INLINE_TYPECHECK_SOURCE_VTABLE) // GetTypeFromHandle(X) == GetTypeFromHandle(Y) (for CORINFO_INLINE_TYPECHECK_SOURCE_TOKEN) -CorInfoInlineTypeCheck interceptor_ICJI::canInlineTypeCheck(CORINFO_CLASS_HANDLE cls, CorInfoInlineTypeCheckSource source) +CorInfoInlineTypeCheck interceptor_ICJI::canInlineTypeCheck(CORINFO_CLASS_HANDLE cls, + CorInfoInlineTypeCheckSource source) { mc->cr->AddCall("canInlineTypeCheck"); CorInfoInlineTypeCheck temp = original_ICorJitInfo->canInlineTypeCheck(cls, source); @@ -703,9 +704,7 @@ unsigned interceptor_ICJI::getHeapClassSize(CORINFO_CLASS_HANDLE cls) return temp; } -BOOL interceptor_ICJI::canAllocateOnStack( - CORINFO_CLASS_HANDLE cls -) +BOOL interceptor_ICJI::canAllocateOnStack(CORINFO_CLASS_HANDLE cls) { mc->cr->AddCall("canAllocateOnStack"); BOOL temp = original_ICorJitInfo->canAllocateOnStack(cls); @@ -1828,10 +1827,10 @@ void* interceptor_ICJI::getFieldAddress(CORINFO_FIELD_HANDLE field, void** ppInd } // return the class handle for the current value of a static field -CORINFO_CLASS_HANDLE interceptor_ICJI::getStaticFieldCurrentClass(CORINFO_FIELD_HANDLE field, bool *pIsSpeculative) +CORINFO_CLASS_HANDLE interceptor_ICJI::getStaticFieldCurrentClass(CORINFO_FIELD_HANDLE field, bool* pIsSpeculative) { mc->cr->AddCall("getStaticFieldCurrentClass"); - bool localIsSpeculative = false; + bool localIsSpeculative = false; CORINFO_CLASS_HANDLE result = original_ICorJitInfo->getStaticFieldCurrentClass(field, &localIsSpeculative); mc->recGetStaticFieldCurrentClass(field, localIsSpeculative, result); if (pIsSpeculative != nullptr) diff --git a/src/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp b/src/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp index 02e94e9ff7..c8002f5cd7 100644 --- a/src/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp +++ b/src/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp @@ -444,7 +444,8 @@ BOOL interceptor_ICJI::isValueClass(CORINFO_CLASS_HANDLE cls) // Decides how the JIT should do the optimization to inline the check for // GetTypeFromHandle(handle) == obj.GetType() (for CORINFO_INLINE_TYPECHECK_SOURCE_VTABLE) // GetTypeFromHandle(X) == GetTypeFromHandle(Y) (for CORINFO_INLINE_TYPECHECK_SOURCE_TOKEN) -CorInfoInlineTypeCheck interceptor_ICJI::canInlineTypeCheck(CORINFO_CLASS_HANDLE cls, CorInfoInlineTypeCheckSource source) +CorInfoInlineTypeCheck interceptor_ICJI::canInlineTypeCheck(CORINFO_CLASS_HANDLE cls, + CorInfoInlineTypeCheckSource source) { mcs->AddCall("canInlineTypeCheck"); return original_ICorJitInfo->canInlineTypeCheck(cls, source); @@ -1413,7 +1414,7 @@ void* interceptor_ICJI::getFieldAddress(CORINFO_FIELD_HANDLE field, void** ppInd } // return the class handle for the current value of a static field -CORINFO_CLASS_HANDLE interceptor_ICJI::getStaticFieldCurrentClass(CORINFO_FIELD_HANDLE field, bool *pIsSpeculative) +CORINFO_CLASS_HANDLE interceptor_ICJI::getStaticFieldCurrentClass(CORINFO_FIELD_HANDLE field, bool* pIsSpeculative) { mcs->AddCall("getStaticFieldCurrentClass"); return original_ICorJitInfo->getStaticFieldCurrentClass(field, pIsSpeculative); diff --git a/src/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp b/src/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp index 0172abd76a..1bdd3b75aa 100644 --- a/src/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp +++ b/src/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp @@ -399,7 +399,8 @@ BOOL interceptor_ICJI::isValueClass(CORINFO_CLASS_HANDLE cls) // Decides how the JIT should do the optimization to inline the check for // GetTypeFromHandle(handle) == obj.GetType() (for CORINFO_INLINE_TYPECHECK_SOURCE_VTABLE) // GetTypeFromHandle(X) == GetTypeFromHandle(Y) (for CORINFO_INLINE_TYPECHECK_SOURCE_TOKEN) -CorInfoInlineTypeCheck interceptor_ICJI::canInlineTypeCheck(CORINFO_CLASS_HANDLE cls, CorInfoInlineTypeCheckSource source) +CorInfoInlineTypeCheck interceptor_ICJI::canInlineTypeCheck(CORINFO_CLASS_HANDLE cls, + CorInfoInlineTypeCheckSource source) { return original_ICorJitInfo->canInlineTypeCheck(cls, source); } @@ -1267,7 +1268,7 @@ void* interceptor_ICJI::getFieldAddress(CORINFO_FIELD_HANDLE field, void** ppInd } // return the class handle for the current value of a static field -CORINFO_CLASS_HANDLE interceptor_ICJI::getStaticFieldCurrentClass(CORINFO_FIELD_HANDLE field, bool *pIsSpeculative) +CORINFO_CLASS_HANDLE interceptor_ICJI::getStaticFieldCurrentClass(CORINFO_FIELD_HANDLE field, bool* pIsSpeculative) { return original_ICorJitInfo->getStaticFieldCurrentClass(field, pIsSpeculative); } diff --git a/src/ToolBox/superpmi/superpmi/icorjitinfo.cpp b/src/ToolBox/superpmi/superpmi/icorjitinfo.cpp index 5346342e51..d6d4d6e8ff 100644 --- a/src/ToolBox/superpmi/superpmi/icorjitinfo.cpp +++ b/src/ToolBox/superpmi/superpmi/icorjitinfo.cpp @@ -1526,7 +1526,7 @@ void* MyICJI::getFieldAddress(CORINFO_FIELD_HANDLE field, void** ppIndirection) } // return the class handle for the current value of a static field -CORINFO_CLASS_HANDLE MyICJI::getStaticFieldCurrentClass(CORINFO_FIELD_HANDLE field, bool *pIsSpeculative) +CORINFO_CLASS_HANDLE MyICJI::getStaticFieldCurrentClass(CORINFO_FIELD_HANDLE field, bool* pIsSpeculative) { jitInstance->mc->cr->AddCall("getStaticFieldCurrentClass"); return jitInstance->mc->repGetStaticFieldCurrentClass(field, pIsSpeculative); |