optimize: make all call single arg

to allow more aggressive optimization
This commit is contained in:
2025-05-23 09:21:40 +08:00
parent f380e5fd70
commit 53cbb37b00
8 changed files with 60 additions and 101 deletions

View File

@@ -22,9 +22,8 @@ pub enum OpCode {
/// force TOS to value
ForceValue,
/// [ .. func args @ .. ] consume (`arity` + 1) elements, call `func` with args` of length `arity`
/// Example: __add 1 2 => [ LookUp("__add") Const(1) Const(2) Call(2) ]
Call { arity: usize },
/// [ .. func arg ] consume 2 elements, call `func` with arg
Call,
/// make a function
Func { idx: usize },