* bindSym power up, working prototype * update bindSym doc * add bindSym test * fix some typo * fix bindSym doc * get rid of specialops field from vm * add experimental: dynamicBindSym
This commit is contained in:
parent
674bd7bfad
commit
78c0ac5407
9 changed files with 183 additions and 13 deletions
|
|
@ -136,7 +136,7 @@ type
|
|||
opcLdGlobalAddr, # dest = addr(globals[Bx])
|
||||
|
||||
opcLdImmInt, # dest = immediate value
|
||||
opcNBindSym,
|
||||
opcNBindSym, opcNDynBindSym,
|
||||
opcSetType, # dest.typ = types[Bx]
|
||||
opcTypeTrait,
|
||||
opcMarshalLoad, opcMarshalStore,
|
||||
|
|
@ -229,7 +229,8 @@ proc refresh*(c: PCtx, module: PSym) =
|
|||
c.prc = PProc(blocks: @[])
|
||||
c.loopIterations = MaxLoopIterations
|
||||
|
||||
proc registerCallback*(c: PCtx; name: string; callback: VmCallback) =
|
||||
proc registerCallback*(c: PCtx; name: string; callback: VmCallback): int {.discardable.} =
|
||||
result = c.callbacks.len
|
||||
c.callbacks.add((name, callback))
|
||||
|
||||
const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue