explicit ID generation for easier IC (#15559)
* refactoring: idents don't need inheritance * refactoring: adding an IdGenerator (part 1) * refactoring: adding an IdGenerator (part 2) * refactoring: adding an IdGenerator (part 3) * refactoring: adding an IdGenerator (part 4) * refactoring: adding an IdGenerator (part 5) * refactoring: adding an IdGenerator (part 5) * IdGenerator must be a ref type; hello world works again * make bootstrapping work again * progress: add back the 'exactReplica' ideas * added back the missing exactReplica hacks * make tcompilerapi work again * make important packages green * attempt to fix the build for 32 bit machines (probably need a better solution here)
This commit is contained in:
parent
7252a50fef
commit
226595515c
67 changed files with 853 additions and 903 deletions
|
|
@ -1266,10 +1266,10 @@ proc genArrayInfo(m: BModule, typ: PType, name: Rope; info: TLineInfo) =
|
|||
|
||||
proc fakeClosureType(m: BModule; owner: PSym): PType =
|
||||
# we generate the same RTTI as for a tuple[pointer, ref tuple[]]
|
||||
result = newType(tyTuple, owner)
|
||||
result.rawAddSon(newType(tyPointer, owner))
|
||||
var r = newType(tyRef, owner)
|
||||
let obj = createObj(m.g.graph, owner, owner.info, final=false)
|
||||
result = newType(tyTuple, nextId m.idgen, owner)
|
||||
result.rawAddSon(newType(tyPointer, nextId m.idgen, owner))
|
||||
var r = newType(tyRef, nextId m.idgen, owner)
|
||||
let obj = createObj(m.g.graph, m.idgen, owner, owner.info, final=false)
|
||||
r.rawAddSon(obj)
|
||||
result.rawAddSon(r)
|
||||
|
||||
|
|
@ -1395,9 +1395,9 @@ proc genTypeInfoV2(m: BModule, t: PType; info: TLineInfo): Rope =
|
|||
result = prefixTI.rope & result & ")".rope
|
||||
|
||||
proc openArrayToTuple(m: BModule; t: PType): PType =
|
||||
result = newType(tyTuple, t.owner)
|
||||
let p = newType(tyPtr, t.owner)
|
||||
let a = newType(tyUncheckedArray, t.owner)
|
||||
result = newType(tyTuple, nextId m.idgen, t.owner)
|
||||
let p = newType(tyPtr, nextId m.idgen, t.owner)
|
||||
let a = newType(tyUncheckedArray, nextId m.idgen, t.owner)
|
||||
a.add t.lastSon
|
||||
p.add a
|
||||
result.add p
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue