aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix copy-paste errorMartin Odersky2016-04-031-2/+2
|
* Docs and polishing for denotation insertionsMartin Odersky2016-04-031-10/+26
| | | | | | Better organization and documentation for the way a symbol's denotations are kept in a ring. This came out of a failed attempt to optimize by adding a `prevInRun` field.
* Merge pull request #1172 from dotty-staging/compiler-docsodersky2016-04-0130-79/+74
|\ | | | | First of a series of compiler design documents
| * Better documentation of main classesMartin Odersky2016-04-015-3/+12
| |
| * Document phasesMartin Odersky2016-04-013-50/+52
| | | | | | | | Give a one-line explanation what each phase does in Compiler.
| * Move Mode to coreMartin Odersky2016-04-0124-26/+10
| | | | | | | | | | Mode is used from a lot of low-level code, does not just reflect Typer info. So it makes more sense top to place it in the core package.
* | Temporarilly enable printing of original failure signature to debug failing ↵Martin Odersky2016-03-311-1/+1
|/ | | | builds
* Fix #854: Optimize matches on primitive constants as switches.Sébastien Doeraene2016-03-311-2/+133
| | | | | | | | This does not yet unable the checks that `@switch` verifies that the compiler was indeed able to perform the optimization. This implementation also does not support guards. A match with guards will never be optimized as a switch.
* FullParameterization: Fix indentation and a typo.Dmitry Petrashko2016-03-311-2/+2
|
* Fix #1089: Special-case local methodsDmitry Petrashko2016-03-311-16/+32
| | | | | | This is a simpler fix than the previous one. Local methods, cannot change `this` and do not need to go through FullParameterization.
* Tailrec: drop support for polymorphic recursion.Dmitry Petrashko2016-03-311-1/+3
| | | | | | | | | | If the method that recurses over a different type arguments, if this method is specialised, it would lead to method not being tail-rec anymore. Eg: def foo[@specialized A, @specialized B]: Unit = foo[B, A]
* FullParametrization: allow to have $this of ThisType.Dmitry Petrashko2016-03-312-15/+35
| | | | | | | | | TailRec methods remain members of enclosing class, it means that they can refer to methods that require this.type. It means that tailrec, unlike value classes is not allowed to widen type of $this to it's full self type. Fixes #1089
* Merge pull request #1182 from dotty-staging/repl-fixesodersky2016-03-317-62/+55
|\ | | | | Repl fixes and tests
| * Move all overridable bits into Config classMartin Odersky2016-03-182-40/+46
| | | | | | | | | | | | Central config class replaces mixture of parameters and fields. The fields were in part in the wrong class, where they could not easily be overridden.
| * Get rid of prompt in DriverMartin Odersky2016-03-182-2/+1
| | | | | | | | It's used only in Resident, where it should be defined.
| * Get rid of indentCodeMartin Odersky2016-03-181-16/+2
| | | | | | | | | | It messed up parsing of multi-line strings and did not seem to have a purpose. Error messages print fine without it.
| * Fix handling of imports in REPL.Martin Odersky2016-03-181-2/+2
| | | | | | | | | | They printed as raw trees which confused the REPL when wrapping subsequent liens with them.
| * Initialize context in REPLMartin Odersky2016-03-183-2/+4
| | | | | | | | | | | | | | | | 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.
* | Merge pull request #1104 from dotty-staging/spec-bugsDmitry Petrashko2016-03-244-8/+23
|\ \ | | | | | | Improvements & bugs that were discovered while implementing specialization.
| * | Mixin: create less forwarders.Dmitry Petrashko2016-03-151-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | There were two sources of inefficiency in previous scheme: - if symbol was no overriding anything the forwarder was still being created - the class that is will have the forwarder was not considered. Many methods do not require forwarders as JVM will dispatch correctly.
| * | Change name of DropEmptyCompanions from dropEmpty to dropEmptyCompanionsDmitry Petrashko2016-03-151-1/+1
| | | | | | | | | | | | | | | dropEmpty is not as clear, as it does not indicate what it drops. Additionally makes phaseName by in sync with class name.
| * | Memoize: perform required tree adaptation in setter.Dmitry Petrashko2016-03-151-2/+7
| | | | | | | | | | | | Otherwise can create trees that do not pas Ycheck.
| * | Erasure: no need to bridge paramaccessors.Dmitry Petrashko2016-03-151-1/+1
| | | | | | | | | | | | Just like normal accessors.
* | | Merge pull request #1180 from niktrop/dotc-settings-formatDmitry Petrashko2016-03-221-4/+6
|\ \ \ | | | | | | | | dotc settings: String options after settings with colon shouldn't be ignored
| * | | String options with choices should be followed by colon and argument without ↵Nikolay.Tropin2016-03-181-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #1184 from liufengyun/error-posodersky2016-03-222-2/+6
|\ \ \ \ | | | | | | | | | | better positioning of `_*` not last argument error
| * | | | better positioning of `_*` not last argument errorliu fengyun2016-03-182-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | The error should be at the beginning of the underscore `_`, not the next token after the star `*`, which is the default.
* | | | | Fix problem involving classtag based pattern matches.Martin Odersky2016-03-211-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewriting did not go far enough, as evidenced by pos/i1174.scala Fixes #1174
* | | | | support `xs @ _*` and `_*` in Scala2 modeliu fengyun2016-03-181-5/+34
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The standard syntax in Dotty now is `xs : _*`. In Scala2 mode, following code should be valid: list match { case List(_, _, _, _ @ _*) => 0 case List(_, _, _*) => 1 case List(_, _: _*) => 2 case Nil => 3 }
* | | / Upgrade to Scala.js 0.6.8.Sébastien Doeraene2016-03-181-17/+4
| |_|/ |/| | | | | | | | | | | | | | This allows to remove the ugly workaround for default methods. There is also a slight adaptation for the new way to encode a reference to the JS global scope in the IR.
* | | Merge pull request #1166 from dotty-staging/fix-#1136odersky2016-03-1817-57/+76
|\ \ \ | | | | | | | | Fix typing of SeqLiterals
| * | | Add second field to SeqLiteralMartin Odersky2016-03-1016-55/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | Nothing is not nullableMartin Odersky2016-03-101-1/+1
| | | |
| * | | More info when resolveOverloading failsMartin Odersky2016-03-101-1/+1
| | | |
* | | | Merge pull request #1160 from dotty-staging/add/collection-strawmanodersky2016-03-183-2/+554
|\ \ \ \ | | | | | | | | | | Add/collection strawman
| * | | | Refine pretypeArgsMartin Odersky2016-03-091-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | It worked more or less by accident before. Now it's more complicated, but we also have tests.
| * | | | Pretype functional arguments when doing overload resolutionMartin Odersky2016-03-092-2/+47
| | | | |
| * | | | New collection strawmanMartin Odersky2016-03-091-0/+486
| | | | | | | | | | | | | | | | | | | | Centered around views instead of iterators.
* | | | | Merge pull request #1148 from sjrd/scalajs-gen-exprsodersky2016-03-1811-90/+1502
|\ \ \ \ \ | | | | | | | | | | | | Implement most of the Scala.js IR code generator.
| * | | | | More documentation for some Scala.js-specific methods.Sébastien Doeraene2016-03-163-4/+33
| | | | | |
| * | | | | Cache the Phases we need in JSCodeGen like all other phases.Sébastien Doeraene2016-03-162-8/+7
| | | | | |
| * | | | | Implement most of use-site JavaScript interop.Sébastien Doeraene2016-03-102-16/+437
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notable things that are not yet implemented: * JS exports * Scala.js-defined JS classes.
| * | | | | Implement most of the Scala.js IR code generator.Sébastien Doeraene2016-03-107-75/+1030
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notable things that are missing at this point: * Pattern matching * Try * Most of the JavaScript interop
| * | | | | Move the logic of ExpandSAMs.isJvmSam to Platform.isSam.Sébastien Doeraene2016-03-073-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | Merge pull request #1154 from dotty-staging/add-rewriteodersky2016-03-1817-83/+327
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | First steps towards rewriting from Scala2 in dotty
| * | | | | Address reviewer comments.Martin Odersky2016-03-148-40/+46
| | | | | |
| * | | | | Fix two rewrite patches.Martin Odersky2016-03-122-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | Fix patch for constructors with procedure syntaxMartin Odersky2016-03-121-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A constructor def this() { ... } needs to be rewritten to def this() = { ... } not to def this(): Unit = { ... }
| * | | | | Add patch for variance errorsMartin Odersky2016-03-121-7/+10
| | | | | |
| * | | | | Fix assert in RewritesMartin Odersky2016-03-121-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `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.