diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-06-01 22:11:32 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-06-01 22:11:32 +0200 |
commit | cae19738562f14fbb76004748bed8d2f337d6f0b (patch) | |
tree | a2d965f68a1e0d2d5617b74166c7798bc77d69f0 /compiler | |
parent | 61fb83ecbb4c691c03d500f6c71499e59a67cef2 (diff) | |
download | Nim-cae19738562f14fbb76004748bed8d2f337d6f0b.tar.gz |
document how the incremental compilation scheme could work
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/lineinfos.nim | 6 | ||||
-rw-r--r-- | compiler/modulegraphs.nim | 2 | ||||
-rw-r--r-- | compiler/options.nim | 23 |
3 files changed, 17 insertions, 14 deletions
diff --git a/compiler/lineinfos.nim b/compiler/lineinfos.nim index 0384fda26..cad1fe6aa 100644 --- a/compiler/lineinfos.nim +++ b/compiler/lineinfos.nim @@ -246,10 +246,10 @@ const trackPosInvalidFileIdx* = FileIndex(-2) # special marker so that no sugges # are produced within comments and string literals type - MsgConfig* = object + MsgConfig* = object ## does not need to be stored in the incremental cache trackPos*: TLineInfo - trackPosAttached*: bool ## whether the tracking position was attached to some - ## close token. + trackPosAttached*: bool ## whether the tracking position was attached to + ## some close token. errorOutputs*: TErrorOutputs msgContext*: seq[TLineInfo] diff --git a/compiler/modulegraphs.nim b/compiler/modulegraphs.nim index 7c9837f54..02307ca9f 100644 --- a/compiler/modulegraphs.nim +++ b/compiler/modulegraphs.nim @@ -47,7 +47,7 @@ type doStopCompile*: proc(): bool {.closure.} usageSym*: PSym # for nimsuggest owners*: seq[PSym] - methods*: seq[tuple[methods: TSymSeq, dispatcher: PSym]] + methods*: seq[tuple[methods: TSymSeq, dispatcher: PSym]] # needs serialization! systemModule*: PSym sysTypes*: array[TTypeKind, PType] compilerprocs*: TStrTable diff --git a/compiler/options.nim b/compiler/options.nim index cb4f1e885..044461b55 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -156,24 +156,27 @@ type version*: int Suggestions* = seq[Suggest] - ConfigRef* = ref object ## eventually all global configuration should be moved here - target*: Target + ConfigRef* = ref object ## every global configuration + ## fields marked with '*' are subject to + ## the incremental compilation mechanisms + ## (+) means "part of the dependency" + target*: Target # (+) linesCompiled*: int # all lines that have been compiled - options*: TOptions - globalOptions*: TGlobalOptions + options*: TOptions # (+) + globalOptions*: TGlobalOptions # (+) m*: MsgConfig evalTemplateCounter*: int evalMacroCounter*: int exitcode*: int8 cmd*: TCommands # the command - selectedGC*: TGCMode # the selected GC + selectedGC*: TGCMode # the selected GC (+) verbosity*: int # how verbose the compiler is numberOfProcessors*: int # number of processors evalExpr*: string # expression for idetools --eval lastCmdTime*: float # when caas is enabled, we measure each command symbolFiles*: SymbolFilesOption - cppDefines*: HashSet[string] + cppDefines*: HashSet[string] # (*) headerFile*: string features*: set[Feature] arguments*: string ## the arguments to be passed to the program that @@ -220,13 +223,13 @@ type cLinkedLibs*: seq[string] # libraries to link externalToLink*: seq[string] # files to link in addition to the file - # we compiled + # we compiled (*) linkOptionsCmd*: string compileOptionsCmd*: seq[string] - linkOptions*: string - compileOptions*: string + linkOptions*: string # (*) + compileOptions*: string # (*) ccompilerpath*: string - toCompile*: CfileList + toCompile*: CfileList # (*) suggestionResultHook*: proc (result: Suggest) {.closure.} suggestVersion*: int suggestMaxResults*: int |