| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The backend lives in the scalac fork at
https://github.com/lampepfl/scala/tree/sharing-backend. Before this
commit, the scala-compiler built from this fork was a dependency of
Scala just to get this backend. This made it much more cumbersome to
test changes to the backend and also forced us to depend on Scala 2.11.5
since that is the version of scalac that the forked backend is based on.
This commit changes this by adding a git submodule in the
`scala-backend` directory that points to the scalac fork. We do not
compile the whole submodule, instead we add the subset of files we need
to the dotty-compiler project in the sbt build. See backend.md for more
information (online at
http://dotty.epfl.ch/docs/contributing/backend.html) once this commit is
merged.
The most important thing to note is that whenever you clone dotty you
should do `git clone --recursive` to also clone the submodule. If you
already have a cloned dotty you'll need to do:
git submodule update --init
You will need to repeat this command anytime you update dotty and the
backend has been updated, otherwise the content of `scala-backend` will
be stale.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Names with internal $'s are entered in package scopes only if
- we look for a name with internal $'s.
- we want to know all the members of a package scope
This optimization seems to be fairly effective. The typical range
of package scopes that need $-names is between 0 and 20%. The optimization
seems to improve execution time of all unit tests by about 3%.
Also. drop the inheritance from Iterable to Scope. The reason
is that we now need a context parameter for toList and
other Iterable operations which makes them impossible to
fit into the Iterable framework.
|
|
|
|
| |
Remove unused functionality
|
| |
|
|
|
|
|
| |
1. Fix problem in fullNameSeparated
2. Revise expandedName operations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The backend contains:
val outerName = innerClassSym.rawowner.javaBinaryName
// Java compatibility. See the big comment in BTypes that summarizes the InnerClass spec.
val outerNameModule = if (innerClassSym.rawowner.isTopLevelModuleClass) outerName.dropModule
Where `dropModule` is defined in the backend interface as:
def dropModule: Name = n.stripModuleClassSuffix
This will only work as expected if `javaBinaryName` returns a name with
proper semantic information, but before this commit we just used the
output of `fullNameSeparated` which contains no semantic information.
|
| |
|
|
|
|
|
|
|
|
|
| |
Structured names are not Seqs anymmore. But the Seq behavior
is required in many places that mangle names. As an intermediate step
we drop the Seq basetype but add Seq behavior through a decorator.
Most Seq operations only work on SimpleTermNames and their
TypeName analogue, will throw an exception wehn called on structured
names.
|
|
|
|
|
|
| |
MethodTypes have paramTypes whereas PolyTypes have paramBounds.
We now harmonize by alling both paramInfos, and parameterizing
types that will become common to both.
|
|\
| |
| | |
Fix #2024: TypeApply can be a final apply of a recursive method.
|
| |
| |
| |
| | |
It saves tasty output near the class file output to a *.tasty-file.
|
| |
| |
| |
| |
| | |
To allow for dependencies between method type parameters, construct MethodTypes
from a closure that maps the currently constructed MethodType to its parameter types.
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The backend uses `rawname` to define the "inner name" of an InnerClass
entry in a classfile, this should be the simple name of the class before
any mangling takes place.
Fixing this allows Java code to reference dotty inner classes, except if
they're defined in objects which is still broken until
https://github.com/DarkDimius/scala/pull/4 is merged and a new backend
is published.
|
|\
| |
| | |
Add implicit function types
|
| |
| |
| |
| |
| | |
When the expected type is an implicit function, create an
implicit closure to match it.
|
|/
|
|
|
|
|
|
|
| |
Typer#ensureReported's comment outlines an example where errors
could go unreported, resulting in error trees after typer without
any reported error messages. This commit makes sure that at least
one error is reported if a tree node has an error type.
Fixes #1802.
|
|\
| |
| | |
Fix emission of annotations
|
| |
| |
| |
| |
| |
| | |
`isRuntimeVisible` and `retentionPolicyOf` had two different ways to get
the retention policy of an annotation and they were both wrong.
Fix retentionPolicyOf` and use it in `isRuntimeVisible`
|
| | |
|
| |
| |
| |
| |
| | |
Drop explicit types for local implicit vals of type Context
and Position. Exercises the functionality and shortens the code.
|
|/
|
|
|
| |
Function classes beyond 22 are now generated on demand,
with no upper limit.
|
|
|