diff options
author | Martin Odersky <odersky@gmail.com> | 2016-06-29 19:59:16 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-11 13:35:02 +0200 |
commit | d1f809f14cad2c14c312767d71361c7f2e7d8244 (patch) | |
tree | a929f8d6c9700acfc5ae031fdda6bb0852c9726e /src/dotty/tools/dotc/core/tasty | |
parent | e749d832e9adebc502c961d743b3b29072f8116a (diff) | |
download | dotty-d1f809f14cad2c14c312767d71361c7f2e7d8244.tar.gz dotty-d1f809f14cad2c14c312767d71361c7f2e7d8244.tar.bz2 dotty-d1f809f14cad2c14c312767d71361c7f2e7d8244.zip |
Remove old hk scheme
- Simplify RefinedType
- Drop recursive definition of RefinedThis - this is now
taken over by RecType.
- Drop RefinedThis.
- Simplify typeParams
The logic avoiding forcing is no longer needed.
- Remove unused code and out of date comments.
Diffstat (limited to 'src/dotty/tools/dotc/core/tasty')
-rw-r--r-- | src/dotty/tools/dotc/core/tasty/TastyFormat.scala | 3 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/tasty/TreePickler.scala | 5 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala | 11 |
3 files changed, 4 insertions, 15 deletions
diff --git a/src/dotty/tools/dotc/core/tasty/TastyFormat.scala b/src/dotty/tools/dotc/core/tasty/TastyFormat.scala index e9708961a..38d55e0e8 100644 --- a/src/dotty/tools/dotc/core/tasty/TastyFormat.scala +++ b/src/dotty/tools/dotc/core/tasty/TastyFormat.scala @@ -259,8 +259,7 @@ object TastyFormat { final val TYPEREFdirect = 66 final val TERMREFpkg = 67 final val TYPEREFpkg = 68 - final val REFINEDthis = 69 - final val RECthis = REFINEDthis // !!! + final val RECthis = 69 final val BYTEconst = 70 final val SHORTconst = 71 final val CHARconst = 72 diff --git a/src/dotty/tools/dotc/core/tasty/TreePickler.scala b/src/dotty/tools/dotc/core/tasty/TreePickler.scala index 9be5c8bcf..d6e6c4d6b 100644 --- a/src/dotty/tools/dotc/core/tasty/TreePickler.scala +++ b/src/dotty/tools/dotc/core/tasty/TreePickler.scala @@ -211,11 +211,6 @@ class TreePickler(pickler: TastyPickler) { case tpe: SuperType => writeByte(SUPERtype) withLength { pickleType(tpe.thistpe); pickleType(tpe.supertpe)} - case tpe: RefinedThis => - writeByte(REFINEDthis) - val binderAddr = pickledTypes.get(tpe.binder) - assert(binderAddr != null, tpe.binder) - writeRef(binderAddr.asInstanceOf[Addr]) case tpe: RecThis => writeByte(RECthis) val binderAddr = pickledTypes.get(tpe.binder) diff --git a/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala b/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala index d9a062263..2d230c630 100644 --- a/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala +++ b/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala @@ -260,7 +260,7 @@ class TreeUnpickler(reader: TastyReader, tastyName: TastyName.Table) { val parent = readType() val ttag = nextUnsharedTag if (ttag == TYPEBOUNDS || ttag == TYPEALIAS) name = name.toTypeName - RefinedType(parent, name, rt => registeringType(rt, readType())) + RefinedType(parent, name, readType()) // Note that the lambda "rt => ..." is not equivalent to a wildcard closure! // Eta expansion of the latter puts readType() out of the expression. case APPLIEDtype => @@ -325,8 +325,6 @@ class TreeUnpickler(reader: TastyReader, tastyName: TastyName.Table) { readPackageRef().termRef case TYPEREF => val name = readName().toTypeName - if (name.isLambdaTraitNameOBS) // Make sure corresponding lambda trait exists - defn.LambdaTraitOBS(name.lambdaTraitVariancesOBS) TypeRef(readType(), name) case TERMREF => readNameSplitSig() match { @@ -337,11 +335,8 @@ class TreeUnpickler(reader: TastyReader, tastyName: TastyName.Table) { ThisType.raw(readType().asInstanceOf[TypeRef]) case RECtype => RecType(rt => registeringType(rt, readType())) - case REFINEDthis => - readTypeRef() match { - case t: RefinedType => RefinedThis(t) - case t: RecType => RecThis(t) - } + case RECthis => + RecThis(readTypeRef().asInstanceOf[RecType]) case SHARED => val ref = readAddr() typeAtAddr.getOrElseUpdate(ref, forkAt(ref).readType()) |