| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Express them in terms PolyTypeTrees rather than having an
irregular, untyped only tparams field. This is necessary
if we want to pickle type trees instead of types, because
now the rhs of a typedef tells the whole story, so we are not
required any longer to use the info of the symbol.
|
|
|
|
|
| |
Mode is used from a lot of low-level code, does not just reflect Typer info.
So it makes more sense top to place it in the core package.
|
|
|
|
|
|
|
| |
The field keeps track of the element type. This is necessary
because JavaSeqLiteral is nonvariant and the elements might
be empty, so we cannot always compute the type from the
element types.
|
|
|
|
|
|
| |
withMode sets the whole mode, nit an individual bits. This was used
wrongly in several places. Make this less of a trap by renaming
withMode -> withModeBits.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Typed MemberDef trees now take the modifiers from their symbol's data.
|
|
|
|
|
|
|
|
| |
1) Add copiers with default arguments, to avoid boilerplate
2) All copiers are now curried wrt first argument (which is
the original tree).
We already make use of the new features in cpy.DefDef, but not yet elsewhere.
|
|
|
|
|
|
|
| |
This makes naming uniform between trees and types, and also avoids the clash with
transform.TreeTransformer. The idea is that transformers are parts of phases, and
have logic that is phase-specific. In particular, a context is passed around when
transforming a tree. Maps are simpler, they only have a T -> T apply method.
|
|
|
|
| |
Changed format of UnApply nodes to also take implicit parameters. See doc comment in class Trees.UnApply
|
|
|
|
|
|
| |
1) Trees are now contravariant.
2) All creation ops, transformers, copiers are pushed into Instance.
3) Still to do: integrate TreeMappers and tpd.TreeTransformers.
|
|
|
|
| |
SeqLiterals no longer have an elemtpt subtree. Their type is now no longer a RepeatedParamType, but instead an instance of SeqType or ArrayType.
|
|
|
|
|
|
|
| |
- Pushed mode into context
- Elimintaed scope nesting level
- Fixed a desugar bug
- Added constant folding
|
|
|
|
| |
Replaces desugar.Mode. Is now a value class representing a set.
|
|
|
|
| |
ClassDefs are now TypeDefs that have a Template as rhs.
|
|
|
|
|
|
| |
Typed TypeDefs no longer carry tparams. Untyped ones still do, but there is a special PolyTypeDef node for them in untpd.
Also, fixed flatten and DeSugarTest to deal with new tree desugarings which are not idempotent (e.g. desugar.classDef, or desugar.valDef).
|
|
|
|
|
| |
Also, changing the maps in Namer. More commenting needs to be done. Pushing now to get off this machine and
back to the new one, which just came back form repair.
|
|
|