aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | make variable name consistent in ScalaSettingsliu fengyun2016-03-141-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Options with syntax "-Y" should NOT be named with a variable beginning with `X`.
* | | | | | Merge pull request #1171 from dotty-staging/fix-#1130Guillaume Martres2016-03-132-23/+41
|\ \ \ \ \ \ | | | | | | | | | | | | | | Have checkNotPrivate skip over private aliases.
| * | | | | | Have checkNotPrivate skip over private aliases.Martin Odersky2016-03-122-23/+41
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CheckNotPrivate now avoids private aliases, so that types sat prepresentable in transformation phases. This does not solve the problem that private classes or abstract types might leak coming from Scala 2, but there is not really a good cure for that. We can reject them outright or allow them under language:Scala2 and hope for the best.
* | | | | | Merge pull request #1164 from dotty-staging/fix-#1140Guillaume Martres2016-03-135-17/+29
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Make sure lazy accessors in traits are not private.
| * | | | | Make Synthetic a FormStart flag.Martin Odersky2016-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Not needed in the end for this patch, but anyway a good idea.
| * | | | | Assert that ensureNotPrivate does not break on separate compilationMartin Odersky2016-03-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When ensureNotPrivate changes the status of a formerly private declaration, assert that the reference to the declaration is in the same compilation unit, as otherwise the nehavior would be different under separate compilation.
| * | | | | Propagate source file to synthetic companionsMartin Odersky2016-03-131-1/+1
| | | | | |
| * | | | | Fix and simplify initializerMartin Odersky2016-03-101-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initializer was needlessly complex and did not work anymore for lazy vals (for them, we implicitly made use of the fact that the initializer would find the symbol itself. But after name mangling that logic would break down.
| * | | | | More detailed reporting in TreeCheckerMartin Odersky2016-03-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | ... when definitions are missing.
| * | | | | Make sure lazy accessors in traits are not private.Martin Odersky2016-03-101-2/+6
| |/ / / / | | | | | | | | | | | | | | | Fixes #1140. Review by @DarkDimius or @smarter.
* | | | / Fix incorrect hashing leading to cache pollutionGuillaume Martres2016-03-112-2/+4
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, Hashable#addDelta did not work correctly when the input hash was the special value NotCached, instead of returning NotCached, it returned NotCached + delta. This means that many different values ended up being cached with the same hash when they should not be cached at all, this is especially bad since our HashSet implementation uses open addressing. I noticed this bug while working on a phase to collect API information for sbt (this phase needs to collect every member of a class, including inherited members), after enabling it, the compileStdLib test took ~500 seconds to complete, this commit reduces this to ~100 seconds.
* | | | Fix bug where ambiguous references were not reportedMartin Odersky2016-03-091-1/+2
|/ / / | | | | | | | | | | | | | | | | | | There was a mssing condition which meant Tyepr thought it was at the outermost scope where but was mistaken. Fixes #1145
* | | remove println from FirstTransformVladimirNik2016-03-091-1/+0
| | |
* | | Merge pull request #1153 from dotty-staging/vc-companionsodersky2016-03-091-17/+42
|\ \ \ | |_|/ |/| | Fix for separate compilation with value class issue (#1137)
| * | Fix for separate compilation with value class issue (missing companion ↵VladimirNik2016-03-071-17/+42
| | | | | | | | | | | | object - #1137)
* | | Merge pull request #1155 from dotty-staging/staticodersky2016-03-098-3/+124
|\ \ \ | | | | | | | | Implement @static sip.
| * | | Replace addAnnotation(annotation) by addAnnotation(Annotation(annotation))Dmitry Petrashko2016-03-083-7/+7
| | | | | | | | | | | | | | | | as asked in https://github.com/lampepfl/dotty/pull/1155/files#r55355664
| * | | CheckStatic: do not eliminate non-pure expressions.Dmitry Petrashko2016-03-081-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | Implemented by checking that tree is allowed to access the static member and all the members on the path to it. Needed as typer has a tendency to desugar calls into series of selections&calls to This.
| * | | Fix Identation in tpd.Dmitry Petrashko2016-03-081-1/+1
| | | |
| * | | Fix add beanSetter annotation to @staticDmitry Petrashko2016-03-071-1/+1
| | | |
| * | | LazyVals: make all fields added to companions static.Dmitry Petrashko2016-03-071-1/+5
| | | |
| * | | 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
* | | Allow successive opening comments.Martin Odersky2016-03-071-11/+11
| |/ |/| | | | | Fixes #1052.
* | Merge pull request #1142 from dotty-staging/fix/implicit-ctxodersky2016-03-072-6/+4
|\ \ | | | | | | Do the implicit search shadowing check in the correct context
| * | Allow adding typevars to an uncommitable constraint setGuillaume Martres2016-03-041-4/+2
| | | | | | | | | | | | We triggered this assert after the fix in the previous commit.
| * | Do the implicit search shadowing check in the correct contextGuillaume Martres2016-03-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes a very sneaky bug, the following code: ``` lazy val shadowing = typed(untpd.Ident(ref.name) withPos pos.toSynthetic, funProto) (nestedContext.addMode(Mode.ImplicitShadowing).setExploreTyperState) ``` is parsed by scalac as: ``` lazy val shadowing = typed(untpd.Ident(ref.name) withPos pos.toSynthetic, funProto); (nestedContext.addMode(Mode.ImplicitShadowing).setExploreTyperState); ``` So we don't actually use the nested context in `typed`, instead we end up implicitly using `ctx`!
* | | Merge pull request #1147 from sjrd/fix-non-jvm-sam-non-applyodersky2016-03-071-1/+2
|\ \ \ | | | | | | | | Fix #1146: Fix bug of ExpandSAMs with non-apply SAM methods.
| * | | Fix #1146: Fix bug of ExpandSAMs with non-apply SAM methods.Sébastien Doeraene2016-03-071-1/+2
| | |/ | |/| | | | | | | | | | | | | When expanding a SAM, ExpandSAMs always used the name `apply` for the generated forwarder, instead of the name of the method which is abstract in the SAM type. This commit fixes this issue.
* | | Merge pull request #1150 from dotty-staging/change-lambdalift-fasttrackodersky2016-03-074-83/+156
|\ \ \ | |/ / |/| | Change lambdalift - fasttrack
| * | Address reviewer comments.Martin Odersky2016-03-071-5/+2
| | |
| * | Drop accidentally left-in inhibitor switchMartin Odersky2016-03-031-1/+1
| | |
| * | Cleanup lambda liftMartin Odersky2016-03-031-19/+26
| | | | | | | | | | | | | | | | | | | | | 1. Make clearer what markFree is supposed to do and get rid of `propagated` mode bit. 2. Harden copyParams so that we make sure corresponding parameters and fields are copied.
| * | Fix call propagation from constructor to classMartin Odersky2016-03-022-4/+4
| | |
| * | LambdaLift redesignMartin Odersky2016-03-022-46/+43
| | | | | | | | | | | | | | | | | | | | | Simplifications in order to avoid the freqent special casing of constructors and prepare the way for proper handling of trait constructors (which cause problems; see pending/pos/llift.scala.
| * | Simplification: get rid of local trait methodsMartin Odersky2016-03-021-24/+10
| | |
| * | Handle local traits in lambda liftMartin Odersky2016-03-011-24/+99
| | |
| * | Fix outer paths generated during lambda lift from constructors.Martin Odersky2016-03-012-3/+9
| | | | | | | | | | | | | | | | | | If lambda lift needs to create an outer path from a constructor, the path needs to start from the $outer parameter of the constructor, not the this of the enclosing class, which is not yet available.
| * | Fix a loophole where outer paths are missing at phase lambda lift.Martin Odersky2016-03-011-2/+7
| | | | | | | | | | | | Test will come in llift.scala.
* | | 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.