internal void CloseNestedFunctions(StackFrame sf) { if (this.nested_functions != null) { IEnumerator enumerator = this.nested_functions.GetEnumerator(); IEnumerator enumerator2 = this.fields_for_nested_functions.GetEnumerator(); while (enumerator.MoveNext() && enumerator2.MoveNext()) { FieldInfo current = (FieldInfo) enumerator2.Current; FunctionObject func = (FunctionObject) enumerator.Current; func.enclosing_scope = sf; current.SetValue(sf, new Closure(func)); } } }
internal void CloseNestedFunctions(StackFrame sf){ if (this.nested_functions == null) return; IEnumerator funcs = this.nested_functions.GetEnumerator(); IEnumerator fields = this.fields_for_nested_functions.GetEnumerator(); while (funcs.MoveNext() && fields.MoveNext()){ FieldInfo field = (FieldInfo)fields.Current; FunctionObject func = (FunctionObject)funcs.Current; func.enclosing_scope = sf; field.SetValue(sf, new Closure(func)); } }
internal void SetMemberValue(string name, object value, StackFrame sf) { FieldInfo info = (FieldInfo) base.name_table[name]; if (info != null) { info.SetValue(sf, value); } else { base.parent.SetMemberValue(name, value); } }
internal void SetMemberValue(String name, Object value, StackFrame sf){ FieldInfo field = (FieldInfo)(this.name_table[name]); if (field != null) field.SetValue(sf, value); else this.parent.SetMemberValue(name, value); }