diff options
author | Arne Döring <arne.doering@gmx.net> | 2019-09-18 20:02:30 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-09-18 20:02:30 +0200 |
commit | 188ce5f3ee5c83d749918f9f286537d65a513c53 (patch) | |
tree | d3a12f3b637c43aedcfec76a4acb736ac874ff23 /compiler/vm.nim | |
parent | f8000d4ba14414657b2255fda3ca058074166b76 (diff) | |
download | Nim-188ce5f3ee5c83d749918f9f286537d65a513c53.tar.gz |
add nodeId proc to macros (#11456)
* add nodeId proc to macros * add doc comment. * fix typo
Diffstat (limited to 'compiler/vm.nim')
-rw-r--r-- | compiler/vm.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim index 40d12db97..0496e37ca 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -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 |