summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/settings
Commit message (Collapse)AuthorAgeFilesLines
* SI-8040 Warn unused parametersSom Snytt2017-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | 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. ```
* SI-8040 Warn unused flagsSom Snytt2017-03-111-5/+35
| | | | | | | | | | | | | | | | 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.
* new version numbers for snapshot and integration builds, new repositoryLukas Rytz2017-03-081-1/+1
| | | | | | | | | | 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.
* Merge pull request #5585 from som-snytt/issue/10097Adriaan Moors2017-02-071-0/+2
|\ | | | | SI-10097 Error if no non-implicit case class param
| * SI-10097 Adapt unless -Xsource:2.13Som Snytt2016-12-141-1/+4
| | | | | | | | | | | | For 2.12 migration, insert missing case class param section, strip caseaccessor from implicit paramsection, and deprecate the adaptation.
| * SI-8704 Also warn if effectively multiple implicitSom Snytt2016-12-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | 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.
* | SI-9729 -Xmaxerrs to limit messagesSom Snytt2017-01-312-5/+7
| | | | | | | | | | Since 2.7.2, console reporter has limited error messages to a fixed 100. Use `-Xmaxerrs -Xmaxwarns` as from `javac` to configure.
* | SI-10068 Only permit elidable methodsSom Snytt2016-12-141-1/+4
|/ | | | | | | | In refchecks, check that symbol with `@elidable` is a method. When eliding in uncurry, doublecheck. The check is enabled under `-Xsource:2.13`.
* delete dead codeLars Hupel2016-12-011-2/+0
|
* remove deprecated compiler flag "-Yinfer-by-name"Lars Hupel2016-12-011-1/+0
| | | | This was slated for removal in 2.12.
* remove deprecated compiler flag "-Yeta-expand-keeps-star"Lars Hupel2016-12-011-1/+0
| | | | This was slated for removal in 2.12.
* Pattern matching virtualization now guarded by -Yvirtpatmat.Miles Sabin2016-11-281-0/+1
|
* Merge pull request #5393 from som-snytt/issue/nowarn-thistype-discardLukas Rytz2016-10-211-5/+2
|\ | | | | No warn when discarding r.f(): r.type
| * No warn when discarding r.f(): r.typeSom Snytt2016-09-101-5/+2
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge 2.11.x into 2.12.xAdriaan Moors2016-10-181-5/+13
|\ \ | | | | | | | | | | | | | | | | | | | | | Fix conflict in #5453: ``` - def help: String = { + override def help: String = { ```
| * | SI-9832 -Xlint:help shows defaultSom Snytt2016-10-111-5/+13
| | | | | | | | | | | | | | | | | | Conclude help method with the default list. Extra words are supplied for underscore.
* | | Default -Xmixin-force-forwarders to trueLukas Rytz2016-09-301-2/+2
| |/ |/| | | | | | | | | | | | | | | | | 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.
* | Add a -Xmixin-force-forwarders ChoiceSettingLukas Rytz2016-09-022-3/+16
| |
* | Allow per-choice help in ChoiceSettingLukas Rytz2016-09-023-13/+28
| |
* | Allow all settings to be helpingLukas Rytz2016-09-013-4/+10
| |
* | Emit mixin forwarders for JUnit-annotated trait methods by defaultLukas Rytz2016-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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.
* | SD-182 compiler option -Xgen-mixin-forwardersLukas Rytz2016-07-151-0/+1
| | | | | | | | | | Introduce a compiler option -Xgen-mixin-forwarders to always generate mixin forwarder methods.
* | Merge pull request #5102 from milessabin/2.12.xJason Zaugg2016-05-271-1/+2
|\ \ | | | | | | SI-2712 Add support for partial unification of type constructors
| * | -Xexperimental mode now only includes -Ypartial-unificationMiles Sabin2016-05-241-1/+1
| | |
| * | SI-2712 Add support for higher order unificationMiles Sabin2016-05-241-0/+1
| | |
* | | Merge pull request #5186 from lrytz/inlinerM5Jason Zaugg2016-05-271-1/+3
|\ \ \ | | | | | | | | Debug flag to print a summary of the inliner's work
| * | | Debug flag to print a summary of the inliner's workLukas Rytz2016-05-241-1/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* / / Rename -Yopt to -opt, -Yopt-warnings to -opt-warningsLukas Rytz2016-05-251-42/+42
|/ / | | | | | | Keep -Yopt-inline-heuristics and -Yopt-trace unchanged
* | Merge pull request #5112 from lrytz/dropRecursiveClasspathJason Zaugg2016-05-051-6/+0
|\ \ | | | | | | Remove legacy recursive classpath implementation
| * | Remove abstraction layer in classpath implementationLukas Rytz2016-05-021-5/+0
| | |
| * | remove recursive classpath implementationLukas Rytz2016-04-231-1/+0
| | |
* | | Emit a warning when a constant expression evaluates to an ↵Olli Helenius2016-05-021-0/+2
| | | | | | | | | | | | ArithmeticException (#5123)
* | | More efficient code for deciding if a mixin forwarder is needed (#5116)Lukas Rytz2016-04-251-0/+2
|/ / | | | | | | Also adds a warning on junit test methods that compile as default methods.
* | General cleanups and less warnings during a Scala buildsoc2016-04-042-3/+2
| |
* | Remove dead code now that `genBCodeActive` is always true.Adriaan Moors2016-03-261-1/+1
| |
* | Enable flat classpath by defaultLukas Rytz2016-03-221-1/+1
| | | | | | | | | | | | | | Implements VirtualDirectoryFlatClassPath, which is required for the presentation compiler created for the repl's tab-completion. Various minor cleanups in the flat classpath implementation.
* | Remove -Y settings that are no longer used in 2.12Lukas Rytz2016-02-162-46/+16
| | | | | | | | | | | | Added a deprecation warning for `-optimize`. Later we'll also graduate `-Yopt` to `-opt`, probably for 2.12.0-M5.
* | rename -YoptTrace to -Yopt-traceLukas Rytz2016-02-031-1/+1
| |
* | -YoptTrace takes a package/Class.method parameterLukas Rytz2016-01-251-1/+1
| |
* | Merge remote-tracking branch 'upstream/2.12.x' into opt/elimBoxesLukas Rytz2016-01-242-5/+2
|\ \
| * | Merge commit '8eb1d4c' into merge-2.11-to-2.12-nov-24Lukas Rytz2015-11-241-1/+1
| |\|
| | * it's Scaladoc, not "ScalaDoc" or "Scala doc"Seth Tisue2015-11-121-1/+1
| | | | | | | | | | | | | | | renaming the existing ScalaDoc and ScalaDocReporter classes might break stuff, sadly, but at least we can fix the rest
| * | Remove ICodeSimon Ochsenreither2015-10-311-1/+0
| | |
| * | Remove GenASM, merge remaining common code snippetsSimon Ochsenreither2015-10-271-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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 optimizations may enable more push-pop eliminationLukas Rytz2016-01-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Ensure that `-Yopt:l:none` takes precedence, tidy optimizer settingsLukas Rytz2015-12-151-17/+28
| | |
* | | Eliminate unnecessary castsLukas Rytz2015-12-151-1/+3
| | | | | | | | | | | | | | | | | | Eliminate casts that are statically known to succeed. This enables boxes to be eliminated and simplifies the implementation of closure allocation elimination.
* | | Eliminate non-escaping boxes, tuples and refsLukas Rytz2015-12-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Clean up optimizer settings.Lukas Rytz2015-11-101-13/+9
| | |
* | | Copy propagation, remove unused values (closures!) and local variablesLukas Rytz2015-11-101-1/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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!