summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #4233 from kanielc/SI-7770Lukas Rytz2015-02-034-2/+6
|\ | | | | SI-7770 mutable.BitSet.toImmutable isn't immutable
| * SI-7770 mutable.BitSet.toImmutable isn't immutableDenton Cockburn2015-01-074-2/+6
| | | | | | | | | | Mark method as deprecated due to it not providing the expected result, while fixing it will break existing code.
* | Merge pull request #4260 from retronym/ticket/9093Lukas Rytz2015-02-033-1/+12
|\ \ | | | | | | SI-9093 Fix value discarding / multiple param list crasher
| * | SI-9093 Fix value discarding / multiple param list crasherJason Zaugg2015-01-203-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | The type error stemming from missing argument list was being swallowed when the expected type was `Unit` and there were undetermined type parameters in the expression. This commit modifies `adapt` to avoid using `instantiateExpectingUnit` when the tree is typed with `MethodType`.
* | | Merge pull request #4252 from retronym/ticket/9050Lukas Rytz2015-02-032-1/+32
|\ \ \ | | | | | | | | SI-9050 Fix crasher with value classes, recursion
| * | | SI-9050 Fix crasher with value classes, recursionJason Zaugg2015-01-162-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the "Substitution is hard to do" department. In 7babdab9a, TreeSymSubstitutor was modified to mutate the info of symbols defined in the tree, if that symbol's info referred to one of the `from` symbols in the substitution. It would have been more principled to create a cloned symbol with the updated info, and add that to the substitution. But I wasn't able implement that correctly (let alone efficiently.) The in-place mutation of the info of a symbol led to the crasher in this bug: a singleton type over that symbol ends up with a stale cached value of 'underlying'. In the enclosed test case, this leads to a type error in the `SubstituteRecursion` of the extension methods phase. This commit performs a cleanup job at the end of `substituteSymbols` by invalidating the cache of any `SingleType`-s in the tree that refer to one of the mutated symbols.
* | | | Merge pull request #4245 from dickwall/doc/scaladoc-concurrent-packageLukas Rytz2015-02-031-0/+74
|\ \ \ \ | | | | | | | | | | Document concurrent package object
| * | | | Added package scaladoc for the concurrent package.dickwall2015-01-121-0/+74
| | | | |
* | | | | Merge pull request #4292 from retronym/ticket/9133Grzegorz Kossakowski2015-02-033-1/+11
|\ \ \ \ \ | | | | | | | | | | | | SI-9133 Harden against infinite loop in NoSymbol.owner
| * | | | | Silence a feature warning in JUnit test code.Jason Zaugg2015-02-031-0/+1
| | | | | |
| * | | | | SI-9133 Harden against infinite loop in NoSymbol.ownerJason Zaugg2015-02-032-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The available evidence gathered in an IDE hang suggests that while editing erronenous code, a call to `Erasure#javaSig` by the IDE's structure builder triggered the `ExplicitOuter` info transformer on a symbol with some sort of incoherent owner chain, which led to an infinite loop in `NoSymbol#outerClass`. This commit hardens that method to work in the same manner as a call to `NoSymbol.owner`: log the error under -Xdev or -Ydebug and return return `NoSymbol` to soldier on without crashing / hanging. I haven't formulated a theory about how we might have ended up with the corrupt owner chain.
* | | | | | Merge pull request #4216 from som-snytt/issue/7623Lukas Rytz2015-02-035-6/+71
|\ \ \ \ \ \ | |/ / / / / |/| | | | | SI-7623 Trailing sequence wildcard warning
| * | | | | SI-7623 Trailing sequence wildcard warningSom Snytt2015-01-215-6/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An -Xlint:stars-align warning for the case of patterns with at least one "fixed" component and a varargs component. Warn if the fixed patterns don't exactly align with the fixed value components, such that a sequence wildcard aligns exactly with the varargs component (either a T* parameter in a case class or a Seq[T] in an extractor result). This addresses the case of the xml.Elem extractor, which does not correspond to the Elem class constructor. One can be fooled into supplying an extra field for extraction. Vanilla extractors of type `Option[Seq[_]]` are unaffected by this flag. It's OK to ask for `case X(a, b, c)` in the expectation that three results are forthcoming. There is no semantic confusion over where the varargs begin.
* | | | | | Merge pull request #4259 from mzitnik/2.11.xIchoran2015-01-302-1/+21
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-9072 Vector ++ concatenation of parallel collection cause inconsisten...
| * | | | | | SI-9072 Vector ++ concatenation of parallel collection cause inconsistent ↵Mark Zitnik2015-01-182-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | results
* | | | | | | Merge pull request #4276 from romanowski/2.11.xAdriaan Moors2015-01-302-8/+11
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Update scala version to 2.11.5 for Intellij 14
| * | | | | | | Fix intellij 14 setup script to read scala version from version.propertiesKrzysztof Romanowski2015-01-302-8/+11
| | | | | | | |
* | | | | | | | Merge pull request #4257 from 193s/2.11.xAdriaan Moors2015-01-301-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | fix definition of TRY in the language specification
| * | | | | | | | fix definition of TRY in the language specIkumi Shimizu2015-01-171-1/+1
| | |/ / / / / / | |/| | | | | |
* | | | | | | | Merge pull request #4226 from jhegedus42/patch-1Adriaan Moors2015-01-301-2/+2
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | Update 03-types.md
| * | | | | | | Update 03-types.mdjhegedus422014-12-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Using U_i instead of T_i is confusing. See http://stackoverflow.com/questions/26803244/is-this-a-typo-in-the-scala-language-specification-on-parameterized-types
* | | | | | | | Merge pull request #4271 from retronym/ticket/8642Adriaan Moors2015-01-283-3/+28
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-8642 Enable OSGi tests under Java 8
| * | | | | | | | SI-8642 Enable OSGi tests under Java 8Jason Zaugg2015-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use the PAX Exam framework to integration test that the OSGi metadata we add to our JARs allows them to be loaded into the Felix and Equinox containers. However, we had to disable this test under Java 8 due to an incompatibility between that framework and the modern Java version. I have found a combination that works in Java 6, 7, and 8, so the test is now run under all Java versions. I have left a `skip` property to disable them, following the established convention. Tip of the hat to: - @soc / @rkrzewski for the work in #4066 that paved the way for this small change - Harald Wellman, for sharing [1] the Java 8 compatible combination of PAX and Felix . Testing: ``` for V in 1.6 1.7 1.8; do java_use $V; ant -q test.osgi; done java version "1.6.0_65" Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716) Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode) ... [echo] Running OSGi JUnit tests. Output in /Users/jason/code/scala3/build/osgi [echo] Test pass 1 of 2 using Apache Felix 4.4.0 [echo] Test pass 2 of 2 using Eclipse Equinox 3.7.1 BUILD SUCCESSFUL Total time: 31 seconds java version "1.7.0_71" Java(TM) SE Runtime Environment (build 1.7.0_71-b14) Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode) ... [echo] Running OSGi JUnit tests. Output in /Users/jason/code/scala3/build/osgi [echo] Test pass 1 of 2 using Apache Felix 4.4.0 [echo] Test pass 2 of 2 using Eclipse Equinox 3.7.1 BUILD SUCCESSFUL Total time: 22 seconds java version "1.8.0_25" Java(TM) SE Runtime Environment (build 1.8.0_25-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode) ... [echo] Running OSGi JUnit tests. Output in /Users/jason/code/scala3/build/osgi [echo] Test pass 1 of 2 using Apache Felix 4.4.0 [echo] Test pass 2 of 2 using Eclipse Equinox 3.7.1 BUILD SUCCESSFUL Total time: 16 seconds ``` [1] https://groups.google.com/d/msg/ops4j/TN0sZFf6wLs/vUP0GML6-TQJ
| * | | | | | | | Add an IntelliJ module for the Pax Exam based OSGi testsJason Zaugg2015-01-283-2/+27
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | We can now edit these in IntelliJ, as per the regular JUnit tests.
* | | | | | | | Merge pull request #4268 from adriaanm/new-ci-validationAdriaan Moors2015-01-285-71/+249
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | | IMPORTANT: Base your PR on this one --> New PR validation <--
| * | | | | | | IDE validation: run on last commitAdriaan Moors2015-01-271-0/+32
| | | | | | | |
| * | | | | | | New PR validationAdriaan Moors2015-01-214-71/+217
| | | | | | | |
* | | | | | | | Merge pull request #4214 from som-snytt/issue/5154Jason Zaugg2015-01-222-4/+12
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-5154 Parse leading literal brace in XML pattern
| * | | | | | | | SI-5154 Parse leading literal brace in XML patternSom Snytt2014-12-162-4/+12
| | |_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't consume literal brace as Scala pattern. Previously, leading space would let the text parser `xText` handle it correctly instead.
* | | | | | | | Merge pull request #4190 from kanielc/SI-5817Jason Zaugg2015-01-222-0/+20
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | SI-5817: Add header to language.scala and languageFeature.scala
| * | | | | | | SI-5817: Add header to language.scala and languageFeature.scalaDenton Cockburn2014-12-052-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These two files were missing headers. There is other work on-going to automate updating of the headers, but that likely won't crossover with this.
* | | | | | | | Merge pull request #4253 from retronym/ticket/9087Grzegorz Kossakowski2015-01-203-8/+74
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-9087 Fix min/max of reversed Double/Float orderings
| * | | | | | | | SI-9087 Fix min/max of reversed Double/Float orderingsJason Zaugg2015-01-203-8/+74
| | |_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As diagnosed by the reporter, we needed additional overrides due to the way these orderings are implemented. I've added tests to show other methods and other orderings are working correctly. After writing that, I found a scalacheck test related to NaN handling that also covers `Ordering`. I had to correct the assertion in the tests of `reverse.{min,max}`.
* | | | | | | | Merge pull request #4247 from adriaanm/2.11.5-bumpGrzegorz Kossakowski2015-01-203-5/+10
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ |/| | | | | | | 2.11.5 bump
| * | | | | | | Bump versions for 2.11.5 release.Adriaan Moors2015-01-042-5/+5
| | | | | | | |
| * | | | | | | TODO notes for release scriptAdriaan Moors2015-01-041-0/+5
| | | | | | | |
* | | | | | | | Merge pull request #4210 from lrytz/opt/classBTypeFromClassfileGrzegorz Kossakowski2015-01-1916-184/+536
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / |/| | | | | | | Construct ClassBTypes from parsed classfiles
| * | | | | | | Address review feedbackLukas Rytz2015-01-164-19/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rename CodeRepository to ByteCodeRepository - Scaladoc on OptimizerReporting - Scaladoc on ByteCodeRepository
| * | | | | | | Construct ClassBTypes from parsed classfilesLukas Rytz2015-01-1613-101/+421
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This infrastructure is required for the inliner: when inlining code from a classfile, the corresponding ClassBType is needed for various things (eg access checks, InnerClass attribute). The test creates two ClassBTypes for the same class: once using the (unpickled) Symbol, once using the parsed ASM ClassNode, and verifies that the two are the same. There's a cleanup to the InnerClass attribute: object T { class Member; def foo = { class Local } } class T For Java compatibility the InnerClass entry for Member says the class is nested in T (not in the module class T$). We now make sure to add that entry only to T, not to T$ (unless Member is actually referenced in the classfile T$, in that case it will be added, as required).
| * | | | | | | Cleanup asm-to-string debug helpersLukas Rytz2015-01-162-14/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces methods for textifying classes, methods, InsnLists and individual AbstractInsnNodes.
| * | | | | | | Remove an unnecessary hash map in BTypesFromSymbolsLukas Rytz2015-01-161-12/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's already the map classBTypeFromInternalNameMap in BTypes which stores all ClassBTypes.
| * | | | | | | Type alias for InternalNameLukas Rytz2015-01-162-5/+17
| | | | | | | |
| * | | | | | | Make ClassBType independent of the name tableLukas Rytz2015-01-163-60/+12
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each ClassBType is identified by its internalName, the fully qualified JVM class name. Before this change, the name was stored in the `chrs` array of the compiler name table (hash consed), with the idea to avoid materializing the string. However, we materialize the string anyway, because each ClassBType is stored in the classBTypeFromInternalNameMap, indexed by the string. If string equality turns out to be too slow we can use interning. For the inliner, we read classes from bytecode and create ClassBTypes for them. The names of these classes would not yet exist in the name table, so the backend would need to be able to create new names. Using Strings removes this dependency.
* | | | | | | Merge pull request #4249 from retronym/ticket/9089Vlad Ureche2015-01-164-1/+7
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | SI-9089 Another REPL/FSC + specialization bug fix
| * | | | | | SI-9089 Another REPL/FSC + specialization bug fixJason Zaugg2015-01-154-1/+7
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The enclosed test case stopped working in 2.11.5 on the back of https://github.com/scala/scala/pull/4040. The key change was that we ran all post-typer info transformers on each run of the compiler, rather than trying to reuse the results of the previous run. In that patch, I noticed one place [1] in specialization that aggressively entered specialized members into the owning scope, rather than relying on `transformInfo` to place the new members in the scope of the newly created element of the info history. I made that change after noticing that this code could actually mutated scopes of specializaed types at the parser phase, which led to fairly obscure failures. This bug is another one of these obscure failures, and has the same root cause. We effectively "double specialiaze" Function0, which trips an assertion when `method apply$mcI$sp` is found twice in a scope. I have found another spot that was directly manipulating the scope, and removed the offending code. [1] https://github.com/scala/scala/pull/4040#commitcomment-8531516
* | | | | | Merge pull request #4201 from mpociecha/fix-typos-in-docs-and-commentsGrzegorz Kossakowski2015-01-14139-232/+232
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix many typos in docs and comments
| * | | | | | Fix many typos in docs and commentsmpociecha2014-12-14140-233/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit corrects many typos found in scaladocs, comments and documentation. It should reduce a bit number of PRs which fix one typo. There are no changes in the 'real' code except one corrected name of a JUnit test method and some error messages in exceptions. In the case of typos in other method or field names etc., I just skipped them. Obviously this commit doesn't fix all existing typos. I just generated in IntelliJ the list of potential typos and looked through it quickly.
* | | | | | | Merge pull request #4234 from JanBessai/ShowCodeEscapeFixGrzegorz Kossakowski2015-01-142-1/+4
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | SI-9057 - fix `showCode` to put backticks around names including dots
| * | | | | | SI-9057 - fix `showCode` to put backticks around names including dotsJan Bessai2015-01-072-1/+4
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Missing backticks cause the parser to treat names as paths, which is obviously invalid. A unit test is included.
* | | | | | Merge pull request #4200 from er1c/typoJason Zaugg2015-01-091-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix scaladoc OutpuStream typo