From b75bda7da7e772c11ca5f8b2422012f2540ad526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ozan=20Hac=C4=B1bekiro=C4=9Flu?= Date: Sun, 15 Mar 2020 18:45:40 +0200 Subject: [PATCH] remove callable args alloc (#259) --- vm.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vm.go b/vm.go index af8783f..4e29cb4 100644 --- a/vm.go +++ b/vm.go @@ -604,9 +604,7 @@ func (v *VM) run() { v.framesIndex++ v.sp = v.sp - numArgs + callee.NumLocals } else { - var args []Object - args = append(args, v.stack[v.sp-numArgs:v.sp]...) - ret, e := value.Call(args...) + ret, e := value.Call(v.stack[v.sp-numArgs : v.sp]...) v.sp -= numArgs + 1 // runtime error