clean up builtins
Some checks failed
Build / build (push) Failing after 1m29s
Test / build (push) Failing after 12m12s

This commit is contained in:
Chuck Smith
2024-03-18 17:08:36 -04:00
parent 5890a80daf
commit c59ce311b0
6 changed files with 191 additions and 211 deletions

View File

@@ -281,9 +281,9 @@ func (vm *VM) Run() error {
builtinIndex := code.ReadUint8(ins[ip+1:])
vm.currentFrame().ip += 1
definition := object.Builtins[builtinIndex]
builtin := object.BuiltinsIndex[builtinIndex]
err := vm.push(definition.Builtin)
err := vm.push(builtin)
if err != nil {
return err
}