summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #4737 from soc/SI-9315Lukas Rytz2016-02-036-21/+101
|\ | | | | SI-9315 Desugar string concat to java.lang.StringBuilder ...
| * SI-9315 Desugar string concat to java.lang.StringBuilder ...Simon Ochsenreither2016-02-036-21/+101
| | | | | | | | | | | | ... instead of scala.collection.mutable.StringBuilder to benefit from JVM optimizations. Unfortunately primitives are already boxed in erasure when they end up in this part of the backend.
* | Merge pull request #4904 from Ichoran/reusable-buildersLukas Rytz2016-02-0315-108/+225
|\ \ | | | | | | Clarified and expanded which Builders were reusable
| * | Clarified and expanded which Builders were reusableRex Kerr2016-01-3015-108/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This additionally fixes both SI-8648 and SI-9564. Added documentation to Builder to clarify that in general Builders are NOT reusable. Altered implementation of GrowingBuilder to use Growable instance's clear (not valid for a reusable builder, but this one isn't reusable). Added a new marker trait ReusableBuilder that specifies that these builders should be reusable. This trait overrides the clear and result methods while leaving them abstract in order to supply appropriate scaladoc. Made all Array builders Reusable in all cases (by setting capacity to 0 if the original array is returned). (Fixed a poor implmentation of Array[Unit] builder along the way.) Documented which other builders were already reusable (maps, sets, Vector, LazyBuilder, StringBuilder, ListBuffer, etc.).
* | | Merge pull request #4926 from lrytz/scalaTreeMapJason Zaugg2016-02-011-6/+4
|\ \ \ | |/ / |/| | mutable.TreeMap instead of java.util.TreeMap in closure optimizer
| * | mutable.TreeMap instead of java.util.TreeMap in closure optimizerLukas Rytz2016-01-281-6/+4
| | |
* | | Merge pull request #4915 from petermz/ticket/9599Vlad Ureche2016-01-293-1/+14
|\ \ \ | | | | | | | | SI-9599 Multiple @todo formatted with comma on separate line
| * | | SI-9599 Multiple @todo formatted with comma on separate linepeterz2016-01-293-1/+14
|/ / /
* | | Merge pull request #4917 from retronym/ticket/9629Jason Zaugg2016-01-293-4/+33
|\ \ \ | | | | | | | | SI-9629 Emit missing 'pattern must be a value' error
| * | | SI-9629 Emit missing 'pattern must be a value' errorJason Zaugg2016-01-253-4/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error used to only be emitted for top-level patterns. This commit moves it into `typedInternal` so it works for nested patterns. It uses the typer mode to know when to fire.
* | | | Merge pull request #4919 from retronym/ticket/9630Jason Zaugg2016-01-2927-21/+150
|\ \ \ \ | |_|/ / |/| | | Pattern Matching analysis improvements
| * | | Avoid exhaustivity warning in typedTemplateJason Zaugg2016-01-291-1/+1
| | | |
| * | | Fix non-exhaustive match in macro code parsingJason Zaugg2016-01-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: ``` ⚡ qscala -deprecation Welcome to Scala 2.12.0-20160126-000825-1e302b76aa (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_66). Type in expressions for evaluation. Or try :help. scala> import reflect.macros.blackbox.Context; import language.experimental.macros import reflect.macros.blackbox.Context import language.experimental.macros scala> def impl(c: Context) = {println(c.universe.showRaw(c.parse("val then = 0"))); c.literalUnit}; def m: Unit = macro impl; <console>:13: warning: method literalUnit in trait ExprUtils is deprecated: Use quasiquotes instead def impl(c: Context) = {println(c.universe.showRaw(c.parse("val then = 0"))); c.literalUnit}; def m: Unit = macro impl; ^ impl: (c: scala.reflect.macros.blackbox.Context)c.Expr[Unit] defined term macro m: Unit scala> m <console>:16: error: exception during macro expansion: scala.MatchError: pos: source-<macro>,line-1,offset=4 then is now a reserved word; usage as an identifier is deprecated WARNING (of class scala.tools.nsc.reporters.StoreReporter$Info) at scala.reflect.macros.contexts.Parsers$class.scala$reflect$macros$contexts$Parsers$class$$$anonfun$1(Parsers.scala:17) ```
| * | | SI-9398 Treat case classes as one-element ADTs for analysisJason Zaugg2016-01-2915-12/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, exhaustivity analysis only runs for scrutinees with a sealed type. This commit treats any case class as a one-element, sealed type to enable additional analysis, such as in the new test case.
| * | | SI-9630 Fix spurious warning related to same-named case accessorsJason Zaugg2016-01-2911-7/+112
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hash consing of trees within pattern match analysis was broken, and considered `x1.foo#1` to be the same tree as `x1.foo#2`, even though the two `foo`-s referred to different symbols. The hash consing was based on `Tree#correspondsStructure`, but the predicate in that function cannot veto correspondance, it can only supplement the default structural comparison. I've instead created a custom tree comparison method for use in the pattern matcher that handles the tree shapes that we use.
* | | Merge pull request #4923 from lrytz/closureOptimizerStabilityLukas Rytz2016-01-281-38/+33
|\ \ \ | |/ / |/| | Ensure bytecode stability in the closure optimizer
| * | Ensure bytecode stability in the closure optimizerLukas Rytz2016-01-271-38/+33
|/ / | | | | | | | | | | | | | | https://github.com/scala/scala-dev/issues/77 Previously, the order in which closure invocations were re-written depended on the callGraph's closureInstantiations map, which is not sorted / linked.
* | Merge pull request #4735 from soc/SI-9437Lukas Rytz2016-01-2611-6/+194
|\ \ | | | | | | SI-9437 Emit and support parameter names in class files
| * | SI-9437 Emit and support parameter names in class filesSimon Ochsenreither2016-01-2511-6/+194
| | | | | | | | | | | | | | | | | | | | | | | | JEP 118 added a MethodParameters attribute to the class file spec which holds the parameter names of methods when compiling Java code with `javac -parameters`. We emit parameter names by default now.
* | | Merge pull request #4916 from lrytz/restoreASMTestsLukas Rytz2016-01-2634-655/+374
|\ \ \ | | | | | | | | Restore backend tests that were removed together with GenASM
| * | | Rename junit tests to end in *Test to make them run in ANTLukas Rytz2016-01-254-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | Our ANT script only runs junit tests that match *Test.class. https://github.com/scala/scala/blob/1081e718f8f8e174dbf615e42b157e187d3d3886/build.xml#L1467
| * | | Rewrite test: no local for underscoreLukas Rytz2016-01-255-49/+19
| | | |
| * | | Rewrite test: no null in patmatLukas Rytz2016-01-255-40/+13
| | | |
| * | | Rewrite test: no type test on primitives in patmatLukas Rytz2016-01-255-34/+19
| | | |
| * | | Rewrite test for SI-7006Lukas Rytz2016-01-255-61/+24
| | | |
| * | | Rewrite test for inlining higher-order functionsLukas Rytz2016-01-253-92/+20
| | | |
| * | | Rewrite test for inlining from sealed classLukas Rytz2016-01-254-56/+29
| | | |
| * | | Rewrite copy propagation testLukas Rytz2016-01-253-191/+73
| | | |
| * | | Rewrite test for SI-5313Lukas Rytz2016-01-253-67/+92
| | | |
| * | | Rewrite test for SI-6955Lukas Rytz2016-01-252-33/+28
| | | |
| * | | Rewrite test for SI-6956Lukas Rytz2016-01-252-31/+58
| | | |
* | | | Merge pull request #4858 from lrytz/opt/elimBoxesLukas Rytz2016-01-2536-858/+3833
|\| | | | |_|/ |/| | Eliminate non-escaping boxes, tuples and refs
| * | -YoptTrace takes a package/Class.method parameterLukas Rytz2016-01-252-2/+3
| | |
| * | Merge remote-tracking branch 'upstream/2.12.x' into opt/elimBoxesLukas Rytz2016-01-24572-24515/+5443
| |\ \ | |/ / |/| |
* | | Merge pull request #4914 from felixmulder/topic/scaladoc-update-diagramsVlad Ureche2016-01-2319-5681/+89
|\ \ \ | |_|/ |/| | Add partial appearance update of inheritence graphs in scaladoc
| * | Add partial appearance update of inheritence graphs in scaladocFelix Mulder2016-01-2319-5681/+89
|/ / | | | | | | | | | | | | | | This commit updates color and shape of the inheritence graphs. Also adds a dropshadow on hover instead of opacity change. Graphviz broke upon trying to include svg buttons instead of png. Looking for a solution.
* | Merge pull request #4911 from lrytz/showRawFootnotesSeth Tisue2016-01-205-38/+36
|\ \ | | | | | | SD-70 Don't share footnotes across multiple calls to universe.showRaw
| * | SD-70 Don't share footnotes across multiple calls to universe.showRawLukas Rytz2016-01-195-38/+36
|/ / | | | | | | | | | | | | | | | | Before this commit, multiple invocations of universe.showRaw used a shared weak map that caches footnotes. If the two printed objects have equal components printed as footnotes, e.g., an equal TypeRef, the result of the second invocation depends on whether the object has been collected (and removed from the weak map) or not. See https://github.com/scala/scala-dev/issues/70#issuecomment-171701671
* | Merge pull request #4870 from ruippeixotog/issue/9507Jason Zaugg2016-01-191-3/+4
|\ \ | | | | | | SI-9507 Make ArrayStack an IndexedSeqOptimized
| * | SI-9507 Make ArrayStack an IndexedSeqOptimizedRui Gonçalves2015-11-271-3/+4
| | | | | | | | | | | | Just like `ArraySeq`, `ArrayBuffer` and all other collections that use an array as underlying data structure, `ArrayStack` should also be an instance of `IndexedSeq` and `IndexedSeqOptimized`. As expected by both of the traits, `ArrayStack` has constant-time random element access and length computation.
* | | Merge pull request #4903 from som-snytt/issue/9622Jason Zaugg2016-01-182-9/+14
|\ \ \ | | | | | | | | SI-9622 Native method may be private
| * | | SI-9622 Native method may be privateSom Snytt2016-01-132-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | This was lost in a refactor. https://github.com/scala/scala/commit/290f687fb6ab91b6aef62d871036ddc3829f12b4
* | | | Merge pull request #4898 from soc/SI-8700Lukas Rytz2016-01-1414-13/+82
|\ \ \ \ | | | | | | | | | | SI-8700 Exhaustiveness warning for enums from Java source
| * | | | SI-8700 Exhaustiveness warning for enums from Java sourceSimon Ochsenreither2016-01-1414-13/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, the warning was only emitted for enums from Java class files. This commit fixes it by - aligning the flags set in JavaParsers with the flags set in ClassfileParser (which are required by the pattern matcher to even consider checking exhaustiveness) - adding the enum members as childs to the class holding the enum as done in ClassfileParser so that the pattern matcher sees the enum members when looking for the sealed children of a type
* | | | | Merge pull request #4900 from mpociecha/correct-decimal-marks-in-tests2Seth Tisue2016-01-131-16/+36
|\ \ \ \ \ | |_|/ / / |/| | | | Fix problems with a locale-dependent decimal mark in StringContextTest
| * | | | Fix problems with a locale-dependent decimal mark in StringContextTestMichał Pociecha2016-01-131-16/+36
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depending on the current locale one can get 3,400000e+00 instead of 3.400000e+00 so the expected result should take this into account. It's a similar change to one I made some time ago in 2.11.x: https://github.com/scala/scala/pull/4204
* | | | Merge pull request #4897 from linasm/stringContextTest-windowsSeth Tisue2016-01-131-3/+2
|\ \ \ \ | |/ / / |/| | | Make StringContextTest pass on Windows
| * | | Make StringContextTest pass on WindowsLinas Medziunas2016-01-131-3/+2
|/ / / | | | | | | | | | | | | | | | One assertion in StringContextTest."f interpolator baseline"() was relying on platform specific newline encoding, making it fail when run on Windows.
* | | Merge pull request #4888 from felixmulder/topic/scaladoc-relative-fontsVlad Ureche2016-01-055-86/+270
|\ \ \ | | | | | | | | fix mobile styling for scaladoc
| * | | add mobile CSS rules for updated scaladoc lookFelix Mulder2016-01-045-86/+270
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit addresses the need for an improved mobile viewing experience. Specifically it introduces CSS media queries to adjust sizing and indentation of elements on mobile devices. This includes the following changes: - replace absolute font sizing with relative font sizing - fix font-resizing issues for mobile by fixing viewport - hide related links when viewport too small - fix missing trigram from heaven on Android - remove indentation on annotations e.g. `@throws` and place associated text on a separate line - fix bottom scoll-bar appearing on code-snippets - add spacing between entity icons in browser - add dynamic top offset for entity description - fix long entity names corrupting style - remove "EXPERIMENTAL" button from shortcomment divs on mobile