IronPython.Compiler.Ast.FunctionDefinition.FunctionDefinitionInstruction.Run C# (CSharp) Method

Run() public method

public Run ( InterpretedFrame frame ) : int
frame Microsoft.Scripting.Interpreter.InterpretedFrame
return int
            public override int Run(InterpretedFrame frame) {
                object[] defaults;
                if (_defaultCount > 0) {
                    defaults = new object[_defaultCount];
                    for (int i = 0; i < _defaultCount; i++) {
                        defaults[i] = frame.Pop();
                    }
                } else {
                    defaults = ArrayUtils.EmptyObjects;
                }

                object modName;
                if (_name != null) {
                    modName = _name.RawValue;
                } else {
                    modName = frame.Pop();
                }

                CodeContext context = (CodeContext)frame.Pop();
                
                frame.Push(PythonOps.MakeFunction(context, _def.FunctionCode, modName, defaults));

                return +1;
            }
FunctionDefinition.FunctionDefinitionInstruction