internal void Box(ParameterExpression variable, InstructionList instructions) { var scope = _variables[variable]; LocalVariable local = scope.Variable; Debug.Assert(!local.IsBoxed && !local.InClosure); _variables[variable].Variable.IsBoxed = true; int curChild = 0; for (int i = scope.Start; i < scope.Stop && i < instructions.Count; i++) { if (scope.ChildScopes != null && scope.ChildScopes[curChild].Start == i) { // skip boxing in the child scope var child = scope.ChildScopes[curChild]; i = child.Stop; curChild++; continue; } instructions.SwitchToBoxed(local.Index, i); } }
internal void Box(ParameterExpression variable, InstructionList instructions) { VariableScope scope = this._variables[variable]; LocalVariable variable2 = scope.Variable; this._variables[variable].Variable.IsBoxed = true; int num = 0; for (int i = scope.Start; (i < scope.Stop) && (i < instructions.Count); i++) { if ((scope.ChildScopes != null) && (scope.ChildScopes[num].Start == i)) { VariableScope scope2 = scope.ChildScopes[num]; i = scope2.Stop; num++; } else { instructions.SwitchToBoxed(variable2.Index, i); } } }