aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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 #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.
| * | | | Fix setChildPositionsMartin Odersky2016-03-121-1/+2
| | | | | | | | | | | | | | | | | | | | Gave overlapping positions in the case of longer lists of children.
| * | | | Patch redundant `_' suffixes.Martin Odersky2016-03-121-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scala2 allows `x _` even if `x` is not a method. Dotty disallows them. The patch removes the ` _` in these cases.
| * | | | More detailed diagnostic in NavigateASTMartin Odersky2016-03-121-1/+6
| | | | |
| * | | | Maintain source position in GettersMartin Odersky2016-03-121-2/+2
| | | | |
| * | | | Disable volatile interpretation of lazy vals under -language:Scala2Martin Odersky2016-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | Revert this commit once #1149 is fixed.
| * | | | Remove printlnMartin Odersky2016-03-121-3/+1
| | | | |
| * | | | Add @volatile when rewriting lazy vals from Scala2.Martin Odersky2016-03-121-2/+8
| | | | |
| * | | | Better error message when an outer path is not found.Martin Odersky2016-03-121-1/+6
| | | | |
| * | | | Copy full modifiers to companionsMartin Odersky2016-03-121-7/+6
| | | | |
| * | | | Fix desugaring of lazy patterns.Martin Odersky2016-03-121-8/+15
| | | | | | | | | | | | | | | | | | | | Selectors should be defs, not lazy vals.
| * | | | Untangle withAnnotation naming.Martin Odersky2016-03-122-4/+8
| | | | |
| * | | | Test language features always in phase typer.Martin Odersky2016-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | Imports are missing afterwards.
| * | | | Add functionality to navigate ASTsMartin Odersky2016-03-122-32/+115
| | | | | | | | | | | | | | | | | | | | Map typed to corresponding untyped trees.
| * | | | Better encapsulationMartin Odersky2016-03-126-93/+101
| | | | | | | | | | | | | | | | | | | | | | | | | No more leaking ofMove PatchedFiles in a settings option. Move all patch classes into a `Rewrites` object.
| * | | | Avoid setupMethod in DriverMartin Odersky2016-03-124-20/+18
| | | | | | | | | | | | | | | | | | | | | | | | | Driver should not know that patch functionality exists. Instead, introduce settings that can introduce their own stateful values.
| * | | | Add patching functionality for migrationMartin Odersky2016-03-126-3/+108
| | | | | | | | | | | | | | | | | | | | | | | | | Firs version of patching that can be invoked by dotty compiler itself.
* | | | | Merge pull request #1178 from liufengyun/tokens-fixDmitry Petrashko2016-03-151-2/+2
|\ \ \ \ \ | | | | | | | | | | | | make token declarations consistent
| * | | | | make token declarations consistentliu fengyun2016-03-141-2/+2
| | | | | |
* | | | | | Merge pull request #1165 from dotty-staging/fix-#1144Dmitry Petrashko2016-03-152-8/+23
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Pickle/unpickle SuperAccessor names
| * | | | | Delete unused lineMartin Odersky2016-03-121-1/+0
| | | | | |
| * | | | | Pickle/unpickle SuperAccessor namesMartin Odersky2016-03-102-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Needed to restore the SuperAccessor flag in separate compilation. Fixes #1144.
* | | | | | Merge pull request #1168 from dotty-staging/fix-#1131Dmitry Petrashko2016-03-144-33/+29
|\ \ \ \ \ \ | | | | | | | | | | | | | | Tweaks to ExplicitOuter and TreeTypeMap
| * | | | | | Drop debug printlnMartin Odersky2016-03-121-1/+0
| | | | | | |
| * | | | | | Changes to owners in Mixin and ConstructorsMartin Odersky2016-03-122-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two changes: 1. Replace changeOwer with changeOwnerAfter for code that moves into the $initial methods in Mixin. This is needed because otherwise subsequent transforms gets confused wrt new vs old owners. `i1131.scala` exhibits the problem. 2. Drop `transformSym` changed the owner of tenplate-local symbols to be the primary constructor. But that is done anyway with a "changeOwnerAfter" in `intoConstr`. So it is redundant and actually gets in the way with a `changeOwnerAfter` in `Mixin`. The faulty scenario is this: 1. The SymTransformer of Constructor is run on a constructor-local definition. The owner of that definition is set to <init> after phase Constructors. 2. The body of the definition is transformed in Mixin. The owner is set to the initializer method, but only for the interval between Mixin and Constructors. Changing to changeOwner in Mixin avoided that problem by duplicating the symbol but it runs into other problems. Fortunately, the solution is much simpler than the status quo: Two changeOwnerAfter calls and no SymTransformer.
| * | | | | | Refinement to TreeTypeMapMartin Odersky2016-03-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When recursing in a template body, need to update the context's owner, so that `ref` can work correctly.
| * | | | | | Refinements to referencesOuterMartin Odersky2016-03-121-17/+24
| | |/ / / / | |/| | | | | | | | | | | | | | | | In a New we need to decide based on the prefix of the type of object created.