since we have now so many virtual registers, reduce memory consumption for the register allocator (#17985)
This commit is contained in:
parent
983a2aa11c
commit
a9ae5fe5be
3 changed files with 48 additions and 50 deletions
|
|
@ -2106,7 +2106,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
|
|||
|
||||
proc execute(c: PCtx, start: int): PNode =
|
||||
var tos = PStackFrame(prc: nil, comesFrom: 0, next: nil)
|
||||
newSeq(tos.slots, c.prc.maxSlots)
|
||||
newSeq(tos.slots, c.prc.regInfo.len)
|
||||
result = rawExecute(c, start, tos).regToNode
|
||||
|
||||
proc execProc*(c: PCtx; sym: PSym; args: openArray[PNode]): PNode =
|
||||
|
|
@ -2203,8 +2203,8 @@ proc evalConstExprAux(module: PSym; idgen: IdGenerator;
|
|||
assert c.code[start].opcode != opcEof
|
||||
when debugEchoCode: c.echoCode start
|
||||
var tos = PStackFrame(prc: prc, comesFrom: 0, next: nil)
|
||||
newSeq(tos.slots, c.prc.maxSlots)
|
||||
#for i in 0..<c.prc.maxSlots: tos.slots[i] = newNode(nkEmpty)
|
||||
newSeq(tos.slots, c.prc.regInfo.len)
|
||||
#for i in 0..<c.prc.regInfo.len: tos.slots[i] = newNode(nkEmpty)
|
||||
result = rawExecute(c, start, tos).regToNode
|
||||
if result.info.col < 0: result.info = n.info
|
||||
c.mode = oldMode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue