diff options
author | schinz <schinz@epfl.ch> | 2005-02-17 14:07:33 +0000 |
---|---|---|
committer | schinz <schinz@epfl.ch> | 2005-02-17 14:07:33 +0000 |
commit | b2dc4a423342a4851a315a455afd28a09bc5354f (patch) | |
tree | 94096a90136f812e4293b811f7d3e5859f29362a | |
parent | 1fe84bcc45a8e59f3fbd1950ae70d7c5c1f4dcb9 (diff) | |
download | scala-b2dc4a423342a4851a315a455afd28a09bc5354f.tar.gz scala-b2dc4a423342a4851a315a455afd28a09bc5354f.tar.bz2 scala-b2dc4a423342a4851a315a455afd28a09bc5354f.zip |
- renamed isSameAs to isSameType, to be consistent
- added the parents to the constructor of ScalaClassType, to avoid
a further call to setParents in some cases - removed fullName from
TypeConstructor (redundant)
-rw-r--r-- | sources/scala/runtime/types/TypeConstructor.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sources/scala/runtime/types/TypeConstructor.java b/sources/scala/runtime/types/TypeConstructor.java index 3526ad0785..ba157ab9dc 100644 --- a/sources/scala/runtime/types/TypeConstructor.java +++ b/sources/scala/runtime/types/TypeConstructor.java @@ -14,7 +14,6 @@ import scala.Type; import scala.Array; import scala.runtime.AtomicReference; import scala.runtime.IOMap; -import scala.runtime.FNV_Hash; /** * Class modelling a type constructor (this includes non-polymorphic @@ -28,9 +27,6 @@ public class TypeConstructor implements java.io.Serializable { public final static TypeConstructor[] EMPTY_ARRAY = new TypeConstructor[0]; - /** Full (qualified) name for this constructor. */ - public final String fullName; - /** Java class corresponding to this constructor. */ public Class clazz; @@ -86,7 +82,6 @@ public class TypeConstructor implements java.io.Serializable { boolean inheritsFromJavaClass, int[] displayCode) { this.level = level; - this.fullName = fullName; this.outer = outer; this.zCount = zCount; this.mCount = mCount; @@ -106,15 +101,15 @@ public class TypeConstructor implements java.io.Serializable { } public String toString() { - return fullName; + return clazz.getName(); } public ScalaClassType getInstantiation(Type[] args) { return instMapModule.get((InstantiationMap.T)instances.get(), args); } - public ScalaClassType instantiate(Type[] args) { - ScalaClassType tp = new ScalaClassType(this, args); + public ScalaClassType instantiate(Type[] args, ScalaClassType[] parents) { + ScalaClassType tp = new ScalaClassType(this, args, parents); try { InstantiationMap.T oldMap, newMap; @@ -131,7 +126,9 @@ public class TypeConstructor implements java.io.Serializable { ////////////////////////////////////////////////////////////////////// - private static class InstantiationMap extends IOMap { + private static class InstantiationMap + extends IOMap + implements java.io.Serializable { public T put(T map, Type[] inst, ScalaClassType value) throws ConflictException { return super.put(map, Type.hashCode(inst), value); |