diff options
author | Araq <rumpf_a@web.de> | 2015-08-21 02:34:34 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-08-21 02:34:34 +0200 |
commit | 695e2e970e5ee560d324d6775c202f9b808f97fa (patch) | |
tree | ee9a89024a46a4eaf425c1000b5c0406c5c99633 /compiler/vm.nim | |
parent | a2bb7d4c71e0804dd57c8e4d7ba16cf61ab184f1 (diff) | |
download | Nim-695e2e970e5ee560d324d6775c202f9b808f97fa.tar.gz |
implemented macros.getImpl
Diffstat (limited to 'compiler/vm.nim')
-rw-r--r-- | compiler/vm.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim index b15c55565..b7b09f4a3 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -781,6 +781,14 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = regs[ra].node.add(copyTree(regs[rb].regToNode)) else: stackTrace(c, tos, pc, errNilAccess) + of opcGetImpl: + decodeB(rkNode) + let a = regs[rb].node + if a.kind == nkSym: + regs[ra].node = if a.sym.ast.isNil: newNode(nkNilLit) + else: copyTree(a.sym.ast) + else: + stackTrace(c, tos, pc, errFieldXNotFound, "symbol") of opcEcho: let rb = instr.regB if rb == 1: |