fixes #1433
This commit is contained in:
parent
8f5bf06528
commit
65587f726e
1 changed files with 2 additions and 0 deletions
|
|
@ -1093,6 +1093,8 @@ proc setSlot(c: PCtx; v: PSym) =
|
||||||
# XXX generate type initialization here?
|
# XXX generate type initialization here?
|
||||||
if v.position == 0:
|
if v.position == 0:
|
||||||
if c.prc.maxSlots == 0: c.prc.maxSlots = 1
|
if c.prc.maxSlots == 0: c.prc.maxSlots = 1
|
||||||
|
if c.prc.maxSlots >= high(TRegister):
|
||||||
|
internalError(v.info, "cannot generate code; too many registers required")
|
||||||
v.position = c.prc.maxSlots
|
v.position = c.prc.maxSlots
|
||||||
c.prc.slots[v.position] = (inUse: true,
|
c.prc.slots[v.position] = (inUse: true,
|
||||||
kind: if v.kind == skLet: slotFixedLet else: slotFixedVar)
|
kind: if v.kind == skLet: slotFixedLet else: slotFixedVar)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue