summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #5293 from lrytz/asm-51Adriaan Moors2016-07-209-32/+47
|\ | | | | upgrade asm to 5.1
| * Upgrade asm to 5.1Lukas Rytz2016-07-209-32/+47
|/ | | | | The constructor of scala.tools.asm.Handle now takes an additional boolean parameter to denote whether the owner is an interface.
* Merge pull request #5257 from szeiger/wip/final-tuplesLukas Rytz2016-07-2032-66/+37
|\ | | | | SI-7301 Make tuple classes final
| * SI-7301 Make tuple classes finalStefan Zeiger2016-07-0732-66/+37
| | | | | | | | | | This includes undoing the special case for `-Xfuture` introduced in https://github.com/scala/scala/pull/2299 and updating tests to take the new errors into account.
* | Merge pull request #5261 from som-snytt/issue/9827Stefan Zeiger2016-07-192-51/+161
|\ \ | | | | | | SI-9827 MatchIterator advances itself
| * | SI-9827 MatchIterator advances itselfSom Snytt2016-07-182-51/+161
| |/ | | | | | | | | | | | | | | | | | | To avoid caveats about calling `next` (or `hasNext`) before using `MatchData` methods on `MatchIterator`, just do it internally as necessary. Note `MatchIterator` behavior in the docs. Added tests showing what people cried about.
* | Merge pull request #5265 from szeiger/issue/6947Adriaan Moors2016-07-189-248/+247
|\ \ | | | | | | SI-6947 Better type parameter names for Map classes
| * | SI-6947 Better type parameter names for Map classesStefan Zeiger2016-07-079-248/+247
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Type parameter names are currently assigned pretty much alphabetically without any meaning. This change renames all key parameters in Map classes from `A` to `K` and all value parameters from `B` to `V` to make them more meaningful. Derived names are renamed accordingly (e.g. `V1` instead of `B1` for an upper bound on `V`, `W` instead of `C` for a new value type). As a side-effect this solves the documentation problem in SI-6947. Due to using `B` both as a type parameter for `foldLeft[B]` in `GenTraversableOnce[A]` and in `Map[A, B]` which extends `GenTraversableOnce[(A, B)]`, the signature of `Map.foldLeft` was rendered in scaladoc as def foldLeft[B](z: B)(op: (B, (A, B)) ⇒ B): B Now you get an unambiguous version: def foldLeft[B](z: B)(op: (B, (K, V)) ⇒ B): B
* | Merge pull request #5246 from jodersky/javadocAdriaan Moors2016-07-1812-74/+171
|\ \ | | | | | | SI-4826 Retain javadoc comments in scaladoc [ci: last-only]
| * | Retain javadoc comments in scaladocJakob Odersky2016-07-1512-74/+171
| | | | | | | | | | | | | | | * Hook into java parser to generate doc comments * Generate empty trees for java implementation bodies
* | | Merge pull request #5285 from szeiger/wip/sbt-bootstrapAdriaan Moors2016-07-188-70/+164
|\ \ \ | | | | | | | | Switch the bootstrap build over to sbt
| * | | Switch the bootstrap build over to sbtStefan Zeiger2016-07-158-70/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All of the individual ant builds that occured during `bootstrap` are replaced by equivalent sbt builds. - Allow extra dashes in version suffix when using SPLIT - Clean up ScriptCommands - Building an extra `locker` for stability testing with ant was not necessary but sbt also drops `strap`, so we need to build again with `quick` to get the equivalent of `strap`. The script for checking stability is invoked directly from the bootstrap script, not from sbt. - `STARR` and `locker` build output is still logged to `logs/builds`, the main build runs log directly to the main console with colored output. - Allow `—show-log` option on partest command line in sbt - Normalize inferred LUB in `run/t7747-repl.scala` - Add `normalize` feature from `ReplTest` to `InteractiveTest` - Normalize inferred LUBs in `presentation/callcc-interpreter`
* | | | Merge pull request #5273 from retronym/ticket/9855Adriaan Moors2016-07-184-17/+32
|\ \ \ \ | | | | | | | | | | SI-9855 Fix regression in extractor pattern translation
| * | | | SI-9855 Fix regression in extractor pattern translationJason Zaugg2016-07-144-17/+32
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In faa5ae6, I changed the pattern matchers code generator to use stable references (`Ident`-s with the singleton type, rather than the widened type) to the synthetic vals used to store intermediate results ("binders"). In the case where the scrutinee matched the unapply parameter type of some extractor pattern, but the pattern subsequently failed, this led to an regression. It turns out that this was due to the way that the type of the binder was mutated to upcast to the exact type of a subsequent pattern in `ensureConformsTo`: https://github.com/scala/scala/blob/953559988/src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala#L165-L174 This was added in 32c57329a as a workaround for the problem caused in t6664.scala, when the binder type was `KList with KCons`, and the code generator wasn't able to find the case field accessors for `KCons` in the decls. The change to use stable references meant that this mutation was now observed in another part of the tree, as opposed to the 2.11.8 situation, where we had used the original, sharper type of the binder eagerly to assign to the `Ident` that referred to it. This led to a tree: Assign(Ident(x3), Ident(x1).setType(x1.tpe) Now that we instead refer generate: Assign(Ident(x3), Ident(x1).setType(stableTypeFor(x1)) and we don't typecheck this until after the mutation of `x1.symbol.info`, we can get a type error. This commit removes this mutation of the binder type altogether, and instead uses `aligner.wholeType`, which is based on the result type of the `Apply(TypeTree(MethodType(params, resultType))` that encodes a typechecked constructor pattern. In `t6624.scala`, this is `KCons`, the case class that has the extractors as its decls.
* | | | Merge pull request #5275 from dwijnand/somexStefan Zeiger2016-07-183-8/+10
|\ \ \ \ | | | | | | | | | | Deprecated and rename Some#x to Some#value
| * | | | Deprecated and rename Some#x to Some#valueDale Wijnand2016-07-153-8/+10
| | |/ / | |/| |
* | | | Merge pull request #5287 from ChristopherDavenport/ticket/9691-2Stefan Zeiger2016-07-182-0/+34
|\ \ \ \ | |/ / / |/| | | SI-9691 BufferedIterator should expose a headOption
| * | | SI-9691 BufferedIterator should expose a headOptionChristopher Davenport2016-07-152-0/+34
|/ / / | | | | | | | | | This exposes a new API to the BufferedIterator trait. It will return the next element of an iterator as an Option. The return will be Some(value) if there is a next value, and None if there is not a next element.
* | | Merge pull request #5264 from lrytz/t8561Lukas Rytz2016-07-133-70/+84
|\ \ \ | | | | | | | | SI-8561 named subclasses for known Manifest / ClassTag instances
| * | | SI-8561 named subclasses for known Manifest / ClassTag instancesLukas Rytz2016-07-063-70/+84
| | |/ | |/| | | | | | | | | | | | | This helps keeping ClassTag serialization stable under accidental changes (like changing the order of definitions, which would change the name of the anonymous classes).
* | | Merge pull request #5234 from som-snytt/review/printersLukas Rytz2016-07-135-22/+36
|\ \ \ | | | | | | | | Avoid triple-quoting triple quotes in printer
| * | | Constant print control in unicodeSom Snytt2016-06-164-8/+10
| | | | | | | | | | | | | | | | | | | | Since octal escape is deprecated, use unicode escape for string representation of constants.
| * | | Refactor triple quote quotingSom Snytt2016-06-162-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To quote a triple quote, only quote one quote. Refactors the code for legibility. Adds test for other inline cruft like control chars.
| * | | Avoid triple-quoting triple quotesSom Snytt2016-06-162-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | The boolean test for triples was inadvertently flipped. Adds test for pretty printed multiline strings
* | | | Merge pull request #5226 from Arneball/sealednessLukas Rytz2016-07-131-1/+1
|\ \ \ \ | | | | | | | | | | If Range is sealed, it makes sense to have Range.Inclusive final.
| * | | | If Range is sealed, it makes sense to have Range.Inclusive final.Raul Bache2016-06-121-1/+1
| |/ / /
* | | | Merge pull request #5269 from lrytz/t9849Lukas Rytz2016-07-133-1/+24
|\ \ \ \ | | | | | | | | | | SI-9849 set privateWithin on default getters
| * | | | SI-9849 set privateWithin on default gettersLukas Rytz2016-07-123-1/+24
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A default getter get the same access flag (private / protected) as the method whose default it implements. However, we forgot to set the privateWithin flag, which defines the scope in a qualified private / protected modifier. For a private[p], the default getter was therefore public, which is less restricted (a private[p] method has privateWithin set to p, but the private flag is not set). For a protected[p], the default getter was protected, which is more restricted.
* | | | Merge pull request #5135 from soc/topic/biased-eitherStefan Zeiger2016-07-135-94/+309
|\ \ \ \ | | | | | | | | | | Right-bias Either
| * | | | [squash] Fix bounds in containsSimon Ochsenreither2016-07-071-1/+1
| | | | |
| * | | | Right-bias EitherSimon Ochsenreither2016-05-275-94/+309
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add operations like map, flatMap which assume right-bias - Deprecate {Left,Right}Projection - Deprecate left and right in favor of swap - Add contains, toOption, toTry, toSeq and filterOrElse - toSeq returns collection.immutable.Seq instead of collection.Seq - Don't add get There are no incompatible changes. The only possibility of breakage that exists is when people have added extension methods named map, flatMap etc. to Either in the past doing something different than the methods added to Either now. One detail that moved the scales in favor of deprecating LeftProjection and RightProjection was the desire to have toSeq return scala.collection.immutable.Seq instead of scala.collection.Seq like LeftProjection and RightProjection do. Therefore keeping LeftProjection and RightProjection would introduce inconsistency. filter is called filterOrElse because filtering in a for-comprehension doesn't work if the method needs an explicit argument. contains was added as safer alternative to if (either.isRight && either.right.get == $something) ... While adding filter with an implicit zero value is possible, it's dangerous as it would require that developers add a "naked" implicit value of type A to their scope and it would close the door to a future in which the Scala standard library ships with Monoid and filter could exist with an implicit Monoid parameter.
* | | | | Merge pull request #5274 from mpociecha/fix-intellij-readmeLukas Rytz2016-07-121-1/+1
|\ \ \ \ \ | |_|_|_|/ |/| | | | Remove redundant 'the' in IntelliJ's README.md
| * | | | Remove redundant 'the' in IntelliJ's README.mdMichał Pociecha2016-07-121-1/+1
|/ / / /
* | | | Merge pull request #5225 from janekdb/topic/2.12.x-scaladoc-math-groupsAdriaan Moors2016-07-072-65/+190
|\ \ \ \ | | | | | | | | | | Group math package functions
| * | | | Group math package functionsJanek Bogucki2016-07-061-64/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Groups - Mathematical Constants - Minimum and Maximum - Rounding - Exponential and Logarithmic - Trigonometric - Angular Measurement Conversion - Hyperbolic - Absolute Values - Signs - Root Extraction - Polar Coordindates - Unit of Least Precision Other changes, - Dropped use of `double` for `Double` in all cases - Grouped some methods in the source - Extended notes about exception to method forwarding - Minor method documentation enhancements IEEERemainder is in the Rounding group since it is related to rounding and did not justify a new group.
| * | | | Fixed a typo in PredefJanek Bogucki2016-07-061-1/+1
|/ / / /
* | | | Merge pull request #5247 from mo/2.12.xAdriaan Moors2016-07-051-1/+1
|\ \ \ \ | | | | | | | | | | Fix typo in test comment
| * | | | Fix typo in test commentMartin Olsson2016-06-261-1/+1
| | | | |
* | | | | Merge pull request #5256 from lrytz/t9515Adriaan Moors2016-07-055-38/+25
|\ \ \ \ \ | | | | | | | | | | | | SI-9515 closure elimination also for non-Scala-Function SAM types
| * | | | | SI-9515 closure elimination also for non-Scala-Function SAM typesLukas Rytz2016-07-045-38/+25
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also logged in as SD-162 The optimizer had conservative checks in place to perform closure elimination only for Scala Function types. We can eliminate IndyLambda instructions for any functional interface. LambdaMetaFactory only constructs lambda objects for interface types, which don't have any side-effects on construction - they don't have a constructor.
* | | | | Merge pull request #5228 from dpogretskiy/SI-9817Adriaan Moors2016-07-051-0/+8
|\ \ \ \ \ | |/ / / / |/| | | | SI-9817 immutable queue `forall` and `exists` implementations
| * | | | SI-9817 forall and existsDmitriy Pogretskiy2016-06-201-0/+8
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | SI-9817 Immutable queue formatting SI-9817 Added comments SI-9817 Comment formatting
* | | | Merge pull request #5255 from adriaanm/2.12.xAdriaan Moors2016-06-291-2/+2
|\ \ \ \ | | | | | | | | | | Bump STARR to 2.12.0-M5.
| * | | | Bump STARR to 2.12.0-M5.Adriaan Moors2016-06-291-2/+2
|/ / / /
* | | | Merge pull request #5251 from adriaanm/rebase-5177Lukas Rytz2016-06-2939-222/+418
|\ \ \ \ | | | | | | | | | | Emit trait method bodies in statics [rebase of #5177]
| * | | | Use 2.12.0-M4-9901daf as STARR (see #5152)Adriaan Moors2016-06-283-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit switches to using 2.12.0-M3-dc9effe as STARR, so that we can switch to the new trait encoding where each concrete trait member gets a a static member, which has the actual implementation (as well as serving as a target for for super calls using invokestatic), and a default member (forwards to the static member). Also bump partest to 1.0.17 -- the release that goes with the in-sourcing of scalacheck. Replace a few more -Yopt with -opt (for our new STARR)
| * | | | Bootstrap skips scalacheck build step / partest depAdriaan Moors2016-06-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Keeping diff minimal since this will need to be reverted once 2.12.0 is final.
| * | | | Emit trait method bodies in staticsJason Zaugg2016-06-2833-206/+385
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And use this as the target of the default methods or statically resolved super or $init calls. The call-site change is predicated on `-Yuse-trait-statics` as a stepping stone for experimentation / bootstrapping. I have performed this transformation in the backend, rather than trying to reflect this in the view from Scala symbols + ASTs. We also need to add an restriction related to invokespecial to Java parents: to support a super call to one of these to implement a super accessor, the interface must be listed as a direct parent of the class. The static method names has a trailing $ added to avoid duplicate name and signature errors in classfiles.
| * | | | Revert pruning of redundant Java parentsJason Zaugg2016-06-281-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts the fix for SI-5278 made in 7a99c03da. The original motivation for this case to avoid bytecode that stretched platform limitations in Android. For super calls to Scala defined trait methods, we won't use `invokespecial`, but rather use `invokestatic` to a static trait implementation method. As such, we can continue to prune redundant Scala interfaces. It might be worth considering removing the pruning of redundant parents altoghether, though: - We no longer include `ScalaObject` as a parent of every class, which was mentioned as a problem in SI-5728. - Scala 2.12 has left Android behind for the time being due to use of Java 8 facilities. - javac doesn't do this, so why should we?
| * | | | Don't minimize parents of java defined syms.Jason Zaugg2016-06-281-1/+2
| | | | |