htmlgen works again

This commit is contained in:
Araq 2014-02-25 21:30:18 +01:00
commit 384a018906

View file

@ -460,11 +460,16 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TRegister =
assert regs[rb].node.kind == nkRefTy assert regs[rb].node.kind == nkRefTy
regs[ra].node = regs[rb].node.sons[0] regs[ra].node = regs[rb].node.sons[0]
else: else:
stackTrace(c, tos, pc, errIndexOutOfBounds) stackTrace(c, tos, pc, errNilAccess)
of opcWrDeref: of opcWrDeref:
# a[] = b # a[] = b
decodeBC(rkNode) let ra = instr.regA
putIntoNode(regs[ra].node, regs[rb]) let rb = instr.regB
case regs[ra].kind
of rkNodeAddr: putIntoNode(regs[ra].nodeAddr[], regs[rb])
of rkRegisterAddr: regs[ra].regAddr[] = regs[rb]
of rkNode: putIntoNode(regs[ra].node, regs[rb])
else: stackTrace(c, tos, pc, errNilAccess)
of opcAddInt: of opcAddInt:
decodeBC(rkInt) decodeBC(rkInt)
regs[ra].intVal = regs[rb].intVal + regs[rc].intVal regs[ra].intVal = regs[rb].intVal + regs[rc].intVal