aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fix bug computing typeParams for hk typesMartin Odersky2015-12-061-1/+3
| | | | | | | | Arg bounds do not count is bindings.
| * Don't recognize type bounds as lambda abstractionsMartin Odersky2015-12-062-7/+6
| | | | | | | | Printing bounds omits the "<:" otherwise.
| * Fix problem with printing lambdas.Martin Odersky2015-12-061-3/+4
| | | | | | | | | | Previous implementation died because TermRef had no denotation.
| * Base Application extractor on classSymbolsMartin Odersky2015-12-061-2/+2
| | | | | | | | typeSymbols always have empty type parameter list.
| * More uses of adaptIfHKMartin Odersky2015-12-063-20/+21
| | | | | | | | | | Also: fix EtaExpansion. Also: Add some debug code to Applications, awaiting further fixes.
| * Use new adaptArgs for Scala2UnpicklerMartin Odersky2015-12-062-58/+10
| | | | | | | | Also: fix adaptArgs and LambdaTrait to make it work.
| * Drop redundant check in beta reduceMartin Odersky2015-12-061-6/+4
| |
| * Fix adaptIfHK and drop rawTypeParamsMartin Odersky2015-12-061-23/+11
| |
| * Use typeapp extractors for printingMartin Odersky2015-12-063-80/+38
| |
| * Extractors and other new functionality for type applicationsMartin Odersky2015-12-061-0/+205
| |
| * Add missing type params in testMartin Odersky2015-12-065-14/+14
| |
| * Change hk naming schemeMartin Odersky2015-12-063-21/+24
| |
| * Disallow existentially bound parameters as type parametersMartin Odersky2015-12-061-12/+1
| | | | | | | | | | | | | | Done in order to keep the basics as simple as possible. Treating existentially bound parameters as still instantiatable type parameters does not seem to add anything fundamental, and makes the type system less regular.
| * Don't count partial applications as applications.Martin Odersky2015-12-061-1/+1
| |
| * Drop requirement that an isRef type cannot be refined.Martin Odersky2015-12-061-3/+2
| | | | | | | | It seems to complciate things with no real purpose.
* | Merge pull request #989 from dotty-staging/add/callbackGuillaume Martres2015-12-084-1/+76
|\ \ | |/ |/| Add initial CompilerCallback implementation for IntelliJ
| * Add initial CompilerCallback implementation for IntelliJGuillaume Martres2015-12-034-1/+76
| | | | | | | | | | This adds some simple callbacks to Dotty that should be enough to get basic integration from IntelliJ.
* | Merge pull request #979 from dotty-staging/fix/hk-deep-subtype-2odersky2015-12-061-7/+13
|\ \ | | | | | | TypeComparer: delay looking up members of AndTypes
| * | TypeComparer: delay looking up members of AndTypesGuillaume Martres2015-11-301-7/+13
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In ParFactory.scala we have checks that look like: (Foo { type Bar = X }) & (Foo { type Bar = X }) <:< (Foo { type Bar = X }) where `Foo` is a recursive type. Before this commit, we would first try to check this by looking up `Bar` in the `AndType` on the left, which means looking it up in both branches and then merging the result, but the merge requires more subtyping checks, which in turn require looking up a member inside an `AndType`, seemingly ad infinitum. We now avoid this by checking if either branch of the `AndType` on the left is a subtype of the `RefinedType` on the right before looking up a member in the `AndType` itself.
* | Desugar#makeAnnotated: Avoid unnecessary typingGuillaume Martres2015-12-011-1/+1
| | | | | | | | The less typing we do during Namer, the better.
* | Compile scala.collection.Seq without double-binding errorGuillaume Martres2015-12-012-6/+11
|/ | | | | | | | | | | This commit fixes two issues which caused us to complete Seq too early and read it from the classpath instead of from the sources: - Evaluting RepeatedParamClass forced Seq, this is not necessary because the type of RepeatedParamClass is a LazyType - TypeErasure#sigName on a Scala type always forced Seq, even if the type is not a repeated param type. This fixes #980.
* Update the comment of TypeApplications#argInfoGuillaume Martres2015-11-301-2/+2
|
* Fixed commentsMartin Odersky2015-11-301-11/+0
|
* Drop argumnt interpolation.Martin Odersky2015-11-305-23/+13
| | | | | | | 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.
* Avoid too eager computation in reporting.Martin Odersky2015-11-301-1/+1
| | | | | | | | I noted a slowdown of about 25% (66sec -> 81sec) when compiling dotty even after the subtype optimization (before it was 117sec). I tracked it down to the traceIndented fix which avoided questions to be evaluated twice. But it also caused the question to be evaluated Making the val lazy fixed the problem.
* The change to do compareAlias early caused a dramatic slowdown of compilationMartin Odersky2015-11-301-28/+28
| | | | | | | compileStdLib went from 45 sec to 230 sec. The problem were many redundant tests when every member of an alias chain was compared to every other. The new scheme follows alias chains to their end before doing anything else.
* Add pickling/unpickling of stable modifierVladimirNik2015-11-273-1/+7
| | | | | Pickling/unpickling of STABLE modifier allows to fix problem with unpickling of path-dependent types (#982)
* Preload scala.util.control.NonFatalGuillaume Martres2015-11-261-1/+6
|
* Avoid repeated unnecessary logging in traceIndentedGuillaume Martres2015-11-261-1/+6
| | | | | | | While trying to debug #943 I noticed that the exception output from traceIndented was interspersed with unrelated logging output, this happened because `question` in traceIndented is by-name and was evaluated both before executing an operation and afterwards.
* Duplication of companion methods after using FromTasty fixedVladimirNik2015-11-251-4/+10
|
* isSubtype: try to dealias TypeRefs before recursively checking the prefixesGuillaume Martres2015-11-251-4/+5
| | | | | | | As demonstrated by tests/pos/hk-deep-subtype.scala, we can avoid some deep subtype recursions that result in stack overflows by doing this. Fix #943.
* Swap order of arguments in annotations for TastyVladimirNik2015-11-233-4/+3
|
* Swap order of arguments in annotationsMartin Odersky2015-11-2213-30/+27
| | | | | | | | | The fact that the annotation comes first is weird, because when I write an annotated type it's <type> @<annotation>. Also, annotated types are like RefinedTypes in that they derive from a parent type. And in RefinedTypes the parent comes first. So swapping the arguments improves consistency.
* Annotate `isAsSpecific` with references to its documentationGuillaume Martres2015-11-181-9/+9
| | | | Also reorder the cases to be in the same order as the documentation.
* Fix ambiguity errors with polymorphic implicitsGuillaume Martres2015-11-182-6/+28
| | | | | | | | | Previously, `isAsSpecific(alt1, tp1, alt2, tp2)` did not handle having `tp2` be a polymorphic non-method type like `[A]Foo[A]`. Also update the documentation of `isAsSpecific` to account for this change, the new documentation is based on SLS ยง 6.26.3 but adapted to reflect the code.
* Fix bug with finger printing in delete.Martin Odersky2015-11-171-4/+2
|
* Merge pull request #957 from dotty-staging/fix-#938odersky2015-11-173-6/+8
|\ | | | | Fix #938
| * Fix comparisonMartin Odersky2015-11-171-1/+1
| |
| * Compensate for getter transform in isSubType testMartin Odersky2015-11-171-0/+3
| | | | | | | | | | | | Getters transform `T` to `=> T`. This means that `=> T <: T` might need to be true after getters. Observed in the wild tree checking t938.scala after getters.
| * Fix bug in phase identification for YcheckMartin Odersky2015-11-171-2/+2
| | | | | | | | | | -Ycheck:era checked after phase resolveSuper. This was due to an overly simplistic containsPhase check.
| * Fix #938 - escaping reference.Martin Odersky2015-11-171-4/+3
| | | | | | | | Need to avoid also symbols in ThisTypes
* | Links between companions after unpickling are addedVladimirNik2015-11-173-12/+20
|/
* Merge pull request #950 from dotty-staging/fix-#916odersky2015-11-177-80/+147
|\ | | | | Adapt type parameters of typed eta expansion according to expected variances
| * Extend synchronized scope in newTermNameMartin Odersky2015-11-171-48/+45
| | | | | | | | | | | | | | Just noted that the previous scope might have been too small. We compute the bucket index with the table size before going into the synchronized. But that might mean we see a stale table size. Let's see what this gives us.
| * Packages are never fully completedMartin Odersky2015-11-171-3/+4
| | | | | | | | | | | | The previous commit made packages always fully completed. This is wrong - since new members can be added to packages at any time, packages are never fully completed.
| * Fix problems arising when hierarchies of classes are under completionMartin Odersky2015-11-172-16/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix problems arising when hierarchies of classes are under completion at the same time. In this case it can happen that we see a subclass (e.g. Arrays.scala) which depends on a superclass (e.g. GenTraversableLike.scala) that itself does not have its parents defined yet. Previously, several things went wrong here - One of the base classes would be marked as frozen, even though it dod not have all members entered yet. This led to an error in finger printing. - The baseclasses and super class bits of the subclass would be computed before the parents of the middle class were known. The baseclasses would then be chached, leading to false results for isDerivedFrom. We need to refine the logic for computing base classes, super class bits, and fingerprints to account for that issue.
| * Avoid setting info with parents too early when unpicklingMartin Odersky2015-11-171-2/+0
| | | | | | | | | | | | Adding parents signals (via SymDenotation.fullyDefined) that the class can now be frozen. So this should be done only after all members are entered.
| * Revert: Make hash codes on type more predictable.Martin Odersky2015-11-172-2/+2
| | | | | | | | | | | | getSimpleName crashes on some module names created by scalac. May help finding the partest issue. (reverted from commit c11646c40042404550eb983577c9e7096a40502a)
| * Harden definition of isScalaTraitMartin Odersky2015-11-171-1/+1
| | | | | | | | | | Exclude false positives such as `Lambda|` be requiring that lambda traits are defined in the Scala package.
| * Eta expand according to expected type parameter varianceMartin Odersky2015-11-172-11/+63
| | | | | | | | | | | | | | When eta expanding a type `C` to `[vX] => C[X]` the variance `v` is now the variance of the expected type, not the variance of the type constructor `C`, as long as the variance of the expected type is compatible with the variance of `C`.