aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/config
Commit message (Collapse)AuthorAgeFilesLines
* Complete better structure to diagnostic messagesFelix Mulder2016-10-101-1/+1
|
* Add initial structure for improved explanations of error messagesFelix Mulder2016-10-101-0/+1
|
* Merge pull request #1492 from dotty-staging/add-inlineGuillaume Martres2016-10-062-1/+3
|\ | | | | Implement inline
| * Make inline a keywordMartin Odersky2016-10-021-1/+0
| | | | | | | | | | | | | | `inline` is now a modifier keyword. To keep disruption tolerable, we still allow `@inline` as an annotation as well. Other uses of `inline` are supported only under `-language:Scala2` and are rewritten to identifiers in backticks.
| * Suppress inlining printingMartin Odersky2016-10-021-1/+1
| |
| * Make inline annotation @scala.inline.Martin Odersky2016-10-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop @dotty.annotation.inline. This will inline all @inline marked methods in Scala for which a body is known (i.e. that are either compiled in the same run or have Tasty trees available). Option -Yno-inline suppresses inlining. This is needed for the moment because some @inline methods access private members or members that are otherwise inaccessible at the call-site. Also fixes some problems in Inliner - make sure type arguments to inline calls re fully defined - don't forget recursive calls in typeMap - don't forget positions in treeMap - drop dead code dealing with outer.
| * First version of inline schemeMartin Odersky2016-10-022-0/+2
| | | | | | | | | | To be done: outer accessors To be done: error positions
* | Merge pull request #1494 from martijnhoekstra/wintestsFelix Mulder2016-10-061-0/+2
|\ \ | |/ |/| [WIP] fix encoding issues
| * honor -encoding compiler flag and defaultsMartijn Hoekstra2016-09-071-0/+2
| | | | | | | | | | | | | | | | | | rename test/pos/valueclasses to pos_valueclasses tests/pos/valueclasses generates a valueclasses.flags file in /tests/partest-generated/pos that conflicts with the valueClasses.flags file that tests/neg/valueClasses.scala tries to create
* | Make positions fit for metaMartin Odersky2016-09-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+0
|/ | | | And remove the not used Printer#echo
* implementation of exhaustivity and redundancy checkliu fengyun2016-08-241-0/+1
|
* Implement working docs requiring manually specifying resources and template ↵Felix Mulder2016-08-191-4/+10
| | | | for html docs
* Add setting for output dirFelix Mulder2016-08-191-0/+7
|
* Add test for checking if Array has documentation after compiling std libFelix Mulder2016-08-191-0/+1
|
* Add recursive CLI args, move other doc argsFelix Mulder2016-08-191-0/+50
|
* Add the scaladoc CLI args that make sense for dottydocFelix Mulder2016-08-191-2/+2
|
* Add module member lookupFelix Mulder2016-08-191-1/+1
|
* Port cooking of strings from NSCFelix Mulder2016-08-191-1/+1
|
* New string infterpolatorsMartin Odersky2016-08-161-2/+2
| | | | | | Roll `sm` and `i` into one interpolator (also called `i`) Evolve `d` to `em` interpolator (for error messages) New interpolator `ex` with more explanations, replaces disambiguation.
* Fixes #1316: Remove JLineKazuyoshi Kato2016-07-271-1/+0
| | | | | Dotty uses ammonite.terminal since April (53bd25f) which replaces JLine. There is no reason to keep it anymore.
* Tweaks to printingMartin Odersky2016-07-211-1/+1
| | | | | - increase page width - print scopes more legibly under -verbose
* Make -Xprint-diff an opt-in option.Nicolas Stucki2016-07-201-1/+2
| | | | | | * -Xprint:[...] alone prints the trees without diffs. * -Xprint-diff enables the diff on -Xprint. * -Xprint-diff-del enables the diff with deletes on -Xprint.
* HK reduction: Remove special-case for typerefsGuillaume Martres2016-07-181-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The special case: case stripped: TypeRef => stripped.symbol.is(BaseTypeArg) is wrong because you might still want to reduce applications involving TypeRefs which are not base class parameters, like in: class Foo[A] type Alias[X] = Foo[X] val x: Alias[Int] = ??? `Alias` is a TypeRef so before this commit `Alias[Int]` was never reduced to `Foo[Int]`. It should have been: case stripped: TypeRef if stripped.symbol.is(BaseTypeArg) => true But even this is incorrect: it assumes that we can always safely reduce HK applications involving base class parameters, this is not the case when the parameter kind is different from the rhs kind as illustrated by `i1181c.scala`. We fix this by simply dropping the special case.
* Merge pull request #1345 from dotty-staging/improve-XprintDmitry Petrashko2016-07-171-0/+1
|\ | | | | Improve Xprint
| * Fix #1312: Improve XprintNicolas Stucki2016-07-151-0/+1
| | | | | | | | | | | | | | * Do not reprint a tree that has not changed. * Highlight changes with yellow and insertions in green. * -Xprint-diff-del: Inserts the deleted parts of the tree in red and the parts that where changed in magenta.
* | Merge pull request #1334 from dotty-jvican/implement-no-predef-no-importDmitry Petrashko2016-07-151-1/+1
|\ \ | |/ |/| Implement -Yno-predef and -Yno-imports
| * Implement -Yno-predef and -Yno-importsjvican2016-06-291-1/+1
| | | | | | | | | | | | * Implement flags -Yno-predef and -Yno-imports * Add unit tests for both
* | Fix bounds checking of hk applied typedMartin Odersky2016-07-141-3/+2
| | | | | | | | | | Previous logic could only handle classes as constructors. Also, address other reviewers comments.
* | Make rewritings of hk applications configurableMartin Odersky2016-07-131-0/+7
| | | | | | | | | | | | | | | | | | Beta-reduce only if `Config.simplifyApplications` is true. Turning off beta-reduction revealed two problems which are also fixed in this commit: 1. Bad treatement of higher-kinded argyments in cyclicity checking 2. Wrong variance for higher-kinded arguments in TypeAccumulator
* | Drop Config.checkKindsMartin Odersky2016-07-111-7/+0
| | | | | | | | | | Allows us to drop also the involved knownHK method. Lots of other cleanups.
* | Cleanup of Signature matchingMartin Odersky2016-07-111-3/+3
| | | | | | | | | | Eliminate sameParams, add comments. Also, minor cleanups elsewhere.
* | Remove refinement encoding of hk typesMartin Odersky2016-07-111-2/+0
| | | | | | | | | | | | | | | | | | | | Remove the code that implemented the encoding of hk types using refinements. Drop the notion that RefinedTypes can be type parameters. This is no longer true under the new representation. Also, refactoring MemberBinding -> TypeParamInfo
* | Drop assertion in TypeMapMartin Odersky2016-07-111-3/+5
| | | | | | | | | | | | | | The deleted assertion could fail for code that was erroneous. - Enable new hk scheme.
* | Start new, direct HK schemeMartin Odersky2016-07-111-0/+2
| | | | | | | | | | - Re-introduce newHK option. Label some things that will be removed with OLD.
* | Remove old hk schemeMartin Odersky2016-07-111-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | - Simplify RefinedType - Drop recursive definition of RefinedThis - this is now taken over by RecType. - Drop RefinedThis. - Simplify typeParams The logic avoiding forcing is no longer needed. - Remove unused code and out of date comments.
* | Optionally, check kinds match for & and |Martin Odersky2016-07-111-0/+5
| | | | | | | | Optionally, check kinds of operands of & and | match.
* | Turn on new hk schemeMartin Odersky2016-07-111-1/+1
| | | | | | | | | | | | | | For the moment under newHK flag. - avoid crasher in derivedTypeParams (NamedTypes don't always have symbols) - Revise logic in type comparer for new HK scheme
* | New type lambda scheme for hk typesMartin Odersky2016-07-111-0/+2
| |
* | Remove print option from ScalaSettingsEdmund Noble2016-07-061-1/+0
|/
* Merge pull request #1251 from felixmulder/topic/fix-stdoutredirect-replFelix Mulder2016-06-011-0/+1
|\ | | | | Fix stdout redirect for REPL's println
| * Disable "auto" alternative in `-color` flagFelix Mulder2016-06-011-1/+1
| |
| * Use ChoiceSetting for coloringFelix Mulder2016-05-121-1/+1
| |
| * Add CLI option to disable REPL syntax highlightingFelix Mulder2016-05-121-0/+1
| |
* | Add sbt incremental compilation supportGuillaume Martres2016-05-281-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To test this with sbt, see https://github.com/lampepfl/dotty/wiki/Using-Dotty-with-sbt The following flags are added: - -Yforce-sbt-phases: Run the phases used by sbt for incremental compilation (ExtractDependencies and ExtractAPI) even if the compiler is ran outside of sbt, for debugging. - -Ydump-sbt-inc: For every compiled foo.scala, output the API representation and dependencies used for sbt incremental compilation in foo.inc, implies -Yforce-sbt-phases. This commit introduces two new phases which do not transform trees: - `ExtractDependencies` which extracts the dependency information of the current compilation unit and sends it to sbt via callbacks - `ExtractAPI` which creates a representation of the API of the current compilation unit and sends it to sbt via callbacks Briefly, when a file changes sbt will recompile it, if its API has changed (determined by what `ExtractAPI` sent) then sbt will determine which reverse-dependencies (determined by what `ExtractDependencies` sent) of the API have to be recompiled depending on what changed. See http://www.scala-sbt.org/0.13/docs/Understanding-Recompilation.html for more information on how sbt incremental compilation works. This phase was originally based on https://github.com/adriaanm/scala/tree/sbt-api-consolidate/src/compiler/scala/tools/sbt which attempts to integrate the sbt phases into scalac (and is itself based on https://github.com/sbt/sbt/tree/0.13/compile/interface/src/main/scala/xsbt), but it has been heavily refactored and adapted to Dotty. The main functional differences are: - ExtractDependencies runs right after Frontend (so that we don't lose dependency informations because of the simplifications done by PostTyper), but ExtractAPI runs right after PostTyper (so that SuperAccessors are part of the API). - `ExtractAPI` only extract types as they are defined and never "as seen from" some some specific prefix, see its documentation for more details. - `ExtractDependenciesTraverser` and `ExtractUsedNames` have been fused into one tree traversal in `ExtractDependenciesCollector`. TODO: Try to run these phases in parallel with the rest of the compiler pipeline since they're independent (except for the sbt callbacks in `GenBCode`) ?
* Rename Reporting#println -> Reporting#echoMartin Odersky2016-04-271-4/+4
| | | | | | | | | | 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.
* Add commandline argument `-Ykeep-comments` to remove hardcodingFelix Mulder2016-04-071-0/+1
|
* Add binding between Symbol and Untyped tree in base contextFelix Mulder2016-04-071-0/+1
| | | | This commit also adds a printer for use by dottydoc.
* Merge pull request #1180 from niktrop/dotc-settings-formatDmitry Petrashko2016-03-221-4/+6
|\ | | | | dotc settings: String options after settings with colon shouldn't be ignored
| * String options with choices should be followed by colon and argument without ↵Nikolay.Tropin2016-03-181-4/+6
| | | | | | | | | | | | whitespace Format of some of the compiler settings was incompatible with scalac. For example "-target:jvm-1.8" is a valid argument for scalac, but it should be "-target: jvm-1.8" (with a whitespace) for dotc.