mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
rollback of nimsuggest improvement until we figured out the reasons
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user