aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/FrontEnd.scala
Commit message (Collapse)AuthorAgeFilesLines
* Check that (most) positions are non-overlapping.Martin Odersky2016-09-241-1/+2
| | | | | | | | | | | | | Check that children of a node have non-overlapping positions and that positions of successive children are monotonically increasing. This holds currently except for 3 exceptions: - Trees coming from Java as the Java parser also does desugarings which copy trees. - Functions coming from wildcard expressions - Interpolated strings We'll see whether we can do something about the latter two.
* Make positions fit for metaMartin Odersky2016-09-241-0/+2
| | | | | | | | | | | | | | | | | | In particular: - get rid of envelope, it's too complicated and hides too many errors - check that everywhere in parsed trees the position range of a parent node contains the position ranges of its children. - check that all non-empty trees coming from parser have positions. The commit contains lots of fixes to make these checks pass. In particular, it changes the scheme how definitions are positioned. Previously the position of a definition was the token range of the name defined by it. That does obviously not work with the parent/children invariant. Now, the position is the whole definition range, with the point at the defined name (care is taken to not count backticks). Namer is changed to still use the token range of defined name as the position of the symbol.
* Clean up config.Printers importsOlivier Blanvillain2016-09-231-1/+1
| | | | And remove the not used Printer#echo
* Fix value classes not being documentedFelix Mulder2016-08-191-1/+1
|
* Rename Reporting#println -> Reporting#echoMartin Odersky2016-04-271-1/+1
| | | | | | | | | | There's a trap otherwise that, when in a class inheriting from Context (and with it Reporting) a call to println will go to this.println and therefore might not print at all, if the current context buffers messages. I lost a lot of time on this on several occasions when I scratched my head why a simple debug println would not show. Better avoid this in the future for myself and others.
* Don't try to transform sources of primitive value classes after FrontEnd.Martin Odersky2015-11-091-1/+14
|
* Merge pull request #889 from dotty-staging/fix-#877odersky2015-11-051-1/+3
|\ | | | | Fix #877
| * Make a new fresh name creator for each unitMartin Odersky2015-10-301-1/+3
| | | | | | | | Needed to make builds deterministic.
* | Allow -Xprint:parser option to print parse treesMartin Odersky2015-11-011-1/+2
|/ | | | | | | `parser` is strictly speaking not a phase, but it makes sense to allow parsed trees being printed. Before this was only possible if the `typr` printer was enabled, but this was cumbersome, non-intuitive, and did too much.
* Merge pull request #691 from vsalvis/vsalvis-partest-outputDmitry Petrashko2015-06-261-1/+1
|\ | | | | Partest output redirection over context.reporter
| * Partest 2/3: Compiler prints via context instead of printlnvsalvis2015-06-241-1/+1
| |
* | Skolemize unstable prefixes in asSeenFromMartin Odersky2015-06-061-0/+1
|/ | | | | | | | | | | Skolemize unstable prefixes in asSeenFrom provided - the prefix appears at least once in non-variant or contra-variant position - we are in phase typer. After typer, we have already established soundness, so there's no need to do skolemization again. We can simply do the (otherwise unsound) substitution from this-type to prefix.
* Correct a large number of typos.Jason Zaugg2015-05-141-1/+1
| | | | | I scanned the main sources with IntellIJ's spell checker and corrected what showed up.
* Drop Java compilation units after TyperMartin Odersky2015-04-131-1/+1
| | | | | | Java compilation units should not be retained after typer, as no code will be generated for them. All we need from them are their symbols.
* Ensure spaces after `if` in Dotty source.Dmitry Petrashko2015-04-091-1/+1
|
* Add spaces around + in dotty source.Dmitry Petrashko2015-04-091-3/+3
|
* Make all Dotty source files end in newline.Dmitry Petrashko2015-04-091-1/+1
|
* Replace Throwable catches with NonFatalMartin Odersky2014-12-151-1/+2
| | | | | | Previously, stackoverflows led to infinite loops because the catch immediately threw another stack overflow. Anyway, one should never catch Throwable.
* Initial implementation of Java scanner and parserOndrej Lhotak2014-11-221-1/+4
| | | | | | | | | | | | | Ported from scalac 2.11.x branch SHA 9753f23f9362b25a9f481b11dd8d51187187882a This is mostly a direct port, with few significant dotty-specific changes needed. The two more significant changes are: In dotty, the first constructor of a class is pulled out separately from the other stats in the Template. The keyword detection code (buildKeywordArray) was moved into Tokens so that it can more cleanly be shared by the Scala and Java scanners.
* Phase.runOn is now List[ComliplationUnit] => List[ComliplationUnit]Dmitry Petrashko2014-11-031-1/+2
| | | | Allows to alter number of compilation units.
* Rename in Phase: name -> phaseNameMartin Odersky2014-08-181-1/+1
| | | | | Most transformations are subclasses of phase. Having a generic name like `name` in scope everywhere is therefore very risky.
* Rename methods on FreshContext to make mutation obviousDmitry Petrashko2014-03-271-1/+1
| | | | And avoid name clashes
* More statistics for created and retained treesMartin Odersky2014-02-241-0/+5
|
* New subtype constraint maintenance algorithm.Martin Odersky2014-01-071-3/+11
| | | | | | | | | | Objective: Avoid cycles by detecting all cases where A <: B and B <: A and removing those cases by unifuing A and B. Cycles need to be avoided because they lead to deep subtype recursions.
* Output cleanupsMartin Odersky2014-01-041-3/+4
|
* Rename TyperPhase.scala -> FrontEnd.scalaMartin Odersky2013-12-211-0/+43