mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
fixes #420
This commit is contained in:
@@ -85,11 +85,11 @@ proc mangleName(s: PSym): PRope =
|
||||
#
|
||||
# Even with all these inefficient checks, the bootstrap
|
||||
# time is actually improved. This is probably because so many
|
||||
# rope concatenations and are now eliminated.
|
||||
# rope concatenations are now eliminated.
|
||||
#
|
||||
# Future notes:
|
||||
# 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:
|
||||
# `r`, `res`
|
||||
# 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, 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 =
|
||||
new(result)
|
||||
InitLinkedList(result.headerFiles)
|
||||
@@ -1091,7 +1096,7 @@ proc rawNewModule(module: PSym, filename: string): BModule =
|
||||
result.typeInfoMarker = initIntSet()
|
||||
result.initProc = newProc(nil, result)
|
||||
result.initProc.options = gOptions
|
||||
result.preInitProc = newProc(nil, result)
|
||||
result.preInitProc = newPreInitProc(result)
|
||||
initNodeTable(result.dataCache)
|
||||
result.typeStack = @[]
|
||||
result.forwardedProcs = @[]
|
||||
@@ -1111,7 +1116,7 @@ proc resetModule*(m: var BModule) =
|
||||
initIdTable(m.forwTypeCache)
|
||||
m.initProc = newProc(nil, m)
|
||||
m.initProc.options = gOptions
|
||||
m.preInitProc = newProc(nil, m)
|
||||
m.preInitProc = newPreInitProc(m)
|
||||
initNodeTable(m.dataCache)
|
||||
m.typeStack = @[]
|
||||
m.forwardedProcs = @[]
|
||||
|
||||
Reference in New Issue
Block a user