aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/backend
Commit message (Collapse)AuthorAgeFilesLines
* Fix #2184: Hyper Bootstrap! Integrate the backend as a git submoduleGuillaume Martres2017-04-132-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Lazy entering of names with internal $'s in package scopesMartin Odersky2017-04-111-1/+1
| | | | | | | | | | | | | | | | 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.
* Cleanups of NameOpsMartin Odersky2017-04-111-2/+2
| | | | Remove unused functionality
* Fix dropModule logicMartin Odersky2017-04-111-1/+1
|
* Revise qualified namesMartin Odersky2017-04-111-2/+1
| | | | | 1. Fix problem in fullNameSeparated 2. Revise expandedName operations
* Fix inner class name table emission with semantic namesGuillaume Martres2017-04-111-1/+2
| | | | | | | | | | | | | | | | 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.
* Get rid of ExpandedName flagMartin Odersky2017-04-111-1/+1
|
* Disentangle Names from SeqsMartin Odersky2017-04-111-2/+2
| | | | | | | | | 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.
* Harmonize paramTypes and paramBoundsMartin Odersky2017-04-061-1/+1
| | | | | | MethodTypes have paramTypes whereas PolyTypes have paramBounds. We now harmonize by alling both paramInfos, and parameterizing types that will become common to both.
* Merge pull request #2025 from dotty-staging/fix-2024Nicolas Stucki2017-04-051-7/+15
|\ | | | | Fix #2024: TypeApply can be a final apply of a recursive method.
| * Add support for `-XemitTasty`.Dmitry Petrashko2017-03-081-7/+15
| | | | | | | | It saves tasty output near the class file output to a *.tasty-file.
* | Construct MethodTypes from parameter closureMartin Odersky2017-03-142-7/+6
| | | | | | | | | | To allow for dependencies between method type parameters, construct MethodTypes from a closure that maps the currently constructed MethodType to its parameter types.
* | Remove unused scala.reflect importsGuillaume Martres2017-03-072-2/+0
|/
* Fix codeblocks in shortened markdownFelix Mulder2017-01-311-21/+24
|
* Partially fix Java interop for emitted inner classesGuillaume Martres2017-01-111-1/+4
| | | | | | | | | | | 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.
* Merge pull request #1775 from dotty-staging/add-implicit-funtypesodersky2016-12-181-2/+4
|\ | | | | Add implicit function types
| * Create implicit closures to math expected implicit functionsMartin Odersky2016-12-171-2/+4
| | | | | | | | | | When the expected type is an implicit function, create an implicit closure to match it.
* | Make errors are not swept under the carpetMartin Odersky2016-12-172-3/+3
|/ | | | | | | | | 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.
* Merge pull request #1763 from dotty-staging/fix/annotationsDmitry Petrashko2016-12-161-13/+10
|\ | | | | Fix emission of annotations
| * Fix visibility of annotationsGuillaume Martres2016-11-301-11/+9
| | | | | | | | | | | | `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`
| * Fix annotations never being emittedGuillaume Martres2016-11-301-2/+1
| |
* | Drop explicit types for local implicit valsMartin Odersky2016-12-121-1/+1
| | | | | | | | | | Drop explicit types for local implicit vals of type Context and Position. Exercises the functionality and shortens the code.
* | Drop limit 30 of generated function classesMartin Odersky2016-11-291-1/+1
|/ | | | | Function classes beyond 22 are now generated on demand, with no upper limit.
* Move compiler and compiler tests to compiler dirFelix Mulder2016-11-226-0/+2342