Added setGlobalValue to VM api (#19007)
This commit is contained in:
parent
f77dea01fd
commit
f0af4a36b9
2 changed files with 9 additions and 0 deletions
|
|
@ -57,6 +57,10 @@ proc callRoutine*(i: Interpreter; routine: PSym; args: openArray[PNode]): PNode
|
|||
proc getGlobalValue*(i: Interpreter; letOrVar: PSym): PNode =
|
||||
result = vm.getGlobalValue(PCtx i.graph.vm, letOrVar)
|
||||
|
||||
proc setGlobalValue*(i: Interpreter; letOrVar: PSym, val: PNode) =
|
||||
## Sets a global value to a given PNode, does not do any type checking.
|
||||
vm.setGlobalValue(PCtx i.graph.vm, letOrVar, val)
|
||||
|
||||
proc implementRoutine*(i: Interpreter; pkg, module, name: string;
|
||||
impl: proc (a: VmArgs) {.closure, gcsafe.}) =
|
||||
assert i != nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue