summary refs log tree commit diff stats
path: root/compiler/vm.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-02-25 08:41:29 +0100
committerAraq <rumpf_a@web.de>2014-02-25 08:41:29 +0100
commitb7bb56bdca9ced8fdc0dea18dc54f732c6e17d3e (patch)
treeb10b53ba60ff226f77c6c6034ba1b45fb7ec44f7 /compiler/vm.nim
parent3a2e1ce538f65942dae426b3183353353850e93f (diff)
downloadNim-b7bb56bdca9ced8fdc0dea18dc54f732c6e17d3e.tar.gz
made some tests green; htmlgen still broken
Diffstat (limited to 'compiler/vm.nim')
-rw-r--r--compiler/vm.nim8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim
index 6277b2dc6..108979739 100644
--- a/compiler/vm.nim
+++ b/compiler/vm.nim
@@ -109,14 +109,18 @@ template decodeBx(k: expr) {.immediate, dirty.} =
 template move(a, b: expr) {.immediate, dirty.} = system.shallowCopy(a, b)
 # XXX fix minor 'shallowCopy' overloading bug in compiler
 
-template createStrKeepNode(x) =
+proc createStrKeepNode(x: var TRegister) =
   if x.node.isNil:
     x.node = newNode(nkStrLit)
   elif x.node.kind == nkNilLit:
     system.reset(x.node[])
     x.node.kind = nkStrLit
   else:
-    assert x.node.kind in {nkStrLit..nkTripleStrLit}
+    # XXX this is hacky; tests/txmlgen triggers it:
+    x.node = newNode(nkStrLit)
+    #if x.node.kind notin {nkStrLit..nkTripleStrLit}:
+    #  debug x.node
+    #assert x.node.kind in {nkStrLit..nkTripleStrLit}
 
 template createStr(x) =
   x.node = newNode(nkStrLit)