summaryrefslogtreecommitdiff
path: root/src/gcinfo/gcinfoencoder.cpp
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2016-10-23 21:11:49 -0700
committerJan Kotas <jkotas@microsoft.com>2016-10-23 21:11:49 -0700
commit3e71169287f5f4deae73151aea0567148a15062a (patch)
treeb9ec9dc4b8004fafc1642be6c944fb2d87490e81 /src/gcinfo/gcinfoencoder.cpp
parent2d07bf2e857f22b8303edbd06c545790039a8f3e (diff)
downloadcoreclr-3e71169287f5f4deae73151aea0567148a15062a.tar.gz
coreclr-3e71169287f5f4deae73151aea0567148a15062a.tar.bz2
coreclr-3e71169287f5f4deae73151aea0567148a15062a.zip
Delete DISABLE_EH_VECTORS
Diffstat (limited to 'src/gcinfo/gcinfoencoder.cpp')
-rw-r--r--src/gcinfo/gcinfoencoder.cpp131
1 files changed, 0 insertions, 131 deletions
diff --git a/src/gcinfo/gcinfoencoder.cpp b/src/gcinfo/gcinfoencoder.cpp
index 67852220ed..716b3aefd3 100644
--- a/src/gcinfo/gcinfoencoder.cpp
+++ b/src/gcinfo/gcinfoencoder.cpp
@@ -343,7 +343,6 @@ GcInfoSize& GcInfoSize::operator+=(const GcInfoSize& other)
NumRanges += other.NumRanges;
NumRegs += other.NumRegs;
NumStack += other.NumStack;
- NumEh += other.NumEh;
NumTransitions += other.NumTransitions;
SizeOfCode += other.SizeOfCode;
@@ -366,7 +365,6 @@ GcInfoSize& GcInfoSize::operator+=(const GcInfoSize& other)
RegSlotSize += other.RegSlotSize;
StackSlotSize += other.StackSlotSize;
CallSiteStateSize += other.CallSiteStateSize;
- NumEhSize += other.NumEhSize;
EhPosSize += other.EhPosSize;
EhStateSize += other.EhStateSize;
ChunkPtrSize += other.ChunkPtrSize;
@@ -389,7 +387,6 @@ void GcInfoSize::Log(DWORD level, const char * header)
LogSpew(LF_GCINFO, level, "NumRanges: %Iu\n", NumRanges);
LogSpew(LF_GCINFO, level, "NumRegs: %Iu\n", NumRegs);
LogSpew(LF_GCINFO, level, "NumStack: %Iu\n", NumStack);
- LogSpew(LF_GCINFO, level, "NumEh: %Iu\n", NumEh);
LogSpew(LF_GCINFO, level, "NumTransitions: %Iu\n", NumTransitions);
LogSpew(LF_GCINFO, level, "SizeOfCode: %Iu\n", SizeOfCode);
@@ -414,7 +411,6 @@ void GcInfoSize::Log(DWORD level, const char * header)
LogSpew(LF_GCINFO, level, "RegSlots: %Iu\n", RegSlotSize);
LogSpew(LF_GCINFO, level, "StackSlots: %Iu\n", StackSlotSize);
LogSpew(LF_GCINFO, level, "CallSiteStates: %Iu\n", CallSiteStateSize);
- LogSpew(LF_GCINFO, level, "NumEh: %Iu\n", NumEhSize);
LogSpew(LF_GCINFO, level, "EhOffsets: %Iu\n", EhPosSize);
LogSpew(LF_GCINFO, level, "EhStates: %Iu\n", EhStateSize);
LogSpew(LF_GCINFO, level, "ChunkPointers: %Iu\n", ChunkPtrSize);
@@ -426,17 +422,6 @@ void GcInfoSize::Log(DWORD level, const char * header)
#endif
-#ifndef DISABLE_EH_VECTORS
-inline BOOL IsEssential(EE_ILEXCEPTION_CLAUSE *pClause)
-{
- _ASSERTE(pClause->TryEndPC >= pClause->TryStartPC);
- if(pClause->TryEndPC == pClause->TryStartPC)
- return FALSE;
-
- return TRUE;
-}
-#endif
-
GcInfoEncoder::GcInfoEncoder(
ICorJitInfo* pCorJitInfo,
CORINFO_METHOD_INFO* pMethodInfo,
@@ -1354,83 +1339,6 @@ void GcInfoEncoder::Build()
#endif
}
-
-#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
- ///////////////////////////////////////////////////////////////////////
- // Gather EH information
- ///////////////////////////////////////////////////////////////////////
-
- couldBeLive.ClearAll();
-
-#ifndef DISABLE_EH_VECTORS
- UINT32 numEHClauses;
- EE_ILEXCEPTION *pEHInfo = (EE_ILEXCEPTION*) m_pCorJitInfo->getEHInfo();
- if (!pEHInfo)
- numEHClauses = 0;
- else
- numEHClauses = pEHInfo->EHCount();
-
- UINT32 numUsedEHClauses = numEHClauses;
- for (UINT32 clauseIndex = 0; clauseIndex < numEHClauses; clauseIndex++)
- {
- EE_ILEXCEPTION_CLAUSE * pClause;
- pClause = pEHInfo->EHClause(clauseIndex);
-
- if(!IsEssential(pClause))
- numUsedEHClauses--;
- }
-
- UINT32 ehTableBitCount = m_NumSlots * numUsedEHClauses;
- BitArray ehLiveSlots(m_pAllocator, (ehTableBitCount + BITS_PER_SIZE_T - 1) / BITS_PER_SIZE_T);
- ehLiveSlots.ClearAll();
-
- UINT32 basePos = 0;
- for (UINT32 clauseIndex = 0; clauseIndex < numEHClauses; clauseIndex++)
- {
- EE_ILEXCEPTION_CLAUSE * pClause;
- pClause = pEHInfo->EHClause(clauseIndex);
-
- _ASSERTE(pClause->TryEndPC <= m_CodeLength);
- if(!IsEssential(pClause))
- continue;
-
- liveState.ClearAll();
-
- for(pCurrent = pTransitions; pCurrent < pEndTransitions; pCurrent++)
- {
- if(pCurrent->CodeOffset > pClause->TryStartPC)
- break;
-
- UINT32 slotIndex = pCurrent->SlotId;
- BYTE becomesLive = pCurrent->BecomesLive;
- _ASSERTE(liveState.ReadBit(slotIndex) && !becomesLive
- || !liveState.ReadBit(slotIndex) && becomesLive);
- liveState.WriteBit(slotIndex, becomesLive);
- }
-
- for( ; pCurrent < pEndTransitions; pCurrent++)
- {
- if(pCurrent->CodeOffset >= pClause->TryEndPC)
- break;
-
- UINT32 slotIndex = pCurrent->SlotId;
- liveState.ClearBit(slotIndex);
- }
-
- // Copy to the EH live state table
- for(UINT32 i = 0; i < m_NumSlots; i++)
- {
- if(liveState.ReadBit(i))
- ehLiveSlots.SetBit(basePos + i);
- }
- basePos += m_NumSlots;
-
- // Keep track of which slots are used
- couldBeLive |= liveState;
- }
-#endif // DISABLE_EH_VECTORS
-#endif // PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
-
#if CODE_OFFSETS_NEED_NORMALIZATION
// Do a pass to normalize transition offsets
for(pCurrent = pTransitions; pCurrent < pEndTransitions; pCurrent++)
@@ -1994,40 +1902,6 @@ void GcInfoEncoder::Build()
#endif // MUST_CALL_JITALLOCATOR_FREE
}
-
- //-----------------------------------------------------------------
- // Encode EH clauses and bit vectors
- //-----------------------------------------------------------------
-
-#ifndef DISABLE_EH_VECTORS
- GCINFO_WRITE_VARL_U(m_Info1, numUsedEHClauses, NUM_EH_CLAUSES_ENCBASE, NumEhSize);
-
- basePos = 0;
- for(UINT32 clauseIndex = 0; clauseIndex < numEHClauses; clauseIndex++)
- {
- EE_ILEXCEPTION_CLAUSE * pClause;
- pClause = pEHInfo->EHClause(clauseIndex);
-
- if(!IsEssential(pClause))
- continue;
-
- UINT32 normStartOffset = NORMALIZE_CODE_OFFSET(pClause->TryStartPC);
- UINT32 normStopOffset = NORMALIZE_CODE_OFFSET(pClause->TryEndPC);
- _ASSERTE(normStopOffset > normStartOffset);
-
- GCINFO_WRITE(m_Info1, normStartOffset, numBitsPerOffset, EhPosSize);
- GCINFO_WRITE(m_Info1, normStopOffset - 1, numBitsPerOffset, EhPosSize);
-
- for(UINT slotIndex = 0; slotIndex < m_NumSlots; slotIndex++)
- {
- if(!m_SlotTable[slotIndex].IsDeleted())
- {
- GCINFO_WRITE(m_Info1, ehLiveSlots.ReadBit(basePos + slotIndex) ? 1 : 0, 1, EhStateSize);
- }
- }
- basePos += m_NumSlots;
- }
-#endif // DISABLE_EH_VECTORS
#endif // PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
@@ -2358,11 +2232,6 @@ lExitSuccess:;
m_CurrentMethodSize.NumMethods = 1;
#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
m_CurrentMethodSize.NumCallSites = m_NumCallSites;
-#ifdef DISABLE_EH_VECTORS
- m_CurrentMethodSize.NumEh = 0;
-#else
- m_CurrentMethodSize.NumEh = numUsedEHClauses;
-#endif
#endif
m_CurrentMethodSize.NumRanges = numInterruptibleRanges;
m_CurrentMethodSize.NumRegs = numRegisters;