summary refs log tree commit diff stats
path: root/compiler/vm.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-07-15 21:36:44 +0200
committerAraq <rumpf_a@web.de>2015-07-15 22:00:44 +0200
commit728fc441ef7d1e81b7f2cc5cb2df04a7b7ced179 (patch)
tree348011507ab532ec4b731b542a9223038dd6d829 /compiler/vm.nim
parent6e39f75f5437a5c9b53fdcb8ec1b6b9b000d1b5d (diff)
downloadNim-728fc441ef7d1e81b7f2cc5cb2df04a7b7ced179.tar.gz
staticExec now supports caching
Diffstat (limited to 'compiler/vm.nim')
-rw-r--r--compiler/vm.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim
index 6d496d6e1..40d273ceb 100644
--- a/compiler/vm.nim
+++ b/compiler/vm.nim
@@ -1168,9 +1168,12 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
                                      c.module)
     of opcGorge:
       decodeBC(rkNode)
+      inc pc
+      let rd = c.code[pc].regA
+
       createStr regs[ra]
       regs[ra].node.strVal = opGorge(regs[rb].node.strVal,
-                                     regs[rc].node.strVal)
+                                     regs[rc].node.strVal, regs[rd].node.strVal)
     of opcNError:
       stackTrace(c, tos, pc, errUser, regs[ra].node.strVal)
     of opcNWarning: