| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One can `-Ywarn-unused:params` or more narrowly warn only for
unused implicit parameters with `-Ywarn-unused:implicits`.
Params includes constructor parameters.
The settings for privates and locals are not yet distinguished.
```
$ skalac -Ywarn-unused:help
Enable or disable specific `unused' warnings
imports Warn if an import selector is not referenced.
patvars Warn if a variable bound in a pattern is unused.
privates Warn if a private member is unused.
locals Warn if a local definition is unused.
params Warn if a value parameter is unused.
implicits Warn if an implicit parameter is unused.
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce `-Ywarn-unused:x,y,z` and exploit `-Ywarn-unused:patvars`.
Although the tree attachment for shielding patvars from warnings
is not structural, sneaking the settings flag into the reflection
internal TreeGen is awkward.
Add test to ensure isolation of patvars warning from others.
`-Ywarn-unused-import` is an alias for `-Ywarn-unused:imports`.
`-Xlint:unused` is an alias for `-Ywarn-unused`, but not enabled
yet. The help text advises to use `-Ywarn-unused`. The future can
decide if `-Xlint:unused-imports` is warranted.
|
|
|
|
|
|
|
|
|
|
| |
Integration builds now have version number like `2.12.2-bin-sha7` or `2.13.0-pre-sha7`
and are published to scala-integration (no longer scala-release-temp).
scala-release-temp is still used in the bootstrap script for publishing intermediate
artifacts (starr, locker).
Various cleanups in the scripts.
|
|\
| |
| | |
SI-10097 Error if no non-implicit case class param
|
| |
| |
| |
| |
| |
| | |
For 2.12 migration, insert missing case class param section,
strip caseaccessor from implicit paramsection,
and deprecate the adaptation.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Current semantics are that leading implicit param
turns the parameter section into an implicit section
(though without making other params implicitly
implicit).
Warn if more than one head of a param section is
implicit, since that results in multiple implicit
param sections.
|
| |
| |
| |
| |
| | |
Since 2.7.2, console reporter has limited error messages to
a fixed 100. Use `-Xmaxerrs -Xmaxwarns` as from `javac` to configure.
|
|/
|
|
|
|
|
|
| |
In refchecks, check that symbol with `@elidable` is a method.
When eliding in uncurry, doublecheck.
The check is enabled under `-Xsource:2.13`.
|
| |
|
|
|
|
| |
This was slated for removal in 2.12.
|
|
|
|
| |
This was slated for removal in 2.12.
|
| |
|
|\
| |
| | |
No warn when discarding r.f(): r.type
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The paradigm is `def add(x: X): Unit = listBuffer += x`.
The value that is discarded is not new information.
Also cleans up the recent tweaks to help messaging.
Adds newlines in case they ask for multiple helps.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix conflict in #5453:
```
- def help: String = {
+ override def help: String = {
```
|
| | |
| | |
| | |
| | |
| | |
| | | |
Conclude help method with the default list.
Extra words are supplied for underscore.
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| | |
Also eliminates the warning when a mixin forwarder cannot be implemented
because the target method is a java-defined default method in an
interface that is not a direct parent of the class.
The test t5148 is moved to neg, as expected: It was moved to pos when
disabling mixin forwarders in 33e7106. Same for the changed error
message in t4749.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
JUnit 4 does not support default methods. For better user experience,
this commit makes the compiler generate mixin forwarders for inherited
trait methods that carry a JUnit annotation.
The -Yjunit-trait-methods-no-forwarders flag disables this behavior.
This supersedes the scala-js/scala-2.12-junit-mixin-plugin compiler
plugin.
|
| |
| |
| |
| |
| | |
Introduce a compiler option -Xgen-mixin-forwarders to always generate
mixin forwarder methods.
|
|\ \
| | |
| | | |
SI-2712 Add support for partial unification of type constructors
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Debug flag to print a summary of the inliner's work
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Example output below. Note that inlining List.map fails because the
trait forwarder uses `INVOKESPECIAL` for now, will change with pr 5177.
$ cat Test.scala
class C {
def foo = Map(1 -> 'a', 2 -> 'b')
def bar(l: List[Int]) = l.map(_ + 1)
}
$ qsc -Yopt-log-inline _ -Yopt:l:classpath Test.scala
Inlining into C.foo (initially 36 instructions, ultimately 72):
- Inlined scala/Predef$ArrowAssoc$.$minus$greater$extension (8 instructions) 2 times: the callee is annotated `@inline`
Inlining into C.bar (initially 12 instructions, ultimately 12):
- Failed to inline scala/collection/immutable/List.map (the callee is a higher-order method, the argument for parameter (bf: Function1) is a function literal): The callee scala/collection/immutable/List::map(Lscala/Function1;Lscala/collection/generic/CanBuildFrom;)Ljava/lang/Object; contains the instruction INVOKESPECIAL scala/collection/TraversableLike.map (Lscala/Function1;Lscala/collection/generic/CanBuildFrom;)Ljava/lang/Object;
that would cause an IllegalAccessError when inlined into class C.
|
|/ /
| |
| |
| | |
Keep -Yopt-inline-heuristics and -Yopt-trace unchanged
|
|\ \
| | |
| | | |
Remove legacy recursive classpath implementation
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
ArithmeticException (#5123)
|
|/ /
| |
| |
| | |
Also adds a warning on junit test methods that compile as default
methods.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Implements VirtualDirectoryFlatClassPath, which is required for the
presentation compiler created for the repl's tab-completion.
Various minor cleanups in the flat classpath implementation.
|
| |
| |
| |
| |
| |
| | |
Added a deprecation warning for `-optimize`.
Later we'll also graduate `-Yopt` to `-opt`, probably for 2.12.0-M5.
|
| | |
|
| | |
|
|\ \ |
|
| |\| |
|
| | |
| | |
| | |
| | |
| | | |
renaming the existing ScalaDoc and ScalaDocReporter classes might
break stuff, sadly, but at least we can fix the rest
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With GenBCode being the default and only supported backend for Java 8,
we can get rid of GenASM.
This commit also fixes/migrates/moves to pending/deletes tests which
depended on GenASM before.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Jump optimization replaces an unnecessary conditional jump, e.g.
`IFNULL l; l: ...` by `POP`, which enables further push-pop elimination.
Also introduces a `-YoptTrace` flag that traces the progress of the
bytecode as it goes through local optimizations.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Eliminate casts that are statically known to succeed. This enables
boxes to be eliminated and simplifies the implementation of closure
allocation elimination.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Eliminate boxes, tuples and refs that are created and used within a
single method without escaping. For details on the implementation see
the doc comment in class BoxUnbox.
This commit also cleans up the logic of inter-dependent method-level
optimizations that run until reaching a fixpoint.
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Copy propagation uses an AliasingAnalyzer: it replaces a `LOAD n`
instruction by `LOAD m` where m is the smallest alias of n. This
leads to stale STORE instructions.
Stale STOREs are identified using a ProdCons analyzer and replaced by
POPs.
Values that are pushed on the stack by a side-effect free instruction
and consumed by a POP are then removed by `eliminatePushPop`. This
includes elimination of unused closure allocations and unused boxes
and tuple allocations (*).
A final cleanup eliminates `STORE x; LOADx` pairs where the stored
value is not otherwise used.
Fixes
- https://github.com/scala/scala-dev/issues/25
- https://github.com/scala/scala-dev/issues/7
- https://github.com/scala/scala-dev/issues/14
- https://github.com/scala/scala-dev/issues/12
(*) We don't yet rewrite reads of boxes and tuples yet. For example,
`val x = (1, 2); x._1` remains a method invocation and the tuple
cannot be eliminated (https://github.com/scala/scala-dev/issues/11).
Inspired in many ways by Miguel's work!
|