Ejemplo n.º 1
0
 /// <summary>
 /// 呼び出します。
 /// </summary>
 /// <param name="context"></param>
 /// <param name="args">引数</param>
 /// <returns>返り値</returns>
 protected internal override KecaknoahFunctionResult Call(KecaknoahContext context, KecaknoahObject[] args)
 {
     var sf = new KecaknoahStackFrame(context, BaseMethod.Codes);
     sf.Locals["self"] = KecaknoahReference.CreateRightReference(Instance);
     sf.Arguments = args;
     var r = sf.Resume();
     return new KecaknoahFunctionResult(sf.ReturningObject, r);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 呼び出します。
 /// </summary>
 /// <param name="context"></param>
 /// <param name="args">引数</param>
 /// <returns>返り値</returns>
 protected internal override KecaknoahFunctionResult Call(KecaknoahContext context, KecaknoahObject[] args)
 {
     if (args != null)
     {
         CurrentFrame = new KecaknoahStackFrame(context, BaseMethod.Codes);
         CurrentFrame.Locals["self"] = KecaknoahReference.Right(Instance);
         CurrentFrame.Arguments = args;
     }
     var r = CurrentFrame.Resume();
     return new KecaknoahFunctionResult(CurrentFrame.ReturningObject, r);
 }