diff options
-rw-r--r-- | compiler/cgen.nim | 3 | ||||
-rw-r--r-- | compiler/main.nim | 4 | ||||
-rw-r--r-- | compiler/passes.nim | 9 | ||||
-rw-r--r-- | compiler/rodimpl.nim | 4 | ||||
-rw-r--r-- | compiler/sem.nim | 6 |
5 files changed, 12 insertions, 14 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim index d2ddd4a39..1ab7f6db2 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -1886,7 +1886,8 @@ proc shouldRecompile(m: BModule; code: Rope, cfile: Cfile): bool = result = true if optForceFullMake notin m.config.globalOptions: if not equalsFile(code, cfile.cname): - if m.config.symbolFiles == readOnlySf: #isDefined(m.config, "nimdiff"): + if false: + #m.config.symbolFiles == readOnlySf: #isDefined(m.config, "nimdiff"): if fileExists(cfile.cname): copyFile(cfile.cname.string, cfile.cname.string & ".backup") echo "diff ", cfile.cname.string, ".backup ", cfile.cname.string diff --git a/compiler/main.nim b/compiler/main.nim index ce80af36d..35c5f9993 100644 --- a/compiler/main.nim +++ b/compiler/main.nim @@ -88,9 +88,7 @@ proc commandCompileToC(graph: ModuleGraph) = let proj = changeFileExt(conf.projectFull, "") if not changeDetectedViaJsonBuildInstructions(conf, proj): # nothing changed - # Little hack here in order to not lose our precious - # hintSuccessX message: - conf.notes.incl hintSuccessX + graph.config.notes = graph.config.mainPackageNotes return compileProject(graph) diff --git a/compiler/passes.nim b/compiler/passes.nim index 7effcfeb5..82314b789 100644 --- a/compiler/passes.nim +++ b/compiler/passes.nim @@ -112,6 +112,14 @@ const nkMacroDef, nkConverterDef, nkIteratorDef, nkFuncDef, nkPragma, nkExportStmt, nkExportExceptStmt, nkFromStmt, nkImportStmt, nkImportExceptStmt} +proc prepareConfigNotes(graph: ModuleGraph; module: PSym) = + # don't be verbose unless the module belongs to the main package: + if module.owner.id == graph.config.mainPackageId: + graph.config.notes = graph.config.mainPackageNotes + else: + if graph.config.mainPackageNotes == {}: graph.config.mainPackageNotes = graph.config.notes + graph.config.notes = graph.config.foreignPackageNotes + proc processModule*(graph: ModuleGraph; module: PSym, stream: PLLStream): bool {.discardable.} = if graph.stopCompile(): return true var @@ -119,6 +127,7 @@ proc processModule*(graph: ModuleGraph; module: PSym, stream: PLLStream): bool { a: TPassContextArray s: PLLStream fileIdx = module.fileIdx + prepareConfigNotes(graph, module) if module.id < 0: # new module caching mechanism: for i in 0 ..< graph.passes.len: diff --git a/compiler/rodimpl.nim b/compiler/rodimpl.nim index 70893a600..f5f689939 100644 --- a/compiler/rodimpl.nim +++ b/compiler/rodimpl.nim @@ -221,10 +221,6 @@ proc encodeType(g: ModuleGraph, t: PType, result: var string) = if t.lockLevel.ord != UnspecifiedLockLevel.ord: add(result, '\14') encodeVInt(t.lockLevel.int16, result) - if t.destructor != nil and t.destructor.id != 0: - add(result, '\15') - encodeVInt(t.destructor.id, result) - pushSym(w, t.destructor) for a in t.attachedOps: add(result, '\16') if a == nil: diff --git a/compiler/sem.nim b/compiler/sem.nim index e33170553..b857f7e23 100644 --- a/compiler/sem.nim +++ b/compiler/sem.nim @@ -523,12 +523,6 @@ proc myOpen(graph: ModuleGraph; module: PSym): PPassContext = if sfSystemModule in module.flags: graph.systemModule = module c.topLevelScope = openScope(c) - # don't be verbose unless the module belongs to the main package: - if module.owner.id == graph.config.mainPackageId: - graph.config.notes = graph.config.mainPackageNotes - else: - if graph.config.mainPackageNotes == {}: graph.config.mainPackageNotes = graph.config.notes - graph.config.notes = graph.config.foreignPackageNotes result = c proc isImportSystemStmt(g: ModuleGraph; n: PNode): bool = |