summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2015-06-12 00:33:09 +0200
committerAndreas Rumpf <rumpf_a@web.de>2015-06-12 00:33:09 +0200
commit70e157d79e3953dcb122dac46e9e5ca5eacdfd99 (patch)
tree68e154d6f3408bf407d9d2604457a9e28d9827d7 /compiler
parente36c12ee37896f64d16271f31dde39be3d782fab (diff)
parentb49c75c82a5588ea6a3f14c9cb966ad87d99637e (diff)
downloadNim-70e157d79e3953dcb122dac46e9e5ca5eacdfd99.tar.gz
Merge pull request #2894 from nanoant/patch/macros-real-node-compare
Real node compare for macros
Diffstat (limited to 'compiler')
-rw-r--r--compiler/vm.nim6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim
index e49bed522..9f0d0bfce 100644
--- a/compiler/vm.nim
+++ b/compiler/vm.nim
@@ -682,11 +682,15 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
     of opcLtu:
       decodeBC(rkInt)
       regs[ra].intVal = ord(regs[rb].intVal <% regs[rc].intVal)
-    of opcEqRef, opcEqNimrodNode:
+    of opcEqRef:
       decodeBC(rkInt)
       regs[ra].intVal = ord((regs[rb].node.kind == nkNilLit and
                              regs[rc].node.kind == nkNilLit) or
                              regs[rb].node == regs[rc].node)
+    of opcEqNimrodNode:
+      decodeBC(rkInt)
+      regs[ra].intVal =
+        ord(exprStructuralEquivalent(regs[rb].node, regs[rc].node))
     of opcXor:
       decodeBC(rkInt)
       regs[ra].intVal = ord(regs[rb].intVal != regs[rc].intVal)