| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Options with syntax "-Y" should NOT be named with a variable beginning with `X`.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Have checkNotPrivate skip over private aliases.
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
CheckNotPrivate now avoids private aliases, so that types sat prepresentable in
transformation phases.
This does not solve the problem that private classes or abstract types might leak coming
from Scala 2, but there is not really a good cure for that. We can reject them outright or
allow them under language:Scala2 and hope for the best.
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Make sure lazy accessors in traits are not private.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Not needed in the end for this patch, but anyway a good idea.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
When ensureNotPrivate changes the status of a formerly private declaration,
assert that the reference to the declaration is in the same compilation unit,
as otherwise the nehavior would be different under separate compilation.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Initializer was needlessly complex and did not work anymore
for lazy vals (for them, we implicitly made use of the fact that
the initializer would find the symbol itself. But after name
mangling that logic would break down.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
... when definitions are missing.
|
| |/ / / /
| | | | |
| | | | |
| | | | | |
Fixes #1140. Review by @DarkDimius or @smarter.
|
| |_|_|/
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Before this commit, Hashable#addDelta did not work correctly when the
input hash was the special value NotCached, instead of returning
NotCached, it returned NotCached + delta. This means that many different
values ended up being cached with the same hash when they should not be
cached at all, this is especially bad since our HashSet implementation
uses open addressing.
I noticed this bug while working on a phase to collect API information
for sbt (this phase needs to collect every member of a class, including
inherited members), after enabling it, the compileStdLib test took
~500 seconds to complete, this commit reduces this to ~100 seconds.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
There was a mssing condition which meant Tyepr thought it was
at the outermost scope where but was mistaken.
Fixes #1145
|
| | | |
|
|\ \ \
| |_|/
|/| | |
Fix for separate compilation with value class issue (#1137)
|
| | |
| | |
| | |
| | | |
object - #1137)
|
|\ \ \
| | | |
| | | | |
Implement @static sip.
|
| | | |
| | | |
| | | |
| | | | |
as asked in https://github.com/lampepfl/dotty/pull/1155/files#r55355664
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Implemented by checking that tree is allowed to access the static member
and all the members on the path to it. Needed as typer has a tendency
to desugar calls into series of selections&calls to This.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |/
|/|
| |
| | |
Fixes #1052.
|
|\ \
| | |
| | | |
Do the implicit search shadowing check in the correct context
|
| | |
| | |
| | |
| | | |
We triggered this assert after the fix in the previous commit.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit fixes a very sneaky bug, the following code:
```
lazy val shadowing =
typed(untpd.Ident(ref.name) withPos pos.toSynthetic, funProto)
(nestedContext.addMode(Mode.ImplicitShadowing).setExploreTyperState)
```
is parsed by scalac as:
```
lazy val shadowing =
typed(untpd.Ident(ref.name) withPos pos.toSynthetic, funProto);
(nestedContext.addMode(Mode.ImplicitShadowing).setExploreTyperState);
```
So we don't actually use the nested context in `typed`, instead we end
up implicitly using `ctx`!
|
|\ \ \
| | | |
| | | | |
Fix #1146: Fix bug of ExpandSAMs with non-apply SAM methods.
|
| | |/
| |/|
| | |
| | |
| | |
| | | |
When expanding a SAM, ExpandSAMs always used the name `apply` for
the generated forwarder, instead of the name of the method which
is abstract in the SAM type. This commit fixes this issue.
|
|\ \ \
| |/ /
|/| | |
Change lambdalift - fasttrack
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
1. Make clearer what markFree is supposed to do and get
rid of `propagated` mode bit.
2. Harden copyParams so that we make sure corresponding
parameters and fields are copied.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Simplifications in order to avoid the freqent special
casing of constructors and prepare the way for
proper handling of trait constructors (which cause
problems; see pending/pos/llift.scala.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
If lambda lift needs to create an outer path from a constructor, the
path needs to start from the $outer parameter of the constructor, not
the this of the enclosing class, which is not yet available.
|
| | |
| | |
| | |
| | | |
Test will come in llift.scala.
|
|\ \ \
| | | |
| | | | |
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.
|