tcnstseq works again

This commit is contained in:
Araq 2013-12-23 08:28:32 +01:00
commit 4447c1b7e3
3 changed files with 17 additions and 6 deletions

View file

@ -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