Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
		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;
		}
Esempio n. 4
0
		internal void AddLabelInstr(LabelInstr lInstr) 
		{
			labInstr = lInstr;
		}
Esempio n. 5
0
		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;
		}
Esempio n. 6
0
 internal void AddLabelInstr(LabelInstr lInstr)
 {
     labInstr = lInstr;
 }