diff options
Diffstat (limited to 'compiler')
-rwxr-xr-x | compiler/ast.nim | 2 | ||||
-rwxr-xr-x | compiler/pragmas.nim | 10 | ||||
-rwxr-xr-x | compiler/semexprs.nim | 2 | ||||
-rwxr-xr-x | compiler/wordrecg.nim | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim index fc2348a77..775f679df 100755 --- a/compiler/ast.nim +++ b/compiler/ast.nim @@ -227,7 +227,7 @@ type # for interfacing with C++, JS sfNamedParamCall, # symbol needs named parameter call syntax in target # language; for interfacing with Objective C - sfOptional # returned value may be discarded implicitely + sfDiscardable # returned value may be discarded implicitely TSymFlags* = set[TSymFlag] diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index dc120ef1d..6c3a7ba67 100755 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -23,15 +23,15 @@ const wMagic, wNosideEffect, wSideEffect, wNoreturn, wDynLib, wHeader, wCompilerProc, wProcVar, wDeprecated, wVarargs, wCompileTime, wMerge, wBorrow, wExtern, wImportCompilerProc, wThread, wImportCpp, wImportObjC, - wNoStackFrame, wError, wOptional} + wNoStackFrame, wError, wDiscardable} converterPragmas* = procPragmas methodPragmas* = procPragmas macroPragmas* = {FirstCallConv..LastCallConv, wImportc, wExportc, wNodecl, wMagic, wNosideEffect, wCompilerProc, wDeprecated, wExtern, - wImportcpp, wImportobjc, wError, wOptional} + wImportcpp, wImportobjc, wError, wDiscardable} iteratorPragmas* = {FirstCallConv..LastCallConv, wNosideEffect, wSideEffect, wImportc, wExportc, wNodecl, wMagic, wDeprecated, wBorrow, wExtern, - wImportcpp, wImportobjc, wError, wOptional} + wImportcpp, wImportobjc, wError, wDiscardable} stmtPragmas* = {wChecks, wObjChecks, wFieldChecks, wRangechecks, wBoundchecks, wOverflowchecks, wNilchecks, wAssertions, wWarnings, wHints, wLinedir, wStacktrace, wLinetrace, wOptimization, wHint, wWarning, wError, wFatal, @@ -553,9 +553,9 @@ proc pragma(c: PContext, sym: PSym, n: PNode, validPragmas: TSpecialWords) = of wPragma: processPragma(c, n, i) break - of wOptional: + of wDiscardable: noVal(it) - if sym != nil: incl(sym.flags, sfOptional) + if sym != nil: incl(sym.flags, sfDiscardable) of wChecks, wObjChecks, wFieldChecks, wRangechecks, wBoundchecks, wOverflowchecks, wNilchecks, wAssertions, wWarnings, wHints, wLinedir, wStacktrace, wLinetrace, wOptimization, wByRef, diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 5e9f9e28d..b042a6436 100755 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -550,7 +550,7 @@ proc buildEchoStmt(c: PContext, n: PNode): PNode = proc semExprNoType(c: PContext, n: PNode): PNode = proc ImplicitelyDiscardable(n: PNode): bool {.inline.} = result = isCallExpr(n) and n.sons[0].kind == nkSym and - sfOptional in n.sons[0].sym.flags + sfDiscardable in n.sons[0].sym.flags result = semExpr(c, n) if result.typ != nil and result.typ.kind != tyStmt: if gCmd == cmdInteractive: diff --git a/compiler/wordrecg.nim b/compiler/wordrecg.nim index 0389439dd..9e4e13797 100755 --- a/compiler/wordrecg.nim +++ b/compiler/wordrecg.nim @@ -51,7 +51,7 @@ type wDeadCodeElim, wSafecode, wPragma, wCompileTime, - wPassc, wPassl, wBorrow, wOptional, + wPassc, wPassl, wBorrow, wDiscardable, wFieldChecks, wCheckPoint, wSubsChar, wAcyclic, wShallow, wUnroll, wLinearScanEnd, @@ -96,7 +96,7 @@ const "deadcodeelim", "safecode", "pragma", "compiletime", - "passc", "passl", "borrow", "optional", "fieldchecks", + "passc", "passl", "borrow", "discardable", "fieldchecks", "checkpoint", "subschar", "acyclic", "shallow", "unroll", "linearscanend", "write", "putenv", "prependenv", "appendenv", "threadvar", "emit", |