| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This reverts commit 9276a1205f74fdec74206209712831913e93f359.
The change is not binary compatible, See discussion on SI-8899. Making
filterImpl non-private changes its call-sites (within TraversableLike)
from INVOKESTATIC to INVOKEINTERFACE. Subclasses of TraversableLike
compiled before this change don't have a mixin for filterImpl.
|
|
|
|
|
|
|
|
|
|
| |
Used the standard method of sending out two iterators, one twice as fast as the others, to avoid hanging on .force, .hasDefiniteSize, and .addString.
.addString appends a "..." as the last element if it detects a cycle. It knows how to print the cycle length, but there's no good way to specify what you want right now, so it's not used.
Added tests in t8680 that verify that cyclic streams give the expected results.
Added to whitelist names of methods formerly used for recursion (now looping).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Make TypeCreator and TreeCreator extend Serializable.
- When replacing a SerializedTypeTag with a TypeTag or WeakTypeTag,
do not use scala.reflect.runtime.universe.rootMirror, since
it is unlikely to find user classes; instead, create a runtime
mirror using the context ClassLoader of the current thread.
Use the same logic for SerializedExpr.
- Remove writeObject/readObject methods from SerializedTypeTag
and SerializedExpr since they are unused.
- Add @throws annotation on writeReplace and readResolve methods.
- Handle SecurityException if the current thread cannot access the
context ClassLoader.
- To make type tags of primitive value classes serializable, make
PredefTypeCreator a top-level class. Otherwise, it would
retain a reference to the enclosing Universe,
rendering the TypeCreator non-serializable.
Binary compatibility:
- Keep nested PredefTypeCreator class to avoid backward binary
incompatible change.
- Keep `var` modifiers on the class parameters of
SerializedTypeTag for backward binary compatibility.
- Adds filter rules to forward binary compatibility whitelist:
- `TypeCreator`, `PredefTypeCreator`, and `TreeCreator` must now
extend from `Serializable`.
- Must have new class `scala.reflect.api.PredefTypeCreator`
to avoid problematic outer reference.
|
|
|
|
|
|
|
|
| |
This moves us a bit closer to the goal of having a single
entry point to reporting.
Must modularize Reporting a bit so it can be used in Variances
(need a reference to `currentRun` in `reflect.internal.Reporting`).
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sharpen interfaces, reduce footprint of Reporting trait.
Ideally, all reporting should indirect through reporter,
and the `Reporting` trait itself should be restricted to
a single method that retrieves the current `reporter`.
Pull up some more reporting to reflect.internal.
Would like to do more, but need to move partest to the
reflect.internal interface first.
(Its `errorCount` relies on `ERROR.count` in `tools.nsc.Reporter`.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move code from Global/SymbolTable to separate Reporting traits to
start carving out an interface in scala.reflect.internal.Reporting,
with internals in scala.tools.nsc. Reporting is mixed into the cake.
It contains a nested class PerRunReporting.
Should do the same for debugging/logging.
The idea is that CompilationUnit and Global forward all reporting
to Reporter. The Reporting trait contains these forwarders, and
PerRunReporting, which accumulates warning state during a run.
In the process, I slightly changed the behavior of `globalError`
in reflect.internal.SymbolTable: it used to abort, weirdly.
I assume that was dummy behavior to avoid introducing an abstract method.
It's immediately overridden in Global, and I couldn't find any other subclasses,
so I don't think the behavior in SymbolTable was ever observed.
Provide necessary hooks for scala.reflect.macros.Parsers#parse.
See scala/reflect/macros/contexts/Parsers.scala's parse method,
which overrides the reporter to detect when parsing goes wrong.
This should be refactored, but that goes beyond the scope of this PR.
Don't pop empty macro context stack.
(Ran into this while reworking -Xfatal-warnings logic.)
Fix -Xfatal-warnings behavior (and check files): it wasn't meant to
influence warning reporting, except for emitting one final error;
if necessary to fail the compile (when warnings but no errors were reported).
Warnings should stay warnings.
This was refactored in fbbbb22946, but we soon seem to have relapsed.
An hour of gitfu did not lead to where it went wrong. Must've been a merge.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can copy the hash table from the parent scope, rather
than constructing it from scratch.
This takes us to:
% rm -rf /tmp/pkg; (for i in {1..50}; do for j in {1..100}; do echo "package pkg { class A_${i}_${j}___(val a: Int, val b: Int) }"; done; done) > sandbox/A1.scala && time qbin/scalac -Ybackend:GenASM -J-Xmx1G -J-XX:MaxPermSize=400M -d /tmp sandbox/A1.scala;
real 0m19.639s // head~1 was 0m35.662s
user 0m41.683s // head~1 was 0m58.275s
sys 0m1.886s
In more detail, this commit:
- Removes the unused `fingerprint` constructor parameter from
scopes. This is a remnant from a previous optimization attempt
- Leave only one constructor on Scope which creates an empty
scope
- Update the factory method, `newNestedScope`, to copy the hash
table from the parent if it exists. We can rely on the invariant
that `outer.hashTable != null || outer.size < MIN_HASH)`, so we
don't need `if (size >= MIN_HASH) createHash()` anymore. This
used to be needed in `Scope#<init>`, which accepted an aribitrary
`initElems: ScopeEntry`.
- Update subclasses and factories of `Scope` in runtime reflection
to accomodate the change. Pleasingly, we could actually remove
the override for `newNestedScope`.
- Unit tests the functionality I'm touching
|
|\
| |
| |
| |
| |
| | |
Conflicts:
bincompat-forward.whitelist.conf
src/reflect/scala/reflect/runtime/JavaMirrors.scala
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Scala's runtime reflection works in few modes. The primary mode reads
reads out the pickled signatures from ScalaSig annotations, if
avaialable. However, these aren't available for Java-defined classes
(obviously) nor for local Scala-defined classes (less obviously.),
and the Scala `Symbol`s and `Types` must be reconstructed from
the Java generic reflection metadata.
This bug occurs in the last case, and is centered in
`FromJavaClassCompleter`.
In that completer, member fields and methods are given an owner
based on the STATIC modifier. That makes sense for Java defined
classes. I'm not 100% if it makes sense for Scala defined classes;
maybe we should just skip them entirely?
This patch still includes them, but makes the ownership-assignment
more robust in the face of STATIC members emitted by the Scala
compiler backend, such as the cache fields for structural calls.
(It's reflection all the way down!). We might not have a companion
module at all, so before we ended up owning those by `NoSymbol`,
and before too long hit the dreaded NSDHNAO crash.
That crash doesn't exist any more on 2.11 (it is demoted to a
-Xdev warning), but this patch still makes sense on that branch.
This commit makes `followStatic` and `enter` more robust when
finding a suitable owner for static members. I've also factored
out the duplicated logic between the two.
|
| |
| |
| |
| |
| |
| |
| | |
scala.reflect.internal._ now gets a free pass from binary
compatibility checking.
Previously, we had to excrutiatingly exclude violations individually.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The bug report suggests this problem only became visible in the
IDE *after* 2.10.3, but I tested an IDE with exactly 2.10.3 and
saw the same problem.
In fact, my test case fails as far back as 2.10.0. I suspect the
problem showed up after 816cecf9a9, which checks that pairs of
companion symbols are codefined eagerly in Namers.
This commit modifies the check of `rawInfo ne NoType`
in `isCoDefinedWith` to avoid triggering adaptation of types from
the previous run. I'm not sure of the precise intent of that check.
I looked at c9861cd198 (genesis of isCoDefinedWith). Before that we
get back to 3761cb4b3a1 (the dawn of Subversion.)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A class should not be required to implement a Java default method.
This commit uses `isDeferredNotDefault` in place of `isDeferred`
when finding unimplemented methods.
The test itself does not depend on Java 8 as we use scalac's
Java source parser to set things 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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We have to assume that the classes we are reflecting on were
compiled with the default value for -Xmax-classfile-name (255).
With this assumption, we can apply the same name compactification
as done in the regular compiler.
The REPL is particularly prone to generating long class names
with the '$iw' prefixes, so this is an important fix for runtime
reflection.
Also adds support for getting the runtime class of `O.type` if
`O` is a module.
|
| |\
| | |
| | | |
[nomaster] macro expansions are now auto-duplicated
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The fix still requires macro developers to be careful about sharing trees
by references, because attributed DefTrees will still bring trouble.
However this is an improvement, because it doesn't make matters worse
and automatically fixes situations similar to one in the test.
A much more thorough discussion with a number of open questions left:
http://groups.google.com/group/scala-internals/browse_thread/thread/492560d941b315cc
Was fixed ages ago in master in one of the paradise backports.
Never got to 2.10.x, but it's very useful, so I'm backporting it now.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Synthetic defs introduced by transforms like named/default arguments,
ANF (in scala-async) often introduce a type tree (the tpt of the temporary)
that are based on the types of expressions. These types are scrutinized in
RefChecks to check that type parameter bounds are satisfied.
However, the type of the expression might be based on slack a LUB that
fails to capture constraints between type parameters.
This slackness is noted in `mergePrefixAndArgs`:
// Martin: I removed this, because incomplete. Not sure there is a
// good way to fix it. For the moment we just err on the conservative
// side, i.e. with a bound that is too high.
The synthesizer can now opt out of bounds by annotating the type as follows:
val temp: (<expr.tpe> @uncheckedBounds) = expr
This facility is now used in named/default arguments for the temporaries
used for the reciever and arguments.
The annotation is hidden under scala.reflect.internal, rather than in
the more prominent scala.annotation.unchecked, to reflect the intention
that it should only be used in tree transformers.
The library component of this change and test case will be included in the
next commit. Why split like this? It shows that the 2.10.3 compiler will
work with 2.10.2 scala-reflect.jar.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously PackageScopes from scala.reflect ignored all classes that
had $'s in non-rightmost positions in their names.
Unfortunately this behaviour is inconsistent with how scalac does things,
and I reconciled this as usual, by pulling corresponding logic into
scala-reflect.jar and sharing it between runtime reflection and compiler.
This change has seprate pull requests for 2.10.x and 2.11.0. The latter
deprecates `scala.tools.nsc.util.ClassPath.isTraitImplementation`
whereas the former (which you're looking at right now) does not, because
we can't deprecated members in minor releases.
|
| |
| |
| |
| |
| |
| |
| | |
Apparently there are still discrepancies between how the vanilla compiler
turns class files into symbols and how the reflective compiler does it.
Working on bringing these guys in sync, one bug at a time.
|
| |\
| | |
| | | |
SI-7336 Link flatMapped promises to avoid memory leaks
|
| | | |
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`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
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Updates ForkJoinPool and dependent classes to the latest jsr166y revisions:
ForkJoinPool.java:
Revision 1.185
Sat Feb 16 20:50:29 2013 UTC (2 months, 2 weeks ago) by jsr166
ForkJoinTask.java:
Revision 1.100
Tue Feb 5 17:09:54 2013 UTC (3 months ago) by jsr166
ForkJoinWorkerThread.java:
Revision 1.73
Wed Nov 21 19:54:39 2012 UTC (5 months, 2 weeks ago) by dl
- Includes Akka-contributed `sun.misc.Unsafe` detection to support Android.
See changeset 06d685c1bbd8a0d058ee8a3f374569f8097f2acc
- Adds private `CountedCompleter` class.
This class is only visible and used in `ForkJoinPool.java`.
- Updates desired.sha1 for updated forkjoin.jar.
- Updates binary compatibility whitelists to exclude package-private methods
in the `forkjoin` package.
- Also fixes SI-7438.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In classfile parser: mark symbols which represent interface
methods yet have code attributes with new flag DEFAULTMETHOD.
These must be kept distinct from regular method bodies so that
an error can be issued when a regular concrete method is
overridden without the override keyword, but not when the
overridden method is a default.
In java source parser: mark Modifiers of interface default
methods with DEFAULTMETHOD flag.
Writing the test was everything I dreamed, and more! However,
% test/partest --debug test/files/run/t7398.scala
Skipping java8-specific test under java version 1.7.0_21
testing: [...]/files/run/t7398.scala [ OK ]
All of 1 tests were successful (elapsed time: 00:00:04)
% test/partest --debug test/files/run/t7398.scala
Attempting java8-specific test under java version 1.8.0-ea
testing: [...]/files/run/t7398.scala [ OK ]
All of 1 tests were successful (elapsed time: 00:00:13)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In 692372ce, we added a warning (under -Xlint) when binding
a `TupleN` in to a single pattern binder, which wasn't allowed
before 2.10.0, and more often than not represents a bug.
However, that warning overstretched, and warned even when
using a Tuple Pattern to bind to the elements of such a value.
This commit checks for this case, and avoids the spurious warnings.
A new test case is added for this case to go with the existing
test for SI-6675:
$ ./tools/partest-ack 6675
% tests-with-matching-paths ... 3
% tests-with-matching-code ... 2
# 3 tests to run.
test/partest --show-diff --show-log \
test/files/neg/t6675-old-patmat.scala \
test/files/neg/t6675.scala \
test/files/pos/t6675.scala \
""
Testing individual files
testing: [...]/files/pos/t6675.scala [ OK ]
Testing individual files
testing: [...]/files/neg/t6675-old-patmat.scala [ OK ]
testing: [...]/files/neg/t6675.scala [ OK ]
All of 3 tests were successful (elapsed time: 00:00:03)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a type constructor variable is applied to the wrong number of arguments,
return a new type variable whose instance is `ErrorType`.
Dissection of the reported test case by @retronym:
Define the first implicit:
scala> trait Schtroumpf[T]
defined trait Schtroumpf
scala> implicit def schtroumpf[T, U <: Coll[T], Coll[X] <: Traversable[X]]
| (implicit minorSchtroumpf: Schtroumpf[T]): Schtroumpf[U] = ???
schtroumpf: [T, U <: Coll[T], Coll[X] <: Traversable[X]](implicit minorSchtroumpf: Schtroumpf[T])Schtroumpf[U]
Call it explicitly => kind error during type inference reported.
scala> schtroumpf(null): Schtroumpf[Int]
<console>:10: error: inferred kinds of the type arguments (Nothing,Int,Int) do not conform to the expected kinds of the type parameters (type T,type U,type Coll).
Int's type parameters do not match type Coll's expected parameters:
class Int has no type parameters, but type Coll has one
schtroumpf(null): Schtroumpf[Int]
^
<console>:10: error: type mismatch;
found : Schtroumpf[U]
required: Schtroumpf[Int]
schtroumpf(null): Schtroumpf[Int]
^
Add another implicit, and let implicit search weigh them up.
scala> implicitly[Schtroumpf[Int]]
<console>:10: error: diverging implicit expansion for type Schtroumpf[Int]
starting with method schtroumpf
implicitly[Schtroumpf[Int]]
^
scala> implicit val qoo = new Schtroumpf[Int]{}
qoo: Schtroumpf[Int] = $anon$1@c1b9b03
scala> implicitly[Schtroumpf[Int]]
<crash>
Implicit search compares the two in-scope implicits in `isStrictlyMoreSpecific`,
which constructs an existential type:
type ET = Schtroumpf[U] forSome { type T; type U <: Coll[T]; type Coll[_] <: Traversable[_] }
A subsequent subtype check `ET <:< Schtroumpf[Int]` gets to `withTypeVars`, which
replaces the quantified types with type variables, checks conformance of that
substitued underlying type against `Schtroumpf[Int]`, and then tries to solve
the collected type constraints. The type var trace looks like:
[ create] ?T ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]] )
[ create] ?U ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]] )
[ create] ?Coll ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]] )
[ setInst] Nothing ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]], T=Nothing )
[ setInst] scala.collection.immutable.Nil.type( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]], U=scala.collection.immutable.Nil.type )
[ setInst] =?scala.collection.immutable.Nil.type( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]], Coll==?scala.collection.immutable.Nil.type )
[ create] ?T ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]] )
[ setInst] Int ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]], T=Int )
[ create] ?T ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]] )
[ create] ?U ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]] )
[ create] ?Coll ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]] )
[ setInst] Nothing ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]], T=Nothing )
[ setInst] Int ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]], U=Int )
[ setInst] =?Int ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]], Coll==?Int )
The problematic part is when `?Int` (the type var originated from `U`) is registered
as a lower bound for `Coll`. That happens in `solveOne`:
for (tparam2 <- tparams)
tparam2.info.bounds.hi.dealias match {
case TypeRef(_, `tparam`, _) =>
log(s"$tvar addLoBound $tparam2.tpeHK.instantiateTypeParams($tparams, $tvars)")
tvar addLoBound tparam2.tpeHK.instantiateTypeParams(tparams, tvars)
case _ =>
}
|
| |
| |
| |
| |
| |
| |
| | |
For imminent reuse in the subsequent commit.
The binary compatibility whitelist is updated to
ignore these, as they live in reflect.internal.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit makes the ClassFileReader/ICodeReader parse class files
from JDK 7 (class file version 51). It does that by skipping over
the method handle related entries in the constant pool and by doing
some dummy processing on invoke dynamic instructions. The inliner
is updated to not try to inline a method with an invoke dynamic
instruction. A place holder INVOKE_DYNAMIC instruction is added to ICode
but it is designed to create an error if there's ever any attempt to
analyze it. Because the inliner is the only phase that ever tries
to analyze ICode instructions not generated from Scala source and
because Scala source will never emit an INVOKE_DYNAMIC, the place
holder INVOKE_DYNAMIC should never cause any errors.
A test is included that generates a class file with INVOKE_DYNAMIC
and then compiles Scala code that depends on it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 54a84a36d5b435a787d93ca48d45399136c7e162.
This is necessary to maintain binary compatibility with 2.10.0.
run/t6989.check had to be updated as it also (indirectly) tested SI-6548
Conflicts:
test/files/lib/javac-artifacts.jar.desired.sha1
test/files/run/t6548.check
test/files/run/t6548/Test_2.scala
|
| |
| |
| |
| |
| |
| | |
This reworks 02ed5fb so that we don't change JavaUniverse's super classes.
This is necessary to maintain binary compatibility with 2.10.0.
|
| |
| |
| |
| |
| |
| | |
This reverts commit 0429f0fd9224499cd8b606490d04b1a8dcffbca8.
This is necessary to maintain binary compatibility with 2.10.0.
|
| |
| |
| |
| |
| |
| | |
Inlined AdaptedForkJoinTask, made uncaughtExceptionHandler private[this].
This is necessary to maintain binary compatibility with 2.10.0.
|
| |
| |
| |
| | |
This is necessary to maintain binary compatibility with 2.10.0.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Reworks d526f8bd74.
This is necessary to maintain binary compatibility with 2.10.0.
matchName="scala.collection.mutable.MutableList.tailImpl"
problemName=MissingMethodProblem
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also revert "SI-4664 [Make scala.util.Random Serializable] Add test case"
This reverts commit 0b92073a38f9d1823f051ac18173078bfcfafc8a.
This reverts commit 2aa66bec86fd464712b0d15251cc400ff9d52821.
This is necessary to maintain binary compatibility with 2.10.0.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit a557a973608a75c7a02f251bbcf49fe6f6b6655e.
This is necessary to maintain binary compatibility with 2.10.0.
Mima says:
matchName="scala.collection.immutable.Range.head"
problemName=IncompatibleResultTypeProblem
The bridge method appeared because result is now Int, whereas
the super-method's result type erases to Object
|
|
|
|
|
|
|
|
|
|
| |
Using @gkossakowski's contribution to mima (in 0.1.5-SNAPSHOT),
make sure bc.run doesn't fail by filtering out all binary incompatibilities.
Each subsequent commit will comment out the filters it makes irrelevant,
until we only need to filter out permitted binary incompatibilities.
We only allow binary incompatibilities in scala.reflect.internal.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to the fact that all TypTrees are transformed into TypeTrees
during typechecking one couldn't treat typed type trees in the same
way as they treat untyped type trees.
This change implements support for pattern matching of TypeTrees as their
corresponding TypTree equivalent using tree preserved in the original.
The implementation itself is a trivial wrapping of regular TypTree
extractors into MaybeTypeTreeOriginal.
|
|
|
|
|
|
|
|
|
| |
I just realized that our tag-based shortcuts were incomplete, because
they only work with root mirrors (doing just u.typeTag[T].tpe means that
the type is going to be resolved in u.rootMirror because that's the default).
This commit fixes this oversight. I'm hoping for 2.11.0-RC3, but also feel
free to reschedule to 2.12.0-M1 if it becomes clear that RC3 isn't happening.
|
|\
| |
| | |
SI-8200 provide an identity liftable for trees
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This liftable hasn't been originally included in the set of standard
liftables due to following contradiction:
1. On one hand we can have identity lifting that seems to be quite
consistent with regular unquoting:
q"..${List(1,2)}" <==> q"1; 2"
q"${List(1,2)}" <==> q"s.c.i.List(1, 2)"
q"..${List(q"a", q"b")}” <==> q"a; b"
q"${List(q"a", q"b")}" <==> q"s.c.i.List(a, b)"
This is also consistent with how lisp unquoting works although they
get lifting for free thanks to homoiconicity:
// scala
scala> val x = List(q"a", q"b); q"f($x)"
q"f(s.c.i.List(a, b))"
// scheme
> (let [(x (list a b))] `(f ,x))
'(f (list a b))
2. On the other hand lifting is an operation that converts a value into
a code that when evaluated turns into the same value. In this sense
Liftable[Tree] means reification of a tree into a tree that
represents it, i.e.:
q"${List(q"a", q"b")}"
<==>
q"""s.c.i.List(Ident(TermName("a")), Ident(TermName("b")))"""
But I belive that such lifting will be very confusing for everyone
other than a few very advanced users.
This commit introduces the first option as a default Liftable for trees.
|
|/
|
|
|
| |
Make the head iterator a constructor parameter, for easier
construction and implementation of ++.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously one could match a partial function with match quasiquote:
scala> val q"$scrutinee match { case ..$cases }" = q"{ case Foo => Bar
}"
scrutinee: universe.Tree = <empty>
cases: List[universe.CaseDef] = List(case Foo => Bar)
This was quite annoying as it leaked encoding of partial functions as
Match trees with empty tree in place of scrutinee.
This commit make sure that matches and partial functions are disjoint
and don't match one another (while preserving original encoding under
the hood out of sight of the end user.)
|
|
|
|
|
|
| |
Due to tree re-use it used to be the fact that type quasiquotes could
match term trees. This commit makes sure selections and applied type and
type applied are all non-overlapping between q and tq.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The b8a76f688c6ce2a4c305da064303bb46b53be875 introduced ArrayOps.{unzip,
unzip3} methods. Both of those methods have ClassTags as context bounds on
their type parameters so they can create (and return) instances of Arrays.
The type inference for those methods is supposed to be guided by
implicit evidence that T <: (T1, T2) (or T <: (T1, T2, T3) in unzip3 case).
However, context bounds are desugared into implicit parameters that
prepended in front of implicit parameters declared in source code. That
means the implicit evidence won't have a chance to guide type inference
because it comes as last implicit parameter.
This commit desugars context bounds and puts them at the end of implicit
parameter list. This way type inference is guided properly and we get
expected compiler errors for missing class tags.
The change to parameters order breaks binary compatibility with respect
to 2.11.0-RC1. I added filters to our binary compatibility configuration
files. We can get rid of them as soon as 2.11.0 is out.
|
|
Changes in the package scala.reflect.internals are ignored.
|