Exemple #1
0
 public UvmInstruction FindUvmInstructionMappedByIlInstruction(Instruction ilInstruction)
 {
     if (IlInstructionsToUvmInstructionsMap.ContainsKey(ilInstruction))
     {
         return(IlInstructionsToUvmInstructionsMap[ilInstruction]);
     }
     else
     {
         return(null);
     }
 }
Exemple #2
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();
         }
     }
 }