System.Reflection.Emit.__ExceptionInfo.MarkHelper C# (CSharp) Method

MarkHelper() private method

private MarkHelper ( int catchorfilterAddr, int catchEndAddr, Type catchClass, int type ) : void
catchorfilterAddr int
catchEndAddr int
catchClass System.Type
type int
return void
        private void MarkHelper(
            int         catchorfilterAddr,      // the starting address of a clause
            int         catchEndAddr,           // the end address of a previous catch clause. Only use when finally is following a catch
            Type        catchClass,             // catch exception type
            int         type)                   // kind of clause
        {
            if (m_currentCatch>=m_catchAddr.Length) {
                m_filterAddr=ILGenerator.EnlargeArray(m_filterAddr);
                m_catchAddr=ILGenerator.EnlargeArray(m_catchAddr);
                m_catchEndAddr=ILGenerator.EnlargeArray(m_catchEndAddr);
                m_catchClass=ILGenerator.EnlargeArray(m_catchClass);
                m_type = ILGenerator.EnlargeArray(m_type);
            }
            if (type == Filter)
            {
                m_type[m_currentCatch]=type;
                m_filterAddr[m_currentCatch] = catchorfilterAddr;
                m_catchAddr[m_currentCatch] = -1;
                if (m_currentCatch > 0)
                {
                    BCLDebug.Assert(m_catchEndAddr[m_currentCatch-1] == -1,"m_catchEndAddr[m_currentCatch-1] == -1");
                    m_catchEndAddr[m_currentCatch-1] = catchorfilterAddr;
                }
            }
            else
            {
                // catch or Fault clause
                m_catchClass[m_currentCatch]=catchClass;
                if (m_type[m_currentCatch] != Filter)
                {
                    m_type[m_currentCatch]=type;
                }
                m_catchAddr[m_currentCatch]=catchorfilterAddr;
                if (m_currentCatch > 0)
                {
                        if (m_type[m_currentCatch] != Filter)
                        {
                            BCLDebug.Assert(m_catchEndAddr[m_currentCatch-1] == -1,"m_catchEndAddr[m_currentCatch-1] == -1");
                            m_catchEndAddr[m_currentCatch-1] = catchEndAddr;
                        }
                }
                m_catchEndAddr[m_currentCatch]=-1;  
                m_currentCatch++;
            }

            if (m_endAddr==-1)
            {
                m_endAddr=catchorfilterAddr;
            }
        }