diff options
author | Araq <rumpf_a@web.de> | 2014-02-25 08:41:29 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-02-25 08:41:29 +0100 |
commit | b7bb56bdca9ced8fdc0dea18dc54f732c6e17d3e (patch) | |
tree | b10b53ba60ff226f77c6c6034ba1b45fb7ec44f7 /compiler/vm.nim | |
parent | 3a2e1ce538f65942dae426b3183353353850e93f (diff) | |
download | Nim-b7bb56bdca9ced8fdc0dea18dc54f732c6e17d3e.tar.gz |
made some tests green; htmlgen still broken
Diffstat (limited to 'compiler/vm.nim')
-rw-r--r-- | compiler/vm.nim | 8 |
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) |