summaryrefslogtreecommitdiff
path: root/bincompat-backward.whitelist.conf
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Optimize slice and take in ArrayOps, WrappedArray"Adriaan Moors2017-04-071-41/+0
| | | | This reverts commit d540bf01fe4d9e5c56a68b0d3bada9d97af77e3f.
* Merge pull request #5600 from paplorinc/HashTable_indexSeth Tisue2017-03-061-0/+12
|\ | | | | Further small HashTable optimizations
| * Optimized HashTable.nextPositivePowerOfTwoPap Lőrinc2017-02-181-0/+12
| |
* | SI-10026 Fix endless cycle in runtime reflectionJason Zaugg2017-02-191-0/+8
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 56f23af introduced a call to `baseTypeSeq` of `scala.collection.mutable.ArrayOps.ofRef[?T]{}` in `findMember`. This exposed a latent bug in the synchronized wrapper of `BaseTypeSeq`, demonstrated below with an older version of Scala: ``` Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_112). Type in expressions for evaluation. Or try :help. scala> val symtab = reflect.runtime.universe.asInstanceOf[scala.reflect.internal.SymbolTable] symtab: scala.reflect.internal.SymbolTable = scala.reflect.runtime.JavaUniverse@458544e0 scala> import symtab._ import symtab._ scala> val ArrayOps_ofRef_Class = symtab.symbolOf[scala.collection.mutable.ArrayOps.ofRef[AnyRef]] ArrayOps_ofRef_Class: symtab.TypeSymbol = class ofRef scala> appliedType(symbolOf[Set[Any]], symbolOf[Set[Any]].typeParams.map(TypeVar(_))) res2: symtab.Type = Set[?A] scala> .narrow res3: symtab.Type = <none>.<refinement>.type scala> .baseTypeSeq java.lang.StackOverflowError at scala.reflect.runtime.Gil$class.gilSynchronized(Gil.scala:21) at scala.reflect.runtime.JavaUniverse.gilSynchronized(JavaUniverse.scala:16) at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$class.map(SynchronizedOps.scala:27) at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$$anon$2.map(SynchronizedOps.scala:34) at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$class.lateMap(SynchronizedOps.scala:34) at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$$anon$2.lateMap(SynchronizedOps.scala:34) at scala.reflect.internal.BaseTypeSeqs$MappedBaseTypeSeq.map(BaseTypeSeqs.scala:235) at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$$anon$2.scala$reflect$runtime$SynchronizedOps$SynchronizedBaseTypeSeq$$super$map(SynchronizedOps.scala:34) at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$$anonfun$map$1.apply(SynchronizedOps.scala:27) at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$$anonfun$map$1.apply(SynchronizedOps.scala:27) at scala.reflect.runtime.Gil$class.gilSynchronized(Gil.scala:19) at scala.reflect.runtime.JavaUniverse.gilSynchronized(JavaUniverse.scala:16) at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$class.map(SynchronizedOps.scala:27) at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$$anon$2.map(SynchronizedOps.scala:34) at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$class.lateMap(SynchronizedOps.scala:34) at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$$anon$2.lateMap(SynchronizedOps.scala:34) at scala.reflect.internal.BaseTypeSeqs$MappedBaseTypeSeq.map(BaseTypeSeqs.scala:235) ``` The infinite cycle involves: ``` class MappedBaseTypeSeq(orig: BaseTypeSeq, f: Type => Type) extends BaseTypeSeq(orig.parents map f, orig.elems) { ... override def map(g: Type => Type) = lateMap(g) override def lateMap(g: Type => Type) = orig.lateMap(x => g(f(x))) } trait SynchronizedBaseTypeSeq extends BaseTypeSeq { ... override def map(f: Type => Type): BaseTypeSeq = gilSynchronized { super.map(f) } override def lateMap(f: Type => Type): BaseTypeSeq = // only need to synchronize BaseTypeSeqs if they contain refined types if (map(f).toList.exists(_.isInstanceOf[RefinedType])) new MappedBaseTypeSeq(this, f) with SynchronizedBaseTypeSeq else new MappedBaseTypeSeq(this, f) } ``` This commit creates a new factory method for `MappedBaseTypeSeq`-s to break the cycle. As an independent change, I have also removed the attempt to conditionally synchronize them, as the condition was eagerly applying the map function (and throwing away the result!). I've appeased MiMa with new whitelist entries, but I'm confident that this is deep enough in the bowels of our runtime reflection implementation that there is no way that user code will be calling these methods directly.
* Merge commit '0965028809' into merge-2.11.x-to-2.12.x-20170214Seth Tisue2017-02-161-0/+211
|\
| * Optimize slice and take in ArrayOps, WrappedArrayMike Skells2017-01-281-0/+41
| | | | | | | | use Array block copy operations rather than builder/iterator
* | Optimizations in immutable.Map.{get, contains}Jason Zaugg2017-02-031-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Avoid allocation of Some in get - defer integer left shift until needed - avoid redundantly masking an integer before: Benchmark (size) Mode Cnt Score Error Units HashMapBenchmark.contains 10 avgt 20 284.624 ± 18.985 ns/op HashMapBenchmark.contains 100 avgt 20 3190.580 ± 33.622 ns/op HashMapBenchmark.contains 1000 avgt 20 52967.171 ± 1524.834 ns/op HashMapBenchmark.get 10 avgt 20 248.168 ± 2.612 ns/op HashMapBenchmark.get 100 avgt 20 2795.469 ± 54.458 ns/op HashMapBenchmark.get 1000 avgt 20 52238.773 ± 1268.764 ns/op after: Benchmark (size) Mode Cnt Score Error Units HashMapBenchmark.contains 10 avgt 20 195.107 ± 2.442 ns/op HashMapBenchmark.contains 100 avgt 20 2454.151 ± 24.392 ns/op HashMapBenchmark.contains 1000 avgt 20 40722.993 ± 520.473 ns/op HashMapBenchmark.get 10 avgt 20 245.282 ± 3.547 ns/op HashMapBenchmark.get 100 avgt 20 2729.669 ± 32.767 ns/op HashMapBenchmark.get 1000 avgt 20 49568.410 ± 794.565 ns/op
* | Merge remote-tracking branch 'origin/2.11.x' into ↵Jason Zaugg2016-12-201-26/+0
|\| | | | | | | | | | | | | | | | | | | merge/2.11.x-to-2.12.x-20161220 Conflicts: bincompat-backward.whitelist.conf build.xml src/compiler/scala/tools/nsc/typechecker/Typers.scala src/library/scala/collection/immutable/NumericRange.scala
| * Upgrade MiMa to 0.1.13Martynas Mickevičius2016-12-081-24/+0
| |
* | Deleted leftover debug method from VectorPap Lőrinc2016-12-061-0/+16
| |
* | Merge remote-tracking branch 'origin/2.11.x' into merge-2.11.x-to-2.12.x-dec-1Seth Tisue2016-12-011-0/+26
|\|
| * upgrade MiMa to 0.1.12Seth Tisue2016-12-011-0/+24
| | | | | | | | | | dogfooding the latest. upgrading all the way from 0.1.8 -- there have been a bunch of improvements since then.
| * SI-9488 - adds the same default toString format to Scala Futures as 2.12.xViktor Klang2016-03-221-0/+6
| | | | | | | | Includes tests to verify the toString representations.
| * SI-8362: AbstractPromise extends AtomicReferenceMariot Chauvin2015-07-291-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid `sun.misc.Unsafe`, which is not supported on Google App Engine. Deprecate `AbstractPromise` --> extend `j.u.c.atomic.AtomicReference` directly. `AtomicReference.compareAndSet()` should also provide better performance on HotSpot, which compiles it down to the machine's CAS instruction. The binary incompatible change is ok because it's in an internal package. I can't think of any real issue with adding a superclass (which contributes only final methods) to a class in an implementation package (as long as those methods were not introduced in any illicit subclasses of said class). Instead of changing `DefaultPromise`'s super class, let's be more conservative, and do it closest to the source. This is both clearer and more focussed, leaving those subclasses of AbstractPromise we never heard of unaffected. Genesis of the commit: since the work on `Future` performance, `AbstractPromise` is using `Unsafe`, breaking the ability for `Future` to be executed on GAE. At that time, viktorklang suggested to implement a fallback in case `Unsafe` is not available. carey proposed an implementation, and mchv submitted a patch, which was refined by adriaanm.
* | Whitelist the remaining changes since 2.12.0 that break all buildsStefan Zeiger2016-11-211-1/+4
| | | | | | | | | | | | | | The changes were made in https://github.com/scala/scala/pull/5481, subsequently breaking binary compatibility checks after https://github.com/scala/scala/pull/5532 was merged, too. The affected methods are part of an internal implementation class. Whitelisting should be safe.
* | Restore binary compatiblity with 2.12.0Jason Zaugg2016-11-161-209/+5
| | | | | | | | | | | | | | - Revert a typo fix to a non-private method - Whitelist changes to internals of runtime reflection that are not part of the API and should only be referenced from within scala-reflect.jar itself.
* | Merge commit '7ba38a0' into merge/2.11.x-to-2.12.x-20150129Jason Zaugg2015-01-291-0/+10
|\| | | | | | | | | | | | | | | Conflicts: build.number src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala src/library/scala/collection/Iterator.scala versions.properties
| * Cleanup and refactoring - semicolons, unused or commented out codempociecha2014-12-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains some minor changes made by the way when implementing flat classpath. Sample JUnit test that shows that all pieces of JUnit infrastructure work correctly now uses assert method form JUnit as it should do from the beginning. I removed commented out lines which were obvious to me. In the case of less obvious commented out lines I added TODOs as someone should look at such places some day and clean them up. I removed also some unnecessary semicolons and unused imports. Many string concatenations using + have been changed to string interpolation. There's removed unused, private walkIterator method from ZipArchive. It seems that it was unused since this commit: https://github.com/scala/scala/commit/9d4994b96c77d914687433586eb6d1f9e49c520f However, I had to add an exception for the compatibility checker because it was complaining about this change. I made some trivial corrections/optimisations like use 'findClassFile' method instead of 'findClass' in combination with 'binary' to find the class file.
| * Fixes memory leak when using reflectionTim Harper2014-11-221-0/+5
| | | | | | | | | | | | References to Threads would be retained long after their termination if reflection is used in them. This led to a steady, long memory leak in applications using reflection in thread pools.
| * [nomerge] SI-8899 Revert "SI-8627 make Stream.filterNot non-eager"Lukas Rytz2014-10-121-9/+0
|/ | | | | | | | | 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.
* SI-8680 Stream.addString is too eagerRex Kerr2014-09-121-0/+13
| | | | | | | | | | 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).
* SI-8627 make Stream.filterNot non-eagerLukas Rytz2014-08-271-0/+9
| | | | | | | | | | | | | | | | 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.
* Optimize nested scope creationJason Zaugg2014-05-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* SI-8388 consistently match type trees by originalsDenys Shabalin2014-03-251-0/+37
| | | | | | | | | | | | 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.
* introduces Mirror.typeOfEugene Burmako2014-03-251-0/+12
| | | | | | | | | 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 treesDenys Shabalin2014-03-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* SI-8366 make partial function and match trees disjointDenys Shabalin2014-03-101-0/+5
| | | | | | | | | | | | | | | | 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.)
* SI-8331 make sure type select & applied type doesn't match termsDenys Shabalin2014-03-091-2/+23
| | | | | | 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.
* SI-8372: unspliceable type printed in error messageGrzegorz Kossakowski2014-03-071-0/+99
| | | | | | | | | | | | | | | | | | | | 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.
* Check library/reflect bincompat against 2.11.0-RC1Adriaan Moors2014-03-031-0/+7
Changes in the package scala.reflect.internals are ignored.