rollback of nimsuggest improvement until we figured out the reasons

This commit is contained in:
Andreas Rumpf
2016-07-15 11:44:02 +02:00
parent 153fd13f3d
commit 3e72c98d49
2 changed files with 13 additions and 9 deletions

View File

@@ -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()

View File

@@ -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,