aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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-1816-84/+119
| | | | | | | | | | | | | | | | 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-182-8/+9
| | | | | | | | | | 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.
* Make Definitions#rootPackage a root.Martin Odersky2015-03-181-1/+1
| | | | Otherwise it is not static, and pickling the symbol leads astray.
* Fix serialization of Bind-defined types in type patterns.Martin Odersky2015-03-184-8/+25
| | | | These are now represented as BIND nodes in pickled types.
* Make pickling output printer-dependent.Martin Odersky2015-03-183-3/+5
|
* Turn on pickling.Martin Odersky2015-03-181-1/+1
|
* Turn on full compression of Tasty tree buffers.Martin Odersky2015-03-181-9/+26
|
* Changes to Tasty format:Martin Odersky2015-03-183-27/+49
| | | | | | | | | | | | 1) IDENT nodes if types are not termrefs. (otherwise we lose information) 2) PRIVATEqualified and PROTECTDqualified always have a type argument Also, Pickler guards against previously encountered errors: - orphan parameters - trying to pickle packages as internal symbols. Plus some small polishings.
* Eliminate raw numbers from Tasy formatMartin Odersky2015-03-183-16/+5
| | | | They are an irregularity and don't buy us much. Might as well pickle these numbers as Nats/Longs.
* Avoid pickling for Java-parsed compilation units.Martin Odersky2015-03-181-10/+11
| | | | Their trees make no sense; can't be pickled.
* Add TASTY readers and printers for TASTy info.Martin Odersky2015-03-1811-95/+602
| | | | | | So far printing is the only reader, ie. deserializer. Numerous bugfixes to make first tests work.
* Treat <root> as staticMartin Odersky2015-03-181-1/+1
|
* Make bestFit work for partially filled arraysMartin Odersky2015-03-183-9/+7
|
* Allow up to 64 phases.Martin Odersky2015-03-181-1/+1
| | | | | Doubles maximal number of phases from 32 to 64. Needed because adding the pickling phase would push us over the edge of 32 phases.
* First prototype of pickler.Martin Odersky2015-03-189-6/+1135
|
* Disallow refinements of types or methods that do not appear in parent.Martin Odersky2015-03-1813-89/+98
| | | | | | | | We planned this for a long time but never implemented it. Instead, we sometimes issued an erro in Splitter, namely if reflection would have been needed to access the member. It turns out that some tests (e.g. neg/t625) fail -Ycheck (we knew that before and disabled) but also fail Pickling because they generate orhpan PolyParams. So rather than patching this up it seems now is a good time to enforce the restriction for real.
* Fix desugaring of refined types with "&"-parent.Martin Odersky2015-03-181-9/+10
| | | | need to generate more than one parent class.
* Merge pull request #361 from dotty-staging/fix/testLiftedDmitry Petrashko2015-03-182-4/+13
|\ | | | | Fix to testLifted
| * Fix to testLiftedMartin Odersky2015-02-112-4/+13
| | | | | | | | | | If the original type does not have the right type parameters, look in the baseclasses. Previously this was done only if the original type did not have any type parameters.
* | Merge pull request #404 from dotty-staging/backend-mergeDmitry Petrashko2015-03-1814-82/+211
|\ \ | | | | | | Fixes to erasure, backend, flatten, restorescopes,
| * | Disable dotc_ast. It fails randomlyDmitry Petrashko2015-03-181-1/+2
| | |
| * | Fix printing errors in ClassfileParser.Dmitry Petrashko2015-03-181-1/+1
| | |
| * | Update tests to show current errors revealed by backend.Dmitry Petrashko2015-03-181-26/+37
| | |
| * | Fix backend not emitting fields.Dmitry Petrashko2015-03-181-1/+3
| | |
| * | Remove workaround for #348.Dmitry Petrashko2015-03-181-4/+1
| | |
| * | Handle inner classes in RestoreScopesMartin Odersky2015-03-181-1/+5
| | | | | | | | | | | | | | | They need to be entered into their enclosing package scope, because flatten lifted them out to the toplevel.
| * | Enabled genBCode for `doc_parsing`. Proceeding with `dotc_tranform`.Dmitry Petrashko2015-03-181-8/+9
| | |
| * | Fix isCoDefinedWith to also work with non-existing symbolsDmitry Petrashko2015-03-181-1/+3
| | | | | | | | | | | | | | | Fixes tests when either symbol or companion object don't actually exist and one goes from non-existing one to an existing one.
| * | ClassfileParser.innerClasses - fix error message.Dmitry Petrashko2015-03-181-1/+1
| | |
| * | Fix TreeMap transforming ValDef children twiceDmitry Petrashko2015-03-181-1/+1
| | |
| * | Add comment in Typer.typedReturnDmitry Petrashko2015-03-181-2/+2
| | |