aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Arrays.newRefArray has multiple symbols that coexist during bootstrap.Dmitry Petrashko2015-07-052-2/+11
| | | | More magic is needed, as enumerating array symbols does not work in backend.
* Fix wrong test in PatMat.Dmitry Petrashko2015-06-191-1/+1
| | | | | Call drop method directly if class derives from sequence. I do not understand how callRuntime works in scalac. Calling this method requires implicit search.
* Make named repeated parameters discoverable during PatMat.Dmitry Petrashko2015-06-192-3/+5
| | | | | | They used to be discoverable using repeatedType, but ElimRepeated eliminates it. Instead I'm using internal synthetic Typed nodes name, similar to how it's done for non-star Wildcards. This makes handling Wildcards and Wildacard_Star more symmetric in patmat.
* Add initializers for lambdalift proxy fieldsMartin Odersky2015-06-192-5/+19
| | | | | | | | If an inner class has proxy fields, we missed so far the assignment sfrom the proxy parameters in the primary constructor of the class to the proxy fields. Test case tries several variations of this.
* Fix problem with explicit outer accessorsMartin Odersky2015-06-191-2/+4
| | | | Even if an explicit outer accessor was a method, it got a TermRef as type.
* Merge pull request #639 from dotty-staging/add/trait-parametersodersky2015-06-195-37/+94
|\ | | | | Add/trait parameters
| * Fix merge breakageMartin Odersky2015-06-191-14/+17
| | | | | | | | | | | | Lazy Scala2 fields and trait parameters touched the same code in Mixin and the merge dropped essential logic. Also cleaned up some of the code having to do with lazy Scala2 fields.
| * Fixed typo introduced by mergeMartin Odersky2015-06-191-1/+2
| |
| * References to trait parameter accessors do not have an elidable prefix.Martin Odersky2015-06-191-1/+1
| | | | | | | | | | | | Reason: The ParamAccessor flag will be reset later in Mixin. We do not want to rewrite the references to a trait parameter accessor then, so it's better to generate all references with a `this.` prefix from the start.
| * Drop parameter accessor flag in traitsMartin Odersky2015-06-191-4/+6
| | | | | | | | | | Parameter accessors in traits have the ParamAccessor flag removed in the Mixin transformSym method.
| * Revert: Implementations of mixin getters are never ParamAccessorsMartin Odersky2015-06-191-1/+1
| | | | | | | | | | | | | | (reverted from commit 2c559003534d4441688bcf1664e53993c6187bde) Mixin should drop the ParamAccessor flag anyway in traits, so there is no need to mask it when creating implementations of trait definitions.
| * Implement trait parametersMartin Odersky2015-06-192-16/+60
| | | | | | | | | | | | Add necessary logic to Mixin. Also add tests that all parameterized traits are called with parameters set.
| * Implement checking for illegal parent trait constructor calls.Martin Odersky2015-06-192-5/+12
| | | | | | | | | | A parent trait may not be parameterized (as in T()) if the calling class does not directly implement that trait.
| * Implementations of mixin getters are never ParamAccessorsMartin Odersky2015-06-191-1/+1
| | | | | | | | Need to suppress the flag when copying symbols.
* | Merge pull request #638 from dotty-staging/change/simplify-tastyodersky2015-06-195-40/+36
|\ \ | |/ |/| Change/simplify tasty
| * Fixed compilation error.Martin Odersky2015-06-191-1/+0
| |
| * Eliminate ABSOVERRIDE from TASTYMartin Odersky2015-06-193-21/+22
| | | | | | | | | | Replace by ABSTRACT and OVERRIDE. No need to expose the representation detail that they are a single flag.
| * Don't keep SkolemTypes in TASTYMartin Odersky2015-06-195-18/+14
| | | | | | | | | | | | | | SkolemTypes are no longer needed when Pickling because they exist only for checking type-safety. After the typer, we can safely eliminate them. Not having skolem types in TASTY simplifies the format and avoids having to explain a difficult concept.
* | Fix stack overflow when testing for shadowingMartin Odersky2015-06-192-2/+8
| | | | | | | | | | | | | | | | | | Shadowing tests could go into an infinite recursion when the found sahdwoing member itself needs an implicit that is resolved and then shadowed again by the same member. A test case is neg/arrayclone-new.scala. This caused a SO before, now gives two errors.
* | Merge pull request #663 from dotty-staging/fix/#643-scala2-noinitsDmitry Petrashko2015-06-199-39/+55
|\ \ | |/ |/| Fix #643 - Scala2 unpickling now sets NoInits flag for interfaces.
| * Add NoInits when reading a Scala2 pure interfaceMartin Odersky2015-06-161-1/+1
| | | | | | | | | | NoInits is implied for pure interfaces, so has to be set. The Java classfile parser already does the right thing here.
| * Use FlagSet directly instead of defKindMartin Odersky2015-06-165-38/+33
| | | | | | | | | | Instead of classifying class members with a TreeInfo.DefKind, we use directly the flags into which kinds were previously translated.
| * Produce PureInterface flag together with NoInits flagMartin Odersky2015-06-165-24/+45
| | | | | | | | | | | | | | | | | | | | | | | | The previous stale symbol was discovered because NormalizeFlags looks at all declarations of a MoInits trait in the SymTransformer. I.e it does this for all no-init traits, whether loaded from a classfile or currently compiled. This is wasteful because it forces too many definitions. The new scheme drops the scan in favor of producing PureInterface together with NoInits. PureInterface is already read as a flag from Java snd Scala2 classfiles. For source and Tasty it is now generated as members are indexed.
| * Avoid double negation in isJvmSam.Martin Odersky2015-06-161-9/+8
| | | | | | | | | | Found while trying to chase down the problem with stale symbols in last commit. Double negation is confusing. The new formulation avoids it.
| * Avoid spurious StaleSymbol error in <refinement> membersMartin Odersky2015-06-162-2/+3
| | | | | | | | | | | | | | Refinement classes and their members could give spurious stale symbol errors if the symbol is loaded in a different run than the classfile containing it. The problem is that refinement classes do not form part of the scope of their owners. The fix assumes that refinement classes are always "stillValid".
* | Merge pull request #634 from dotty-staging/fix/refs-to-inner-objectsodersky2015-06-191-9/+19
|\ \ | | | | | | Refactorings for small style improvements.
| * | Refactorings for small style improvements.Martin Odersky2015-06-081-9/+19
| | |
* | | Merge pull request #599 from dotty-staging/add/existential-skolemizationodersky2015-06-1919-232/+316
|\ \ \ | | | | | | | | Tighten comparison of skolem types
| * | | Better printing of skolem typesMartin Odersky2015-06-061-2/+2
| | | |
| * | | Document asSeenFromMartin Odersky2015-06-061-2/+46
| | | |
| * | | Remove no longer needed Skolemization.scalaMartin Odersky2015-06-061-145/+0
| | | |
| * | | Deskolemize types inferred for vals and defsMartin Odersky2015-06-064-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to establish the invariant (optionally checked by assertNoSkolems) that symbols do not contain skolemized types as their info. This avoids unsoundness situations where a skolem gets exported as part if the result type of a method, so different instantiations look like their are the same instance.
| * | | Skolemize unstable prefixes in asSeenFromMartin Odersky2015-06-064-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Skolemize unstable prefixes in asSeenFrom provided - the prefix appears at least once in non-variant or contra-variant position - we are in phase typer. After typer, we have already established soundness, so there's no need to do skolemization again. We can simply do the (otherwise unsound) substitution from this-type to prefix.
| * | | Move deskolemization from TypeComparer to TypeOpsMartin Odersky2015-06-062-16/+114
| | | | | | | | | | | | | | | | It's no longer needed in TypeComparer. We now deskolemize when locally inferring types of vals and defs.
| * | | Track unstability in asSeenFromMartin Odersky2015-06-061-4/+21
| | | |
| * | | Make SkolemTypes cached but generative.Martin Odersky2015-06-061-1/+2
| | | | | | | | | | | | | | | | Skolem[T] != Skolem[T]
| * | | Split RefinedThis and SkolemTypeMartin Odersky2015-06-0613-53/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SkolemTypes need to behave differently form RefinedThis types in TypeMap and TypeAccumulator. For skolem types these should follow through to the underlying type. For RefinedThis types, these need to do nothing, in order not to start an infinite recursion.
| * | | Disable deskolemization in narrowGADTBoundsMartin Odersky2015-06-061-5/+4
| | | | | | | | | | | | | | | | | | | | Will use deskolemize later, when method result types are inferred.
| * | | More inclusive isStable test.Martin Odersky2015-06-061-1/+2
| | | | | | | | | | | | | | | | | | | | (1) Refinements of stable types are stable (2) TypeVars instantiated to stable types are stable.
| * | | Follow aliases when deskolemizingMartin Odersky2015-06-061-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Be more aggressive doing this than with lookupRefined in that we compute the member of a projected name, instead of just analyzing the type structurally. Reason: (1) If we do not follow aliases, skolemization will lose information (2) Skolemization is applied rather late, less risk of cyclic references by computing members.
| * | | Tighten isStable predicateMartin Odersky2015-06-063-25/+4
| | | | | | | | | | | | | | | | | | | | A term ref is stable only if its prefix is also stable. At the same time, we drop stability requirements where they no longer make sense (e.g. in isLegalPrefix).
| * | | Make skolemsstate three valuedMartin Odersky2015-06-062-9/+21
| | | |
| * | | Tighten comparison of skolem typesMartin Odersky2015-06-061-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Skolem types are =:= only if they are reference-equal. Two skolem types with the same underlying type are not necessarily equal. Tests continue to run under this tightened definition.
* | | | Merge pull request #664 from dotty-staging/more-testsodersky2015-06-182-4/+21
|\ \ \ \ | |_|_|/ |/| | | Enable tests that pass, move macro tests to disabled.
| * | | Scala2 mixin: For some lazy vals inside traits, Lazy flag isn't set on ↵Dmitry Petrashko2015-06-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | implementation method. Cannot rely on it. Instead use method signature.
| * | | Support overloaded lazy vals coming from Scala2 traits.Dmitry Petrashko2015-06-161-2/+5
| | | |
| * | | Mixin: implementations of Scala2 LazyVals need a rhs.Dmitry Petrashko2015-06-151-1/+7
| | | | | | | | | | | | | | | | | | | | Unlike normal fields, they aren't initialised in $init method, and need to know a bit about class layout of implementation class. Luckily AugmentScala2Traits added just enough symbols to make this work.
| * | | Annotate lazy vals in Scala2 traits with @volatileMartin Odersky2015-06-081-3/+9
| | | | | | | | | | | | | | | | Scala-2 lazy vals are @volatile according to Dotty conventions.
* | | | Fix #651 Generalize criterion for isOpAssignMartin Odersky2015-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | Methods like + can have multiple parameters. In that case += also takes multiple parameters.
* | | | Merge pull request #635 from dotty-staging/fix/private-scala2-trait-settersDmitry Petrashko2015-06-127-19/+47
|\| | | | |_|/ |/| | Some fixes around mixin and memoization