상속: FieldInstruction
예제 #1
0
 private Instruction GetLoadField(FieldInfo field)
 {
     lock (_loadFields)
     {
         if (!_loadFields.TryGetValue(field, out var instruction))
         {
             if (field.IsStatic)
             {
                 instruction = new LoadStaticFieldInstruction(field);
             }
             else
             {
                 instruction = new LoadFieldInstruction(field);
             }
             _loadFields.Add(field, instruction);
         }
         return(instruction);
     }
 }
예제 #2
0
 private Instruction GetLoadField(FieldInfo field)
 {
     lock (s_loadFields)
     {
         Instruction instruction;
         if (!s_loadFields.TryGetValue(field, out instruction))
         {
             if (field.IsStatic)
             {
                 instruction = new LoadStaticFieldInstruction(field);
             }
             else
             {
                 instruction = new LoadFieldInstruction(field);
             }
             s_loadFields.Add(field, instruction);
         }
         return instruction;
     }
 }