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

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

            inst.AsmLine = line;
            AddInstruction(inst);
        }
Exemplo n.º 3
0
 public int IndexOfUvmInstruction(UvmInstruction inst)
 {
     if (inst == null)
     {
         return(-1);
     }
     return(NotEmptyCodeInstructions().IndexOf(inst));
 }
Exemplo n.º 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();
         }
     }
 }
Exemplo n.º 5
0
 public UvmInstruction MakeEmptyInstruction(string comment)
 {
     return(UvmInstruction.CreateEmpty(comment));
 }
Exemplo n.º 6
0
 public void AddEmptyInstruction(string comment)
 {
     AddInstruction(UvmInstruction.CreateEmpty(comment));
 }