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;
     }
 }
 public void EmitLoadLocalFromClosureBoxed(int index)
 {
     if (InstructionList._loadLocalFromClosureBoxed == null)
     {
         InstructionList._loadLocalFromClosureBoxed = new Instruction[64];
     }
     if (index >= (int)InstructionList._loadLocalFromClosureBoxed.Length)
     {
         this.Emit(new LoadLocalFromClosureBoxedInstruction(index));
         return;
     }
     else
     {
         InstructionList instructionList = this;
         Instruction     instruction     = InstructionList._loadLocalFromClosureBoxed[index];
         Instruction     instruction1    = instruction;
         if (instruction == null)
         {
             LoadLocalFromClosureBoxedInstruction loadLocalFromClosureBoxedInstruction = new LoadLocalFromClosureBoxedInstruction(index);
             Instruction instruction2 = loadLocalFromClosureBoxedInstruction;
             InstructionList._loadLocalFromClosureBoxed[index] = loadLocalFromClosureBoxedInstruction;
             instruction1 = instruction2;
         }
         instructionList.Emit(instruction1);
         return;
     }
 }
 public void EmitLoad(bool value)
 {
     if (!value)
     {
         InstructionList instructionList = this;
         Instruction     instruction     = InstructionList._false;
         Instruction     instruction1    = instruction;
         if (instruction == null)
         {
             LoadObjectInstruction loadObjectInstruction = new LoadObjectInstruction((object)value);
             instruction1           = loadObjectInstruction;
             InstructionList._false = loadObjectInstruction;
         }
         instructionList.Emit(instruction1);
         return;
     }
     else
     {
         InstructionList instructionList1 = this;
         Instruction     instruction2     = InstructionList._true;
         Instruction     instruction3     = instruction2;
         if (instruction2 == null)
         {
             LoadObjectInstruction loadObjectInstruction1 = new LoadObjectInstruction((object)value);
             instruction3          = loadObjectInstruction1;
             InstructionList._true = loadObjectInstruction1;
         }
         instructionList1.Emit(instruction3);
         return;
     }
 }
 public void EmitAssignLocalToClosure(int index)
 {
     if (InstructionList._assignLocalToClosure == null)
     {
         InstructionList._assignLocalToClosure = new Instruction[64];
     }
     if (index >= (int)InstructionList._assignLocalToClosure.Length)
     {
         this.Emit(new AssignLocalToClosureInstruction(index));
         return;
     }
     else
     {
         InstructionList instructionList = this;
         Instruction     instruction     = InstructionList._assignLocalToClosure[index];
         Instruction     instruction1    = instruction;
         if (instruction == null)
         {
             AssignLocalToClosureInstruction assignLocalToClosureInstruction = new AssignLocalToClosureInstruction(index);
             Instruction instruction2 = assignLocalToClosureInstruction;
             InstructionList._assignLocalToClosure[index] = assignLocalToClosureInstruction;
             instruction1 = instruction2;
         }
         instructionList.Emit(instruction1);
         return;
     }
 }
        public void EmitLeaveFault(bool hasValue)
        {
            Instruction     nonVoid;
            InstructionList instructionList = this;

            if (hasValue)
            {
                nonVoid = LeaveFaultInstruction.NonVoid;
            }
            else
            {
                nonVoid = LeaveFaultInstruction.Void;
            }
            instructionList.Emit(nonVoid);
        }
 public void EmitLoad(object value, Type type)
 {
     unsafe
     {
         if (value != null)
         {
             if (type == null || type.IsValueType)
             {
                 if (!(value is bool))
                 {
                     if (value is int)
                     {
                         int num = (int)value;
                         if (num >= -100 && num <= 100)
                         {
                             if (InstructionList._ints == null)
                             {
                                 InstructionList._ints = new Instruction[201];
                             }
                             num = num - -100;
                             InstructionList instructionList = this;
                             Instruction     instruction     = InstructionList._ints[num];
                             Instruction     instruction1    = instruction;
                             if (instruction == null)
                             {
                                 LoadObjectInstruction loadObjectInstruction = new LoadObjectInstruction(value);
                                 Instruction           instruction2          = loadObjectInstruction;
                                 InstructionList._ints[num] = loadObjectInstruction;
                                 instruction1 = instruction2;
                             }
                             instructionList.Emit(instruction1);
                             return;
                         }
                     }
                 }
                 else
                 {
                     this.EmitLoad((bool)value);
                     return;
                 }
             }
             if (this._objects == null)
             {
                 this._objects = new List <object>();
                 if (InstructionList._loadObjectCached == null)
                 {
                     InstructionList._loadObjectCached = new Instruction[0x100];
                 }
             }
             if (this._objects.Count >= (int)InstructionList._loadObjectCached.Length)
             {
                 this.Emit(new LoadObjectInstruction(value));
                 return;
             }
             else
             {
                 int count = (int)this._objects.Count;
                 this._objects.Add(value);
                 InstructionList instructionList1 = this;
                 Instruction     instruction3     = InstructionList._loadObjectCached[count];
                 Instruction     instruction4     = instruction3;
                 if (instruction3 == null)
                 {
                     LoadCachedObjectInstruction loadCachedObjectInstruction = new LoadCachedObjectInstruction(count);
                     Instruction instruction5 = loadCachedObjectInstruction;
                     InstructionList._loadObjectCached[count] = loadCachedObjectInstruction;
                     instruction4 = instruction5;
                 }
                 instructionList1.Emit(instruction4);
                 return;
             }
         }
         else
         {
             InstructionList instructionList2 = this;
             Instruction     instruction6     = InstructionList._null;
             Instruction     instruction7     = instruction6;
             if (instruction6 == null)
             {
                 LoadObjectInstruction loadObjectInstruction1 = new LoadObjectInstruction(null);
                 instruction7          = loadObjectInstruction1;
                 InstructionList._null = loadObjectInstruction1;
             }
             instructionList2.Emit(instruction7);
             return;
         }
     }
 }