diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-07-15 11:44:02 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-07-15 11:44:02 +0200 |
commit | 3e72c98d49ff6c9c07251e2497c5b245770bec5e (patch) | |
tree | b56d87729cbf7505f1e745f6475f906268097de7 | |
parent | 153fd13f3d6a8f8a046d85c44d077238310664b5 (diff) | |
download | Nim-3e72c98d49ff6c9c07251e2497c5b245770bec5e.tar.gz |
rollback of nimsuggest improvement until we figured out the reasons
-rw-r--r-- | compiler/modules.nim | 12 | ||||
-rw-r--r-- | compiler/semexprs.nim | 10 |
2 files changed, 13 insertions, 9 deletions
diff --git a/compiler/modules.nim b/compiler/modules.nim index d653e8b8f..9a7f68495 100644 --- a/compiler/modules.nim +++ b/compiler/modules.nim @@ -105,10 +105,14 @@ proc checkDepMem(fileIdx: int32): TNeedRecompile = resetModule(fileIdx) return Yes - # cycle detection: We claim that a cycle does no harm. - if gMemCacheData[fileIdx].needsRecompile == Probing: - return No - #return gMemCacheData[fileIdx].needsRecompile + when true: + if gMemCacheData[fileIdx].needsRecompile != Maybe: + return gMemCacheData[fileIdx].needsRecompile + else: + # cycle detection: We claim that a cycle does no harm. + if gMemCacheData[fileIdx].needsRecompile == Probing: + return No + #return gMemCacheData[fileIdx].needsRecompile if optForceFullMake in gGlobalOptions or hashChanged(fileIdx): markDirty() diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 7aeaa475f..8ce29d299 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -1635,8 +1635,8 @@ proc newAnonSym(kind: TSymKind, info: TLineInfo, result.flags = {sfGenSym} proc semExpandToAst(c: PContext, n: PNode): PNode = - var macroCall = n[1] - var expandedSym = expectMacroOrTemplateCall(c, macroCall) + let macroCall = n[1] + let expandedSym = expectMacroOrTemplateCall(c, macroCall) if expandedSym.kind == skError: return n macroCall.sons[0] = newSymNode(expandedSym, macroCall.info) @@ -1644,13 +1644,13 @@ proc semExpandToAst(c: PContext, n: PNode): PNode = styleCheckUse(n.info, expandedSym) for i in countup(1, macroCall.len-1): + #if macroCall.sons[0].typ.sons[i].kind != tyExpr: macroCall.sons[i] = semExprWithType(c, macroCall[i], {}) # Preserve the magic symbol in order to be handled in evals.nim internalAssert n.sons[0].sym.magic == mExpandToAst - #n.typ = getSysSym("PNimrodNode").typ # expandedSym.getReturnType - n.typ = if getCompilerProc("NimNode") != nil: sysTypeFromName"NimNode" - else: sysTypeFromName"PNimrodNode" + #n.typ = getSysSym("NimNode").typ # expandedSym.getReturnType + n.typ = sysTypeFromName"NimNode" result = n proc semExpandToAst(c: PContext, n: PNode, magicSym: PSym, |