* fixes #14409; fixes#10674 VM callbacks switch to table-index seqs * fixes package name * reduce runtime cost
This commit is contained in:
parent
fc068ee06d
commit
4647c7b596
5 changed files with 37 additions and 23 deletions
|
|
@ -1351,7 +1351,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
|
|||
let prc = if not isClosure: bb.sym else: bb[0].sym
|
||||
if prc.offset < -1:
|
||||
# it's a callback:
|
||||
c.callbacks[-prc.offset-2].value(
|
||||
c.callbacks[-prc.offset-2](
|
||||
VmArgs(ra: ra, rb: rb, rc: rc, slots: cast[ptr UncheckedArray[TFullReg]](addr regs[0]),
|
||||
currentException: c.currentExceptionA,
|
||||
currentLineInfo: c.debug[pc])
|
||||
|
|
@ -1674,7 +1674,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
|
|||
rb = instr.regB
|
||||
rc = instr.regC
|
||||
idx = int(regs[rb+rc-1].intVal)
|
||||
callback = c.callbacks[idx].value
|
||||
callback = c.callbacks[idx]
|
||||
args = VmArgs(ra: ra, rb: rb, rc: rc, slots: cast[ptr UncheckedArray[TFullReg]](addr regs[0]),
|
||||
currentException: c.currentExceptionA,
|
||||
currentLineInfo: c.debug[pc])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue