| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
This commit also adds a printer for use by dottydoc.
|
|\
| |
| | |
dotc settings: String options after settings with colon shouldn't be ignored
|
| |
| |
| |
| |
| |
| | |
whitespace
Format of some of the compiler settings was incompatible with scalac. For example "-target:jvm-1.8" is a valid argument for scalac, but it should be "-target: jvm-1.8" (with a whitespace) for dotc.
|
|\ \
| | |
| | | |
Implement most of the Scala.js IR code generator.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | | |
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`.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Prune constraints that could turn into cycles
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
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
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This prevents propagation changes leading to long
recompiles when a printer is changed.
|
|
|
|
| |
Track starts and ends of completions using indentation.
|
|
|
|
|
|
| |
TypeRef becomes Type, thus removing duplicates. Where
...Type was used in an extraction (e.g. ArrayType(...),
FunctionType(...)), we now use ...Of.
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
With the new approach to matching it is no longer sound.
We always have to match infos anyway to be sure.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out that asSeenFrom can produce types
that get projected with $apply but that are not
higher-kinded. An exampple failure is in Iter3,
andother in scala.collection.immutable.Map (which is
now part of the test suite).
We now detect that situation, and eta expand the
projected type in `derivedSelect`, this will
force a subssequent `lookupRefined` which will give
the desired normalized type.
Also added is a configurable test that checks that
$apply projected tyeps are in fact higher-kinded.
|
|
|
|
|
| |
Also, some code movements in Names to make it more obvious that mutating operations
are only called from synchronized blocks.
|
|
|
|
|
|
|
| |
Add @sharable annotation for classes and vals that are presumed
to be safely sharable between threads.
Also: Document CtxLazy.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
- Make parts more reusable
- Introduce hook "sourcesRequired" that controls whether
no sources on the command line give a help message.
|
| |
|
|
|
|
|
|
|
| |
Checking that constraints are closed caused cyclic reference exceptions in
DottyBackedInterface. What's worrying is that these were seemingly not checked
by the checkin tests. Or maybe there is some dependcy on compilation order that triggers
the erros only in my setup.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were two instances where a constraint undergoing a replace would still refer
to poly params that are no longer bound after the replace.
1. In an ordering the replaced parameters was n ot removed from the bounds of the others.
2. When a parameter refers to the replaced parameter in a type, (not a TypeBounds), the
replaced parameter was not replaced.
We now have checking in place that in globally committable typer states, TypeVars are not instantiated
to PolyParams and (configurable) that constraints of such typer states are always closed.
Fixes #670.
|
|
|
|
|
|
|
| |
We want to establish the invariant (optionally checked by assertNoSkolems)
that symbols do not contain skolemized types as their info. This avoids unsoundness situations
where a skolem gets exported as part if the result type of a method, so different instantiations
look like their are the same instance.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds IterableSelfRec.scala which caused lockup of the compiler.
After a lot of work the problem was determined to be polyomial or
exponential behavior of the compiler when executing findMember
on refined types that contain several bindings where the
resutling & causes a recursive invokation of findMember with
the same name. We do have a stop for this now, but if the
stop comes too late the runtime will grow very fast.
Problem addressed by kiccking in earlier with the stopping logic.
|
|
|
|
|
| |
More refular that way. Also, change some raw printlns in low-level
code to reporter.printlns in order to harden them against prints over prints.
|
|
|
|
| |
It's a more logical home for them than the Context object.
|
|
|
|
|
| |
I scanned the main sources with IntellIJ's spell checker and
corrected what showed up.
|
| |
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
The previous one caused a spurious error - I had compiled the config classes
into the config directory, resulting in a dotty directory in config. My mistake,
not the previous import list's. Still the new imports are much cleaner.
|