aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #509 from dotty-staging/add/expandSAMsDmitry Petrashko2015-05-0412-27/+176
|\ | | | | Expand SAM closures to anonymous classes if needed
| * More conditions under which SAMs are converted to anonymous classesMartin Odersky2015-05-022-6/+16
| | | | | | | | | | | | | | Also included are - Closures implementing classes that inherit from a class other than Object - Closures that implement traits which run initialization code.
| * Refactoring and renaming of superClass/superInterfacesMartin Odersky2015-05-022-19/+9
| | | | | | | | | | | | | | | | superClass was a duplicate; we already have one in SymDenotation, so we delete the one in SymUtils. superInterfaces is too easy to confused with the JVM notion, which is different. I replaced with directlyInheritedTraits.
| * Fix noInitMember to apply to DefDefsMartin Odersky2015-05-021-1/+1
| | | | | | | | Thanks for pointing it out, @smarter.
| * Generalize tpd.AnonClassMartin Odersky2015-05-022-12/+11
| | | | | | | | | | | | | | Now takes a list of parent types. We needed only one parent for SAM implementation but it makes sense to generalize this. Also, removed redundant code accidentally left in.
| * Remove worksround in ExpandSAMsMartin Odersky2015-05-021-14/+1
| | | | | | | | Removed the workaround of the original crasher which was addressed in the last commit.
| * Make sure types of pattern bound variables are fully-defined.Martin Odersky2015-05-021-2/+3
| | | | | | | | | | | | | | | | | | Like all other variables, pattern-bound vars need a fully defined type. I was thinking originally that demanding a fully defined selector type is sufficient to ensure this, but that's not true: An outer pattern might call a polymorphic unapply and its type variables need not be fully instantiated. With the fix, the minimized test case from ExpandSAMs works.
| * New miniphase: ExpandSAMsMartin Odersky2015-05-024-0/+103
| | | | | | | | The phase replaces SAM closures with anonymous classes when necessary.
| * Avoid prepare actions form earlier phases when doing a transformFollowinfDeepMartin Odersky2015-05-021-1/+8
| | | | | | | | See comment in the code.
| * New utility method tpd.AnonymousClassMartin Odersky2015-05-021-1/+28
| | | | | | | | As the name implies, this creates an anonymous class.
| * Make tpd.ClassDef work for polymorphic parent classes.Martin Odersky2015-05-021-2/+3
| | | | | | | | | | | | | | The handling of the first parent of ClassDef was broken if that parent had type parameters. This was exposed by following commites which use ClassDef more intensively than before in creating anonymous classes representing closures.
| * New symbol creation method: `newNormalizedClassSymbol`.Martin Odersky2015-05-021-0/+24
| | | | | | | | | | | | It's common that one wants to create class symbols with arbitary parent types, not just TypeRefs. But for the casual user it's non-obvious how to do it. Hence the new creation method.
| * Fix to error reporting of compiled unitsMartin Odersky2015-05-021-1/+1
| |
* | Merge pull request #512 from dotty-staging/fix-511Dmitry Petrashko2015-05-041-0/+3
|\ \ | | | | | | Fix #511. Lambdas of traits that inherit abstract member.
| * | Reuse Type.abstractTermMembers in DottyBackendInterface.Dmitry Petrashko2015-04-301-2/+1
| | |
| * | Fix #511. The fix will not be effective until we update scalac fork dependency.Dmitry Petrashko2015-04-301-0/+4
| | | | | | | | | | | | | | | https://github.com/DarkDimius/scala/commit/9c054bd687bbbcaa75f3f10a1d343998c6c1a2ba As bug is minor I do not want to update scalac fork dependency just yet.
* | | Merge pull request #529 from dotty-staging/fix/#503Dmitry Petrashko2015-05-042-4/+5
|\ \ \ | | | | | | | | Fix of #503
| * | | Re-use MethodOrLazy in constructors.Martin Odersky2015-05-041-3/+2
| | | | | | | | | | | | | | | | A search revealed duplicates, which are eliminated now.
| * | | Treat references to modules and lazy vals as outer referencesMartin Odersky2015-05-041-1/+3
| | | | | | | | | | | | | | | | Previously, we considered only methods. #503 shows that this is wrong.
* | | | Merge pull request #532 from smarter/fix/vc-java-compatDmitry Petrashko2015-05-043-6/+18
|\ \ \ \ | | | | | | | | | | Fix compatibility of Java with value classes
| * | | | Fix compatibility of Java with value classesGuillaume Martres2015-05-041-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids getting a runtime error when calling a Java-defined method whose signature contains value classes. It happened because we erased the value classes in this signature even though it comes from a classfile. Amusingly, this problem also exists in scalac: <https://issues.scala-lang.org/browse/SI-9298>
| * | | | add an isCompanionMethod convenience methodGuillaume Martres2015-05-043-5/+14
| |/ / /
* | | | Make DottyPredef compilable with -Yno-importsMartin Odersky2015-05-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | DottyPredef needs to be compiled with -Yno-imports because it would clash otherwise with the DottyPredef in the root context. Note that ??? has to be written in fully qualified form because of #530.
* | | | Honor -Yno-imports flagMartin Odersky2015-05-042-2/+4
|/ / / | | | | | | | | | If the flag is set, no root imports are added.
* | | Merge pull request #517 from dotty-staging/add/expand-privatesodersky2015-05-0411-43/+75
|\ \ \ | | | | | | | | Expand private members if necessary
| * | | Refchecks runs before resolveSuper: superAccessors not yet materialised.Dmitry Petrashko2015-05-031-0/+1
| | | |
| * | | TreeChecker: check for absence of private abstract methods.Dmitry Petrashko2015-05-032-11/+5
| | | |
| * | | SuperAccessors: Do not create abstract private members.Dmitry Petrashko2015-05-031-2/+2
| | | |
| * | | ExpandPrivate: Make sure Deferred members are not Private.Dmitry Petrashko2015-05-031-4/+13
| | | |
| * | | Fixed doc comment.Martin Odersky2015-05-021-6/+2
| | | |
| * | | Expand name should use initial owner.Martin Odersky2015-05-011-1/+6
| | | |
| * | | Get rid of NotPrivate flag.Martin Odersky2015-05-014-7/+3
| | | | | | | | | | | | | | | | It is now redundant.
| * | | New miniphase: ExpandPrivateMartin Odersky2015-05-013-30/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A late miniphase which resets private flag of all members that are not accessed from within same class. Replaces logic in RefChecks. Doing this late has two advantages - we can use name expansion, because references are symbolic, so the names of symbols and references to them do not need to correspond anymore. - we can automatically correct for symbols moved in earlier phases (e.g. lifted out by LambdaLift).
| * | | Make sure mixin accessors are not private.Martin Odersky2015-05-012-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | Logic moved from RefChecks to Mixin; implementation is now by name expansion instead of setting NotJavaPrivate flag.
| * | | New method for SymDenotations: ensureNotPrivateMartin Odersky2015-05-011-0/+7
| | | | | | | | | | | | | | | | Resets private flag, and expands the name if necessary.
| * | | Drop reference to NotJavaPrivate in access checks.Martin Odersky2015-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | Verified that all tests still run. This is a first step, so that we can later on eliminate NotJavaPrivate altogether.
* | | | Merge pull request #520 from dotty-staging/refactor/picklingodersky2015-05-0327-47/+47
|\ \ \ \ | | | | | | | | | | Pickling modularization reorg
| * | | | Pickling modularization reorgMartin Odersky2015-05-0227-47/+47
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | The pickling package got rather large and confusing with three separate tasks that each had their own conventions: read JVM classfiles, read Scala2 pickle info, read Tasty. The classes for each task are now in separate packages.
* | | | Merge pull request #526 from dotty-staging/fix/#522odersky2015-05-031-2/+3
|\ \ \ \ | | | | | | | | | | Fix #522.
| * | | | Fix #522.Martin Odersky2015-05-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | We were missing a substitution in full parameterization. Embarraingly, this made even the example in the doc comment of `fullyParameterizedDef` fail.
* | | | | addToConstraint: Disable debug message by defaultGuillaume Martres2015-05-031-1/+1
|/ / / /
* / / / Fix #523: Instantiate lower bound when bounds checkingMartin Odersky2015-05-021-1/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | Lower bounds need to be instantiated just like upper bounds. F-bounded polymorphism (which only applies too upper bounds) is one reason for instantiating arguments, but parameters referring to other parameters is another one. An the latter applies to lower bounds as well.
* | | Merge pull request #507 from dotty-staging/add/from-tastyDmitry Petrashko2015-05-0213-87/+228
|\ \ \ | | | | | | | | Compile from Tasty
| * | | Force TASTY trees read by unpickler in FromTastyMartin Odersky2015-04-301-0/+6
| | | | | | | | | | | | | | | | | | | | We want to ensure that the whole tree is read at phase frontend. To achieve this, we run an empty traverser over the tree.
| * | | Move addrOfTree, addOfSym from CompilationUnit to Pickler.Martin Odersky2015-04-283-16/+18
| | | | | | | | | | | | | | | | | | | | These only exist if there was a pickler, and they are not unique per CompilationUnit.
| * | | Add usage documentation to FromTastyMartin Odersky2015-04-281-0/+11
| | | |
| * | | Handle missing delta positions when unpicklingMartin Odersky2015-04-283-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | A missing delta position signifies that the node has the same position as its parent. Once that case was added, we can now enable positions when reading from Tasty.
| * | | Maintain source files in pickled infoMartin Odersky2015-04-285-17/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | So far: Only one source file is recorded. Should evaluate whether more are needed. Will programs composed from several source files be pickled? They will certainly be generated after inlining, but maybe all that happens after pickling?
| * | | Unpickler should not label parameter accessors Deferred.Martin Odersky2015-04-281-1/+1
| | | |
| * | | Fix definition of empty package so that it can persist membersMartin Odersky2015-04-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Previously, the empty package was always initialized with the empty scope. This means that separate compilation between files in the empty package was not possible.