private void AddToBuffer(CILInstruction inst) { if (tide >= buffer.Length) { CILInstruction[] tmp = buffer; buffer = new CILInstruction[tmp.Length * 2]; for (int i = 0; i < tide; i++) { buffer[i] = tmp[i]; } } //Console.WriteLine("Adding instruction at offset " + offset + " with size " + inst.size); inst.offset = offset; offset += inst.size; buffer[tide++] = inst; }
internal void AddBranch(CILInstruction instr) { if (branch == null) { branch = instr; return; } if (multipleBranches == null) { multipleBranches = new CILInstruction[2]; } else if (tide >= multipleBranches.Length) { CILInstruction[] tmp = multipleBranches; multipleBranches = new CILInstruction[tmp.Length * 2]; for (int i = 0; i < tide; i++) { multipleBranches[i] = tmp[i]; } } multipleBranches[tide++] = instr; }
private void AddToBuffer(CILInstruction inst) { if (tide >= buffer.Length) { CILInstruction[] tmp = buffer; buffer = new CILInstruction[tmp.Length * 2]; for (int i=0; i < tide; i++) { buffer[i] = tmp[i]; } } //Console.WriteLine("Adding instruction at offset " + offset + " with size " + inst.size); inst.offset = offset; offset += inst.size; buffer[tide++] = inst; }
internal void AddLabelInstr(LabelInstr lInstr) { labInstr = lInstr; }
internal void AddBranch(CILInstruction instr) { if (branch == null) { branch = instr; return; } if (multipleBranches == null) { multipleBranches = new CILInstruction[2]; } else if (tide >= multipleBranches.Length) { CILInstruction[] tmp = multipleBranches; multipleBranches = new CILInstruction[tmp.Length*2]; for (int i=0; i < tide; i++) { multipleBranches[i] = tmp[i]; } } multipleBranches[tide++] = instr; }