summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #3959 from ↵Jason Zaugg2014-09-03327-10664/+5264
|\ | | | | | | | | lrytz/merge/2.11-to-2.12-is-it-really-sept-2-already-where-was-summer Merge 2.11 to 2.12
| * Merge branch 'merge/2.10-to-2.11-sept-2' into ↵Lukas Rytz2014-09-0254-1813/+2703
| |\ | | | | | | | | | | | | | | | | | | merge/2.11-to-2.12-is-it-really-sept-2-already-where-was-summer Conflicts: versions.properties
| | * Merge branch '2.10.x' into merge/2.10-to-2.11-sept-2Lukas Rytz2014-09-020-0/+0
| | |\
| | | * Merge pull request #3937 from som-snytt/issue/8787-doc-backportGrzegorz Kossakowski2014-09-021-186/+291
| | | |\ | | | | | | | | | | [backport] SI-8787 Backport Regex doc
| | | | * [backport] SI-8787 Backport Regex docSom Snytt2014-08-261-186/+291
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport the doc with two material changes: 1. need to use Groups to extract from Match, so say that in lieu of the 2.11 advice that the Regex instance can be used without recomputing the match; 2. and relatedly, in 2.10 there is no secondary constructor, so the doc for group names is moved back up to the class doc. Original doc update on PR #3923 was: 0e26910372d349c6ff7bbaa17fc8fe0bf568c5fe f98c53cb03f800b3d790f3866ab90f827fd131f5
| | | * Merge pull request #3865 from xeno-by/topic/extractor-macros-210xGrzegorz Kossakowski2014-08-195-42/+114
| | | |\ | | | | | | | | | | [backport] transformers no longer ignore UnApply.fun
| | | | * [backport] transformers no longer ignore UnApply.funEugene Burmako2014-07-035-42/+114
| | | | | | | | | | | | | | | | | | | | Backports 7122560063 and 4133eb8454 from the 2.11.x branch
| | | * | Merge pull request #3860 from gourlaysama/wip/t7710-backportGrzegorz Kossakowski2014-08-193-3/+39
| | | |\ \ | | | | | | | | | | | | [backport] SI-7710 fix memory performance of RegexParsers in jdk7u6+
| | | | * | [backport] SI-7710 fix memory performance of RegexParsers in jdk7u6+Antoine Gourlay2014-08-123-3/+39
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of scala/scala-parser-combinators@91584dc. --- Starting with 1.7.0_06 [1], String.substring no longer reuses the internal char array of the String but make a copy instead. Since we call subSequence twice for *every* input character, this results in horrible parse performance and GC. With the benchmark from the (duplicate) ticket SI-8542, I get: BEFORE: parseAll(new StringReader(String)) For 100 items: 49 ms For 500 items: 97 ms For 1000 items: 155 ms For 5000 items: 113 ms For 10000 items: 188 ms For 50000 items: 1437 ms === parseAll(String) For 100 items: 4 ms For 500 items: 67 ms For 1000 items: 372 ms For 5000 items: 5693 ms For 10000 items: 23126 ms For 50000 items: 657665 ms AFTER: parseAll(new StringReader(String)) For 100 items: 43 ms For 500 items: 118 ms For 1000 items: 217 ms For 5000 items: 192 ms For 10000 items: 196 ms For 50000 items: 1424 ms === parseAll(String) For 100 items: 2 ms For 500 items: 8 ms For 1000 items: 16 ms For 5000 items: 79 ms For 10000 items: 161 ms For 50000 items: 636 ms [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6924259
| | * | | Merge commit 'b5759ef' into merge/2.10-to-2.11-sept-2Lukas Rytz2014-09-023-1/+25
| | |\| |
| | | * | Merge pull request #3904 from kzys/jira-8314-2.10.xGrzegorz Kossakowski2014-08-072-0/+19
| | | |\ \ | | | | | | | | | | | | Prevent SI-8314 by adding a test
| | | | * | Prevent SI-8314 by adding a testKato Kazuyoshi2014-07-312-0/+19
| | | |/ / | | | | | | | | | | | | | | | The original issue was fixed already. This test is just for make sure.
| | | * | Merge pull request #3752 from jeroentervoorde/SI_8589Adriaan Moors2014-07-041-1/+6
| | | |\ \ | | | | |/ | | | |/| SI-8589 Performance improvement for ArrayCharSequence.toString
| | | | * SI-8589 Performance improvement for ArrayCharSequence.toStringJeroen ter Voorde2014-06-191-1/+6
| | | |/
| | * | Merge pull request #3952 from gourlaysama/wip/t8828-lint-innacessibleGrzegorz Kossakowski2014-09-023-1/+22
| | |\ \ | | | | | | | | | | SI-8828 fix regression in Xlint visibility warning for sealed classes
| | | * | SI-8828 fix regression in Xlint visibility warning for sealed classesAntoine Gourlay2014-08-283-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5dfcf5e reverted a change to `Symbol#isEffectivelyFinal` (made in adeffda) that broke overriding checks, and moved the new enhanced version to a new method. However, the test for inaccessible type access still uses the old one, so it lost the ability to see that the owner of some method is either final or sealed and not overridden. This just makes it use the new `isEffectivelyFinalOrNotOverriden`.
| | * | | Merge pull request #3956 from gourlaysama/wip/interp-warnGrzegorz Kossakowski2014-09-023-4/+4
| | |\ \ \ | | | | | | | | | | | | fix a few string interpolation typos
| | | * | | SI-7931 fix Dscala.repl.vids and some string interpolation typosAntoine Gourlay2014-09-023-4/+4
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That nice little `-Dscala.repl.vids` feature regressed in f56f9a3c when a string.format was replaced by string interpolation. The ones in scala-reflect were caught by Xlint (who knew building with Xlint was actually useful...), the other was just luck.
| | * | | Merge pull request #3948 from retronym/ticket/8823Grzegorz Kossakowski2014-09-022-1/+11
| | |\ \ \ | | | | | | | | | | | | SI-8823 Exclude specialized methods from extension method rewrite
| | | * | | SI-8823 Exclude specialized methods from extension method rewriteJason Zaugg2014-08-272-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a value class extends a specialized class, it can sprout specialized members after the specialization info transformer has run. However, we only install extension methods for class members we know about at the extmethods phase. This commit simply disables rewiring calls to these methods in erasure to an extention method. This follows the approach taken from super accessors. Note: value class type parameters themselves currently are not allowed to be specialized.
| | * | | | Merge pull request #3931 from lrytz/opt/tracked-finalLukas Rytz2014-09-0129-1787/+2418
| | |\ \ \ \ | | | |_|/ / | | |/| | | GenBCode refactoring (remove Tracked) and fix InnerClass / EnclosingMethod attributes
| | | * | | Small cleanup in toTypeKind.Lukas Rytz2014-09-011-11/+2
| | | | | |
| | | * | | Fix InnerClass / EnclosingMethod attributesLukas Rytz2014-09-0123-255/+1090
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit seems bigger than it is. Most of it is tests, and moving some code around. The actual changes are small, but a bit subtle. The InnerClass and EnclosingMethod attributes should now be close to the JVM spec (which is summarized in BTypes.scala). New tests make sure that changes to these attributes, and changes to the way Java reflection sees Scala classfiles, don't go unnoticed. A new file, BCodeAsmCommon, holds code that's shared between the two backend (it could hold more, future work). In general, the difficulty with emitting InnerClass / EnclosingMethod is that we need to find out source-level properties. We need to make sure to do enough phase-travelling, and work around destructive changes to the ownerchain in lambdalift (we use originalOwner a lot). The change to JavaMirrors is prompted by the change to the EnclosingMethod attribute, which changes Java reflection's answer to getEnclosingMethod and getEnclosingConstructor. Classes defined in field initializers no longer have an enclosing method, just an enclosing class, which broke an assumption in JavaMirrors. There's one change in erasure. Before this change, when an object declaration implements / overrides a method, and a bridge is required, then the bridge method was actually a ModuleSymbol (it would get the lateMETHOD flag and be emitted as a method anyway). This is confusing, when iterating through the members of a class, you can find two modules with the same name, and one of them doesn't have a module class. Now, such bridge methods will be MethodSymbols. Removed Symbol.originalEnclosingMethod, that is a backend thing and doesn't need to live in the symbol API.
| | | * | | Don't traverse all trees in delambdafy phase if delambdafy:inlineLukas Rytz2014-09-011-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | If delambdafy:method is not enabled, the delambdafy method is a nop.
| | | * | | Fix indentation in delambdafyLukas Rytz2014-08-191-25/+25
| | | | | |
| | | * | | Integrate CoreBTypes by composition (not inheritance), non-var fieldsLukas Rytz2014-08-199-202/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the fields of CoreBTypes non-variable. Instead, replace the CoreBTypes instance on each compiler run. That results in fewer variables, and the initialization code is directly where the fields are declared, instead of an init method.
| | | * | | Minor cleanups, integrating review feedbackLukas Rytz2014-08-193-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | Review was in https://github.com/scala/scala/pull/3855
| | | * | | Add the ACC_DEPRECATED flag in javaFlags, instead of each call site.Lukas Rytz2014-08-193-25/+9
| | | | | |
| | | * | | Remove Tracked, add type information to ClassBTypeLukas Rytz2014-08-1910-1537/+1298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, a ClassBType was just a name. The `exemplars` map stored a Tracked instance for every ClassBType. Tracked stored type information that is required later in the backend when things may run concurrently. In particular: superclass, interfaces, flags and information for emitting the InnerClass attribute. Now we put all the information stored in Tracked directly in the ClassBType. There is still one hash map: `classBTypeFromInternalNameMap` maps a JVM internal class name (e.g. "scala/Predef$") to the corresponding ClassBType. This map is used during bytecode generation, when the ASM framework computes stack map frames. In order to compute stack map frames, the ASM framework needs to be able to get the LUB of two types. The default implementation uses reflection to get type information, however that doesn't work in our case: the classes we compile are not on the classpath. So instead, the backend overwrites the method `getCommonSuperClass` of the ClassWriter. This method receives two class internal names and computes their LUB. This is done by looking up the ClassBTypes in the `classBTypeFromInternalNameMap` and invoking `jvmWiseLUB`. This commit was reviwed in https://github.com/scala/scala/pull/3855. It consists of all commits labelled [squash-after-review], squashed into one.
| | | * | | Set currentUnit while generating bytecode.Lukas Rytz2014-08-192-3/+5
| | | | | |
| | * | | | Merge pull request #3949 from lrytz/t8627Grzegorz Kossakowski2014-08-276-13/+139
| | |\ \ \ \ | | | | | | | | | | | | | | SI-8627 make Stream.filterNot non-eager
| | | * | | | SI-8627 make Stream.filterNot non-eagerLukas Rytz2014-08-276-13/+139
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The obvious fix, overriding `filterNot` in Stream, is not binary compatible, see https://github.com/scala/scala/pull/3925 Instead, this makes `filterImpl` in TaversableLike private[scala], which allows overriding it in Stream. The corresponding mima-failures can be whitelisted, as the changes are only to private[scala]. In 2.12.x we can remove the override of `filter` in Stream, but in 2.11.x this is not binary compatible. Eventually we'd also like to make filter / filterNot in TraversableLike final, but that's not source compatible, so it cannot be done in 2.12.x.
| | * | | | Merge pull request #3905 from gourlaysama/wip/t5691-2Lukas Rytz2014-08-2610-7/+85
| | |\ \ \ \ | | | | | | | | | | | | | | SI-5691 lint warning when a type parameter shadows an existing type.
| | | * | | | SI-5691 lint warning when a type parameter shadows an existing type.Antoine Gourlay2014-08-1210-7/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new lint warning for when a class/method/type-member's type parameter shadows an existing type: `-Xlint:type-parameter-shadow`. It excludes type parameters of synthetic methods (the user can't rename or remove those anyway), otherwise, for example, every case class triggers the warning. Also fixes a test that contained wrong java sources (that didn't even compile...), discovered thanks to the warning. --- This kind of errors shows up every now and then on the mailing-list, on stackoverflow, etc. so maybe a warning would be useful. I was afraid this would yield too many warnings for libraries that are heavy on type parameters, but no: running this on scalaz and shapeless HEAD (`v7.1.0-RC1-41-g1cc0a96` and `v2.0.0-M1-225-g78426a0` respectively) yields 44 warnings. None of them are false positives; they usually come from: - scalaz loving using `A` as type parameter, even several levels deep of parametrized classes/methods - or calling a type parameter that will hold a map `Map`, or similar, thus shadowing an existing type
| * | | | | | Merge commit 'eb74148' into ↵Lukas Rytz2014-09-020-0/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | merge/2.11-to-2.12-is-it-really-sept-2-already-where-was-summer
| | * | | | | Merge pull request #3947 from lrytz/backportsLukas Rytz2014-08-2622-42/+84
| | |\ \ \ \ \ | | | |_|_|/ / | | |/| | | | Backporting from 2.12.x to 2.11.x
| | | * | | | Merge remote-tracking branch 'upstream/2.11.x' into backportsLukas Rytz2014-08-26131-815/+1383
| | | |\ \ \ \ | | | |/ / / / | | |/| | | | | | | | | | | | | | | | | | Conflicts: src/library/scala/util/matching/Regex.scala
| | | * | | | [backport] Rewrite explanation of doc-source-url option more clearly, and ↵Masato Sogame2014-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix encoding to show euro-sign correctly. (cherry picked from commit 13054daa658484df30b71447dbe684f475537252)
| | | * | | | [backport] Update javadoc tag to new scaladoc tags.Masato Sogame2014-08-113-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit 68b16a0992877b4ebbb7c967804edbb72c05ceb5)
| | | * | | | [backport] Fixes cut sentences in the generated scaladocsDominik Gruntz2014-08-1111-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes all first sentences of library functions which contain `i.e.` or `e.g.` and adds a `,` to prevent that the scaladoc summary sentence is cut after this abbreviation. This is possible as pull/3824 fixed how Scaladoc parses the first sentence of a method description into a sumary sentence(now the first sentence has to end with a dot followed by whitespace). Only docs in the core library are changed (src/library/**/*.scala) and only if they occur in the first sentence. Review by @heathermiller (cherry picked from commit 72721ff5dd06dea1235ecb71acae0bd61aee4814)
| | | * | | | [backport] Refactored example to Option.collect method.jxcoder2014-08-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit 7cca7635b392cb533d0f8e26b74d7362c0dd3891)
| | | * | | | [backport] Fixed mathematically wrong statement in the documentation of ↵Malte Isberner2014-08-111-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scala.math.PartialOrdering. - Previous (misleading) documentation suggested that a partial ordering *is* an equivalence relation. This has now been clarified. - Existing documentation on properties of partial orderings (reflexive, transitive, antisymmetric) had several formatting inconsistencies that have now been remove. (cherry picked from commit 528df5becee03175e7462b64d7c22460cc5992f7)
| | | * | | | [backport] Fix scaladoc typoLukas Elmer2014-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit 0a1694d8048f01b7f0812cedaa341813e9044e7f)
| | | * | | | [backport] Did not know of the fix for SI-8672. Followed the recommendation ↵Dominik Gruntz2014-08-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | given by som-snytt. (cherry picked from commit ec4abf5483e890976ae460252e80a66a95674e61)
| | | * | | | [backport] Fixes first sentence delimitersdgruntz2014-08-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scaladoc places the first sentence in the method summary table and index. The first sentence is defined as the sequence of chars up to the first period (not as in JavaDoc where the sentence ends with the first period *followed by a blank*). As a consequence, the clause starting with `i.e.` is interpreted as sentende delimiter. This request replaces `i.e.` with `i.e.`. Alghough a valid HTML code, I do not know whether this change is compatible with other tools. And I assume that this is not the only source file affected. (cherry picked from commit c2e4da674d8c40e2d220854a966b0510fb6d459e)
| | | * | | | [backport] [scaladoc] Changed align of example code to Option.contains and ↵Maks Atygaev2014-08-111-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Option.collect methods. (cherry picked from commit e3311073bbad6f6f0dfdd3ea09628d324b4b3614)
| | | * | | | [backport] SI-8705 Added example to Option.contains method.jxcoder2014-08-111-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit 1e2a21681a4a55469faa59b07473a3b269e70258)
| | | * | | | [backport] Added example to Option.collect method.jxcoder2014-08-111-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit 6c698089aeb55e649a65dd7ae1bce2b4514ee865)
| | | * | | | [backport] Change StringContext scaladocEvgeny Vereshchagin2014-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See e2a3498 commit message for explanation Explicit private declaration better than implicit Thanks to @som-snytt (cherry picked from commit d071abe8dd9035d8dd246ecb6b207e584b6437fa)
| | | * | | | [backport] som-snytt's update to wordingMax Bileschi2014-08-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit 80a9e908fd7b591a6fe452d908407d537675a999)