aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/config
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* | Merge pull request #1148 from sjrd/scalajs-gen-exprsodersky2016-03-183-0/+17
|\ \ | | | | | | Implement most of the Scala.js IR code generator.
| * | Implement most of the Scala.js IR code generator.Sébastien Doeraene2016-03-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Notable things that are missing at this point: * Pattern matching * Try * Most of the JavaScript interop
| * | Move the logic of ExpandSAMs.isJvmSam to Platform.isSam.Sébastien Doeraene2016-03-072-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whether a language SAM type is also a valid SAM type for the back-end is a platform-specific thing. On Scala.js, for example, the rules are completely different than for the JVM. This commit therefore moves the logic of the predicate used by ExpandSAMs to decide whether to expand a SAM as an anonymous class to the Platform.
* | | Merge pull request #1154 from dotty-staging/add-rewriteodersky2016-03-182-2/+12
|\ \ \ | |_|/ |/| | First steps towards rewriting from Scala2 in dotty
| * | Better encapsulationMartin Odersky2016-03-121-2/+2
| | | | | | | | | | | | | | | No more leaking ofMove PatchedFiles in a settings option. Move all patch classes into a `Rewrites` object.
| * | Avoid setupMethod in DriverMartin Odersky2016-03-122-3/+12
| | | | | | | | | | | | | | | Driver should not know that patch functionality exists. Instead, introduce settings that can introduce their own stateful values.
| * | Add patching functionality for migrationMartin Odersky2016-03-121-0/+1
| |/ | | | | | | | | Firs version of patching that can be invoked by dotty compiler itself.
* / make variable name consistent in ScalaSettingsliu fengyun2016-03-141-6/+6
|/ | | | Options with syntax "-Y" should NOT be named with a variable beginning with `X`.
* Store the JSDefinitions in a custom platform SJSPlatform.Sébastien Doeraene2016-03-011-0/+13
| | | | | | This required the ability to instantiate a different `Platform` depending on settings, which, in turn, required to defer the initialization of `ContextBase.platform`.
* Initial infrastructure and hello world for the Scala.js back-end.Sébastien Doeraene2016-03-011-0/+1
| | | | | | | | | | | | | | | | The Scala.js back-end can be enabled with the `-scalajs` command-line option. Currently, it adds one phase to the pipeline, which emits .sjsir files from trees. A sandbox project `sjsSandbox`, in `sandbox/scalajs/`, can be used to easily test Scala.js compilation. One can run the `main()` method of the `hello.world` object with > sjsSandbox/run The back-end only contains the bare mimimum to compile the hello world application in the sandbox. Anything else will blow up (for example, primitive method calls). It is a work-in-progress.
* Remove interpreterSettings logicMartin Odersky2016-02-171-1/+1
| | | | | | Seems to be overkill for the current interpreter. The only thing that was needed was a configrable linewidth. A plain setting works fine for this and is in line with the way things are done elsewhere.
* Merge pull request #1058 from dotty-staging/fix-#864-v2Guillaume Martres2016-02-091-4/+5
|\ | | | | Prune constraints that could turn into cycles
| * Fix documentation of Config.checkConstraintsSeparatedGuillaume Martres2016-02-081-4/+4
| |
| * Fix docs and namingMartin Odersky2016-02-051-4/+5
| |
* | Do not use the plain printer with -YdebugGuillaume Martres2016-02-061-0/+1
| | | | | | | | | | | | Instead, a new setting called -Yplain-printer is used for this. After this commit, we can now run all tests with -Ydebug (this was not the case before because using the plain printer breaks -Ytest-pickler)
* | Do not store context creation trace with -YdebugGuillaume Martres2016-02-061-0/+1
|/ | | | | This makes the compiler extremely slow. To store the trace, you now need to pass -Ytrace-context-creation
* Don't force symbol denotation when taking fingerprint.Martin Odersky2016-01-191-1/+1
|
* Change name of setting: -YshowVarBounds -> -Yshow-var-boundsMartin Odersky2015-12-211-1/+1
|
* Optionally rewrite projections.Martin Odersky2015-12-151-0/+9
|
* Print bounds of TypeVars only when option is enabled.Martin Odersky2015-12-151-0/+1
|
* Fully type annotate PrintersMartin Odersky2015-12-061-9/+9
| | | | | This prevents propagation changes leading to long recompiles when a printer is changed.
* Better diagnosis from completions printerMartin Odersky2015-11-091-1/+1
| | | | Track starts and ends of completions using indentation.
* Renamings in DefinitionsMartin Odersky2015-11-091-4/+2
| | | | | | TypeRef becomes Type, thus removing duplicates. Where ...Type was used in an extraction (e.g. ArrayType(...), FunctionType(...)), we now use ...Of.
* Add migration warningsMartin Odersky2015-11-051-0/+1
| | | | | The idea is that whenever Dotty detects a migration problem under -language:Scala2, it should issue a migration warning, so we know what needs to be rewritten.
* Eliminate Config.newMatch optionMartin Odersky2015-09-291-6/+0
| | | | | With the new approach to matching it is no longer sound. We always have to match infos anyway to be sure.
* Eta expand $apply projected types if neededMartin Odersky2015-09-211-0/+5
| | | | | | | | | | | | | | | | It turns out that asSeenFrom can produce types that get projected with $apply but that are not higher-kinded. An exampple failure is in Iter3, andother in scala.collection.immutable.Map (which is now part of the test suite). We now detect that situation, and eta expand the projected type in `derivedSelect`, this will force a subssequent `lookupRefined` which will give the desired normalized type. Also added is a configurable test that checks that $apply projected tyeps are in fact higher-kinded.
* More @sharable annotationsMartin Odersky2015-07-061-2/+2
| | | | | Also, some code movements in Names to make it more obvious that mutating operations are only called from synchronized blocks.
* Add @sharable annotationMartin Odersky2015-07-062-4/+5
| | | | | | | Add @sharable annotation for classes and vals that are presumed to be safely sharable between threads. Also: Document CtxLazy.
* Add reentrancy checkingMartin Odersky2015-07-061-0/+1
| | | | | | | | | | New miniphase CheckRentrant verifies that compiled program is without vars accessible through global roots if -Ycheck-reentrant option is set. Known shortcoming: Array elements are currently not considered as vars. This is because in many programs arrays are used as an efficient container for immutable fields.
* Refactor DriverMartin Odersky2015-06-291-3/+2
| | | | | | - Make parts more reusable - Introduce hook "sourcesRequired" that controls whether no sources on the command line give a help message.
* Remove -resident settingMartin Odersky2015-06-291-1/+0
|
* Disable checkConstraintClosed by defaultMartin Odersky2015-06-261-2/+10
| | | | | | | Checking that constraints are closed caused cyclic reference exceptions in DottyBackedInterface. What's worrying is that these were seemingly not checked by the checkin tests. Or maybe there is some dependcy on compilation order that triggers the erros only in my setup.
* Avoid junk produced by Constraint#replace.Martin Odersky2015-06-221-0/+3
| | | | | | | | | | | | | | There were two instances where a constraint undergoing a replace would still refer to poly params that are no longer bound after the replace. 1. In an ordering the replaced parameters was n ot removed from the bounds of the others. 2. When a parameter refers to the replaced parameter in a type, (not a TypeBounds), the replaced parameter was not replaced. We now have checking in place that in globally committable typer states, TypeVars are not instantiated to PolyParams and (configurable) that constraints of such typer states are always closed. Fixes #670.
* Deskolemize types inferred for vals and defsMartin Odersky2015-06-061-0/+5
| | | | | | | We want to establish the invariant (optionally checked by assertNoSkolems) that symbols do not contain skolemized types as their info. This avoids unsoundness situations where a skolem gets exported as part if the result type of a method, so different instantiations look like their are the same instance.
* Calibrate findMember logging thresholds and test caseMartin Odersky2015-05-211-3/+11
| | | | | | | | | | | | Adds IterableSelfRec.scala which caused lockup of the compiler. After a lot of work the problem was determined to be polyomial or exponential behavior of the compiler when executing findMember on refined types that contain several bindings where the resutling & causes a recursive invokation of findMember with the same name. We do have a stop for this now, but if the stop comes too late the runtime will grow very fast. Problem addressed by kiccking in earlier with the stopping logic.
* Rename Reporter#echo -> printlnMartin Odersky2015-05-211-4/+4
| | | | | More refular that way. Also, change some raw printlns in low-level code to reporter.printlns in order to harden them against prints over prints.
* Move threshold values to ConfigMartin Odersky2015-05-211-0/+19
| | | | It's a more logical home for them than the Context object.
* Correct a large number of typos.Jason Zaugg2015-05-141-2/+2
| | | | | I scanned the main sources with IntellIJ's spell checker and corrected what showed up.
* Allow disabling value classes entirely from command line.Dmitry Petrashko2015-05-051-0/+1
|
* Honor -Yno-imports flagMartin Odersky2015-05-041-1/+1
| | | | If the flag is set, no root imports are added.
* Add spaces around + in dotty source.Dmitry Petrashko2015-04-091-1/+1
|
* Remove trailing spaces in Dotty source.Dmitry Petrashko2015-04-091-6/+6
|
* Make all Dotty source files end in newline.Dmitry Petrashko2015-04-094-4/+4
|
* Rename -YnoDoubleBindings to -Yno-double-bindingsMartin Odersky2015-04-091-1/+1
| | | | | | | This aligns with the "-" instead of CamelCase convention for the other command line options. Also, enable -Yno-double-bindings for dotc_core.
* Cleanup of import list in JavaPlatformMartin Odersky2015-04-071-3/+2
| | | | | | The previous one caused a spurious error - I had compiled the config classes into the config directory, resulting in a dotty directory in config. My mistake, not the previous import list's. Still the new imports are much cleaner.