summary refs log tree commit diff stats
path: root/compiler/ccgexprs.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-07-10 12:42:23 +0200
committerAraq <rumpf_a@web.de>2019-07-10 12:42:41 +0200
commitc94647aecad6ed7fd12152800437a6cda11e06e6 (patch)
treef876ae0ac6379dfd99fd5d5ed7d8903be96b433b /compiler/ccgexprs.nim
parent96523cdd3e8ada367b804efbd47f4763a1269fa8 (diff)
downloadNim-c94647aecad6ed7fd12152800437a6cda11e06e6.tar.gz
styleCheck: make the compiler and large parts of the stdlib compatible with --styleCheck:error
Diffstat (limited to 'compiler/ccgexprs.nim')
-rw-r--r--compiler/ccgexprs.nim18
1 files changed, 9 insertions, 9 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim
index 140f7e1d4..a155c1d98 100644
--- a/compiler/ccgexprs.nim
+++ b/compiler/ccgexprs.nim
@@ -76,7 +76,7 @@ proc genLiteral(p: BProc, n: PNode, ty: PType): Rope =
       # with the new semantics for 'nil' strings, we can map "" to nil and
       # save tons of allocations:
       if n.strVal.len == 0 and optNilSeqs notin p.options and
-          p.config.selectedGc != gcDestructors:
+          p.config.selectedGC != gcDestructors:
         result = genNilStringLiteral(p.module, n.info)
       else:
         result = genStringLiteral(p.module, n)
@@ -1065,7 +1065,7 @@ proc gcUsage(conf: ConfigRef; n: PNode) =
   if conf.selectedGC == gcNone: message(conf, n.info, warnGcMem, n.renderTree)
 
 proc strLoc(p: BProc; d: TLoc): Rope =
-  if p.config.selectedGc == gcDestructors:
+  if p.config.selectedGC == gcDestructors:
     result = byRefLoc(p, d)
   else:
     result = rdLoc(d)
@@ -1657,7 +1657,7 @@ proc makeAddr(n: PNode): PNode =
     result.typ = makePtrType(n.typ)
 
 proc genSetLengthSeq(p: BProc, e: PNode, d: var TLoc) =
-  if p.config.selectedGc == gcDestructors:
+  if p.config.selectedGC == gcDestructors:
     e.sons[1] = makeAddr(e[1])
     genCall(p, e, d)
     return
@@ -1686,7 +1686,7 @@ proc genSetLengthSeq(p: BProc, e: PNode, d: var TLoc) =
   gcUsage(p.config, e)
 
 proc genSetLengthStr(p: BProc, e: PNode, d: var TLoc) =
-  if p.config.selectedGc == gcDestructors:
+  if p.config.selectedGC == gcDestructors:
     binaryStmtAddr(p, e, d, "setLengthStrV2")
   else:
     var a, b, call: TLoc
@@ -1900,7 +1900,7 @@ proc genSomeCast(p: BProc, e: PNode, d: var TLoc) =
     if srcTyp.kind in {tyPtr, tyPointer} and etyp.kind in IntegralTypes:
       putIntoDest(p, d, e, "(($1) (ptrdiff_t) ($2))" %
           [getTypeDesc(p.module, e.typ), rdCharLoc(a)], a.storage)
-    elif p.config.selectedGc == gcDestructors and etyp.kind in {tySequence, tyString}:
+    elif p.config.selectedGC == gcDestructors and etyp.kind in {tySequence, tyString}:
       putIntoDest(p, d, e, "(*($1*) (&$2))" %
           [getTypeDesc(p.module, e.typ), rdCharLoc(a)], a.storage)
     else:
@@ -2134,7 +2134,7 @@ proc genMagicExpr(p: BProc, e: PNode, d: var TLoc, op: TMagic) =
       genAssignment(p, dest, call, {})
   of mAppendStrStr: genStrAppend(p, e, d)
   of mAppendSeqElem:
-    if p.config.selectedGc == gcDestructors:
+    if p.config.selectedGC == gcDestructors:
       e.sons[1] = makeAddr(e[1])
       genCall(p, e, d)
     else:
@@ -2773,7 +2773,7 @@ proc getNullValueAuxT(p: BProc; orig, t: PType; obj, cons: PNode,
     inc count
   getNullValueAux(p, t, obj, cons, result, count)
   # do not emit '{}' as that is not valid C:
-  if oldcount == count: result = oldres
+  if oldcount == count: result = oldRes
   elif not p.module.compileToCpp: result.add "}"
 
 proc genConstObjConstr(p: BProc; n: PNode): Rope =
@@ -2847,7 +2847,7 @@ proc genConstExpr(p: BProc, n: PNode): Rope =
   of nkBracket, nkPar, nkTupleConstr, nkClosure:
     var t = skipTypes(n.typ, abstractInstOwned)
     if t.kind == tySequence:
-      if p.config.selectedGc == gcDestructors:
+      if p.config.selectedGC == gcDestructors:
         result = genConstSeqV2(p, n, n.typ)
       else:
         result = genConstSeq(p, n, n.typ)
@@ -2871,7 +2871,7 @@ proc genConstExpr(p: BProc, n: PNode): Rope =
   of nkObjConstr:
     result = genConstObjConstr(p, n)
   of nkStrLit..nkTripleStrLit:
-    if p.config.selectedGc == gcDestructors:
+    if p.config.selectedGC == gcDestructors:
       result = genStringLiteralV2Const(p.module, n)
     else:
       var d: TLoc