| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This pull request implements most of machinery needed for
https://github.com/scala/scala.github.com/pull/491
Only 3-rd check is not implemented by this commit.
I propose to get this in faster to fix #1149
|
|\
| |
| | |
Initial infrastructure and hello world for the Scala.js back-end.
|
| |
| |
| |
| |
| |
| | |
This required the ability to instantiate a different `Platform`
depending on settings, which, in turn, required to defer the
initialization of `ContextBase.platform`.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a concrete val is mixed in from a Scala2 trait, a setter is
generated, which is called by the `$init$` method. Since the
assignment in this setter is not done in the constructor, it is
nonsensical for the field to be immutable.
This commit sets the Mutable flag on such fields. It only applies
for vals coming from Scala2 traits. vals coming from Dotty traits
are kept immutable.
|
| |
| |
| |
| |
| | |
Dotty treats trait and class constructors as returning the class.
But scalac uses Unit for the return type of trait init methods.
|
|\ \
| | |
| | | |
Rename AllFlags to AnyFlags
|
| |/
| |
| |
| |
| |
| | |
`membersBasedOnFlags(requiredFlags = AnyFlags, excludedFlags = ...)` is
easier to understand than
`membersBasedOnFlags(requiredFlags = AllFlags, excludedFlags = ...)`
|
|\ \
| | |
| | | |
Change isCompanionNeeded
|
| | |
| | |
| | |
| | | |
Brings time to compile stdlib down from 185s to 44s.
|
| | |
| | |
| | |
| | |
| | | |
Print a phase after it has run, together with the time
it needs. Useful to locate performance problems in transforms.
|
|\ \ \
| |_|/
|/| | |
Special case pattern matching against abstract types with class tags
|
| | |
| | |
| | |
| | | |
We do not want to do implicit search during tree checking.
|
| | |
| | |
| | |
| | | |
Add special case when pattern matching against an abstract type that comes with a class tag
|
| | |
| | |
| | |
| | |
| | | |
Goal: Make implementation easier to understand. Prepare the ground for
special-casing of typetagged patterns.
|
| | | |
|
| | |
| | |
| | |
| | | |
Now subsumed by functionality in Typer.
|
| | |
| | |
| | |
| | |
| | | |
Make use of Definitions as the repository for
standard symbols in Predef.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Context bounds did not make it before into secondary
constructors. Now the evidence parameters generated
by context bounds get copied into secondary constructors.
Without this fix, scala.collection.immutable.PagedSeq fails
to compile in new classtag scheme.
|
| | |
| | |
| | |
| | |
| | | |
If a classtag for `T` is available, a classtag
for `Array[T]` can also be generated.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Now diagnoses missing ClassTags of abstract types
as implicit failures.
Also: Simpler API of tpd.clsOf.
|
| |/
|/|
| |
| | |
By filtering excluded flags earlier, we avoid forcing some denotations.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| | |
Previously, getMessage() always returned `null`, causing NPEs
when trying to report a FatalError.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fix blocker bug reported in #1114
I dislike this fix as now phase needs to know in advance
if it will ever need a companion for the class.
On the bright side, this change makes it clear
which phases need companions
|
|\ \
| | |
| | | |
Value classes: add support for private[this] parameter
|
| | | |
|
|\ \ \
| | | |
| | | | |
PatMat: remove one more trace of doing several steps at a time
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | | |
When creating subPatRefs the consider returned type of accessor,
not the type of binder.
Fixes #1114
|
| | | |
|
|/ /
| |
| |
| |
| |
| | |
Default getters should have same accessibility as the method they belong to.
Previously, it was the accessibility of the parameter, which makes no sense.
Fixes #1116.
|
|\ \
| | |
| | | |
Keep named arguments during eta expansion
|
| | |
| | |
| | |
| | | |
Fixes #1096.
|
|\ \ \
| | | |
| | | | |
Fix #997
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Also: include a test that private aliases are transparent.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
First version. Fixes #997.
|
| | | | |
|
| | |/
| |/|
| | |
| | | |
Previously, some definitions were too public, others too private.
|
|\ \ \
| |/ /
|/| | |
Change is volatile 2
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Addendum to change-isVolatile. Changes did not make it in
by accident before that branch was merged.
|