removed nimdat in favor of per-module dat init procs
This commit is contained in:
parent
035b715dfd
commit
4841b6390c
6 changed files with 73 additions and 75 deletions
|
|
@ -112,14 +112,14 @@ type
|
|||
labels*: natural # for generating unique module-scope names
|
||||
|
||||
var
|
||||
mainModProcs*, mainModInit*: PRope # parts of the main module
|
||||
mainModProcs*, mainModInit*, mainDatInit*: PRope # parts of the main module
|
||||
gMapping*: PRope # the generated mapping file (if requested)
|
||||
gProcProfile*: Natural # proc profile counter
|
||||
gPendingModules*: seq[BModule] = @[] # list of modules that are not
|
||||
# finished with code generation
|
||||
gModules*: seq[BModule] = @[] # list of all compiled modules
|
||||
gForwardedProcsCounter*: int = 0
|
||||
gNimDat*: BModule # generated global data
|
||||
|
||||
|
||||
proc s*(p: BProc, s: TCProcSection): var PRope {.inline.} =
|
||||
# section in the current block
|
||||
result = p.blocks[p.blocks.len - 1].sections[s]
|
||||
|
|
@ -128,6 +128,10 @@ proc procSec*(p: BProc, s: TCProcSection): var PRope {.inline.} =
|
|||
# top level proc sections
|
||||
result = p.blocks[0].sections[s]
|
||||
|
||||
proc bmod*(module: PSym): BModule =
|
||||
# obtains the BModule for a given module PSym
|
||||
result = gModules[module.position]
|
||||
|
||||
proc newProc*(prc: PSym, module: BModule): BProc =
|
||||
new(result)
|
||||
result.prc = prc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue