1
0

builtinfunction.dが追加されていなかったので追加

This commit is contained in:
otya128
2015-07-11 17:42:20 +09:00
parent a410f80ed0
commit 8a0ae76334
2 changed files with 208 additions and 0 deletions

View File

@@ -853,3 +853,22 @@ class CallFunctionCode : Code
}
}
}
import otya.smilebasic.builtinfunctions;
class CallBuiltinFunction : Code
{
BuiltinFunction func;
int argcount;
int outcount;
this(BuiltinFunction func, int argcount, int outcount/+可変長引数用+/)
{
this.func = func;
this.argcount = argcount;
this.outcount = outcount;
}
override void execute(VM vm)
{
Value[] arg = vm.stack[vm.stacki - argcount..vm.stacki - 1];
Value[] result = vm.stack[vm.stacki - argcount..vm.stacki - argcount + outcount - 1];//雑;
func.func(vm.petitcomputer, arg, result);
}
}