| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
lrytz/merge/2.11-to-2.12-is-it-really-sept-2-already-where-was-summer
Merge 2.11 to 2.12
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
merge/2.11-to-2.12-is-it-really-sept-2-already-where-was-summer
Conflicts:
versions.properties
|
| | |\ |
|
| | | |\
| | | | |
| | | | | |
[backport] SI-8787 Backport Regex doc
|
| | | |/
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | |\
| | | | |
| | | | | |
[backport] transformers no longer ignore UnApply.fun
|
| | | | |
| | | | |
| | | | |
| | | | | |
Backports 7122560063 and 4133eb8454 from the 2.11.x branch
|
| | | |\ \
| | | | | |
| | | | | | |
[backport] SI-7710 fix memory performance of RegexParsers in jdk7u6+
|
| | | | |/
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
| | |\| | |
|
| | | |\ \
| | | | | |
| | | | | | |
Prevent SI-8314 by adding a test
|
| | | |/ /
| | | | |
| | | | |
| | | | | |
The original issue was fixed already. This test is just for make sure.
|
| | | |\ \
| | | | |/
| | | |/| |
SI-8589 Performance improvement for ArrayCharSequence.toString
|
| | | |/ |
|
| | |\ \
| | | | |
| | | | | |
SI-8828 fix regression in Xlint visibility warning for sealed classes
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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`.
|
| | |\ \ \
| | | | | |
| | | | | | |
fix a few string interpolation typos
|
| | | |/ /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | |\ \ \
| | | | | |
| | | | | | |
SI-8823 Exclude specialized methods from extension method rewrite
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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.
|
| | |\ \ \ \
| | | |_|/ /
| | |/| | | |
GenBCode refactoring (remove Tracked) and fix InnerClass / EnclosingMethod attributes
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
If delambdafy:method is not enabled, the delambdafy method is a nop.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Review was in https://github.com/scala/scala/pull/3855
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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.
|
| | | | | | |
|
| | |\ \ \ \
| | | | | | |
| | | | | | | |
SI-8627 make Stream.filterNot non-eager
|
| | | |/ / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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.
|
| | |\ \ \ \
| | | | | | |
| | | | | | | |
SI-5691 lint warning when a type parameter shadows an existing type.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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/2.11-to-2.12-is-it-really-sept-2-already-where-was-summer
|
| | |\ \ \ \ \
| | | |_|_|/ /
| | |/| | | | |
Backporting from 2.12.x to 2.11.x
|
| | | |\ \ \ \
| | | |/ / / /
| | |/| | | |
| | | | | | |
| | | | | | | |
Conflicts:
src/library/scala/util/matching/Regex.scala
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
fix encoding to show euro-sign correctly.
(cherry picked from commit 13054daa658484df30b71447dbe684f475537252)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
(cherry picked from commit 68b16a0992877b4ebbb7c967804edbb72c05ceb5)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
(cherry picked from commit 7cca7635b392cb533d0f8e26b74d7362c0dd3891)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
(cherry picked from commit 0a1694d8048f01b7f0812cedaa341813e9044e7f)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
given by som-snytt.
(cherry picked from commit ec4abf5483e890976ae460252e80a66a95674e61)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Option.collect methods.
(cherry picked from commit e3311073bbad6f6f0dfdd3ea09628d324b4b3614)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
(cherry picked from commit 1e2a21681a4a55469faa59b07473a3b269e70258)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
(cherry picked from commit 6c698089aeb55e649a65dd7ae1bce2b4514ee865)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
See e2a3498 commit message for explanation
Explicit private declaration better than implicit
Thanks to @som-snytt
(cherry picked from commit d071abe8dd9035d8dd246ecb6b207e584b6437fa)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
(cherry picked from commit 80a9e908fd7b591a6fe452d908407d537675a999)
|