aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/TypeComparer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-11-29 19:11:18 +0100
committerGuillaume Martres <smarter@ubuntu.com>2015-11-30 17:31:32 +0100
commite77428eb0bf0d9f68f4055d686cbabe111a4afdf (patch)
tree16c8fcfc8d8ebaf0ed3840aaa2a334fd3eab029b /src/dotty/tools/dotc/core/TypeComparer.scala
parent4ca8744da021642d9f943224950482b3344cf089 (diff)
downloaddotty-e77428eb0bf0d9f68f4055d686cbabe111a4afdf.tar.gz
dotty-e77428eb0bf0d9f68f4055d686cbabe111a4afdf.tar.bz2
dotty-e77428eb0bf0d9f68f4055d686cbabe111a4afdf.zip
Drop argumnt interpolation.
It turns out it's not needed because now all type arguments are expressed as aliases. Interestingly dropping this feature shaved 20% off the time off junit tests. Which seems to indicate that the handling of type application is really performance critical.
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeComparer.scala')
-rw-r--r--src/dotty/tools/dotc/core/TypeComparer.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/TypeComparer.scala b/src/dotty/tools/dotc/core/TypeComparer.scala
index d94e24469..d0abe86a7 100644
--- a/src/dotty/tools/dotc/core/TypeComparer.scala
+++ b/src/dotty/tools/dotc/core/TypeComparer.scala
@@ -140,14 +140,14 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
private def firstTry(tp1: Type, tp2: Type): Boolean = tp2 match {
case tp2: NamedType =>
- def compareNamed = {
+ def compareNamed(tp1: Type, tp2: NamedType): Boolean = {
implicit val ctx: Context = this.ctx
tp2.info match {
case info2: TypeAlias => firstTry(tp1, info2.alias)
case _ => tp1 match {
case tp1: NamedType =>
tp1.info match {
- case info1: TypeAlias => firstTry(info1.alias, tp2)
+ case info1: TypeAlias => compareNamed(info1.alias, tp2)
case _ =>
val sym1 = tp1.symbol
(if ((sym1 ne NoSymbol) && (sym1 eq tp2.symbol))
@@ -171,7 +171,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
}
}
}
- compareNamed
+ compareNamed(tp1, tp2)
case tp2: ProtoType =>
isMatchedByProto(tp2, tp1)
case tp2: BoundType =>