fixes #14409; fixes #10674 VM callbacks switch to table-index seqs (#21297)

* fixes #14409; fixes#10674 VM callbacks switch to table-index seqs

* fixes package name

* reduce runtime cost
This commit is contained in:
ringabout
2023-01-27 06:49:04 +08:00
committed by GitHub
parent fc068ee06d
commit 4647c7b596
5 changed files with 37 additions and 23 deletions

View File

@@ -23,7 +23,7 @@ proc initInterpreter(script: string): Interpreter =
proc main() =
let i = initInterpreter("myscript.nim")
i.implementRoutine("*", "exposed", "addFloats", proc (a: VmArgs) =
i.implementRoutine("nim", "exposed", "addFloats", proc (a: VmArgs) =
setResult(a, getFloat(a, 0) + getFloat(a, 1) + getFloat(a, 2))
)
i.evalScript()