From 859d2bbba89d435529f8d0213e3a9fa5d7adc493 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Thu, 29 May 2008 07:12:15 +0000 Subject: added / updated some documentation --- src/compiler/scala/tools/nsc/symtab/InfoTransformers.scala | 4 ++++ src/compiler/scala/tools/nsc/transform/InfoTransform.scala | 1 + src/compiler/scala/tools/nsc/transform/Mixin.scala | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/symtab/InfoTransformers.scala b/src/compiler/scala/tools/nsc/symtab/InfoTransformers.scala index 9756ddd576..5855179284 100644 --- a/src/compiler/scala/tools/nsc/symtab/InfoTransformers.scala +++ b/src/compiler/scala/tools/nsc/symtab/InfoTransformers.scala @@ -31,6 +31,10 @@ trait InfoTransformers { } } + /** The InfoTransformer whose (pid == from). + * If no such exists, the InfoTransformer with the next + * higher pid. + */ def nextFrom(from: Phase#Id): InfoTransformer = if (from == this.pid) this else if (from < this.pid) diff --git a/src/compiler/scala/tools/nsc/transform/InfoTransform.scala b/src/compiler/scala/tools/nsc/transform/InfoTransform.scala index 3dbab7121b..2183218c82 100644 --- a/src/compiler/scala/tools/nsc/transform/InfoTransform.scala +++ b/src/compiler/scala/tools/nsc/transform/InfoTransform.scala @@ -25,6 +25,7 @@ abstract class InfoTransform extends Transform { class Phase(prev: scala.tools.nsc.Phase) extends super.Phase(prev) { if (infoTransformers.nextFrom(id).pid != id) { + // this phase is not yet in the infoTransformers val infoTransformer = new InfoTransformer { val pid = id val changesBaseClasses = InfoTransform.this.changesBaseClasses diff --git a/src/compiler/scala/tools/nsc/transform/Mixin.scala b/src/compiler/scala/tools/nsc/transform/Mixin.scala index 2a0c6c05e1..f421529346 100644 --- a/src/compiler/scala/tools/nsc/transform/Mixin.scala +++ b/src/compiler/scala/tools/nsc/transform/Mixin.scala @@ -501,7 +501,7 @@ abstract class Mixin extends InfoTransform { } /** If `stat' is a superaccessor, complete it by adding a right-hand side. - * (Note: superaccessors are always abstract until this point. + * Note: superaccessors are always abstract until this point. * The method to call in a superaccessor is stored in the accessor symbol's alias field. * The rhs is: * super.A(xs) where A is the super accessor's alias and xs are its formal parameters. -- cgit v1.2.3