This commit is contained in:
Araq
2013-05-19 01:52:06 +02:00
parent 814fca7de5
commit 2189e9a60f
2 changed files with 9 additions and 4 deletions

View File

@@ -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.

View File

@@ -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 = @[]