fixes #420
This commit is contained in:
parent
814fca7de5
commit
2189e9a60f
2 changed files with 9 additions and 4 deletions
|
|
@ -85,11 +85,11 @@ proc mangleName(s: PSym): PRope =
|
||||||
#
|
#
|
||||||
# Even with all these inefficient checks, the bootstrap
|
# Even with all these inefficient checks, the bootstrap
|
||||||
# time is actually improved. This is probably because so many
|
# time is actually improved. This is probably because so many
|
||||||
# rope concatenations and are now eliminated.
|
# rope concatenations are now eliminated.
|
||||||
#
|
#
|
||||||
# Future notes:
|
# Future notes:
|
||||||
# sfFromGeneric seems to be needed in order to avoid multiple
|
# sfFromGeneric seems to be needed in order to avoid multiple
|
||||||
# definitions of certain varialbes generated in transf with
|
# definitions of certain variables generated in transf with
|
||||||
# names such as:
|
# names such as:
|
||||||
# `r`, `res`
|
# `r`, `res`
|
||||||
# I need to study where these come from.
|
# I need to study where these come from.
|
||||||
|
|
|
||||||
|
|
@ -1078,6 +1078,11 @@ proc genModule(m: BModule, cfilenoext: string): PRope =
|
||||||
app(result, genSectionEnd(i))
|
app(result, genSectionEnd(i))
|
||||||
app(result, m.s[cfsInitProc])
|
app(result, m.s[cfsInitProc])
|
||||||
|
|
||||||
|
proc newPreInitProc(m: BModule): BProc =
|
||||||
|
result = newProc(nil, m)
|
||||||
|
# little hack so that unique temporaries are generated:
|
||||||
|
result.labels = 100_000
|
||||||
|
|
||||||
proc rawNewModule(module: PSym, filename: string): BModule =
|
proc rawNewModule(module: PSym, filename: string): BModule =
|
||||||
new(result)
|
new(result)
|
||||||
InitLinkedList(result.headerFiles)
|
InitLinkedList(result.headerFiles)
|
||||||
|
|
@ -1091,7 +1096,7 @@ proc rawNewModule(module: PSym, filename: string): BModule =
|
||||||
result.typeInfoMarker = initIntSet()
|
result.typeInfoMarker = initIntSet()
|
||||||
result.initProc = newProc(nil, result)
|
result.initProc = newProc(nil, result)
|
||||||
result.initProc.options = gOptions
|
result.initProc.options = gOptions
|
||||||
result.preInitProc = newProc(nil, result)
|
result.preInitProc = newPreInitProc(result)
|
||||||
initNodeTable(result.dataCache)
|
initNodeTable(result.dataCache)
|
||||||
result.typeStack = @[]
|
result.typeStack = @[]
|
||||||
result.forwardedProcs = @[]
|
result.forwardedProcs = @[]
|
||||||
|
|
@ -1111,7 +1116,7 @@ proc resetModule*(m: var BModule) =
|
||||||
initIdTable(m.forwTypeCache)
|
initIdTable(m.forwTypeCache)
|
||||||
m.initProc = newProc(nil, m)
|
m.initProc = newProc(nil, m)
|
||||||
m.initProc.options = gOptions
|
m.initProc.options = gOptions
|
||||||
m.preInitProc = newProc(nil, m)
|
m.preInitProc = newPreInitProc(m)
|
||||||
initNodeTable(m.dataCache)
|
initNodeTable(m.dataCache)
|
||||||
m.typeStack = @[]
|
m.typeStack = @[]
|
||||||
m.forwardedProcs = @[]
|
m.forwardedProcs = @[]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue