summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2008-05-29 07:12:15 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2008-05-29 07:12:15 +0000
commit859d2bbba89d435529f8d0213e3a9fa5d7adc493 (patch)
treedfa190a0b1404ad2488dde02b75229e0200d1295
parent3fefc43327960dfc7cdc451724ae935f356e630a (diff)
downloadscala-859d2bbba89d435529f8d0213e3a9fa5d7adc493.tar.gz
scala-859d2bbba89d435529f8d0213e3a9fa5d7adc493.tar.bz2
scala-859d2bbba89d435529f8d0213e3a9fa5d7adc493.zip
added / updated some documentation
-rw-r--r--docs/development/scala.tools.nsc/nscTypes.dot73
-rw-r--r--src/compiler/scala/tools/nsc/symtab/InfoTransformers.scala4
-rw-r--r--src/compiler/scala/tools/nsc/transform/InfoTransform.scala1
-rw-r--r--src/compiler/scala/tools/nsc/transform/Mixin.scala2
4 files changed, 49 insertions, 31 deletions
diff --git a/docs/development/scala.tools.nsc/nscTypes.dot b/docs/development/scala.tools.nsc/nscTypes.dot
index 8e4e531aa6..86adc12faa 100644
--- a/docs/development/scala.tools.nsc/nscTypes.dot
+++ b/docs/development/scala.tools.nsc/nscTypes.dot
@@ -4,70 +4,83 @@ digraph SQLTypes {
rankdir=BT
rank=max
ratio=compress
-
+
node [shape = record]
-
+
Type
-
+
+ SimpleTypeProxy -> Type
+
+ RewrappingTypeProxy -> SimpleTypeProxy
+
SubType -> Type
-
+
+ NotNullType -> SubType
+
SingletonType -> SubType
-
+
ErrorType -> Type
-
+
WildcardType -> Type
-
+
+ BoundedWildcardType -> Type
+
NoType -> Type
-
+
NoPrefix -> Type
-
+
+ DeBruijnIndex -> Type
+
ThisType [label = "{ThisType|sym: Symbol}"]
ThisType -> SingletonType
-
+
SingleType [label = "{SingleType|pre: Type\nsym: Symbol}"]
SingleType -> SingletonType
-
+
SuperType [label = "{SuperType|thistpe: Type\nsupertp: Type}"]
SuperType -> SingletonType
-
+
TypeBounds [label = "{TypeBounds|lo: Type\nhi: Type}"]
TypeBounds -> SubType
-
+
CompoundType -> Type
-
+
RefinedType[label = "{RefinedType|parents: List[Type]\ndecls: Scope}"]
RefinedType -> CompoundType
-
+
ClassInfoType[label = "{ClassInfoType|parents: List[Type]\ndecls: Scope\nsymbol: Symbol}"]
ClassInfoType -> CompoundType
-
- PackageClassInfoType[label = "{PackageClassInfoType|decls: Scope\nclazz: Symbol}"]
+
+ PackageClassInfoType[label = "{PackageClassInfoType|decls: Scope\nclazz: Symbol\nloader: LazyType}"]
PackageClassInfoType -> ClassInfoType
-
+
ConstantType[label = "{ConstantType|value: Constant}"]
ConstantType -> SingletonType
-
+
TypeRef[label = "{TypeRef|pre: Type\nsym: Symbol\nargs: List[Type]}"]
TypeRef -> Type
-
+
MethodType[label = "{MethodType|paramTypes: List[Type]\nresultType: Type}"]
MethodType -> Type
-
+
+ ImplicitMethodType[label = "{MethodType|pts: List[Type]\nrt: Type}"]
+ ImplicitMethodType -> MethodType
+
+ JavaMethodType[label = "{MethodType|pts: List[Type]\nrt: Type}"]
+ JavaMethodType -> MethodType
+
PolyType[label = "{PolyType|typeParams: List[Symbol]\nresultType: Type}"]
PolyType -> Type
-
+
OverloadedType[label = "{OverloadedType|pre: Type\nalternatives: List[Symbol]}"]
OverloadedType -> Type
-
+
AntiPolyType[label = "{AntiPolyType|pre: Type\ntargs: List[Type]}"]
AntiPolyType -> Type
-
+
TypeVar[label = "{TypeVar|origin: Type\nconstr: TypeConstraint}"]
TypeVar -> Type
-
+
LazyType -> Type
-
- LazyPolyType[label = "{LazyPolyType|typeParams: List[Symbol]\nrestp: Type}"]
- LazyPolyType -> LazyType
-
-} \ No newline at end of file
+
+}
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.