| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
It's used only in Resident, where it should be defined.
|
|
|
|
|
| |
It messed up parsing of multi-line strings and did not
seem to have a purpose. Error messages print fine without it.
|
|
|
|
|
| |
They printed as raw trees which confused the REPL
when wrapping subsequent liens with them.
|
|
|
|
|
|
|
|
| |
This broke under the recent introduction of the JS backend, because now
the context needs to be initialized before the platform can be selected.
So invoking `doti` immediately gave an IllegalStateException.
No big deal to fix, but it shows how sorely we are lacking REPL tests.
|
|\
| |
| | |
Fix typing of SeqLiterals
|
| |
| |
| |
| |
| |
| |
| | |
The field keeps track of the element type. This is necessary
because JavaSeqLiteral is nonvariant and the elements might
be empty, so we cannot always compute the type from the
element types.
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Add/collection strawman
|
| | |
| | |
| | |
| | |
| | | |
It worked more or less by accident before. Now it's more complicated,
but we also have tests.
|
| | | |
|
| | |
| | |
| | |
| | | |
Centered around views instead of iterators.
|
|\ \ \
| | | |
| | | | |
Implement most of the Scala.js IR code generator.
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Notable things that are not yet implemented:
* JS exports
* Scala.js-defined JS classes.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Notable things that are missing at this point:
* Pattern matching
* Try
* Most of the JavaScript interop
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
|\ \ \ \
| | | | |
| | | | | |
First steps towards rewriting from Scala2 in dotty
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
1. trailing `_`:
`x _` is rewritten to `(() => x)` not to `x`
2. lazy vals:
Rewrites are done in Typer, not LazyVals. Later on we are too much at risk to
hit synthetically generated lazy vals.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
A constructor
def this() { ... }
needs to be rewritten to
def this() = { ... }
not to
def this(): Unit = { ... }
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
`Iterator.sliding(2, 1)` returns a one-element result if the original iterator
contains only one element, which makes it unpleasant to use for our task. Replaced
by a fold.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Gave overlapping positions in the case of longer lists of children.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Scala2 allows `x _` even if `x` is not a method.
Dotty disallows them. The patch removes the ` _`
in these cases.
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Revert this commit once #1149 is fixed.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Selectors should be defs, not lazy vals.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Imports are missing afterwards.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Map typed to corresponding untyped trees.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
make token declarations consistent
|
| | | | | | |
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Pickle/unpickle SuperAccessor names
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Needed to restore the SuperAccessor flag in separate compilation.
Fixes #1144.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Tweaks to ExplicitOuter and TreeTypeMap
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Two changes:
1. Replace changeOwer with changeOwnerAfter for code
that moves into the $initial methods in Mixin. This is needed because
otherwise subsequent transforms gets confused wrt new vs old owners.
`i1131.scala` exhibits the problem.
2. Drop `transformSym` changed the owner of tenplate-local symbols
to be the primary constructor. But that is done anyway with a "changeOwnerAfter"
in `intoConstr`. So it is redundant and actually gets in the way with
a `changeOwnerAfter` in `Mixin`. The faulty scenario is this:
1. The SymTransformer of Constructor is run on a constructor-local definition.
The owner of that definition is set to <init> after phase Constructors.
2. The body of the definition is transformed in Mixin. The owner is set
to the initializer method, but only for the interval between Mixin
and Constructors.
Changing to changeOwner in Mixin avoided that problem by duplicating the symbol but
it runs into other problems.
Fortunately, the solution is much simpler than the status quo: Two changeOwnerAfter calls
and no SymTransformer.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
When recursing in a template body, need to update the
context's owner, so that `ref` can work correctly.
|
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | | |
In a New we need to decide based on the prefix of the type of object created.
|