Skip to content

Commit 592dd5f

Browse files
committed
Improve OpCallTyped performance
1 parent 24e1757 commit 592dd5f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

vm/vm.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,7 @@ func (vm *VM) Run(program *Program, env interface{}) (_ interface{}, err error)
377377
vm.push(fn(in...))
378378

379379
case OpCallTyped:
380-
fn := vm.pop()
381-
out := vm.call(fn, arg)
382-
vm.push(out)
380+
vm.push(vm.call(vm.pop(), arg))
383381

384382
case OpCallBuiltin1:
385383
vm.push(builtin.Functions[arg].Builtin1(vm.pop()))

0 commit comments

Comments
 (0)