new VM: next steps

This commit is contained in:
Araq 2013-08-03 21:14:57 +02:00
commit 30bb68d48a
7 changed files with 72 additions and 28 deletions

View file

@ -663,6 +663,10 @@ proc execute(c: PCtx, start: int) =
of opcCallSite:
if c.callsite != nil: regs[ra] = c.callsite
else: stackTrace(c, tos, pc, errFieldXNotFound, "callsite")
of opcNLineInfo:
let rb = instr.regB
let n = regs[rb]
regs[ra] = newStrNodeT(n.info.toFileLineCol, n)
else:
InternalError(c.debug[pc], "unknown opcode " & $instr.opcode)
inc pc