aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fix problems in avoidMartin Odersky2015-03-181-2/+6
| | | | | | | | | | | | It turned out that avoid does not always produce a supertype of the original type, which makes the additions in "ensureNoLocalRefs" type incorrect. This commit fixes the problems.
| * Avoid escaping pattern bound variablesMartin Odersky2015-03-182-22/+27
| | | | | | | | | | | | | | ... by applying the same "ensureNoLocalRefs" logic we already apply to blocks. This change is necessitated by Pickling - escaping variables are not defined before being referenced. The change uncovered in turn problems in type avoidance.
| * Print templates again in sugared form.Martin Odersky2015-03-181-3/+5
| |
| * Pass the correct context down in tree accumulators.Martin Odersky2015-03-181-81/+88
| |
| * Tweaks to printingMartin Odersky2015-03-182-67/+87
| | | | | | | | | | | | | | | | - when traversing a tree, we need to keep the context current so that it always has the right owner. Otherwise recostructing lazy trees will lead to failures in TypeAssigners. - also, some tweaks concerning how parameters are displayed.
| * Run unpickler tests in next run.Martin Odersky2015-03-181-14/+20
| | | | | | | | Will get cross-talk ob cached symbols otherwise.
| * Bugfixes in unpicklingMartin Odersky2015-03-187-36/+67
| | | | | | | | | | | | | | | | | | - better diagnostics, avoid try-finally-assert, because that masks errors. - handle paths as terms correctly. - need to set flags wholesale from pickling, not just add to them. - fix pickling of refined types and skolem types. - dealias type aliases representing parameter instantiations before pickling, so that we do not refer to as-yet-undefined symbols.
| * Fix implicit problem in RefinedPrinter.Martin Odersky2015-03-182-6/+6
| | | | | | | | | | | | | | The implicit def was shadowed by a following import. Scalac did not detect the problem probably because the import and the def were in the same scope. But selecting the member explicitly would have caused an error because the import came after the definition. So arguably this was in error, but scalac did not detect it correctly.
| * Don't suppress ambiguous implicit notes.Martin Odersky2015-03-181-1/+1
| | | | | | | | | | Ambiguous implicits notifcations for selection views were propagataed to adapt but then dropped.
| * Align PickleFormat with doc specMartin Odersky2015-03-182-186/+180
| | | | | | | | | | | | New version number: 0.04 Also removed dead code in pickler.
| * Pickle trait flag and compute PureInterface and NoInits in unpickler.Martin Odersky2015-03-185-28/+46
| | | | | | | | | | | | 1) Trait was missing, needs to be serialized. 2) The other two flags are not serialized, need to be reconstituted on unpickling.
| * Set NoInits also for non-trait classesMartin Odersky2015-03-181-6/+4
| | | | | | | | The flag seems useful also for plain classes. No reason to restrict to traits.
| * Tweaks to printingMartin Odersky2015-03-182-12/+11
| | | | | | | | | | 1) Remove special treatment of PlainPrinter <module>.this. 2) Always use symbol mods when a symbol is available.
| * Added testing hooks for unpicklerMartin Odersky2015-03-187-27/+67
| | | | | | | | New option -Ytest-pickler compares trees before and after pickling.
| * Ensure that start position is <= end position in ParserMartin Odersky2015-03-181-1/+1
| |
| * Added pickling part of new scheme.Martin Odersky2015-03-185-108/+54
| |
| * Finished new position unpickling code.Martin Odersky2015-03-186-118/+97
| | | | | | | | Pickling still has to be written.
| * Companion objects of abstract case classes are not functions.Martin Odersky2015-03-182-2/+5
| | | | | | | | | | They do not have a generated apply method, so cannot be functions. Problem was unvovered when changing the definition of LazyAnnotation.
| * Bugfix: Take account of asSeenFrom in matchingDenotationMartin Odersky2015-03-182-9/+13
| | | | | | | | | | | | | | When disambiguating overloaded alternatives in matchingSymbol we need to apply asSeenFrom before comparing signatures. Before this was not done, and led to a failure of determining the inherited result type of an apply method in Checking, which in turn led to a type error.
| * Bugfix: Avoid importing constructorsMartin Odersky2015-03-181-1/+1
| | | | | | | | We got an ambiguous import error in PositionReader before.
| * Avoid capturing context in lazy treesMartin Odersky2015-03-1812-74/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lazy trees can live longer than runs, so it is important that they capture as little as possible. In particular they should not capture contexts. This change led with a ripple through effect to many changes where operations now have to parameterzied with contexts, in particular in what concerns tree folding. The changes in turn uncovered some areas where dotc was incompatible with scalac, and flagged correct things as errors. These will be fixed in the next commits. Another small twist: EmptyTrees will not be read in delayed mode, so that one can check for lacking definitions without deserializing the rhs.
| * Handle ParsedTry nodes in RefinedPrinterMartin Odersky2015-03-181-0/+4
| | | | | | | | Used to print in raw form only.
| * Halfway to yet another scheme for handling positionsMartin Odersky2015-03-184-20/+57
| | | | | | | | | | | | | | | | | | | | The previous attempt was very fragile, and did not play well with lazy trees, despite best intentions. It did not work correctly for normal trees, and it seemed anyeway very hard to extend this to annotations. The new scheme, as outlined in PicklerFormat, is simpler and naturally handles lazy trees and annotations.
| * New scheme for recording positionsMartin Odersky2015-03-1812-167/+194
| | | | | | | | Single traverser, also handles lazy trees.
| * Various fixes to unpicklingMartin Odersky2015-03-186-48/+64
| | | | | | | | | | | | | | 1) Treatment of root symbols simplified. TODO: check for double reads 2) Self defs no longer get symbols 3) class symbols now get their proper ClassInfos. 4) Some other smaller fixes
| * Fixed bugs related to Unpickling.Martin Odersky2015-03-183-41/+51
| |
| * Save pickled bytes in compilation unitMartin Odersky2015-03-182-0/+6
| |
| * Have pkg intsead of static external referencesMartin Odersky2015-03-184-13/+23
| | | | | | | | | | Static does not tell us whether to start the search it in empty package or in root package.
| * First version of unpickler for PositionsMartin Odersky2015-03-187-674/+715
| | | | | | | | Refactored unpickling, splitting into several files.
| * Fix implementation of readEndMartin Odersky2015-03-181-1/+1
| |
| * Refactor traversals to be in Edge instead of PositionPickler.Martin Odersky2015-03-182-29/+36
| | | | | | | | Will be used also for unpickling of positions.
| * Add hooks for unpickling positions to trees.Martin Odersky2015-03-184-39/+87
| |
| * First version of position pickler.Martin Odersky2015-03-185-0/+131
| |
| * Record pickled trees in a hashmapMartin Odersky2015-03-183-4/+26
| | | | | | | | | | | | The idea is that we want to use the mapping from tree to Addr in other sections, most immeditaely for positions, but it could be others as well.
| * First version of UnpicklerMartin Odersky2015-03-186-55/+725
| | | | | | | | Caused several small changes to Tasty format.
| * Add UUID to TastyMartin Odersky2015-03-184-10/+20
| | | | | | | | Tasty files now always carry a random UUID.
| * Add signed ints in Tasty format.Martin Odersky2015-03-184-74/+128
| | | | | | | | | | | | - will be needed for position deltas - also simplify format in that negative constants are no longer needed.
| * Move more functionality from Namer proper to context ops.Martin Odersky2015-03-182-35/+46
| | | | | | | | Aim: re-use from Unpickler.
| * Change order of fields in PickleFormatMartin Odersky2015-03-183-44/+40
| | | | | | | | | | | | | | | | | | | | | | | | For Nat/AST trees, have the Nat come first. The main advantage is when unpickling SELECT. We need to know when unpickling the qualifier whether we are in a constructor call (to set inConstructor parameter of tpd.Super). We know this only after having read the name in the SELECT. Also: tweaks to Pickler.
| * Polishings on TastyReaderMartin Odersky2015-03-184-26/+62
| | | | | | | | | | | | | | In particular: Allow for Addr(0) to point to the middle of the `bytes` array. Needed so that we can read trees without copying the bytes representing trees into a fresh array.
| * Changes to pickling annotationsMartin Odersky2015-03-182-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem is that we need to be strict in the annotation symbol (need to force at the latest when checking whether a definition has some specific class of annotation), but should be lazy in the rest of the tree. This is achieved by pickling annotations with a symbol and a full tree. At the same time, Annotated trees can be ignored because they are eliminated by Typer. We only need AnnotatedTypes.
| * Add INSUPERCALL flag to pickle format.Martin Odersky2015-03-182-3/+6
| | | | | | | | | | | | | | | | | | | | Reason: It is really hard to establish when a context is a inSuperCall context when unpickling trees. The unpickler does not have the ability to look inside (untyped) trees, so it is tricky/messy to detect a super.<init> or this.<init> Apply in a constructor body. Also: Always pickle template constructors.
| * Moved part of computation of types of DefDefs from Namer to TypeOpsMartin Odersky2015-03-182-16/+19
| | | | | | | | ... so that this can be re-used in the tree unpickler.
| * Make some tree fields lazyMartin Odersky2015-03-1815-78/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lazy fields are - the rhs field of a ValDef or DefDef - the body field of a Template These can be instantiated with Lazy instances. The scheme is such that lazy fields are completely transparent for users of the Trees API. The only downside is that the parameter used to initialize a potentially lazy field has a weak type (now it's Any, with Dotty it would be a union type of the form `T | Lazy[T]`. Therefore, the parameter cannot be recovered through pattern matching.
| * Add auxiliary constructor for TastyPrinterMartin Odersky2015-03-182-2/+3
| |
| * Weaks to formatMartin Odersky2015-03-182-86/+87
| | | | | | | | Bump version to 0.03. Harmonize doc comment and Google doc.
| * Tweaks in commentsMartin Odersky2015-03-183-9/+7
| |
| * Stop type inference from creating oprphans.Martin Odersky2015-03-184-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A tweak in the answer to a fundamental question of inference: When should type variables be instantiated? Example: In a call f [ TVar ] ( g() ) A syntehsied type variable TVar can be instantiated as soon as the call is fully elaborated, but not before - in particular not when typing the nested call `g()`. This is so far achieved by looking at the `owningTree` of a type variable (in the example it would be the call above) and instantiating only if the current tree contains the owning tree. Problem is that this is fragile. If in the meantime the tree was copied, say due to eta-expansion, the contains test will fail. Now this is not a big deal, as long as we instantiate the type variable eventually. But previously that was never done. With the fix we now instantiate type variables also if we have fully elaborated the definition that closest encloses the point where the type variable is created. This is less fragile, as definitions can be compared using their symbols instead of looking at trees.
| * Tightening of orphans tests.Martin Odersky2015-03-181-0/+2
| | | | | | | | | | Need to always follow TypeVariables, otherwise we will not detect orphan parameters of uninstantiated type variables.
| * Change scheme of translating array creations new Array(...)Martin Odersky2015-03-181-7/+7
| | | | | | | | | | | | | | | | | | | | The previous scheme generated too many newGenericArray expressions because at the time newArray was called, the type arguments were not yet determined. Furthermore, the type variables somehow did not have the right positions, which caused them not to be interpolated and led to orphan PolyParams. The new scheme converts the expression when the length parameter has been supplied and it fully determines the array type before converting.