mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 06:20:38 +00:00
added #903 to the test suite
This commit is contained in:
@@ -448,7 +448,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
|
||||
let n = src.sons[rc]
|
||||
regs[ra].node = n
|
||||
else:
|
||||
stackTrace(c, tos, pc, errIndexOutOfBounds)
|
||||
stackTrace(c, tos, pc, errNilAccess)
|
||||
of opcWrObj:
|
||||
# a.b = c
|
||||
decodeBC(rkNode)
|
||||
@@ -902,6 +902,10 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
|
||||
let rb = instr.regBx - wordExcess - 1
|
||||
ensureKind(rkNode)
|
||||
regs[ra].node = c.globals.sons[rb]
|
||||
of opcLdGlobalAddr:
|
||||
let rb = instr.regBx - wordExcess - 1
|
||||
ensureKind(rkNodeAddr)
|
||||
regs[ra].nodeAddr = addr(c.globals.sons[rb])
|
||||
of opcRepr:
|
||||
decodeB(rkNode)
|
||||
createStr regs[ra]
|
||||
|
||||
@@ -126,6 +126,7 @@ type
|
||||
opcLdConst, # dest = constants[Bx]
|
||||
opcAsgnConst, # dest = copy(constants[Bx])
|
||||
opcLdGlobal, # dest = globals[Bx]
|
||||
opcLdGlobalAddr, # dest = addr(globals[Bx])
|
||||
|
||||
opcLdImmInt, # dest = immediate value
|
||||
opcNBindSym,
|
||||
|
||||
@@ -1614,7 +1614,7 @@ proc genProc(c: PCtx; s: PSym): int =
|
||||
c.gABC(body, opcEof, eofInstr.regA)
|
||||
c.optimizeJumps(result)
|
||||
s.offset = c.prc.maxSlots
|
||||
#if s.name.s == "tupleUnpack":
|
||||
#if s.name.s == "addStuff":
|
||||
# echo renderTree(body)
|
||||
# c.echoCode(result)
|
||||
c.prc = oldPrc
|
||||
|
||||
Reference in New Issue
Block a user