Ejemplo n.º 1
0
 public void EmitLoadLocal(int index)
 {
     if (InstructionList._loadLocal == null)
     {
         InstructionList._loadLocal = new Instruction[64];
     }
     if (index >= (int)InstructionList._loadLocal.Length)
     {
         this.Emit(new LoadLocalInstruction(index));
         return;
     }
     else
     {
         InstructionList instructionList = this;
         Instruction     instruction     = InstructionList._loadLocal[index];
         Instruction     instruction1    = instruction;
         if (instruction == null)
         {
             LoadLocalInstruction loadLocalInstruction = new LoadLocalInstruction(index);
             Instruction          instruction2         = loadLocalInstruction;
             InstructionList._loadLocal[index] = loadLocalInstruction;
             instruction1 = instruction2;
         }
         instructionList.Emit(instruction1);
         return;
     }
 }
Ejemplo n.º 2
0
        public void EmitLoadLocal(int index)
        {
            if (s_loadLocal == null)
            {
                s_loadLocal = new Instruction[LocalInstrCacheSize];
            }

            if (index < s_loadLocal.Length)
            {
                Emit(s_loadLocal[index] ?? (s_loadLocal[index] = new LoadLocalInstruction(index)));
            }
            else
            {
                Emit(new LoadLocalInstruction(index));
            }
        }