IC: compilerprocs are handled correctly (#17265)
* IC: compilerprocs are handled correctly * IC: special logic for .exportC'ed procs * IC: 'hello world' compiles for the first round (2nd round fails) * IC: hello world seems to work
This commit is contained in:
parent
761ec2ccc8
commit
6cb26d8010
8 changed files with 120 additions and 39 deletions
|
|
@ -147,7 +147,6 @@ type
|
|||
selfName*: PIdent
|
||||
cache*: IdentCache
|
||||
graph*: ModuleGraph
|
||||
encoder*: PackedEncoder
|
||||
signatures*: TStrTable
|
||||
recursiveDep*: string
|
||||
suggestionsMade*: bool
|
||||
|
|
@ -314,9 +313,10 @@ proc newContext*(graph: ModuleGraph; module: PSym): PContext =
|
|||
assert graph.packed[id].status in {undefined, outdated}
|
||||
graph.packed[id].status = storing
|
||||
graph.packed[id].module = module
|
||||
initEncoder result.encoder, graph.packed[id].fromDisk, module, graph.config, graph.startupPackedConfig
|
||||
initEncoder graph, module
|
||||
|
||||
template packedRepr*(c): untyped = c.graph.packed[c.module.position].fromDisk
|
||||
template encoder*(c): untyped = c.graph.encoders[c.module.position]
|
||||
|
||||
proc addIncludeFileDep*(c: PContext; f: FileIndex) =
|
||||
if c.config.symbolFiles != disabledSf:
|
||||
|
|
@ -561,9 +561,10 @@ proc addToGenericCache*(c: PContext; s: PSym; inst: PType) =
|
|||
|
||||
proc saveRodFile*(c: PContext) =
|
||||
if c.config.symbolFiles != disabledSf:
|
||||
for (m, n) in PCtx(c.graph.vm).vmstateDiff:
|
||||
if m == c.module:
|
||||
addPragmaComputation(c, n)
|
||||
if c.graph.vm != nil:
|
||||
for (m, n) in PCtx(c.graph.vm).vmstateDiff:
|
||||
if m == c.module:
|
||||
addPragmaComputation(c, n)
|
||||
if sfSystemModule in c.module.flags:
|
||||
c.graph.systemModuleComplete = true
|
||||
c.idgen.sealed = true # no further additions are allowed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue