more modules compile again
This commit is contained in:
parent
05724645f8
commit
ce859d8c16
15 changed files with 544 additions and 518 deletions
|
|
@ -17,7 +17,7 @@ proc evalPattern(c: PContext, n, orig: PNode): PNode =
|
|||
# aweful to semcheck before macro invocation, so we don't and treat
|
||||
# templates and macros as immediate in this context.
|
||||
var rule: string
|
||||
if optHints in gOptions and hintPattern in gNotes:
|
||||
if optHints in gOptions and hintPattern in c.config.notes:
|
||||
rule = renderTree(n, {renderNoComments})
|
||||
let s = n.sons[0].sym
|
||||
case s.kind
|
||||
|
|
@ -27,8 +27,8 @@ proc evalPattern(c: PContext, n, orig: PNode): PNode =
|
|||
result = semTemplateExpr(c, n, s, {efFromHlo})
|
||||
else:
|
||||
result = semDirectOp(c, n, {})
|
||||
if optHints in gOptions and hintPattern in gNotes:
|
||||
message(orig.info, hintPattern, rule & " --> '" &
|
||||
if optHints in gOptions and hintPattern in c.config.notes:
|
||||
message(c.config, orig.info, hintPattern, rule & " --> '" &
|
||||
renderTree(result, {renderNoComments}) & "'")
|
||||
|
||||
proc applyPatterns(c: PContext, n: PNode): PNode =
|
||||
|
|
@ -45,7 +45,7 @@ proc applyPatterns(c: PContext, n: PNode): PNode =
|
|||
# better be safe than sorry, so check evalTemplateCounter too:
|
||||
inc(evalTemplateCounter)
|
||||
if evalTemplateCounter > evalTemplateLimit:
|
||||
globalError(n.info, errTemplateInstantiationTooNested)
|
||||
globalError(c.config, n.info, "template instantiation too nested")
|
||||
# deactivate this pattern:
|
||||
c.patterns[i] = nil
|
||||
if x.kind == nkStmtList:
|
||||
|
|
@ -86,9 +86,9 @@ proc hlo(c: PContext, n: PNode): PNode =
|
|||
else:
|
||||
result = fitNode(c, n.typ, result, n.info)
|
||||
# optimization has been applied so check again:
|
||||
result = commonOptimizations(c.module, result)
|
||||
result = commonOptimizations(c.graph, c.module, result)
|
||||
result = hlo(c, result)
|
||||
result = commonOptimizations(c.module, result)
|
||||
result = commonOptimizations(c.graph, c.module, result)
|
||||
|
||||
proc hloBody(c: PContext, n: PNode): PNode =
|
||||
# fast exit:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue