Microsoft.JScript.FunctionObject.TranslateToILToCopyLocalsToNestedScope C# (CSharp) 메소드

TranslateToILToCopyLocalsToNestedScope() 개인적인 메소드

private TranslateToILToCopyLocalsToNestedScope ( ILGenerator il, FunctionScope nestedScope, JSLocalField notToBeRestored ) : void
il ILGenerator
nestedScope FunctionScope
notToBeRestored JSLocalField
리턴 void
      private void TranslateToILToCopyLocalsToNestedScope(ILGenerator il, FunctionScope nestedScope, JSLocalField[] notToBeRestored){
        int offset = (this.attributes&MethodAttributes.Static) == MethodAttributes.Static ? 0 : 1;
        int n = this.fields.Length;
        for (int i = 0; i < n; i++){
          JSLocalField field = nestedScope.GetOuterLocalField(this.fields[i].Name);
          if (field == null || field.outerField != this.fields[i] || (notToBeRestored != null && IsPresentIn(field, notToBeRestored)))
            continue;
          il.Emit(OpCodes.Dup);
          ConstantWrapper.TranslateToILInt(il, this.fields[i].slotNumber);
          il.Emit(OpCodes.Ldelem_Ref);
          Convert.Emit(this.body, il, Typeob.Object, this.fields[i].FieldType);
          il.Emit(OpCodes.Stloc, (LocalBuilder)field.metaData);
        }
        il.Emit(OpCodes.Pop);
      }