summaryrefslogtreecommitdiff
path: root/src/library
Commit message (Collapse)AuthorAgeFilesLines
* Added ensureAccessible to reflection library.Paul Phillips2013-04-032-7/+15
| | | | | | | | This method comes up with some frequency and there are a lot of ways to write it either unsafely (failing to catch a likely exception) or with inadequate generality (as was done in the pre-existing version of this method in ScalaRunTime) so I thought it warranted a place in the standard library.
* SI-7237 Always choose ForkJoinTaskSupportSimon Ochsenreither2013-04-021-3/+1
| | | | | | | ForkJoinTaskSupport works on Hotspot, Avian and J9, while ThreadPoolTaskSupport causes the test test/files/scalacheck/parallel-collections to reliably hang on all three.
* Merge remote tracking branch 'origin/2.10.x' into ↵Jason Zaugg2013-04-021-5/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | topic/merge-2.10.x-to-v2.11.0-M2-74-g00e6c8b Conflicts: bincompat-backward.whitelist.conf bincompat-forward.whitelist.conf build.xml src/compiler/scala/reflect/reify/utils/Extractors.scala src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala src/compiler/scala/tools/nsc/transform/patmat/MatchOptimization.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/partest/scala/tools/partest/nest/ReflectiveRunner.scala src/reflect/scala/reflect/internal/Types.scala src/reflect/scala/reflect/runtime/JavaUniverse.scala test/files/run/inline-ex-handlers.check test/files/run/t6223.check test/files/run/t6223.scala test/scaladoc/scalacheck/IndexTest.scala
| * [backport] SI-7237 Always choose ForkJoinTaskSupportSimon Ochsenreither2013-03-151-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | ... on Java 6 and above. ForkJoinTaskSupport works on Hotspot, Avian and J9, while ThreadPoolTaskSupport causes the test test/files/scalacheck/parallel-collections to reliably hang on all three. We keep ThreadPoolTaskSupport around to keep the hope alive that we still have a glimpse of 1.5 support.
* | Merge pull request #2323 from paulp/pr/iterator_++Paul Phillips2013-03-281-18/+36
|\ \ | | | | | | Iterator.++ no longer blows the stack.
| * | Iterator.++ no longer blows the stack.Paul Phillips2013-03-261-18/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To my chagrin we still hadn't gotten this one. I took a new approach which seems like a winner to me. Here's a benchmark: object Test { def run(n: Int) = println((1 to n).foldLeft(Iterator.empty: Iterator[Int])((res, _) => res ++ Iterator(1)) sum) def main(args: Array[String]): Unit = run(args(0).toInt) } Runtime before this commit for various n: 500 0.403 real 1000 0.911 real 1500 2.351 real 2000 5.298 real 2500 10.184 real Runtime after this commit, same n: 500 0.346 real 1000 0.359 real 1500 0.368 real 2000 0.379 real 2500 0.390 real In the test case I dial it up to 100000.
* | | Merge pull request #2289 from paulp/pr/name-logicPaul Phillips2013-03-271-3/+6
|\ \ \ | |/ / |/| | Name logic consistency
| * | Overhauled local/getter/setter name logic.Paul Phillips2013-03-251-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sifted through extraneous methods trying to find consistency, consolidating and deprecating as I went. The original motivation for all this was the restoration of LOCAL_SUFFIX to originalName, because: It looks like in an attempt to make originalName print consistently with decodedName, I went a little too far and stripped invisible trailing spaces from originalName. This meant outer fields would have an originalName of '$outer' instead of '$outer ', which in turn could have caused them to be mis-recognized as outer accessors, because the logic of outerSource hinges upon "originalName == nme.OUTER". I don't know if this affected anything - I noticed it by inspection, improbably enough. Deprecated originalName - original, compared to what? - in favor of unexpandedName, which has a more obvious complement. Introduced string_== for the many spots where people have given up and are comparing string representations of names. A light dusting of types is still better than nothing. Editoral note: LOCAL_SUFFIX is the worst. Significant trailing whitespace! It's a time bomb.
* | | SI-7294 Deprecate inheritance from TupleN.Jason Zaugg2013-03-2423-1/+23
|/ / | | | | | | | | | | | | | | The motivation is to provide static warnings in cases like: scala> (1, 2) match { case Seq() => 0; case _ => 1 } res9: Int = 1
* | Merge pull request #2285 from vigdorchik/silence_scaladocPaul Phillips2013-03-235-12/+12
|\ \ | | | | | | Remove unrecognized doc comments
| * | Doc -> C-style comments for local symbols to avoid "discardingEugene Vigdorchik2013-03-215-12/+12
| | | | | | | | | | | | | | | unmoored doc comment" warning when building distribution for scala itself.
* | | SI-7102 Specialize isEmpty for bitsetsEugene Vigdorchik2013-03-211-0/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | Currently bitsets use default isEmpty implementation inherited from Set, which tests for "size == 0". Calculating the size of a word in a bitmap requires summing through all bits set, whereas testing for emptyness needs only one comparison with zero. This commit overrides the default implementation with the specialized one looking for a non-zero word in this bitmap.
* | Merge pull request #2251 from soc/SI-7236James Iry2013-03-202-14/+14
|\ \ | | | | | | SI-7236 Deprecate ThreadPoolTaskSupport and friends
| * | SI-7236 Deprecate ThreadPoolTaskSupport and friendsSimon Ochsenreither2013-03-132-14/+14
| | |
* | | Merge pull request #2235 from vigdorchik/si_5513James Iry2013-03-201-1/+50
|\ \ \ | | | | | | | | SI-5513: add inplace set-theoretic operations for mutable bitsets.
| * | | SI-5513: add inplace set-theoretic operations for mutable bitsets.Eugene Vigdorchik2013-03-111-1/+50
| |/ /
* | | Merge pull request #2219 from chuvoks/rbtRebalanceJames Iry2013-03-201-24/+45
|\ \ \ | | | | | | | | Optimize RedBlackTree rebalance method by using null optimized list implementation.
| * | | Optimize rebalance method by using null optimized list implementation.Juha Heljoranta2013-03-131-24/+45
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | rebalance method relies heavily on s.c.i.List. By replacing List with null optimized version, NList, rebalance operation is significantly more faster. Test indicate +10 % performance improvement for tree sizes >= 100. Existing tests verify red-black tree invariants, including operations involving tree rebalance.
* / / SI-7247, deprecated NotNull.Paul Phillips2013-03-132-1/+3
|/ / | | | | | | | | | | | | | | Removed NotNull from tests and the parentage of AnyVal. Removed the tests which were actually testing anything to do with NotNull; massaged the others to forget NotNull and/or not to name local things NotNull.
* | Merge 2.10.x into master.Adriaan Moors2013-03-051-10/+13
|\| | | | | | | | | Conflicts: src/library/scala/collection/mutable/ArrayOps.scala
| * Merge pull request #2198 from retronym/ticket/7215Paul Phillips2013-03-051-10/+13
| |\ | | | | | | SI-7215 Fix transpose of an empty Array[Array[T]].
| | * SI-7215 Fix transpose of an empty Array[Array[T]].Jason Zaugg2013-03-051-10/+13
| | |
* | | Name boolean arguments in src/library.Jason Zaugg2013-03-0524-71/+71
| | |
* | | Merge pull request #2183 from mt2309/tailrec-intmapPaul Phillips2013-03-051-0/+3
|\ \ \ | | | | | | | | Require firstKey and lastKey on IntMap tail-recursive.
| * | | Require firstKey and lastKey on IntMap to be tail recursive.Michael Thorpe2013-03-021-0/+3
| | | |
* | | | Merge pull request #2195 from vigdorchik/lint_libraryPaul Phillips2013-03-057-12/+1
|\ \ \ \ | | | | | | | | | | Changes around lint
| * | | | Remove unused symbols and imports from the library.Eugene Vigdorchik2013-03-057-12/+1
| | | | |
* | | | | Renamed type param to be consistent with convention.Paul Phillips2013-03-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's super confusing to see debugging output showing a type constructor called "Coll". The convention in the collections is that CC[A] takes type parameters and Coll is an alias for the applied type.
* | | | | Merge branch 2.10.1 into masterAdriaan Moors2013-02-273-17/+17
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/ast/Trees.scala src/library/scala/concurrent/impl/ExecutionContextImpl.scala
| * | | | Merge 2.10.1 into 2.10.x.Adriaan Moors2013-02-279-145/+136
| |\ \ \ \ | | |_|_|/ | |/| | |
| | * | | SI-7146 - Fixing checkinit bug in ExecutionContextImpl and adding testViktor Klang2013-02-191-4/+4
| | | | |
| | * | | SI-7128 Fix regression in copyToArray for empty arraysJason Zaugg2013-02-141-1/+1
| | | | |
| | * | | [nomaster] refactor AdaptedForkJoinTask, uncaughtExceptionHandlerAdriaan Moors2013-02-091-18/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inlined AdaptedForkJoinTask, made uncaughtExceptionHandler private[this]. This is necessary to maintain binary compatibility with 2.10.0.
| | * | | [nomaster] can't add new class BatchingExecutorAdriaan Moors2013-02-092-120/+103
| | | | | | | | | | | | | | | | | | | | This is necessary to maintain binary compatibility with 2.10.0.
| | * | | [nomaster] bring back SerializeStart from fa3b8040ebAdriaan Moors2013-02-091-0/+4
| | | | | | | | | | | | | | | | | | | | This is necessary to maintain binary compatibility with 2.10.0.
| | * | | [nomaster] duplicate tailImpl as a private methodAdriaan Moors2013-02-092-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reworks d526f8bd74. This is necessary to maintain binary compatibility with 2.10.0. matchName="scala.collection.mutable.MutableList.tailImpl" problemName=MissingMethodProblem
| | * | | [nomaster] Revert "SI-4664 Make scala.util.Random Serializable"Adriaan Moors2013-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | | [nomaster] Revert "Fixes SI-6521, overrides Range#head to be faster"Adriaan Moors2013-02-091-1/+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
| * | | | SI-7074 Fix xml attribute sortingSzabolcs Berecz2013-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sorting the attributes of an xml element could drop some of the attributes. It was caused by the incorrect use of MetaData#copy() to concatenate "smaller" with the rest of the attributes. The MetaData#copy() method is similar to the following hypothetical method on a List: def copy(other: List): List = head :: other The fix prepends all elements of "smaller" to the rest of the attributes in the proper order.
* | | | | Address some ScaladocrotJason Zaugg2013-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - @param tags whose name drifted from the corresponding parameter - Remove or complete a few stray stub comments (@param foo ...) - Use @tparam where appropriate.
* | | | | Modernize legacy backquotes in comments.Jason Zaugg2013-02-252-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Was: ``blah'' Now: `blah`
* | | | | Remove redundant explicit returns.Jason Zaugg2013-02-254-6/+6
| | | | |
* | | | | Don't wrap an array just to get its length.Jason Zaugg2013-02-253-3/+3
| | | | | | | | | | | | | | | | | | | | Use .length directly, avoiding the allocation of the WrappedArray.
* | | | | Remove redundant 'val' from case class params.Jason Zaugg2013-02-255-7/+7
| | | | |
* | | | | More explicit empty paren lists in method calls.Jason Zaugg2013-02-24121-519/+519
| | | | |
* | | | | Banish needless semicolons.Jason Zaugg2013-02-2443-167/+177
| | | | |
* | | | | Merge pull request #2147 from JamesIry/master_SI-7015Grzegorz Kossakowski2013-02-221-2/+3
|\ \ \ \ \ | | | | | | | | | | | | SI-7015 Removes redundant aconst_null; pop; aconst_null creation
| * | | | | SI-7015 Removes redundant aconst_null; pop; aconst_null creationJames Iry2013-02-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In an effort to adapt methods and field accesses of type Null to other types, we were always emitting aconst_null pop aconst_null The problem is we were doing that even when the JVM was in a position to know it had null value, e.g. when the user had written a null constant. This commit fixes that and includes a test to show that the resulting byte code still works even without repeating ourselves and/or repeating ourselves. This commit also makes the scala.runtim.Null$ constructor private. It was a sealed abstract class which prevented subclassing in Scala, but it didn't prevent subclassing in Java. A private constructor takes care of that hole so now the only value of type Null$ should be null. Along the way I found some other questionable things in adapt and I've added TODO's and issue https://issues.scala-lang.org/browse/SI-7159 to track.
* | | | | | Merge pull request #2154 from ↵James Iry2013-02-221-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | viktorklang/wip-SI7164-nonfatal-notimplementederror SI-7164 - Removing NotImplementedError as Fatal from s.u.c.NonFatal
| * | | | | | SI-7164 - Removing NotImplementedError as Fatal from s.u.c.NonFatalViktor Klang2013-02-211-2/+2
| |/ / / / /