internal uint AddCode(CILInstructions byteCode) { byteCodes.Add(byteCode); uint offset = codeSize; codeSize += byteCode.GetCodeSize(); return offset; }
internal void TraverseCode(MetaDataOut md) { try { if (code != null) { if (code.IsEmpty()) { code = null; } else { code.BuildTables(md); } } } catch (InstructionException ex) { throw new Exception(ex.AddMethodName(name)); } }
/// <summary> /// Create a code buffer for this method to add the IL instructions to /// </summary> /// <returns>a buffer for this method's IL instructions</returns> public CILInstructions CreateCodeBuffer() { code = new CILInstructions(this); return code; }
/// <summary> /// Create a new code block definition /// </summary> /// <param name="instructions">The buffer the code block relates to</param> internal CodeBlock(CILInstructions instructions) { cilInstr = instructions; }