summary refs log tree commit diff stats
path: root/compiler/vm.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-12-23 08:28:32 +0100
committerAraq <rumpf_a@web.de>2013-12-23 08:28:32 +0100
commit4447c1b7e323443a26189140410814195eee18a9 (patch)
tree2e7b779a5eaa046f166ded908a7629c083bf385c /compiler/vm.nim
parentb76729df1cd326a3230536d0f78276cfabe4dd2a (diff)
downloadNim-4447c1b7e323443a26189140410814195eee18a9.tar.gz
tcnstseq works again
Diffstat (limited to 'compiler/vm.nim')
-rw-r--r--compiler/vm.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim
index 854b491fb..709baf7b2 100644
--- a/compiler/vm.nim
+++ b/compiler/vm.nim
@@ -632,10 +632,10 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): PNode =
         # we pass 'tos.slots' instead of 'regs' so that the compiler can keep
         # 'regs' in a register:
         when hasFFI:
-          if c.globals.sons[prc.position-1].kind == nkEmpty:
+          let prcValue = c.globals.sons[prc.position-1]
+          if prcValue.kind == nkEmpty:
             globalError(c.debug[pc], errGenerated, "canot run " & prc.name.s)
-          let newValue = callForeignFunction(c.globals.sons[prc.position-1],
-                                             prc.typ, tos.slots,
+          let newValue = callForeignFunction(prcValue, prc.typ, tos.slots,
                                              rb+1, rc-1, c.debug[pc])
           if newValue.kind != nkEmpty:
             assert instr.opcode == opcIndCallAsgn