| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Will be used also for unpickling of positions.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Caused several small changes to Tasty format.
|
|
|
|
| |
Tasty files now always carry a random UUID.
|
|
|
|
|
|
| |
- will be needed for position deltas
- also simplify format in that negative constants
are no longer needed.
|
|
|
|
| |
Aim: re-use from Unpickler.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
... so that this can be re-used in the tree unpickler.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Bump version to 0.03. Harmonize doc comment and Google doc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Need to always follow TypeVariables, otherwise we will
not detect orphan parameters of uninstantiated type variables.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Otherwise it is not static, and pickling the symbol leads astray.
|
|
|
|
| |
These are now represented as BIND nodes in pickled types.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
They are an irregularity and don't buy us much. Might as well pickle these numbers as Nats/Longs.
|
|
|
|
| |
Their trees make no sense; can't be pickled.
|
|
|
|
|
|
| |
So far printing is the only reader, ie. deserializer.
Numerous bugfixes to make first tests work.
|
| |
|
| |
|
|
|
|
|
| |
Doubles maximal number of phases from 32 to 64. Needed because adding the pickling phase
would push us over the edge of 32 phases.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
need to generate more than one parent class.
|
|\
| |
| | |
Fix to testLifted
|
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
Fixes to erasure, backend, flatten, restorescopes,
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
They need to be entered into their enclosing package scope, because
flatten lifted them out to the toplevel.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Fixes tests when either symbol or companion object don't actually exist and one goes
from non-existing one to an existing one.
|
| | | |
|
| | | |
|
| | | |
|