Revert "remove callable args alloc ()" ()

This reverts commit b75bda7da7.
This commit is contained in:
daniel 2020-03-15 11:19:02 -07:00 committed by GitHub
parent b75bda7da7
commit 3b53bc4f6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

4
vm.go
View file

@ -604,7 +604,9 @@ func (v *VM) run() {
v.framesIndex++
v.sp = v.sp - numArgs + callee.NumLocals
} else {
ret, e := value.Call(v.stack[v.sp-numArgs : v.sp]...)
var args []Object
args = append(args, v.stack[v.sp-numArgs:v.sp]...)
ret, e := value.Call(args...)
v.sp -= numArgs + 1
// runtime error