aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Implement @static sip.Dmitry Petrashko2016-03-077-2/+108
| | | | | | | | This pull request implements most of machinery needed for https://github.com/scala/scala.github.com/pull/491 Only 3-rd check is not implemented by this commit. I propose to get this in faster to fix #1149
* Merge pull request #1126 from sjrd/scalajsDmitry Petrashko2016-03-0414-10/+2022
|\ | | | | Initial infrastructure and hello world for the Scala.js back-end.
| * Store the JSDefinitions in a custom platform SJSPlatform.Sébastien Doeraene2016-03-015-20/+44
| | | | | | | | | | | | This required the ability to instantiate a different `Platform` depending on settings, which, in turn, required to defer the initialization of `ContextBase.platform`.
| * Initial infrastructure and hello world for the Scala.js back-end.Sébastien Doeraene2016-03-019-1/+1984
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Mark concrete vals mixed in from Scala2 traits as mutable.Sébastien Doeraene2016-03-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | When a concrete val is mixed in from a Scala2 trait, a setter is generated, which is called by the `$init$` method. Since the assignment in this setter is not done in the constructor, it is nonsensical for the field to be immutable. This commit sets the Mutable flag on such fields. It only applies for vals coming from Scala2 traits. vals coming from Dotty traits are kept immutable.
| * In LinkScala2ImplClass, disregard signatures when looking for constructor.Martin Odersky2016-03-011-4/+8
| | | | | | | | | | Dotty treats trait and class constructors as returning the class. But scalac uses Unit for the return type of trait init methods.
* | Merge pull request #1129 from dotty-staging/rename/AllFlagsodersky2016-03-032-2/+2
|\ \ | | | | | | Rename AllFlags to AnyFlags
| * | Rename AllFlags to AnyFlagsGuillaume Martres2016-03-012-2/+2
| |/ | | | | | | | | | | `membersBasedOnFlags(requiredFlags = AnyFlags, excludedFlags = ...)` is easier to understand than `membersBasedOnFlags(requiredFlags = AllFlags, excludedFlags = ...)`
* | Merge pull request #1139 from dotty-staging/change-needs-companionDmitry Petrashko2016-03-033-3/+4
|\ \ | | | | | | Change isCompanionNeeded
| * | Speed up LazyVals isCompanion neededMartin Odersky2016-03-032-2/+2
| | | | | | | | | | | | Brings time to compile stdlib down from 185s to 44s.
| * | Print phases with time they needMartin Odersky2016-03-031-1/+2
| | | | | | | | | | | | | | | Print a phase after it has run, together with the time it needs. Useful to locate performance problems in transforms.
* | | Merge pull request #1111 from dotty-staging/fix-#1099Dmitry Petrashko2016-03-0213-172/+146
|\ \ \ | |_|/ |/| | Special case pattern matching against abstract types with class tags
| * | Search for classtag only during typer.Martin Odersky2016-02-201-1/+1
| | | | | | | | | | | | We do not want to do implicit search during tree checking.
| * | Special case for pattern matching tagged abstract types.Martin Odersky2016-02-201-3/+18
| | | | | | | | | | | | Add special case when pattern matching against an abstract type that comes with a class tag
| * | Refactoring of typedTypedMartin Odersky2016-02-201-20/+28
| | | | | | | | | | | | | | | Goal: Make implementation easier to understand. Prepare the ground for special-casing of typetagged patterns.
| * | Check that classOf gets applied to class typesMartin Odersky2016-02-204-8/+14
| | |
| * | Remove ClassTags phase.Martin Odersky2016-02-201-68/+0
| | | | | | | | | | | | Now subsumed by functionality in Typer.
| * | Simplify ClassOf phaseMartin Odersky2016-02-202-8/+3
| | | | | | | | | | | | | | | Make use of Definitions as the repository for standard symbols in Predef.
| * | Fix desugaring of classes with context boundsMartin Odersky2016-02-201-14/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | Context bounds did not make it before into secondary constructors. Now the evidence parameters generated by context bounds get copied into secondary constructors. Without this fix, scala.collection.immutable.PagedSeq fails to compile in new classtag scheme.
| * | Fix search of Array classTags.Martin Odersky2016-02-201-3/+3
| | | | | | | | | | | | | | | If a classtag for `T` is available, a classtag for `Array[T]` can also be generated.
| * | Make type fully defined before searching for a ClassTag for itMartin Odersky2016-02-201-2/+3
| | |
| * | Synthesize classTags in Typer.Martin Odersky2016-02-208-54/+55
| | | | | | | | | | | | | | | | | | | | | Now diagnoses missing ClassTags of abstract types as implicit failures. Also: Simpler API of tpd.clsOf.
* | | Make Types#membersBasedOnFlags safer and fasterGuillaume Martres2016-02-291-1/+1
| |/ |/| | | | | By filtering excluded flags earlier, we avoid forcing some denotations.
* | Add a `dotty-interfaces` packageGuillaume Martres2016-02-288-63/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We introduce a new entry point for the compiler in `dotty.tools.dotc.Driver`: ``` def process(args: Array[String], simple: interfaces.SimpleReporter, callback: interfaces.CompilerCallback): interfaces.ReporterResult ``` Except for `args` which is just an array, the argument types and return type of this method are Java interfaces defined in a new package called `dotty-interfaces` which has a stable ABI. This means that you can programmatically run a compiler with a custom reporter and callbacks without having to recompile it against every version of dotty: you only need to have `dotty-interfaces` present at compile-time and call the `process` method using Java reflection. See `test/test/InterfaceEntryPointTest.scala` for a concrete example. This design is based on discussions with the IntelliJ IDEA Scala plugin team. Thanks to Nikolay Tropin for the discussions and his PR proposal (see #1011).
* | Small API changes in preparation for dotty-interfacesGuillaume Martres2016-02-255-17/+22
| | | | | | | | | | | | | | - Rename Diagnostic#msg to message, this is nicer for a public API - Rename SourceFile#lineContents and SourcePosition#lineContents to lineContent, the former is not grammatically correct. - Add some convenience methods to SourcePosition.
* | Remove dotty.tools.dotc.FatalError; use dotty.tools.FatalError instead.Sébastien Doeraene2016-02-241-3/+1
| |
* | Fix FatalError's constructor to forward `msg` to super.Sébastien Doeraene2016-02-241-1/+1
| | | | | | | | | | Previously, getMessage() always returned `null`, causing NPEs when trying to report a FatalError.
* | ConsoleReporter: handling of non-sensical messages is now reusableGuillaume Martres2016-02-235-27/+39
| | | | | | | | | | | | | | | | | | | | This is now handled by a separate trait HideNonSensicalMessages that can be mixed in, similar to UniqueMessagePositions. This way we'll be able to reuse this functionality for other kind of Reporters. This also means that we don't need `doReport` to return a Boolean anymore, so we change it to return a Unit as it did before 065a0026924f722e9844c8e314180bb4cebca236
* | Refactor DiagnosticMartin Odersky2016-02-237-49/+56
| | | | | | | | | | | | Break it out from Reporter and eliminate all dependencies to Context. This is done so that Diagnostics can be part of a public and minimal compiler API.
* | Rename unused phases.Dmitry Petrashko2016-02-203-0/+0
| |
* | FirstTransform: simplify needsCompanion codeDmitry Petrashko2016-02-201-4/+6
| |
* | Do not create companions that will be dropped later.Dmitry Petrashko2016-02-205-6/+31
| | | | | | | | | | | | | | | | Fix blocker bug reported in #1114 I dislike this fix as now phase needs to know in advance if it will ever need a companion for the class. On the bright side, this change makes it clear which phases need companions
* | Merge pull request #1112 from dotty-staging/value-classes-private-this-paramDmitry Petrashko2016-02-202-4/+3
|\ \ | | | | | | Value classes: add support for private[this] parameter
| * | Add support for private[this] parameter in value classesVladimirNik2016-02-192-4/+3
| | |
* | | Merge pull request #1120 from dotty-staging/fix-1114-patmatodersky2016-02-201-1/+1
|\ \ \ | | | | | | | | PatMat: remove one more trace of doing several steps at a time
| * | | PatMat: remove one more trace of doing several steps at a timeDmitry Petrashko2016-02-201-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | When creating subPatRefs the consider returned type of accessor, not the type of binder. Fixes #1114
* | | Don't copy annotations from method to default getter.Martin Odersky2016-02-201-1/+1
| | |
* | | Default getters accessibility fixMartin Odersky2016-02-201-1/+1
|/ / | | | | | | | | | | Default getters should have same accessibility as the method they belong to. Previously, it was the accessibility of the parameter, which makes no sense. Fixes #1116.
* | Merge pull request #1102 from dotty-staging/fix-#1096odersky2016-02-191-6/+4
|\ \ | | | | | | Keep named arguments during eta expansion
| * | Keep named arguments during eta expansionMartin Odersky2016-02-181-6/+4
| | | | | | | | | | | | Fixes #1096.
* | | Merge pull request #1066 from dotty-staging/fix-#997odersky2016-02-1910-16/+72
|\ \ \ | | | | | | | | Fix #997
| * | | Merge parentsWithArgs and instantiatedParentsMartin Odersky2016-02-194-9/+6
| | | |
| * | | Move leak detection to CheckingMartin Odersky2016-02-192-34/+42
| | | | | | | | | | | | | | | | Also: include a test that private aliases are transparent.
| * | | Fix two private leaks in dotty compiler itself.Martin Odersky2016-02-192-3/+3
| | | |
| * | | Add checking for leaking private definitionsMartin Odersky2016-02-193-5/+51
| | | | | | | | | | | | | | | | First version. Fixes #997.
| * | | New utility method: Reporter#errorOrMigrationWarningMartin Odersky2016-02-191-0/+3
| | | |
| * | | Copy access flags to derived definitions during desugaringMartin Odersky2016-02-191-5/+7
| | |/ | |/| | | | | | | Previously, some definitions were too public, others too private.
* | | Merge pull request #1072 from dotty-staging/change-isVolatile-2odersky2016-02-1919-100/+347
|\ \ \ | |/ / |/| | Change is volatile 2
| * | Fix merge breakage.Martin Odersky2016-02-191-0/+1
| | |
| * | Remove unused method, fix comments.Martin Odersky2016-02-192-19/+9
| | | | | | | | | | | | | | | Addendum to change-isVolatile. Changes did not make it in by accident before that branch was merged.