summaryrefslogtreecommitdiff
path: root/src/library
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in DocumentationValerian2013-07-141-1/+1
|
* Merge pull request #2709 from yllan/fix-docsAdriaan Moors2013-07-101-2/+2
|\ | | | | Fix docs inconsistent (cmp -> ord).
| * Fix docs inconsistent (cmp -> ord).yllan2013-07-061-2/+2
| | | | | | | | The parameter name is 'ord', but mentioned in docs with 'cmp'.
* | Merge pull request #2704 from adriaanm/modularizeAdriaan Moors2013-07-09110-10627/+0
|\ \ | | | | | | Separate jars for XML, Parser Combinators. Use released JLine.
| * | Spin off parser combinators to scala-parser-combinators.jar.Adriaan Moors2013-07-0525-2727/+0
| | |
| * | Spin off src/library/scala/xml to src/xml/scala/xml.Adriaan Moors2013-07-0585-7900/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Remove the last vestiges of xml from Predef and Contexts. - Change build to compile scala.xml to scala-xml.jar. - Deploy scala-xml module to maven. - Update partest accordingly. Note: An older compiler cannot use the new standard library to compile projects that use XML. Thus, skipping locker will break the build until we use 2.11.0-M4 for STARR. In the future build process, where we drop locker, we would have to release a milestone that supports the old and the new approach to xml. As soon as we'd be using that new milestone for starr, we could drop support for the old approach.
* | | Merge pull request #2688 from yllan/SI-7614Grzegorz Kossakowski2013-07-062-2/+52
|\ \ \ | |_|/ |/| | SI-7614 Minimize the times of evaluation f in TraversableOnce.maxBy/minBy
| * | SI-7614 Minimize the times of evaluation f in TraversableOnce.maxBy/minBy.yllan2013-07-062-2/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the previous implementation, maxBy/minBy will evaluate most of its elements with f twice to get the ordering. That results (2n - 2) evaluations of f. I save both the element and result of evaluation to a tuple so that it doesn't need to re-evaluate f on next comparison. Thus only n evaluations of f, that is the optimal. Note that the original implementation always returns the first matched if more than one element evaluated to same largest/smallest value of f. I document this behavior explicitly in this commit as well.
* | | Merge pull request #2695 from xuwei-k/bigint-bigdecimal-typoAdriaan Moors2013-07-032-2/+2
|\ \ \ | |_|/ |/| | fix typo
| * | fix typoxuwei-k2013-06-302-2/+2
| | |
* | | Merge pull request #2693 from lexspoon/semmle-lintAdriaan Moors2013-07-012-6/+6
|\ \ \ | | | | | | | | Lint-like fixes found by Semmle
| * | | Seals some case class hierarchies.Lex Spoon2013-06-262-6/+6
| | | |
* | | | Merge pull request #2694 from adriaanm/masterGrzegorz Kossakowski2013-07-011-135/+42
|\ \ \ \ | | | | | | | | | | Merge 2.10.x into master
| * \ \ \ Merge 2.10.x into masterAdriaan Moors2013-06-281-135/+42
| |\ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/typechecker/Duplicators.scala src/library/scala/concurrent/Future.scala test/files/jvm/scala-concurrent-tck.scala
| | * | | Merge pull request #2511 from ↵Adriaan Moors2013-06-241-137/+44
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | viktorklang/wip-cleaner-Future-method-implementations-2.10-√ General SIP-14 Future method implementation cleanup
| | | * | | Cleaning up method implementations in FutureViktor Klang2013-06-191-137/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optimizations: 1) Avoiding isDefinedAt + apply and using applyOrElse to allow for optimizations later 2) Reducing method sizes to be more JIT + inliner friendly 3) Reusing core combinators to reuse inliner/JIT optimizations and be more code-cache friendly
| | * | | | [backport] SI-7498 ParTrieMap.foreach no longer crashesAleksandar Prokopec2013-06-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the `split` method of the `ParTrieMap` iterator threw an exception when splitting a splitter that iterated over nodes whose hash codes collide. This was due to reusing the iterator of the list of colliding keys rather than creating a new splitter. This commit changes the `subdivide` method to create a new iterator using the factory method of the current trie map iterator rather than returning a `LinearSeqLike` iterator.
* | | | | | SI-7591 Minor cleanupsSimon Ochsenreither2013-07-011-4/+0
| |_|_|_|/ |/| | | |
* | | | | Merge pull request #2681 from soc/SI-7590Adriaan Moors2013-06-282-11/+17
|\ \ \ \ \ | | | | | | | | | | | | SI-7590 TreeSet should fail fast if Ordering is null
| * | | | | SI-7590 TreeSet should fail fast if Ordering is nullSimon Ochsenreither2013-06-252-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While migrating scala.tools.nsc.util.TreeSet to scala.collection.mutable.TreeSet, I messed up initialization order and realized that TreeSet accepts null as an Ordering and only fails much later. This change makes mutable.TreeSet and immutable.TreeSet fail immediately.
* | | | | | Merge pull request #2676 from soc/SI-7511Adriaan Moors2013-06-289-68/+147
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7511 Remove indirection of numeric methods
| * | | | | | SI-7511 Remove indirection of numeric methodsSimon Ochsenreither2013-06-239-68/+147
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Methods on `Rich<AnyVal>`s like `abs`, `doubleValue`, `floatValue`, `longValue`, `intValue`, `byteValue`, `shortValue`, `min`, `max`, `signum` are slow because they go through multiple indirections including typeclasses and boxing. For instance, take `1L.abs`: Instead of just computing and returning the result (like it is done in `RichInt`), this is what happens: - `RichLong` inherits `abs` by extending `ScalaNumberProxy[T]` - `ScalaNumberProxy[T]` has an abstract `protected implicit def num: Numeric[T]` - This method is implemented in `RichLong` and points to `scala.math.Numeric.LongIsIntegral` - The actual method `abs` now calls `num.abs(self)`
* | | | | | Merge pull request #2673 from greenrd/patch-1Adriaan Moors2013-06-281-1/+1
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Fix typo in Scaladoc
| * | | | | Fix typo in ScaladocRobin Green2013-06-231-1/+1
| |/ / / /
* | | | | Merge pull request #2679 from soc/topic/java-rawtype-cleanupAdriaan Moors2013-06-273-5/+6
|\ \ \ \ \ | |_|/ / / |/| | | | Get rid of raw types which cause unnecessary warnings
| * | | | Get rid of raw types which cause unnecessary warningsSimon Ochsenreither2013-06-233-5/+6
| |/ / /
* | | | Set scene for Predef.$scope's demise.Jason Zaugg2013-06-201-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there's no Predef.$scope but xml is being used, the compiler aliases scala.xml.TopScope to $scope. There must be a scala.xml package when xml literals were parsed. For compatibility with the old library, which relied on $scope being in scope, synthesize a `import scala.xml.{TopScope => $scope}` when xml is needed, but there's no Predef.$scope and the old library is detected (scala.xml.TopScope exists).
* | | | Remove dependency on xml in ScalaRunTime.Adriaan Moors2013-06-201-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | runtime.ScalaRunTime.stringOf's behavior has changed slightly: Call the object's `toString` for all classes in `scala.xml._`, instead of only for `Node` and `MetaData` (old behavior).
* | | | Remove dependency on xml in sys.process.Adriaan Moors2013-06-203-21/+24
|/ / / | | | | | | | | | Added deprecated conversions in xml.Elem to preserve source compatibility.
* | | Merge pull request #2625 from paulp/pr/no-useless-implicitsGrzegorz Kossakowski2013-06-192-33/+2
|\ \ \ | | | | | | | | SI-6899, prohibit dangerous, useless implicit conversions.
| * | | SI-6899, prohibit dangerous, useless implicit conversions.Paul Phillips2013-06-042-33/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Increase eligibility requirements for implicit conversions, such that T => U is ineligible if T <: Null <or> AnyRef <: U This has the salutary effect of allowing us to ditch 16 ridiculous implicits from Predef, since they existed solely to work around the absence of this restriction. There was one tiny impact on actual source code (one line in one file) shown here, necessitated because the literal null is not eligible to be implicitly converted to A via <:<. def f[A](implicit ev: Null <:< A): A = null // before def f[A](implicit ev: Null <:< A): A = ev(null) // after As impositions go it's on the tame side.
* | | | Merge pull request #2602 from t3hnar/Duration.toCoarsestAdriaan Moors2013-06-181-0/+36
|\ \ \ \ | | | | | | | | | | Add Duration.toCoarsest method
| * | | | Add Duration.toCoarsest methodYaroslav Klymko2013-06-101-0/+36
| | | | |
* | | | | Merge pull request #2561 from soc/SI-7479Adriaan Moors2013-06-181-0/+3
|\ \ \ \ \ | | | | | | | | | | | | SI-7479 Make test/files/run/tailcalls.scala pass on Avian
| * | | | | SI-7479 Add avian option to partest's diff filter...Simon Ochsenreither2013-06-061-0/+3
| | |/ / / | |/| | | | | | | | | | | | | | | | | | ... so that the different results of the test on Avian can be specified in the check file.
* | | | | Merge pull request #2641 from soc/SI-6811-cloneable-definitionPaul Phillips2013-06-131-15/+0
|\ \ \ \ \ | | | | | | | | | | | | SI-6811 Remove scala.annotation.cloneable
| * | | | | SI-6811 Remove scala.annotation.cloneableSimon Ochsenreither2013-06-071-15/+0
| |/ / / /
* | | | | Merge pull request #2645 from soc/SI-6747Paul Phillips2013-06-131-0/+3
|\ \ \ \ \ | | | | | | | | | | | | SI-6747 Deprecate Range#{numRange,last,terminal}Element{s,}
| * | | | | SI-6747 Deprecate Range#{numRange,last,terminal}Element{s,}Simon Ochsenreither2013-06-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | There are already better replacements which expose less surprising behaviour.
* | | | | | Merge pull request #2640 from jedesah/patch-1Jason Zaugg2013-06-091-0/+21
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Document exceptions thrown in some conversion methods of String
| * | | | | Fix incorrectly documented exception of toBoolean method of StringJean-Remi Desjardins2013-06-061-1/+1
| | | | | |
| * | | | | Document exceptions thrown in some conversion methods of StringJean-Remi Desjardins2013-06-061-0/+21
| |/ / / /
* | | | | Merge pull request #2610 from axel22/issue/7498Jason Zaugg2013-06-091-2/+5
|\ \ \ \ \ | |/ / / / |/| | | | SI-7498 ParTrieMap.foreach no longer crashes
| * | | | SI-7498 ParTrieMap.foreach no longer crashesAleksandar Prokopec2013-05-301-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the `split` method of the `ParTrieMap` iterator threw an exception when splitting a splitter that iterated over nodes whose hash codes collide. This was due to reusing the iterator of the list of colliding keys rather than creating a new splitter. This commit changes the `subdivide` method to create a new iterator using the factory method of the current trie map iterator rather than returning a `LinearSeqLike` iterator.
* | | | | Merge branch 'pr/merge-2.10.2' into masterPaul Phillips2013-06-042-48/+49
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | | | SI-7497 Fix scala.util.Properties.isMacSimon Ochsenreither2013-05-231-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | Reimplementing much of the DefaultPromise methodsViktor Klang2013-05-181-43/+42
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge pull request #2577 from scalamacros/pullrequest/paradiseEugene Burmako2013-06-033-2/+15
|\ \ \ \ | | | | | | | | | | Backport from paradise/macros
| * | | | refactors IMPLPARAM_xxx constants into value classesEugene Burmako2013-06-021-0/+13
| | | | |
| * | | | less magic in fast track macrosEugene Burmako2013-05-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Now that we have a mechanism to declare not implemented macros, let's put it to good use by reducing the amount of magic applied to fast track.