コード例 #1
0
ファイル: InstructionList.cs プロジェクト: modulexcite/pash-1
 public void EmitStoreLocal(int index)
 {
     if (InstructionList._storeLocal == null)
     {
         InstructionList._storeLocal = new Instruction[64];
     }
     if (index >= (int)InstructionList._storeLocal.Length)
     {
         this.Emit(new StoreLocalInstruction(index));
         return;
     }
     else
     {
         InstructionList instructionList = this;
         Instruction     instruction     = InstructionList._storeLocal[index];
         Instruction     instruction1    = instruction;
         if (instruction == null)
         {
             StoreLocalInstruction storeLocalInstruction = new StoreLocalInstruction(index);
             Instruction           instruction2          = storeLocalInstruction;
             InstructionList._storeLocal[index] = storeLocalInstruction;
             instruction1 = instruction2;
         }
         instructionList.Emit(instruction1);
         return;
     }
 }
コード例 #2
0
        public void EmitStoreLocal(int index)
        {
            if (s_storeLocal == null)
            {
                s_storeLocal = new Instruction[LocalInstrCacheSize];
            }

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