public override void Execute(ActionContext context) { var funcName = context.Stack.Pop().ToString(); var args = FunctionCommon.GetArgumentsFromStack(context); FunctionCommon.ExecuteFunction(funcName, args, context.Scope, context); }
public override void Execute(ActionContext context) { var id = Parameters[0].ToInteger(); var funcName = context.Scope.Constants[id].ToString(); var args = FunctionCommon.GetArgumentsFromStack(context); FunctionCommon.ExecuteFunction(funcName, args, context.Scope, context); }
public override void Execute(ActionContext context) { var id = Parameters[0].ToInteger(); var funcName = context.Scope.Constants[id].ToString(); var obj = context.Stack.Pop().ResolveRegister(context).ToObject(); var args = FunctionCommon.GetArgumentsFromStack(context); FunctionCommon.ExecuteFunction(funcName, args, obj, context); }
public override void Execute(ActionContext context) { var id = Parameters[0].ToInteger(); var funcName = context.Scope.Constants[id].ToString(); var args = new Value[0]; FunctionCommon.ExecuteFunction(funcName, args, context.Scope, context); }
public override void Execute(ActionContext context) { var id = Parameters[0].ToInteger(); var funcName = context.Scope.Constants[id].ToString(); var obj = context.Stack.Pop().ToObject(); var args = FunctionCommon.GetArgumentsFromStack(context); FunctionCommon.ExecuteFunction(funcName, args, obj, context); var result = context.Stack.Pop(); var varName = context.Stack.Pop(); context.Locals[varName.ToString()] = result; }
public override void Execute(ActionContext context) { var id = Parameters[0].ToInteger(); var funcName = context.Scope.Constants[id].ToString(); var argCount = context.Stack.Pop().ToInteger(); var args = new Value[argCount]; for (int i = 0; i < argCount; ++i) { args[i] = context.Stack.Pop(); } FunctionCommon.ExecuteFunction(funcName, args, context.Scope, context); }
public override void Execute(ActionContext context) { var funcName = context.Stack.Pop().ToString(); var obj = context.Stack.Pop().ResolveRegister(context).ToObject(); var argCount = context.Stack.Pop().ToInteger(); var args = new Value[argCount]; for (int i = 0; i < argCount; ++i) { args[i] = context.Stack.Pop(); } FunctionCommon.ExecuteFunction(funcName, args, obj, context); }
public override void Execute(ActionContext context) { var funcName = context.Stack.Pop().ToString(); // If funcname is defined we need get the function from an object if (funcName.Length > 0) { var obj = context.Stack.Pop().ResolveRegister(context).ToObject(); var args = FunctionCommon.GetArgumentsFromStack(context); FunctionCommon.ExecuteFunction(funcName, args, obj, context); } // Else the function is on the stack else { var funcVal = context.Stack.Pop().ResolveRegister(context); var args = FunctionCommon.GetArgumentsFromStack(context); FunctionCommon.ExecuteFunction(funcVal, args, context.Scope, context); } }