Skip to content

Commit

Permalink
make diff a bit smaller by moving unrelated changes to other PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Apr 13, 2021
1 parent 35f04d2 commit 8c06a0e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion compiler/ast.nim
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,6 @@ var

type
TMagic* = enum # symbols that require compiler magic:
# see also: magicsAfterOverloadResolution, getConstExpr, semMagic
mNone,
mDefined, mDeclared, mDeclaredInScope, mCompiles, mArrGet, mArrPut, mAsgn,
mLow, mHigh, mSizeOf, mAlignOf, mOffsetOf, mTypeTrait,
Expand Down
3 changes: 0 additions & 3 deletions compiler/debugutils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,3 @@ proc onNewConfigRef*(conf: ConfigRef) {.inline.} =
proc getConfigRef*(): ConfigRef =
## nil, if -d:nimDebugUtils wasn't specified
result = conf0

proc nimDebugutilsGetConfigRef*(): ConfigRef {.exportc.} =
conf0
6 changes: 3 additions & 3 deletions compiler/importer.nim
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ proc rawImportSymbol(c: PContext, s, origin: PSym; importSet: var IntSet) =
else:
importSet.incl s.id
if s.kind == skType:
let etyp = s.typ
var etyp = s.typ
if etyp.kind in {tyBool, tyEnum}:
for j in 0..<etyp.n.len:
var e = etyp.n[j].sym
Expand Down Expand Up @@ -248,7 +248,7 @@ proc transformImportAs(c: PContext; n: PNode): tuple[node: PNode, importHidden:
of wImportHidden: ret.importHidden = true
else: globalError(c.config, n.info, "invalid pragma, expected: " & ${wImportHidden})

if n.kind == nkInfix and considerQuotedIdent(c, n[0]).s == $wAs:
if n.kind == nkInfix and considerQuotedIdent(c, n[0]).s == "as":
ret.node = newNodeI(nkImportAs, n.info)
ret.node.add n[1].processPragma
ret.node.add n[2]
Expand Down Expand Up @@ -317,7 +317,7 @@ proc evalImport*(c: PContext, n: PNode): PNode =
imp.add sep # dummy entry, replaced in the loop
for x in it[2]:
# transform `a/b/[c as d]` to `/a/b/c as d`
if x.kind == nkInfix and x[0].ident.s == $wAs:
if x.kind == nkInfix and x[0].ident.s == "as":
let impAs = copyTree(x)
imp[2] = x[1]
impAs[1] = imp
Expand Down
1 change: 0 additions & 1 deletion compiler/semexprs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ proc semOperand(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
localError(c.config, n.info, errProcHasNoConcreteType % n.renderTree)
if result.typ.kind in {tyVar, tyLent}: result = newDeref(result)
elif {efWantStmt, efAllowStmt} * flags != {}:
# xxx use getSysType(c.graph, n.info, tyVoid)
result.typ = newTypeS(tyVoid, c)
else:
localError(c.config, n.info, errExprXHasNoType %
Expand Down

0 comments on commit 8c06a0e

Please sign in to comment.