internal ILGenerator(MethodInfo methodBuilder, int size) { if (size < 0x10) { this.m_ILStream = new byte[0x10]; } else { this.m_ILStream = new byte[size]; } this.m_length = 0; this.m_labelCount = 0; this.m_fixupCount = 0; this.m_labelList = null; this.m_fixupData = null; this.m_exceptions = null; this.m_exceptionCount = 0; this.m_currExcStack = null; this.m_currExcStackCount = 0; this.m_RelocFixupList = new int[0x40]; this.m_RelocFixupCount = 0; this.m_RVAFixupList = new int[0x40]; this.m_RVAFixupCount = 0; this.m_ScopeTree = new ScopeTree(); this.m_LineNumberInfo = new LineNumberInfo(); this.m_methodBuilder = methodBuilder; this.m_localCount = 0; MethodBuilder builder = this.m_methodBuilder as MethodBuilder; if (builder == null) { this.m_localSignature = SignatureHelper.GetLocalVarSigHelper(null); } else { this.m_localSignature = SignatureHelper.GetLocalVarSigHelper(builder.GetTypeBuilder().Module); } }
internal ILGenerator(MethodInfo methodBuilder, int size) { Contract.Requires(methodBuilder != null); Contract.Requires(methodBuilder is MethodBuilder || methodBuilder is DynamicMethod); if (size < defaultSize) { m_ILStream = new byte[defaultSize]; } else { m_ILStream = new byte[size]; } m_length = 0; m_labelCount = 0; m_fixupCount = 0; m_labelList = null; m_fixupData = null; m_exceptions = null; m_exceptionCount = 0; m_currExcStack = null; m_currExcStackCount = 0; m_RelocFixupList = null; m_RelocFixupCount = 0; // initialize the scope tree m_ScopeTree = new ScopeTree(); m_LineNumberInfo = new LineNumberInfo(); m_methodBuilder = methodBuilder; // initialize local signature m_localCount = 0; MethodBuilder mb = m_methodBuilder as MethodBuilder; if (mb == null) m_localSignature = SignatureHelper.GetLocalVarSigHelper(null); else m_localSignature = SignatureHelper.GetLocalVarSigHelper(mb.GetTypeBuilder().Module); }
internal ILGenerator(MethodBuilder methodBuilder, int size) { if (size < defaultSize) { m_ILStream = new byte[defaultSize]; } else { m_ILStream = new byte[size]; } m_length=0; m_labelCount=0; m_fixupCount=0; m_labelList = null; m_fixupData = null; m_exceptions = null; m_exceptionCount=0; m_currExcStack = null; m_currExcStackCount=0; m_RelocFixupList = new int[DefaultFixupArraySize]; m_RelocFixupCount=0; m_RVAFixupList = new int[DefaultFixupArraySize]; m_RVAFixupCount=0; // initialize the scope tree m_ScopeTree = new ScopeTree(); m_LineNumberInfo = new LineNumberInfo(); m_methodBuilder = methodBuilder; // initialize local signature m_localCount=0; m_localSignature = SignatureHelper.GetLocalVarSigHelper(m_methodBuilder.GetTypeBuilder().Module); }