summaryrefslogtreecommitdiff
path: root/sources/scalac/transformer/UnCurryPhase.java
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-08-18 15:58:45 +0000
committerpaltherr <paltherr@epfl.ch>2003-08-18 15:58:45 +0000
commit87210b8f1092065be1b7cfaf13a3852fe861abe4 (patch)
tree0e2ee43a75d151a74cec60e0025876082f2d7bc5 /sources/scalac/transformer/UnCurryPhase.java
parentc4e1967d6c99021400b8fa906f51f0bcba984fd4 (diff)
downloadscala-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/UnCurryPhase.java')
-rw-r--r--sources/scalac/transformer/UnCurryPhase.java32
1 files changed, 8 insertions, 24 deletions
diff --git a/sources/scalac/transformer/UnCurryPhase.java b/sources/scalac/transformer/UnCurryPhase.java
index d9ae38ba4e..ce5bf61287 100644
--- a/sources/scalac/transformer/UnCurryPhase.java
+++ b/sources/scalac/transformer/UnCurryPhase.java
@@ -14,33 +14,17 @@ import scalac.symtab.*;
import scalac.typechecker.Infer;
import scalac.checkers.*;
-public class UnCurryPhase extends PhaseDescriptor implements Modifiers {
+public class UnCurryPhase extends Phase implements Modifiers {
- private Global global;
-
- public void initialize(Global global, int id) {
- super.initialize(global, id);
- this.global = global;
- }
-
- public String name () {
- return "uncurry";
- }
-
- public String description () {
- return "uncurry function types and applications";
- }
-
- public String taskDescription() {
- return "uncurried";
- }
-
- public void apply(Global global) {
- new UnCurry(global, this).apply();
+ /** Initializes this instance. */
+ public UnCurryPhase(Global global, PhaseDescriptor descriptor) {
+ super(global, descriptor);
}
- public void apply(Unit unit) {
- new UnCurry(unit.global, this).apply(unit);
+ /** Applies this phase to the given compilation units. */
+ public void apply(Unit[] units) {
+ for (int i = 0; i < units.length; i++)
+ new UnCurry(global, this).apply(units[i]);
}
/** - return symbol's transformed type,