Beispiel #1
0
        public UvmInstruction MakeInstructionLine(UvmOpCodeEnums opCode, string line, Instruction ilInstruction)
        {
            var inst = UvmInstruction.Create(opCode, ilInstruction);

            inst.AsmLine = line;
            return(inst);
        }
Beispiel #2
0
        public void AddInstructionLine(UvmOpCodeEnums opCode, string line, Instruction ilInstruction)
        {
            var inst = UvmInstruction.Create(opCode, ilInstruction);

            inst.AsmLine = line;
            AddInstruction(inst);
        }
Beispiel #3
0
 public int IndexOfUvmInstruction(UvmInstruction inst)
 {
     if (inst == null)
     {
         return(-1);
     }
     return(NotEmptyCodeInstructions().IndexOf(inst));
 }
Beispiel #4
0
 public void AddInstruction(UvmInstruction inst)
 {
     this.CodeInstructions.Add(inst);
     if (inst.IlInstruction != null && !(inst is UvmEmptyInstruction))
     {
         if (!IlInstructionsToUvmInstructionsMap.ContainsKey(inst.IlInstruction))
         {
             IlInstructionsToUvmInstructionsMap[inst.IlInstruction] = inst;
         }
         if (NotMappedILInstructions.Count > 0)
         {
             foreach (var notMappedItem in NotMappedILInstructions)
             {
                 IlInstructionsToUvmInstructionsMap[notMappedItem] = inst;
             }
             NotMappedILInstructions.Clear();
         }
     }
 }
Beispiel #5
0
 public UvmInstruction MakeEmptyInstruction(string comment)
 {
     return(UvmInstruction.CreateEmpty(comment));
 }
Beispiel #6
0
 public void AddEmptyInstruction(string comment)
 {
     AddInstruction(UvmInstruction.CreateEmpty(comment));
 }