| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Thanks @smarter!
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Fancy console reporter and the string interpolator for highlighting now
obey the color setting - this means that the next step towards unifying
the reporters is to make sure the tests work with
`FancyConsoleReporter` under the `-color:never` flag.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This makes existsing uses of inline mostly compile.
Todo: Verify that stdlib can be compiled.
Todo: Implement accessors for assignments to priavte variables
Todo: Figure out what to do with accesses to private types.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Inlined operations are: Stats.track and all variants
of Reporter.traceIndented.
|
|
|
|
|
| |
Error messages now print the inlined positions as well
as the position of the inlined call, recursively.
|
|
|
|
| |
And remove the not used Printer#echo
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We introduce a new entry point for the compiler in
`dotty.tools.dotc.Driver`:
```
def process(args: Array[String], simple: interfaces.SimpleReporter,
callback: interfaces.CompilerCallback): interfaces.ReporterResult
```
Except for `args` which is just an array, the argument types and return
type of this method are Java interfaces defined in a new package called
`dotty-interfaces` which has a stable ABI. This means that you can
programmatically run a compiler with a custom reporter and callbacks
without having to recompile it against every version of dotty: you only
need to have `dotty-interfaces` present at compile-time and call the
`process` method using Java reflection.
See `test/test/InterfaceEntryPointTest.scala` for a concrete example.
This design is based on discussions with the IntelliJ IDEA Scala plugin
team. Thanks to Nikolay Tropin for the discussions and his PR
proposal (see #1011).
|
|
|
|
|
|
|
| |
- Rename Diagnostic#msg to message, this is nicer for a public API
- Rename SourceFile#lineContents and SourcePosition#lineContents
to lineContent, the former is not grammatically correct.
- Add some convenience methods to SourcePosition.
|
|
|
|
|
|
|
|
|
|
| |
This is now handled by a separate trait HideNonSensicalMessages that can
be mixed in, similar to UniqueMessagePositions. This way we'll be able
to reuse this functionality for other kind of Reporters.
This also means that we don't need `doReport` to return a Boolean
anymore, so we change it to return a Unit as it did before
065a0026924f722e9844c8e314180bb4cebca236
|
|
|
|
|
|
| |
Break it out from Reporter and eliminate all dependencies
to Context. This is done so that Diagnostics can be part
of a public and minimal compiler API.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
They're not very useful for end users and some tests like
tests/neg/selfreq.scala always print these exceptions which makes it
harder to read the test logs,
Also use Thread.dumpStack() instead of creating an Exception and calling
printStackTrace() on it.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
I noted a slowdown of about 25% (66sec -> 81sec) when compiling dotty even
after the subtype optimization (before it was 117sec).
I tracked it down to the traceIndented fix which avoided questions to be evaluated
twice. But it also caused the question to be evaluated
Making the val lazy fixed the problem.
|
|
|
|
|
|
|
| |
While trying to debug #943 I noticed that the exception output from
traceIndented was interspersed with unrelated logging output, this
happened because `question` in traceIndented is by-name and was
evaluated both before executing an operation and afterwards.
|
|
|
|
| |
Flag them as "migration warning" rather than just "warning".
|