| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Cache the most recently created SubstTypeMap.
|
| |
| |
| |
| |
| | |
I discovered that a 1-element cache for SubstTypeMaps
gave a 75-90% hit rate.
|
|\ \
| | |
| | | |
SI-7149 Use a WeakHashSet for type uniqueness
|
| | |
| | |
| | |
| | |
| | |
| | | |
perRunCaches was using a HashMap of WeakReferences which meant it would
accumulate WeakReferences over time. This commit uses a WeakHashSet
instead so that the references are cleaned up.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently type uniqueness is done via a HashSet[Type], but
that means the Types live through an entire compile session, even
ones that are used once. The result is a huge amount of unnecessarily
retained memory. This commit uses a WeakHashSet instead so that Types
and their WeakReferences are cleaned up when no longer in use.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Replaces scala.reflect.internal.WeakHashSet with a version that
* extends the mutable.Set trait
* doesn't leak WeakReferences
* is unit tested
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* pr/merge-2.10.2:
SI-7375 ClassTag for value class aliases
SI-7507 Fix lookup of private[this] member in presence of self type.
SI-7532 Fix regression in Java inner classfile reader
SI-7517 Fix higher kinded type inference regression
SI-7516 Revert "SI-7234 Make named args play nice w. depmet types"
A test case for a recent LUB progression.
SI-7421 remove unneeded extra-attachement in maven deploy
SI-7486 Regressions in implicit search.
SI-7509 Avoid crasher as erronous args flow through NamesDefaults
SI-6138 Centralize and refine detection of `getClass` calls
SI-7497 Fix scala.util.Properties.isMac
SI-7473 Bad for expr crashes postfix
Increase build.number to 2.10.3
SI-7391 Always use ForkJoin in Scala actors on ... ... Java 6 and above (except when the porperty actors.enableForkJoin says otherwise)
Reimplementing much of the DefaultPromise methods Optimizations: 1) Avoiding to call 'synchronized' in tryComplete and in tryAwait 2) Implementing blocking by using an optimized latch so no blocking ops for non-blockers 3) Reducing method size of isCompleted to be cheaper to inline 4) 'result' to use Try.get instead of patmat
c.typeCheck(silent = true) now suppresses ambiguous errors
Conflicts:
bincompat-backward.whitelist.conf
bincompat-forward.whitelist.conf
src/compiler/scala/reflect/macros/contexts/Typers.scala
src/compiler/scala/reflect/reify/package.scala
src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/compiler/scala/tools/reflect/ToolBoxFactory.scala
src/library/scala/concurrent/impl/Promise.scala
src/reflect/scala/reflect/internal/Types.scala
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* origin/2.10.2:
SI-7532 Fix regression in Java inner classfile reader
SI-7517 Fix higher kinded type inference regression
SI-7516 Revert "SI-7234 Make named args play nice w. depmet types"
SI-7486 Regressions in implicit search.
SI-7509 Avoid crasher as erronous args flow through NamesDefaults
|
| | |\ \ \
| | | | | |
| | | | | | |
SI-7532 Fix regression in Java inner classfile reader
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
395e90a modified the detection of top-level classes in
ClassfileParser in two ways:
1. used `Name#containsChar` rather than `toString.indexOf ...` (good!)
2. decoded the name before doing this check (bad!)
That code is actually only run for non-Scala classfiles, whose
names don't need decoding. Attempting to do so converted `R$attr`
to `R@tr`, which no longer contains a '$', and was wrongly treated
as a top level class.
This commit reverts the use of `decodedName`, and inlines the method
to its only call site for clarity.
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- Discovered in 2.10.2-RC1
- Ostensibly regressed in 7e52fb910b, which conceptually reverted
part of 0cde930b so that (mutable) TypeVars don't use structural equality.
- But, does *not* fail if 7e52fb910b is cherry-picked directly after 0cde930b,
suggesting that it shone a light on a behaviour change in some other commit
in between the two.
- Indeed, the true regression came in https://github.com/scala/scala/commit/e5da30b843#L5L3176
- A targeted revert of e5da30b843 is undesirable, as we'd like SI-6846 to stay fixed
What's happening here? In the enclosed test case, higher kinded type
inference explores two possibilities:
Composed.this.Split[A]
K[[T]A[B[T]]] // `Split[A]` dealiased
The difference in the flow of type inference can be seen from the diff
below. Notice how now we no longer register `?K.addBound(Composed.this.Split)`,
we instead only register `?K.addBound(K)`
```patch
--- sandbox/old.log 2013-05-30 00:27:34.000000000 +0200
+++ sandbox/new.log 2013-05-30 00:28:28.000000000 +0200
@@ -1,55 +1,114 @@
?K.unifyFull(Composed.this.Split[A])
?K.unifySpecific(Composed.this.Split[A])
- ?K.addBound(Composed.this.Split)
?B.unifyFull(T)
?B.unifySpecific(T)
`-> false
?B.unifyFull(Any)
?B.unifySpecific(Any)
`-> false
`-> false
?K.unifySpecific(L[[T]A[B[T]]])
- ?K.addBound(L)
?B.unifyFull(B[T])
?B.unifySpecific(B[T])
?B.addBound(B)
`-> true
?B.unifyFull(B[T])
?B.unifySpecific(B[T])
?B.addBound(B)
`-> true
?B.unifyFull(B[T])
?B.unifySpecific(B[T])
?B.addBound(B)
`-> true
?B.unifyFull(B[T])
?B.unifySpecific(B[T])
?B.addBound(B)
`-> true
+ ?K.addBound(L)
`-> true
?K.unifyFull(Composed.this.Split[A])
?K.unifySpecific(Composed.this.Split[A])
- ?K.addBound(Composed.this.Split)
?B.unifyFull(x)
?B.unifySpecific(x)
`-> false
`-> false
?K.unifySpecific(L[[T]A[B[T]]])
+ ?B.unifyFull(B[T])
+ ?B.unifySpecific(B[T])
+ ?B.addBound(B)
+ `-> true
+ ?B.unifyFull(B[T])
+ ?B.unifySpecific(B[T])
+ ?B.addBound(B)
+ `-> true
+ ?B.unifyFull(B[T])
+ ?B.unifySpecific(B[T])
+ ?B.addBound(B)
+ `-> true
+ ?B.unifyFull(B[T])
+ ?B.unifySpecific(B[T])
+ ?B.addBound(B)
+ `-> true
?K.addBound(L)
+ `-> true
+?K.unifyFull(Composed.this.Split[A])
+ ?K.unifySpecific(Composed.this.Split[A])
+ ?B.unifyFull(T)
+ ?B.unifySpecific(T)
+ `-> false
+ ?B.unifyFull(Any)
+ ?B.unifySpecific(Any)
+ `-> false
+ `-> false
+ ?K.unifySpecific(L[[T]A[B[T]]])
?B.unifyFull(B[T])
?B.unifySpecific(B[T])
?B.addBound(B)
`-> true
?B.unifyFull(B[T])
?B.unifySpecific(B[T])
?B.addBound(B)
`-> true
?B.unifyFull(B[T])
?B.unifySpecific(B[T])
?B.addBound(B)
`-> true
?B.unifyFull(B[T])
?B.unifySpecific(B[T])
?B.addBound(B)
`-> true
+ ?K.addBound(L)
+ `-> true
+?K.unifyFull(Composed.this.Split[A])
+ ?K.unifySpecific(Composed.this.Split[A])
+ ?B.unifyFull(x)
+ ?B.unifySpecific(x)
+ `-> false
+ `-> false
+ ?K.unifySpecific(L[[T]A[B[T]]])
+ ?B.unifyFull(B[T])
+ ?B.unifySpecific(B[T])
+ ?B.addBound(B)
+ `-> true
+ ?B.unifyFull(B[T])
+ ?B.unifySpecific(B[T])
+ ?B.addBound(B)
+ `-> true
+ ?B.unifyFull(B[T])
+ ?B.unifySpecific(B[T])
+ ?B.addBound(B)
+ `-> true
+ ?B.unifyFull(B[T])
+ ?B.unifySpecific(B[T])
+ ?B.addBound(B)
+ `-> true
+ ?K.addBound(L)
+ `-> true
+?K.unifyFull(L[A])
+ ?K.unifySpecific(L[A])
+ ?K.addBound(L)
+ `-> true
+?K.unifyFull(L[A])
+ ?K.unifySpecific(L[A])
+ ?K.addBound(L)
`-> true
```
|
| | |\ \ \
| | | | | |
| | | | | | |
SI-7516 Revert "SI-7234 Make named args play nice w. depmet types"
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This reverts commit 83c9c764b528a7a1c1d39c480d22c8e3a71d5a58.
The tests are shunted to 'pending'.
Why revert this seemingly innocous commit? 83c9c764 generates a ValDef whose
tpt TypeTree has no original; this contains a reference to the symbol for `d`.
resetAttrs and the retypecheck assigns a new symbol for d and leaves a the
reference to the prior symbol dangling. The real bug is the resetAttrs concept.
|
| | |\ \ \ \
| | | |/ / /
| | |/| | | |
SI-7486 Regressions in implicit search.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Revert e86832d7e8 and dd33e280e2.
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The fix for SI-7238 caused this regression.
This commit marks taints whole Apply with an ErrorType if it
has an erroneous argument, so as to stop a later crash trying
to further process the tree.
|
| |\ \ \ \
| | | | | |
| | | | | | |
SI-7507 Fix lookup of private[this] member in presence of self type.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In the following code:
trait Cake extends Slice
trait Slice { self: Cake => // must have self type that extends `Slice`
private[this] val bippy = () // must be private[this]
locally(bippy)
}
`ThisType(<Slice>)`.findMember(bippy)` excluded the private local member on
the grounds that the first class in the base type sequence, `Cake`, was
not contained in `Slice`.
scala> val thisType = typeOf[Slice].typeSymbol.thisType
thisType: $r.intp.global.Type = Slice.this.type
scala> thisType.baseClasses
res6: List[$r.intp.global.Symbol] = List(trait Cake, trait Slice, class Object, class Any)
This commit changes `findMember` to use the symbol of the `ThisType`, rather
than the first base class, as the location of the selection.
|
| |\ \ \ \ \
| | |/ / / /
| |/| | | | |
SI-7375 ClassTag for value class aliases
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
reifyRuntimeClass now always dealiases its argument prior to processing.
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
SI-6138 Centralize and refine detection of `getClass` calls
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
`getClass` is special cased in the compiler; this is described
in in the comments on `Definitions.Any_getClass`.
Part of this happens in `Typer#stabilize`. This was trying to determine
if an Ident or Select node was a call to `getClass` by merits of the name
of the tree's symbol and by checking that the its type (if it was a
MethodType or PolyType) had no parameters in the primary parameter list.
Overloaded user defined `getClass` methods confused this check. In the
enclosed test case, the tree `definitions.this.getClass` had an
`OverloadedType`, and such types always report an empty list of `params`.
This commit:
- changes `stabilize` to use `isGetClass`, rather than the
homebrew check
- changes `isGetClass` to consider a `Set[Symbol]` containing all
`getClass` variants. This moves some similar code from `Erasure`
to `Definitions`
- keeps a fast negative path in `isGetClass` based on the symbol's name
|
| |\ \ \ \ \ \
| | |_|/ / / /
| |/| | | | | |
SI-7391 Always use ForkJoin in Scala actors on ...
|
| | | |/ / /
| | |/| | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
... Java 6 and above (except when the porperty
actors.enableForkJoin says otherwise)
Like SI-7236 and SI-7237, the logic in
scala.actors.scheduler.ThreadPoolConfig.useForkJoin
(which resulted in a different thread pool implementation
being chosen) was causing random hangs in the test
concurrent-stream.scala when running on Avian.
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
SI-7473 Bad for expr crashes postfix
|
| | | |/ / /
| | |/| | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This commit makes building PostfixSelect robust against a bad pos
on its operand, which can happen if a bad for expression results
in an EmptyTree.
|
| | | | | | |
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It returned wrong values because it used the java.vendor
property instead of os.name.
See http://mail.openjdk.java.net/pipermail/macosx-port-dev/2012-November/005148.html
for the reason why we don't follow developer.apple.com/library/mac/#technotes/tn2002/tn2110.
|
| |\ \ \ \
| | | | | |
| | | | | | |
c.typeCheck(silent = true) now suppresses ambiguous errors
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Otherwise use cases like the one shown in the attached test (trying to
typecheck something, which leads to an ambiguous overload error) will
mysteriously fail compilation.
|
| |\ \ \ \ \
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | | |
viktorklang/wip-removing-synchronization-from-DefaultPromise-2.10-√
Reimplementing blocking awaiting for Futures so only the blockers have t...
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Optimizations:
1) Avoiding to call 'synchronized' in tryComplete and in tryAwait
2) Implementing blocking by using an optimized latch so no blocking ops for non-blockers
3) Reducing method size of isCompleted to be cheaper to inline
4) 'result' to use Try.get instead of patmat
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This reverts commit 14534c693d2eb6acafaf8244c14b5643388fbd67.
It turns out this approach was breaking the working variations
in the submitted test case even as it was unbreaking the unworking
one, but I never managed to uncomment them. Fortunately retronym's
test case was not so lackadaisical.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
constructors phase refactoring for readability
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
And it's a nice golf clinic and all, but let's remove our
golf gloves and take in some film.
for (stat <- defBuf.iterator ++ auxConstructorBuf.iterator)
A quick count:
- defBuf is a ListBuffer (1 mutant)
- auxConstructorBuf is a ListBuffer (2 mutants)
- two mutable iterators over mutable sequences (3, 4 mutants)
- Iterator.++ joins them and is BY-NAME (4 mutants, 1 tragedy in waiting)
- the joined Iterator is a new mutable structure (5 mutants, now 3 deep)
- omittables is a mutable Set (6 mutants)
- the 5-layer-3-deep iterator mutates omittables as it walks
[The following is a public service breakdown. The letter
sequence y-o-u is a local variable which should be replaced
with your name, whoever "you" are, if you commit any code in
these parts.]
Hear my plea! YOU DON'T HAVE TO DO IT THIS WAY! It isn't simpler,
faster, easier, more satisfying, shorter, more pixelated, there
just isn't any advantage to it, even if you're lazy! Especially
if you're lazy! Whatever combination of virtues and vices exist
in your personal petri dish, this will never be a hilltop!
PLEASE COME ENJOY A DRINK WITH ME AND MY FRIEND 'VAL' !!
I'LL INTRODUCE YOU! I THINK YOU WILL REALLY LIKE HER! I HOPE
YOU WILL SEE A LOT OF ONE ANOTHER! REMEMBER THAT NAME, 'VAL' !!
SHE'LL HAVE HER EYE OUT FOR YOU!
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Putting back the bits I moved aside to get a clean rebase.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Removing the old implementation of elision in constructors
in favor of the new one which is both faster, more readable.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
For now both old and new implementations of elision coexist,
allowing cross-checking their results.
In the next commit only the new one will remain.
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This way the contract of `transformClassTemplate()` can focus on
non-AnyVal cases, which are more regular from the perspective of
transforming their templates in the constructors phase.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The check in question relies on helper maps and methods that don't
belong outside that check. This commit encapsulates those helpers into
the newly added `checkUninitializedReads()` , thus uncluttering
`transformClassTemplate()`
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
If I reverse these few lines, I can rebase miguel's
pull request cleanly; if I don't, git thinks there are
enough merge conflicts to start a war. Something is
suboptimal in that algorithm.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-7520 bug in subtyping.
|