| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
`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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
To be done: outer accessors
To be done: error positions
|
| |
|
|
|
|
| |
for html docs
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Dotty uses ammonite.terminal since April (53bd25f) which replaces JLine.
There is no reason to keep it anymore.
|
|
|
|
|
| |
- increase page width
- print scopes more legibly under -verbose
|
|
|
|
|
|
| |
* -Xprint:[...] alone prints the trees without diffs.
* -Xprint-diff enables the diff on -Xprint.
* -Xprint-diff-del enables the diff with deletes on -Xprint.
|
|\
| |
| | |
Improve Xprint
|
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
|\ \
| |/
|/| |
Implement -Yno-predef and -Yno-imports
|
| |
| |
| |
| |
| |
| | |
* Implement flags -Yno-predef and -Yno-imports
* Add unit tests for both
|
|/ |
|
|\
| |
| | |
Fix stdout redirect for REPL's println
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`) ?
|
| |
|
|\
| |
| | |
First steps towards rewriting from Scala2 in dotty
|
| |
| |
| |
| |
| | |
No more leaking ofMove PatchedFiles in a settings option. Move all
patch classes into a `Rewrites` object.
|
| |
| |
| |
| |
| | |
Driver should not know that patch functionality exists. Instead, introduce settings
that can introduce their own stateful values.
|
| |
| |
| |
| |
| | |
Firs version of patching that can be invoked by dotty compiler
itself.
|
|/
|
|
| |
Options with syntax "-Y" should NOT be named with a variable beginning with `X`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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)
|
|
|
|
|
| |
This makes the compiler extremely slow. To store the trace, you now need
to pass -Ytrace-context-creation
|
| |
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
If the flag is set, no root imports are added.
|
| |
|
|
|
|
|
|
|
| |
This aligns with the "-" instead of CamelCase convention for
the other command line options.
Also, enable -Yno-double-bindings for dotc_core.
|
|
|
|
| |
New option -Ytest-pickler compares trees before and after pickling.
|
|
|
|
|
|
|
|
|
|
|
| |
Add -strict option to do some type checks that are encessary to ensure type soundness, but
are stricter than what Scala 2.x enforces.
The first such test is the "pattern cannot be uniquely instantiated" problem where we reject a
non-variant case subclass of a covariant superclass in a pattern match. The error is now only
issued in -struct mode, otherwise it will be a warning.
We might move more tests into the same category. This should help the transition.
|
|
|
|
|
|
|
|
| |
New constraint handling scheme using constraints that distinguish more between
parameter and non-parameter bounds and which track parameter bounds separately.
This allows a co-inductive formulation of satisfiability checking without fishy
cyclicity checks. It should also scale better for long chains of dependent type
variables.
|
| |
|
| |
|