diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/symtab/InfoTransformers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/InfoTransformers.scala | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/InfoTransformers.scala b/src/compiler/scala/tools/nsc/symtab/InfoTransformers.scala index bf01d4419a..c5147f9cbb 100644 --- a/src/compiler/scala/tools/nsc/symtab/InfoTransformers.scala +++ b/src/compiler/scala/tools/nsc/symtab/InfoTransformers.scala @@ -1,45 +1,42 @@ -/* NSC -- new scala compiler - * Copyright 2005 LAMP/EPFL +/* NSC -- new Scala compiler + * Copyright 2005-2006 LAMP/EPFL * @author Martin Odersky */ // $Id$ -package scala.tools.nsc.symtab; + +package scala.tools.nsc.symtab trait InfoTransformers requires SymbolTable { abstract class InfoTransformer { - var prev: InfoTransformer = this; - var next: InfoTransformer = this; + var prev: InfoTransformer = this + var next: InfoTransformer = this - val pid: Phase#Id; - val changesBaseClasses: boolean; - def transform(sym: Symbol, tpe: Type): Type; + val pid: Phase#Id + val changesBaseClasses: Boolean + def transform(sym: Symbol, tpe: Type): Type def insert(that: InfoTransformer): unit = { - assert(this.pid != that.pid); + assert(this.pid != that.pid) if (that.pid < this.pid) { - prev insert that + prev insert that } else if (next.pid <= that.pid && next.pid != NoPhase.id) { - next insert that + next insert that } else { - that.next = next; - that.prev = this; - next.prev = that; - this.next = that + that.next = next + that.prev = this + next.prev = that + this.next = that } } def nextFrom(from: Phase#Id): InfoTransformer = if (from == this.pid) this else if (from < this.pid) - if (prev.pid < from) this - else prev.nextFrom(from); + if (prev.pid < from) this + else prev.nextFrom(from); else if (next.pid == NoPhase.id) next - else next.nextFrom(from); + else next.nextFrom(from) } } - - - - |