summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2020-03-16 18:49:27 +0100
committerAraq <rumpf_a@web.de>2020-03-16 19:05:33 +0100
commitd375120c424fa94cc58228c2f0285c1b0b32919b (patch)
treed907880ad22dc85b8909031e7f55970c185f3f4b /compiler
parent5ba5b5202acdf5e597ef1e83ebae84608669d32b (diff)
downloadNim-d375120c424fa94cc58228c2f0285c1b0b32919b.tar.gz
rename sfAlwaysReturn to sfNeverRaises
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ast.nim2
-rw-r--r--compiler/ccgcalls.nim2
-rw-r--r--compiler/enumtostr.nim4
-rw-r--r--compiler/modulegraphs.nim2
4 files changed, 5 insertions, 5 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index 55ad2ba4b..33edcc953 100644
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -289,7 +289,7 @@ type
     sfTemplateParam   # symbol is a template parameter
     sfCursor          # variable/field is a cursor, see RFC 177 for details
     sfInjectDestructors # whether the proc needs the 'injectdestructors' transformation
-    sfAlwaysReturn    # proc can never raise an exception, not even OverflowError
+    sfNeverRaises     # proc can never raise an exception, not even OverflowError
                       # or out-of-memory
 
   TSymFlags* = set[TSymFlag]
diff --git a/compiler/ccgcalls.nim b/compiler/ccgcalls.nim
index 3e2cf2271..3be3cbb6b 100644
--- a/compiler/ccgcalls.nim
+++ b/compiler/ccgcalls.nim
@@ -559,7 +559,7 @@ proc genNamedParamCall(p: BProc, ri: PNode, d: var TLoc) =
 
 proc canRaiseDisp(p: BProc; n: PNode): bool =
   # we assume things like sysFatal cannot raise themselves
-  if n.kind == nkSym and sfAlwaysReturn in n.sym.flags:
+  if n.kind == nkSym and sfNeverRaises in n.sym.flags:
     result = false
   elif optPanics in p.config.globalOptions or
       (n.kind == nkSym and sfSystemModule in getModule(n.sym).flags):
diff --git a/compiler/enumtostr.nim b/compiler/enumtostr.nim
index 614190ac3..3eb703ade 100644
--- a/compiler/enumtostr.nim
+++ b/compiler/enumtostr.nim
@@ -40,7 +40,7 @@ proc genEnumToStrProc*(t: PType; info: TLineInfo; g: ModuleGraph): PSym =
   n[resultPos] = newSymNode(res)
   result.ast = n
   incl result.flags, sfFromGeneric
-  incl result.flags, sfAlwaysReturn
+  incl result.flags, sfNeverRaises
 
 proc searchObjCaseImpl(obj: PNode; field: PSym): PNode =
   case obj.kind
@@ -102,4 +102,4 @@ proc genCaseObjDiscMapping*(t: PType; field: PSym; info: TLineInfo; g: ModuleGra
   n[resultPos] = newSymNode(res)
   result.ast = n
   incl result.flags, sfFromGeneric
-  incl result.flags, sfAlwaysReturn
+  incl result.flags, sfNeverRaises
diff --git a/compiler/modulegraphs.nim b/compiler/modulegraphs.nim
index d3be4b3b6..dff3f3b58 100644
--- a/compiler/modulegraphs.nim
+++ b/compiler/modulegraphs.nim
@@ -165,7 +165,7 @@ proc stopCompile*(g: ModuleGraph): bool {.inline.} =
 proc createMagic*(g: ModuleGraph; name: string, m: TMagic): PSym =
   result = newSym(skProc, getIdent(g.cache, name), nil, unknownLineInfo, {})
   result.magic = m
-  result.flags = {sfAlwaysReturn}
+  result.flags = {sfNeverRaises}
 
 proc newModuleGraph*(cache: IdentCache; config: ConfigRef): ModuleGraph =
   result = ModuleGraph()