diff options
Diffstat (limited to 'compiler/plugins')
-rw-r--r-- | compiler/plugins/active.nim | 2 | ||||
-rw-r--r-- | compiler/plugins/itersgen.nim | 17 | ||||
-rw-r--r-- | compiler/plugins/locals/locals.nim | 4 |
3 files changed, 11 insertions, 12 deletions
diff --git a/compiler/plugins/active.nim b/compiler/plugins/active.nim index 7b6411178..5da623e49 100644 --- a/compiler/plugins/active.nim +++ b/compiler/plugins/active.nim @@ -10,4 +10,4 @@ ## Include file that imports all plugins that are active. import - locals.locals, itersgen + locals / locals, itersgen diff --git a/compiler/plugins/itersgen.nim b/compiler/plugins/itersgen.nim index f44735b77..ebb65dd4a 100644 --- a/compiler/plugins/itersgen.nim +++ b/compiler/plugins/itersgen.nim @@ -9,30 +9,29 @@ ## Plugin to transform an inline iterator into a data structure. -import compiler/pluginsupport, compiler/ast, compiler/astalgo, - compiler/magicsys, compiler/lookups, compiler/semdata, - compiler/lambdalifting, compiler/rodread, compiler/msgs - +import ".." / [pluginsupport, ast, astalgo, + magicsys, lookups, semdata, + lambdalifting, rodread, msgs] proc iterToProcImpl(c: PContext, n: PNode): PNode = result = newNodeI(nkStmtList, n.info) let iter = n[1] if iter.kind != nkSym or iter.sym.kind != skIterator: - localError(iter.info, "first argument needs to be an iterator") + localError(c.config, iter.info, "first argument needs to be an iterator") return if n[2].typ.isNil: - localError(n[2].info, "second argument needs to be a type") + localError(c.config, n[2].info, "second argument needs to be a type") return if n[3].kind != nkIdent: - localError(n[3].info, "third argument needs to be an identifier") + localError(c.config, n[3].info, "third argument needs to be an identifier") return let t = n[2].typ.skipTypes({tyTypeDesc, tyGenericInst}) if t.kind notin {tyRef, tyPtr} or t.lastSon.kind != tyObject: - localError(n[2].info, + localError(c.config, n[2].info, "type must be a non-generic ref|ptr to object with state field") return - let body = liftIterToProc(iter.sym, iter.sym.getBody, t) + let body = liftIterToProc(c.graph, iter.sym, iter.sym.getBody, t) let prc = newSym(skProc, n[3].ident, iter.sym.owner, iter.sym.info) prc.typ = copyType(iter.sym.typ, prc, false) diff --git a/compiler/plugins/locals/locals.nim b/compiler/plugins/locals/locals.nim index 338e7bcac..ff7f3be58 100644 --- a/compiler/plugins/locals/locals.nim +++ b/compiler/plugins/locals/locals.nim @@ -9,8 +9,8 @@ ## The builtin 'system.locals' implemented as a plugin. -import compiler/pluginsupport, compiler/ast, compiler/astalgo, - compiler/magicsys, compiler/lookups, compiler/semdata, compiler/lowerings +import "../../" / [pluginsupport, ast, astalgo, + magicsys, lookups, semdata, lowerings] proc semLocals(c: PContext, n: PNode): PNode = var counter = 0 |