summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | | Address review feedback.Lukas Rytz2014-09-115-10/+10
| | | | | | | | | |
| * | | | | | | | | Remove stale local variables and exception handlers after DCELukas Rytz2014-09-1011-36/+386
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is required for correctness of the generated bytecode. Exception handlers and local variable descriptors specify code offset ranges. These offsets have to exist, not be eliminated.
| * | | | | | | | | SI-8568 unreachable test now passes in GenBCodeLukas Rytz2014-09-101-1/+0
| | | | | | | | | |
| * | | | | | | | | Clarify why we emit ATHROW after expressions of type NothingLukas Rytz2014-09-1010-7/+282
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests for emitting expressions of type Nothing.
| * | | | | | | | | Tools to run the compiler in JUnit testsLukas Rytz2014-09-103-2/+136
| | | | | | | | | |
| * | | | | | | | | JUnit tests for dead code elimination.Lukas Rytz2014-09-109-72/+379
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JUnit tests may use tools from partest-extras (ASMConverters)
| * | | | | | | | | -Yopt mulit-choice flagLukas Rytz2014-09-092-1/+27
| | | | | | | | | |
| * | | | | | | | | Eliminate unreachable code in GenBCodeLukas Rytz2014-09-096-4/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We rely on dead code elimination provided by the ASM framework, as described in the ASM User Guide (http://asm.ow2.org/index.html), Section 8.2.1. It runs a data flow analysis, which only computes information for reachable instructions. Instructions for which no data is available after the analyis are unreachable. There's one issue with the ASM framework (or the way we use it): Data flow analysis requires the maxlocals and maxstack of each method to be computed. The ASM framework calculates these maxes only when writing the classfiles, not during code generation. In order to run DCE, we therefore run a MethodWriter beforehand on every method. This assings the MethodNode's maxStack/maxLocals, but it does more work (writes the instructions to a byte array). This is also what Miguel uses on his branch. The change is basically the same as https://github.com/lrytz/scala/commit/bfadf92c20. We could probably make this faster (and allocate less memory) by hacking the ASM framework: create a subclass of MethodWriter with a /dev/null byteVector. Another option would be to create a separate visitor for computing those values, duplicating the functionality from the MethodWriter. For now, I added some timers to be able to measure the time DCE takes. Here's compiling the library with -Ystatistics:jvm time in backend : 1 spans, 6597ms bcode initialization : 1 spans, 8ms (0.1%) code generation : 1 spans, 4580ms (69.4%) dead code elimination : 3771 spans, 742ms (11.2%) classfile writing : 1 spans, 879ms (13.3%)
| * | | | | | | | | Removed empty class, unused importsLukas Rytz2014-09-092-8/+2
| |/ / / / / / / /
* | | | | | | | | Merge pull request #3983 from retronym/merge/2.10.x-2.11.x-20140915Jason Zaugg2014-09-160-0/+0
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / / |/| | | | | | | | Merge 2.10.x to 2.11.x
| * | | | | | | | Merge commit '9ecfac8' into merge/2.10.x-2.11.x-20140915Jason Zaugg2014-09-150-0/+0
|/| | | | | | | | | | |_|_|_|_|/ / | |/| | | | | |
| * | | | | | | Merge pull request #3859 from xeno-by/topic/fundep-materialization-210xGrzegorz Kossakowski2014-09-1119-4/+215
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | [backport] SI-7470 implements fundep materialization
| | * | | | | | | -Xfundep-materialization => -Yfundep-materializationEugene Burmako2014-09-094-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To quote gkossakowski: Thinking about it more, could we hide this behind 'Y' flag instead? We have lesser obligation to keep around Y flags and this is something we should remove from 2.11/2.12.
| | * | | | | | | pull request feedbackEugene Burmako2014-07-031-0/+1
| | | | | | | | |
| | * | | | | | | [backport] SI-7470 implements fundep materializationEugene Burmako2014-07-0219-4/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backports 21a8c6c from the 2.11.x branch under -Xfundep-materialization as per Miles Sabin's request. Thanks Miles!
* | | | | | | | | Merge pull request #3977 from terma/issue/8817Vlad Ureche2014-09-121-5/+4
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / / |/| | | | | | | | SI-8817 Correct scaladoc for scala.sys.addShutdownHook
| * | | | | | | | SI-8817 Correct scaladoc for scala.sys.addShutdownHookterma2014-09-111-5/+4
| | |_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove mention that shutdown hook is daemon thread - Add link on scala.sys.ShutdownHookThread class
* | | | | | | | Merge pull request #3846 from xeno-by/topic/move-quasiquotesGrzegorz Kossakowski2014-09-126-6/+6
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / |/| | | | | | | moves the impl of quasiquotes to scala.reflect
| * | | | | | | moves the impl of quasiquotes to scala.reflectEugene Burmako2014-09-116-6/+6
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings consistency with scala.reflect.reify and scala.reflect.macros already existing in scala-compiler. To the contrast, scala.tools.reflect, the previous home of quasiquotes, is a grab bag of various stuff without any central theme.
* | | | | | | Merge pull request #3968 from Feodorov/ticket/8398Grzegorz Kossakowski2014-09-103-19/+23
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | | SI-8398 - Compiler specifies lazy variables as methods
| * | | | | | SI-8398 - unused warning reports lazy val as a methodKonstantin Fedorov2014-09-103-19/+23
|/ / / / / / | | | | | | | | | | | | | | | | | | Compiler internals treat lazy vals as methods. Therefore, we need to have a special case for them when assembling the warning message.
* | | | | | Merge pull request #3938 from gourlaysama/wip/t8764Grzegorz Kossakowski2014-09-097-1/+39
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-8764 fix return type of case class productElement under Xexperimental
| * | | | | | [nomaster] SI-8764 fix return type of case class productElement under ↵Antoine Gourlay2014-09-097-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xexperimental Under Xexperimental, productElement now returns the lub instead of the weak lub of case class parameter types (numeric widening shouldn't magically happen *inside* productElement). This was removed from 2.12.x in 6317ae2.
* | | | | | | Merge pull request #3967 from retronym/topic/mathjaxGrzegorz Kossakowski2014-09-091-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix broken URL for MathJAX Javascript dependency.
| * | | | | | | Fix broken URL for MathJAX Javascript dependency.Jason Zaugg2014-09-081-1/+1
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Loaded using an DNS alias for the CDN, as per the [instructions](http://docs.mathjax.org/en/latest/configuration.html) I also switched from `latest` to `2.3-latest`, so that we don't automatically perform major upgrades.
* | | | | | | Merge pull request #3946 from gourlaysama/wip/t5254Grzegorz Kossakowski2014-09-092-11/+46
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-5254 running an empty scala script should succeed
| * | | | | | | SI-5254 running an empty scala script should succeedAntoine Gourlay2014-08-262-11/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The script runner made the assumption that "compilation succeeded" implies "there is a Main class to run", but this can be wrong if the script is empty (or only contains imports/comments). The ScriptRunner now uses the ClassPath utility to check if there really is a main class. If not, it doesn't try to run it and returns peacefully. This also makes `scala -e ''` succeed.
* | | | | | | | Merge pull request #3801 from Ichoran/issue/8474Grzegorz Kossakowski2014-09-092-16/+47
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-8474 Inconsistent behavior of patch method
| * | | | | | | | SI-8474 Inconsistent behavior of patch methodRex Kerr2014-08-242-16/+47
| | |_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed Iterator to be consistent with other collections. Also fixed SeqViewLike to validate/constrain inputs. No specific tests; quasi-comprehensive collection tests will cover this later.
* | | | | | | | Merge pull request #3939 from lrytz/ystatsLukas Rytz2014-09-0815-209/+416
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | | -Ystatistics accepts a list of phases for which to print stats
| * | | | | | | Make MultiChoiceSetting.compute easier to understandLukas Rytz2014-09-081-18/+11
| | | | | | | |
| * | | | | | | Address PR feedback, fix MultiChoiceSetting.containsLukas Rytz2014-09-083-22/+20
| | | | | | | |
| * | | | | | | Use Enumeration for MultiChoiceSettingSom Snytt2014-09-058-168/+288
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is pretty easy, since a ValueSet is a BitSet. When the setting is updated, recompute the current set of values, which is cheap and succinct. Checking a flag is also easy and fast. Choices in MultiChoiceSettings may enable other choices.
| * | | | | | | -Ystatistics accepts a list of phases, cleanups in MultiChoiceSettingLukas Rytz2014-09-0210-164/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MultiChoiceSetting and Xlint with its deprecated aliases is now a bit simpler, but there's still room for improvement, as noted in comments.
| * | | | | | | Fix assertThrows, and the behaviors that it shadowedLukas Rytz2014-09-024-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test in StdNamesTest was introduced in cff8b569, where newTermName would throw on a negative length. In b090f97 this was changed to fix the negative length, but the test was not adapted (as it didn't fail).
* | | | | | | | Merge pull request #3935 from lrytz/t8803Jason Zaugg2014-09-054-5/+90
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-8803 generate super accessor for super[A], if A is outer superclass
| * | | | | | | | SI-8803 generate super accessor for super[A], if A is outer superclassLukas Rytz2014-08-204-5/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | class C extends A with T { class I { C.super[T] C.super[A] } } A super call in a nested class of the form super[T] where T is a parent trait of the outer class doesn't need an accessor: mixin can directly re-route the call to the correct implementation class - it's statically known to be T$class. However, if a nested class accesses super[A] and A is the superclass of the outer class (not a trait), then we need a super accessor in the outer class. We need to add the mixin name to the super accessor name, otherwise it clashes with non-qualified super accessors.
* | | | | | | | | Merge pull request #3961 from lrytz/t8786-disable-testJason Zaugg2014-09-041-1/+3
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | SI-8786 disable part of thest that's failing the jdk8 build
| * | | | | | | | | SI-8786 disable part of test that's failing the jdk8 buildLukas Rytz2014-09-041-1/+3
| | | | | | | | | |
* | | | | | | | | | Merge pull request #3932 from gourlaysama/wip/t8498Jason Zaugg2014-09-043-5/+9
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | SI-8498 @compileTimeOnly should be aware of bridge methods.
| * | | | | | | | | | SI-8498 @compileTimeOnly should be aware of bridge methods.Antoine Gourlay2014-08-213-5/+9
| | |/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling a @compileTimeOnly method from another @compileTimeOnly method happens when the former gets a bridge method. It should not throw an error. Calling the bridge or the method will anyway.
* | | | | | | | | | Merge pull request #3951 from pawel-wiejacha/2.11.x_SI-8810_fixGrzegorz Kossakowski2014-09-033-45/+18
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | scaladoc: fixed code block indentation normalization
| * | | | | | | | | | SI-8810 scaladoc: fixed code block indentation normalizationPaweł Wiejacha2014-09-033-45/+18
| | | | | | | | | | |
* | | | | | | | | | | Merge pull request #3960 from gourlaysama/wip/t8113Vlad Ureche2014-09-033-2/+43
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / |/| | | | | | | | | | SI-8113 scaladoc: allow a newline between a link target and title
| * | | | | | | | | | SI-8113 allow a newline between a link target and titleAntoine Gourlay2014-09-033-2/+43
|/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parsing "[[http://foo.bar link title]]" stops at the first whitespace. This breaks pretty badly in: [[http://foo.bar link title]] It stops after "link", interprets what it parsed as a link to a member, obviously fails, and then just ouputs "title". It should at least return a proper error, or, even better, just allow a newline between the target and title. I went for the latter.
* | | | | | | | | | Merge pull request #3955 from som-snytt/issue/8410Grzegorz Kossakowski2014-09-033-2/+18
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | SI-8410 Don't warn fatally on disabled flag
| * | | | | | | | | | SI-8410 Summarize if warnings and not disabledSom Snytt2014-09-011-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the conditional and emit the summary if there were buffered warnings and the user didn't explicitly disable this setting. The working assumption is that using fatal-warnings to turn on summaries was either an outdated heuristic or just due to a faulty merge. Or wait, was it for -feature, which is not enabled when warnings are issued against it?
| * | | | | | | | | | SI-8410 Don't warn fatally on disabled flagSom Snytt2014-09-013-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since boolean settings can now be set false by user, summary warnings should not be issued when the flag is explicitly off (as opposed to unset, default). In particular, `-Xfatal-warnings` should not fail if there were no warnings otherwise. ``` $ ~/scala-2.11.2/bin/scalac -d /tmp -deprecation:false test/files/pos/t8410.scala $ ~/scala-2.11.2/bin/scalac -d /tmp -deprecation:false -Xfatal-warnings test/files/pos/t8410.scala warning: there were three deprecation warnings; re-run with -deprecation for details error: No warnings can be incurred under -Xfatal-warnings. one warning found one error found ``` After this commit: ``` $ skalac -d /tmp -Xfatal-warnings test/files/pos/t8410.scala warning: there were three deprecation warnings; re-run with -deprecation for details error: No warnings can be incurred under -Xfatal-warnings. one warning found one error found $ skalac -d /tmp -deprecation:false -Xfatal-warnings test/files/pos/t8410.scala ``` Similarly for other collecting flags: ``` $ skalac -d /tmp -optimise -Yinline-warnings -deprecation:false -Xfatal-warnings test/files/pos/t8410.scala test/files/pos/t8410.scala:14: warning: Could not inline required method dropWhile because access level required by callee not matched by caller. def k = List(0).dropWhile(_ < 1) // inlining warns doubly ^ test/files/pos/t8410.scala:14: warning: At the end of the day, could not inline @inline-marked method dropWhile def k = List(0).dropWhile(_ < 1) // inlining warns doubly ^ error: No warnings can be incurred under -Xfatal-warnings. two warnings found one error found $ skalac -d /tmp -optimise -Yinline-warnings:false -deprecation:false -Xfatal-warnings test/files/pos/t8410.scala ``` Footnote: handling of deprecated locals also changed in 2014: ``` $ ~/scala-2.11.0-M7/bin/scalac -d /tmp -deprecation -Xfatal-warnings test/files/pos/t8410.scala test/files/pos/t8410.scala:8: warning: method f in object Test is deprecated: Console println f // warns ^ error: No warnings can be incurred under -Xfatal-warnings. one warning found one error found $ ~/scala-2.11.0-M8/bin/scalac -d /tmp -deprecation -Xfatal-warnings test/files/pos/t8410.scala test/files/pos/t8410.scala:5: warning: method _f is deprecated: def g = { @deprecated("","") def _f = f ; _f } // warns in 2.11.0-M8 ^ test/files/pos/t8410.scala:6: warning: class X is deprecated: def x = { @deprecated("","") class X { def x = f } ; new X().x } // warns in 2.11.0-M8 ^ test/files/pos/t8410.scala:8: warning: method f in object Test is deprecated: Console println f // warns ^ error: No warnings can be incurred under -Xfatal-warnings. three warnings found one error found ```
* | | | | | | | | | | Merge pull request #3958 from lrytz/merge/2.10-to-2.11-sept-2Jason Zaugg2014-09-033-1/+25
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Merge 2.10 to 2.11
| * \ \ \ \ \ \ \ \ \ \ Merge branch '2.10.x' into merge/2.10-to-2.11-sept-2Lukas Rytz2014-09-020-0/+0
| |\ \ \ \ \ \ \ \ \ \ \ | | | |_|_|_|_|_|_|/ / / | | |/| | | | | | | | |