aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/pickling/UnPickler.scala
Commit message (Collapse)AuthorAgeFilesLines
* Fixed test failure for core_pickling.Martin Odersky2015-04-031-1/+4
| | | | | When reading external symbols from class Object, need to consider members of Any as well.
* Both module and class being unpickled need to register links.Dmitry Petrashko2015-03-301-4/+10
|
* Fix #443, set moduleClass of class being lazily unpickled.Dmitry Petrashko2015-03-301-1/+5
|
* Make companion-module links in UnPicklerDmitry Petrashko2015-03-281-1/+6
|
* Remove code duplication between Namer, ClassfileParser and UnPicklerDmitry Petrashko2015-03-261-6/+3
|
* Add companion class methods for files read from scala & javaDmitry Petrashko2015-03-251-0/+10
|
* Fix for #371Martin Odersky2015-02-241-1/+2
| | | | | | | | | | This causes backend to fail with ambiguous reference when loading member "equals" of object "BoxesRuntime". The reference is indeed ambiguous. BoxesRunTime has a two paremeter equals method and, with the fix, inherits the one-parameter method from Object. The backend needs to disambiguate, e.g. by demanding the `decl` equals in BoxesRunTime instead of the member.
* Merge pull request #331 from dotty-staging/fix/refined-subtypingodersky2015-01-311-12/+8
|\ | | | | Fix/refined subtyping
| * Rename RefinedThis -> SkolemTypeMartin Odersky2015-01-101-1/+1
| | | | | | | | | | Also, make binder type of SkolemType refer to arbitrary type, not necessarily RefinedType.
| * Reverting the idea that RefinedThis types take levels.Martin Odersky2015-01-101-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the end, this did not buy us anything. What matters is that - we can reliably identify RefinedThis types pointing to a given refinement type. Making sure that the `binder` field of q RefinedThis type in a refinedInfo is always the containing refined type is good enough for that. - we take care to rebind RefinedThis types in isSubType. This was leaky before, is handled now better in the new isSubType. So, in the end, adding a level was a needless complication. Also, as a next step we should be able to identify skolem types and RefinedThis types.
| * Provide the correct levels for RefinedThis types.Martin Odersky2015-01-011-11/+3
| |
* | New method on scopes: openForMutationsMartin Odersky2014-12-181-1/+1
| | | | | | | | Replaces `asInstanceOf[MutableScope]` calls.
* | More careful usage of unforced decls in classes.Martin Odersky2014-12-181-3/+3
|/ | | | | | | | | | 1) Rename `decls` to `unforcedDecls` to make it clear that it is danegrous to use. 2) Prefer `info.decls` over `unforcedDecls`. This fixes the problem reported in #305 where the primary constructor was not found.
* Extracting ApplyOverloaded to be reused in UnPickler and ClassfileParserDmitry Petrashko2014-11-221-15/+3
|
* Fix ElimRepeated not transforming modifiers in tree.Dmitry Petrashko2014-11-221-1/+1
|
* Dotty typer deviation triggered in UnpicklerDmitry Petrashko2014-11-221-1/+2
|
* Infer if overloading resolution should trigger implicit search.Dmitry Petrashko2014-11-221-33/+28
| | | | This doesn't require additional argument. Decision can be made solely from the phaseId.
* Fix StackOveflow due to implicit resolution in readAnnotationContentsDmitry Petrashko2014-11-221-1/+1
|
* readAnnotationContents that should be able to resolve overloaded constructors.Dmitry Petrashko2014-11-221-12/+36
|
* Restructure Try node.Dmitry Petrashko2014-10-301-1/+1
| | | | | | Now Try node always has cases as handlers. In case handler is an Ident of type Throwable => T than it's desugared to a CaseDef during parsing.
* Fix a bug in unpicklerMartin Odersky2014-09-051-1/+1
| | | | Module roots were mis-characterized, which meant that module symbols were loaded twice.
* Make ThisTypes take TypeRefs instead of ClassSymbolsMartin Odersky2014-08-271-4/+4
| | | | | This avoids stale symbol errors and does not need the somewhat unsystematic symbol rebinding of the last commit.
* Rebinding ThisTypesMartin Odersky2014-08-271-1/+1
| | | | | | | | | | | ThisTypes do escape. It seems that Scala 2 pickling produces ThisTypes that refer to base classes of the class being compiled. If the base class is in a separate compilation unit, this can lead to a stale class symbol in the ThisType. We solve this here by rebinding the class symbol in the ThisType. We should also explore the alternative: class ThisType(tref: TypeRef) ... That would do the rebinding as part of the generation denotation resolution mechanism.
* LazyRefs break cycles for unpickled typesMartin Odersky2014-08-081-1/+6
| | | | | Insert LazyRefs to break cycles for F-bounded types that are unpickled or read from Java signatures.
* Eliminate JavaRepeatedParamClassMartin Odersky2014-08-031-2/+2
| | | | | | | Having two repeated param classes (and two types) does not work, because we need to maintain an overriding relationship between Scala repeated param methods and Java repeated param methods (this will be resolved later by bridges).
* Make TypeParamCreation flags depend on ownerMartin Odersky2014-07-171-1/+1
| | | | | | Type params should have different flags, depending on whether they are owned by a method or a class. Only class type parameters are marked Deferred, protected, and Local.
* Added infix methods for some tree constructionsMartin Odersky2014-07-171-1/+1
| | | | | | | Added several forms of "select" and "appliedTo" methods which construct Select, Apply, TypeApply trees. Motivation: Infix methods allow chaining which is more legible than deep nesting.
* Various cleanups and utility additionsMartin Odersky2014-07-171-6/+6
| | | | | | | - Some new functionality in tpd and in Symbols. - Added `sm` interpolator to print nicely. - Make use of nestedMap where possible. - Add IdentityDenotTransformer as a convencience class
* Handling higher-kinded types with lambdasMartin Odersky2014-06-181-4/+6
| | | | | Switch to the new scheme where higher-kinded types (and also some polymorphic type aliases) are represented as instances of Lambda traits.
* Main Typer reorg.Martin Odersky2014-03-071-2/+2
| | | | Common code between tpd and Typer has been factored out into class TypeAssigner.
* Fix of #34Martin Odersky2014-03-031-1/+1
| | | | | | | | The root cause of #34 was that we took a type argument which was an existential type. These are returned as type bounds, which make no sense in the calling context. To avoid that problem in the future, `typeArgs` got renamed to `argInfos`, so it is clear we get an info, not necessarily a value type. There are also added method `argTypes`, `argTypesLo`, `argTypesHi`, which return a type, but either throw an exception or return a lower/upper approximation of the argument is an existential type. There's another issue that the existential type only arose when compiling the same couple fo files the seciond time. We need to chase that one down separately.
* Rename baseType -> baseTypeRefMartin Odersky2014-03-021-1/+1
| | | | | | | What was `baseType` and is now `baseTypeRef` only computes the prefix of of basetype, not the type arguments. If type arguments need to be included there is `baseTypeWithArgs`. The reason is that type arguments are usually already encoded as member types. But this was a source of errors because in Scala 2, baseType includes the type arguements. (also added test file structural.scala forgotten from last commit)
* Misc performance improvements by eliminating stupid allocationsMartin Odersky2014-02-241-0/+1
| | | | | | - Avoid closure creation in Position. - Avoid creating debug string in SymDenotations - Avoid creating Flag translation tables in pickle buffers
* Avoid memory leaks on repeated compilation.Martin Odersky2014-02-241-6/+6
| | | | | | | | | | | | | | | | | Several measures: 1. Invalidate classOfId and superIdOfClass in ContextBase after each run. These contain local classes that should become inaccessible. 2. Also clear implicitScope cache that maps types to their implicit scopes after each run. (not sure whether this is needed; it did show up in paths from root, but on second thought this might have been a gc-able cycle. 3. Avoid capturing contexts in lazy annotations. 4. Avoid capturing contexts in functions that compute souceModule and moduleClass 5. Avoid capturing contexts in Unpickler's postReadOp hook.
* Reverted: Avoid using TypeBounds in alias refinements.Martin Odersky2014-02-211-8/+7
| | | | The idea is to use the alias itself. This cuts down on # of typebounds created and makes operations on refined infos and applied types more direct. (reverted from commit 81f31f9b71bc4466d3f04f5ce28ef94051688ecd)
* Avoid using TypeBounds in alias refinements.Martin Odersky2014-02-211-7/+8
| | | | The idea is to use the alias itself. This cuts down on # of typebounds created and makes operations on refined infos and applied types more direct.
* Symbol loaders no longer complete with creation contextMartin Odersky2014-02-091-108/+106
| | | | | | Instead current ctx is passed through everywhere. Question: can we factor out ctx better?
* Making completer take an implicit contextMartin Odersky2014-02-091-2/+2
| | | | | | | As a first step, we make the complete method in LazyType take an implicit context parameter. This requires a fairly large propagation of implicit contexts. The implicit parameter is ignored for classes inheriting from CompleteInCreationContext (which until now are all completers). The next step will be to make the complete methods of selective lazy types take the current context, rather than the creation context.
* Replacing most occurrences of HashMap with AnyRefMapMartin Odersky2014-01-301-2/+2
|
* Making files in pickling dotty-compliant.Martin Odersky2014-01-141-5/+5
|
* Add type parameters to synthetic constructors.Martin Odersky2014-01-101-1/+5
|
* Some cleanups.Martin Odersky2014-01-021-1/+2
|
* Module classes are now entered into owner's scope when unpickled.Martin Odersky2013-12-261-1/+1
| | | | ... aligning with treatement of module classes elsewhere.
* Fixing unpickling of refinements.Martin Odersky2013-12-261-3/+6
|
* Typing by-name parameters with ExprTypes.Martin Odersky2013-12-221-4/+2
| | | | To avoid duplication between by-name parameters and expr types, we treat by-name parameters as as having ExprType. A part of this is introducing ByNameTypeTree, a specific tree class for => T types.
* Generalized ensure constructor logic from Java classes to all classes or ↵Martin Odersky2013-12-221-0/+4
| | | | | | traits except Java modules. We now assume that all classes or traits (with the exception of Java statics) have a constructor.
* Normalize parents to be class refsMartin Odersky2013-12-221-1/+1
| | | | | | Previously, alias type refs were also accepted. But this is the wrong assumption for computeMembersNames. So, e.g. instead of leaving an AnyRef we now expand to Object. Also making ==, != take an Any instead of Object
* Handling implicit unapply arguments.Martin Odersky2013-12-201-1/+1
| | | | Changed format of UnApply nodes to also take implicit parameters. See doc comment in class Trees.UnApply
* Fixes for desugarings of case classes.Martin Odersky2013-12-071-1/+2
| | | | Also: Standardized on selectorName; Translate $init$ to <init> when unpickling.
* Refactorings in TypeComparers and elsewhereMartin Odersky2013-11-281-5/+1
| | | | Broke out common functionality in two new methods: widenExpr, and commonVariance.