add nodeId proc to macros (#11456)

* add nodeId proc to macros

* add doc comment.

* fix typo
This commit is contained in:
Arne Döring 2019-09-18 20:02:30 +02:00 • committed by Andreas Rumpf
commit 188ce5f3ee
6 changed files with 18 additions and 2 deletions

View file

@ -1472,6 +1472,12 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
regs[ra].node = copyNode(a)
else:
stackTrace(c, tos, pc, errFieldXNotFound & "ident")
of opcNodeId:
decodeB(rkInt)
when defined(useNodeIds):
regs[ra].intVal = regs[rb].node.id
else:
regs[ra].intVal = -1
of opcNGetType:
let rb = instr.regB
let rc = instr.regC