aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Added functionality to deal with function applications.Martin Odersky2013-07-1125-588/+1509
| | | | | | | | | | | | | - Added Applications class to represent applications - Added Constraint class to represent type constraints - Added TyperState class to represent typer state - Added Diagnostic class to buffer errors and warnings - Added Inferencing class that contains some common functionality for type inferencing (this one's still rudimentary). - Added extractor for FunctionType in Definitions - Added desugaring of default parameters to default getters in Desugar - Added flags to deal with default parameters - Added substitutions that replace bound parameters
* Adding TypeVars and adapting constrints accordingly.Martin Odersky2013-06-292-82/+102
| | | | | A TypeVar is essentially a container whose contents can be "flipped" from a PolyParam to an instantiated type. Adding TypeVars avoids subtitutions of large trees and all their types which would otherwise be necessary when a type parameter is instantiated at some point.
* Added logic for typing selections.Martin Odersky2013-06-221-2/+71
| | | | … and got started with typing applications.
* Added logic for constraint solving.Martin Odersky2013-06-223-19/+113
| | | | Re-organized constraints and type comparers and added methods that will be needed for type inference.
* More utility methods in type: subst(BoundType, Type) and occursIn.Martin Odersky2013-06-221-0/+8
|
* Added a mapValues method to SimpleMapMartin Odersky2013-06-221-0/+14
|
* Flehsed out constraints, with more efficient maps.Martin Odersky2013-06-223-12/+205
|
* Being a bit more conservative with creating new TypeBoundsMartin Odersky2013-06-221-5/+7
|
* Added accessibility checks to typedIdentMartin Odersky2013-06-202-15/+40
|
* Changed symbol selection for |Martin Odersky2013-06-191-4/+14
| | | | We now pick a common superclass symbol even if it is not accessible. Accessible ones take precedence over non-accessible ones. The reason for doing this is better error diagnostics.
* Removed the comparison with previous behavior for &.Martin Odersky2013-06-191-75/+9
|
* made ClassInfo#typeConstructor work more directly.Martin Odersky2013-06-191-3/+10
| | | | Replaced asSeenFrom by a direct copy of the underlying denotation, and added a cache for the result.
* Taking accessibility into account for &, |Martin Odersky2013-06-196-31/+115
| | | | | | Changed the algorithm for & (and also |) to take accessibility into account. Fixed various problems that opened up when doing this. Under -debug, new and old behavior of & are checked side-by-side and any discrepancy is noted.
* Distribute & into TypeTypes.Martin Odersky2013-06-181-2/+28
| | | | &, | on two TypeTypes yielded AndTypes and OrTypes, which is wrong. We now turn any ClassInfoTypes into TypeBounds and distribute the operator into the bounds, creating a TypeBounds type.
* Added typedIdent method.Martin Odersky2013-06-188-16/+228
| | | | Also some refactorings that were caused by adding this method.
* Added typer.ModeMartin Odersky2013-06-173-12/+27
| | | | Replaces desugar.Mode. Is now a value class representing a set.
* Removed ClassDef as a Tree node class.Martin Odersky2013-06-159-64/+54
| | | | ClassDefs are now TypeDefs that have a Template as rhs.
* Forward-ported Jason's fix to setting privateWIthin from Java classfiles.Martin Odersky2013-06-151-0/+1
|
* Dropping type parameters from typed TypeDefs.Martin Odersky2013-06-139-53/+80
| | | | | | 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).
* Removed dead code.Martin Odersky2013-06-121-2/+0
| | | | Parameterized are never PolyTypes anymore, so do not need to test for this.
* Made type parameters left leaning for AndTypes.Martin Odersky2013-06-122-38/+60
| | | | | | | | What did not work before: type F[T] = G[X] & Runnable We now make this work by interpreting type parameters of the RHS to be the type parameters of G[X].
* Made pos a total method on Symbols, returns NoSymbol if undefined.Martin Odersky2013-06-121-3/+3
|
* Integrated new treatment of higher-kinded types with Unpickler.Martin Odersky2013-06-077-160/+69
| | | | Could drop quite a bit of code in the process.
* Added support for eliminating type parameters from TypeDefs.Martin Odersky2013-06-073-6/+168
| | | | | | | (1) New scheme for higher-kinded types that deals also with F-bounds. (2) Type parameters in type aliases are eliminated in most cases by expressing as unparameterized aliases of some refinement type. We will issue an error where this is not possible.
* Added `pos` meethod to symbols.Martin Odersky2013-06-071-0/+5
|
* Namer redesign.Martin Odersky2013-06-067-161/+225
| | | | A new design that relies on DefDef local maps, instead of global maps before.
* Changed meaning of typeParamsMartin Odersky2013-06-061-7/+15
| | | | | | | Type parameters are now counted only if they are not refined. I.e. previously given class Map[K, V], K and V would be type parameters of Map { K = Int }, but now only V would be. Also, added a new kind of name filter that gets all type members.
* wip - partial redesign of namer/typerMartin Odersky2013-06-053-186/+187
|
* Refactoring: breaking out desugaring into its own object.Martin Odersky2013-06-0413-684/+680
| | | | | 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.
* Refactorings: ModDefTree renamed to MemberDef and removed EmptyFlags ↵Martin Odersky2013-06-035-17/+17
| | | | | | | comparisons. EmptyFlags comparisons were eliminated and replaced bu .isEmpty tests. The problem this solves is that more than one flag value can represent an empty flag set.
* More solid design of Namer with some Typer bits added.Martin Odersky2013-06-0311-87/+454
|
* wip, because I have to get off this machine.Martin Odersky2013-05-3013-98/+241
|
* wip namer.Martin Odersky2013-05-289-22/+191
|
* TempTrees -> ThicketMartin Odersky2013-05-273-131/+67
| | | | Dropped Thicket as a Seq. Plus some other smallish changes.
* Making use of specialized TempTrees constructors.Martin Odersky2013-05-252-2/+2
|
* Making EmptyTree a special case of TempTreesMartin Odersky2013-05-257-67/+65
|
* Made TempTrees array-backed.Martin Odersky2013-05-253-25/+97
| | | | This is a first step towards going from List[Tree] to an array-backed solution with special cases for small numbers.
* Improvements to printing trees.Martin Odersky2013-05-242-40/+47
|
* Improvements to desugaringMartin Odersky2013-05-243-40/+207
| | | | | (1) Reorganization of Typed/Untyped trees. Untyped trees now have their own copier, transformer and accumulators. (2) Better treatment of functions
* Parser tweaks to handling new and templates.Martin Odersky2013-05-242-15/+39
|
* NameTransformer.encode now goes from names to names.Martin Odersky2013-05-244-16/+16
| | | | Also, special treatment of <init>, which is not encoded.
* More tweaks to desugaringMartin Odersky2013-05-234-46/+92
| | | | | | (1) Made desugaring reaching a fixed point. (2) Systematic encoding of names. (3) Introduced Closure nodes which represent anonymous functions
* Moved TempTrees to Trees, get automatically flattened in transforms.Martin Odersky2013-05-233-32/+33
|
* Eliminating Trees.TypedTree and Trees.UntypedTreeMartin Odersky2013-05-224-31/+32
| | | | | Replaced by tpd.Tree and untpd.Tree. Also some cleanups in RefinedPrinters.
* Made tpd/untpd toplevel objects.Martin Odersky2013-05-2218-711/+706
| | | | Moved all other elements of TypedTrees and UntypedTrees into tpd and untpd.
* More tree refactorings.Martin Odersky2013-05-2221-779/+781
| | | | | | | 1) Getting rid of ugen in favor of untpd. 2) Eliminating some unused methods 3) Splitting out CheckTrees from TypedTrees. 4) Moving trees and related classes into separate package dotc.ast
* Added desugaring.Martin Odersky2013-05-2211-88/+506
| | | | With various other small changes.
* Fix to typechecking of Try nodes.Martin Odersky2013-05-171-7/+4
|
* Refactored Printing architecture.Martin Odersky2013-05-1720-567/+906
| | | | | Split printers into several files. Added refined printing of trees. Changed Showable and generalized printing under a precedence.
* Some fixes to parsers.Martin Odersky2013-05-171-7/+11
|