diff options
author | Araq <rumpf_a@web.de> | 2014-02-01 23:58:20 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-02-01 23:58:20 +0100 |
commit | 0b8f68def0130ca381c2b2f16cc9b62918e32301 (patch) | |
tree | 587097ee9a12669bf0359d4d3da75fc7160c9947 /compiler/vm.nim | |
parent | 31f3034c3a93a7f056863db51ede65d2ebf66db6 (diff) | |
download | Nim-0b8f68def0130ca381c2b2f16cc9b62918e32301.tar.gz |
tstringinterp almost working
Diffstat (limited to 'compiler/vm.nim')
-rw-r--r-- | compiler/vm.nim | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim index 26aab3068..bc5320d9d 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -337,7 +337,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): PNode = asgnRef(c.globals.sons[instr.regBx-wordExcess-1], regs[ra]) of opcWrGlobal: asgnComplex(c.globals.sons[instr.regBx-wordExcess-1], regs[ra]) - of opcLdArr: + of opcLdArr, opcLdArrRef: # a = b[c] let rb = instr.regB let rc = instr.regC @@ -348,7 +348,11 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): PNode = assert regs[rb].kind != nkMetaNode let src = regs[rb] if src.kind notin {nkEmpty..nkNilLit} and idx <% src.len: - asgnComplex(regs[ra], src.sons[idx]) + if instr.opcode == opcLdArrRef and false: + # XXX activate when seqs are fixed + asgnRef(regs[ra], src.sons[idx]) + else: + asgnComplex(regs[ra], src.sons[idx]) else: stackTrace(c, tos, pc, errIndexOutOfBounds) of opcLdStrIdx: @@ -379,9 +383,15 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): PNode = # a = b.c let rb = instr.regB let rc = instr.regC - # XXX this creates a wrong alias #Message(c.debug[pc], warnUser, $regs[rb].safeLen & " " & $rc) asgnComplex(regs[ra], regs[rb].sons[rc]) + of opcLdObjRef: + # a = b.c + let rb = instr.regB + let rc = instr.regC + # XXX activate when seqs are fixed + asgnComplex(regs[ra], regs[rb].sons[rc]) + #asgnRef(regs[ra], regs[rb].sons[rc]) of opcWrObj: # a.b = c let rb = instr.regB |