| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
SI-9315 Desugar string concat to java.lang.StringBuilder ...
|
| |
| |
| |
| |
| |
| | |
... 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.
|
|\ \
| | |
| | | |
Clarified and expanded which Builders were reusable
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.).
|
|\ \ \
| |/ /
|/| | |
mutable.TreeMap instead of java.util.TreeMap in closure optimizer
|
| | | |
|
|\ \ \
| | | |
| | | | |
SI-9599 Multiple @todo formatted with comma on separate line
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
SI-9629 Emit missing 'pattern must be a value' error
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
|\ \ \ \
| |_|/ /
|/| | | |
Pattern Matching analysis improvements
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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)
```
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |/ /
|/| | |
Ensure bytecode stability in the closure optimizer
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
SI-9437 Emit and support parameter names in class files
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| | | |
| | | | |
Restore backend tests that were removed together with GenASM
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Our ANT script only runs junit tests that match *Test.class.
https://github.com/scala/scala/blob/1081e718f8f8e174dbf615e42b157e187d3d3886/build.xml#L1467
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
|\| | |
| |_|/
|/| | |
Eliminate non-escaping boxes, tuples and refs
|
| | | |
|
| |\ \
| |/ /
|/| | |
|
|\ \ \
| |_|/
|/| | |
Add partial appearance update of inheritence graphs in scaladoc
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
SD-70 Don't share footnotes across multiple calls to universe.showRaw
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| | |
| | | |
SI-9507 Make ArrayStack an IndexedSeqOptimized
|
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| | | |
| | | | |
SI-9622 Native method may be private
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This was lost in a refactor.
https://github.com/scala/scala/commit/290f687fb6ab91b6aef62d871036ddc3829f12b4
|
|\ \ \ \
| | | | |
| | | | | |
SI-8700 Exhaustiveness warning for enums from Java source
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
Fix problems with a locale-dependent decimal mark in StringContextTest
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|\ \ \ \
| |/ / /
|/| | | |
Make StringContextTest pass on Windows
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
One assertion in StringContextTest."f interpolator baseline"() was
relying on platform specific newline encoding, making it fail when run
on Windows.
|
|\ \ \
| | | |
| | | | |
fix mobile styling for scaladoc
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|