diff options
author | paltherr <paltherr@epfl.ch> | 2003-08-18 15:58:45 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-08-18 15:58:45 +0000 |
commit | 87210b8f1092065be1b7cfaf13a3852fe861abe4 (patch) | |
tree | 0e2ee43a75d151a74cec60e0025876082f2d7bc5 /sources/scalac/transformer/ExplicitOuterClassesPhase.java | |
parent | c4e1967d6c99021400b8fa906f51f0bcba984fd4 (diff) | |
download | scala-87210b8f1092065be1b7cfaf13a3852fe861abe4.tar.gz scala-87210b8f1092065be1b7cfaf13a3852fe861abe4.tar.bz2 scala-87210b8f1092065be1b7cfaf13a3852fe861abe4.zip |
- rewrote the phase creation process
- replace PhaseRepository by CompilerPhases
Diffstat (limited to 'sources/scalac/transformer/ExplicitOuterClassesPhase.java')
-rw-r--r-- | sources/scalac/transformer/ExplicitOuterClassesPhase.java | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/sources/scalac/transformer/ExplicitOuterClassesPhase.java b/sources/scalac/transformer/ExplicitOuterClassesPhase.java index 805530bcd3..ace14302f6 100644 --- a/sources/scalac/transformer/ExplicitOuterClassesPhase.java +++ b/sources/scalac/transformer/ExplicitOuterClassesPhase.java @@ -15,28 +15,19 @@ import scalac.symtab.*; import scalac.util.*; import java.util.HashMap; -public class ExplicitOuterClassesPhase extends PhaseDescriptor { +public class ExplicitOuterClassesPhase extends Phase { // Mapping from class constructor symbols to owner field symbols. - protected HashMap/*<Symbol,Symbol>*/ outerMap = new HashMap(); + protected final HashMap/*<Symbol,Symbol>*/ outerMap = new HashMap(); - public String name () { - return "explicitouterclasses"; + /** Initializes this instance. */ + public ExplicitOuterClassesPhase(Global global,PhaseDescriptor descriptor){ + super(global, descriptor); } - public String description () { - return "make links from inner classes to enclosing one explicit"; - } - - public String taskDescription() { - return "made outer links explicit"; - } - - public void apply(Global global) { - new ExplicitOuterClasses(global).apply(); - } - - public void apply(Unit unit) { - new ExplicitOuterClasses(unit.global).apply(unit); + /** Applies this phase to the given compilation units. */ + public void apply(Unit[] units) { + for (int i = 0; i < units.length; i++) + new ExplicitOuterClasses(global, this).apply(units[i]); } public Checker[] postCheckers(Global global) { |