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);
}