summaryrefslogtreecommitdiff
path: root/src/library
Commit message (Collapse)AuthorAgeFilesLines
* Clean up standard/swing library by deprecating/moving code examplesSimon Ochsenreither2011-12-071-1/+1
| | | | | | | | | Deprecate scala/xml/include/sax/Main.scala. Move scala/swing/test/* to docs/examples. Saves 160KB in scala-swing.jar. Fixes SI-4627.
* Merge branch 'master' of /scala/trunk into developPaul Phillips2011-12-061-0/+5
|\
| * Gave Option its own nonEmpty.Paul Phillips2011-12-061-0/+5
| | | | | | | | | | A bit further down Option's slippery slope of collections methods, but those sudden implicit conversions to Iterable are legitimately annoying.
* | Fix documentation stutters.Blair Zajac2011-12-065-5/+5
|/
* Update scaladoc links to collections overview.Josh Marcus2011-12-0628-38/+34
| | | | | | Change scaladoc links in collection classes to point at re-formatted Collections Overview on docs.scala-lang.org. Fix minor typo: s/Ummutable/Immutable
* Enhanced scaladoc of collection classes with links to the relevant pages of ↵Josh Marcus2011-12-0527-0/+68
| | | | "The Scala 2.8 Collections API" overview.
*-. Merge remote-tracking branches 'kepler/topic/reifyclasses' and ↵Paul Phillips2011-12-041-9/+3
|\ \ | | | | | | | | | 'ijuma/feature/signum' into develop
| | * Delegate to Java's implementation of signum for Long and Int.Ismael Juma2011-12-031-9/+3
| |/ | | | | | | | | | | | | | | The Java implementation is faster as it doesn't have branches. java.lang.Math includes implementations of signum for Double and Float, but I didn't change the ones in scala.math because there is a difference on how negative zero is handled.
* / Add a mnemonic to help remember what's the difference between +:Daniel C. Sobral2011-12-042-0/+8
|/ | | | and :+, plus one for ++:.
*-----. Merge remote-tracking branches 'dcsobral/parser/NoSuccessMessages', ↵Paul Phillips2011-12-023-15/+70
|\ \ \ \ | | | | | | | | | | | | | | | 'dcsobral/parserFilter', 'soc/library-range-sum', 'szeiger/feature/enumeration-valueset', 'szeiger/issue/5117' and 'jsuereth/pull-binary-error-message' into develop
| | | * | Make Enumeration.ValueSet SerializableStefan Zeiger2011-12-021-2/+3
| | | | | | | | | | | | | | | | | | | | Closes SI-5117.
| | | * | Enumeration and Enumeration.ValueSet improvementsStefan Zeiger2011-12-021-15/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make Enumeration.ValueSet a SortedSet and back it by a BitSet - Add toBitMask and fromBitMask methods for value sets - Add an Ordering for the values - Deprecate names seq in the Enumeration constructor - Add + method to Value for easy ValueSet creation
| | * | | Makes Range#sum an O(1) operation instead of an O(n) one.Simon Ochsenreither2011-12-021-0/+7
| | |/ / | | | | | | | | | | | | Partially fixes SI-4658. NumericRange stays slow, thanks to the brilliant idea that Numeric doesn't need a division operation.
| * | / Add filter/withFilter method to ParserDaniel Capo Sobral2011-12-021-0/+14
| | |/ | |/| | | | | | | | | | | | | | | | Complement map and flatMap when used in for comprehensions. This is required when pattern matching is used on the result of the generators. It is implemented through a new filterWithError method on ParseResult.
* / | Add withErrorMessage/withFailureMessage to Parser.Daniel C. Sobral2011-12-021-0/+56
|/ / | | | | | | Can be used to reliably override the default no success messages.
* / Improve performance of BitSet.sizeStefan Zeiger2011-12-021-12/+1
|/ | | | | Using java.lang.Long.bitCount for the size computation is a lot faster than the previous Scala implementation. Closes SI-2196.
*-. Merge commit 'e21c05'; commit '8b8ed9'; commit '335da6'; commit '5d7da7' ↵Paul Phillips2011-12-011-1/+2
|\ \ | | | | | | | | | into develop
| | * Example in scala.sys.process didn't match the text that describes it. Fixed.Daniel C. Sobral2011-12-011-1/+2
| |/
* / Fix typo on Regex documentation.Daniel C. Sobral2011-12-011-1/+1
|/
*-. Merge remote-tracking branches 'remotes/odersky/master', ↵Paul Phillips2011-12-017-20/+113
|\ \ | | | | | | | | | 'remotes/odersky/topic/reify', 'remotes/robinst/master' and 'remotes/szeiger/bitset' into pending
| | * Improved BitSet implementationsStefan Zeiger2011-12-016-20/+111
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | - Mutable and immutable BitSets now extend SortedSet, using a fixed Ordering.Int and an efficient bit mask based rangeImpl() - fromArray methods in both implementations are deprecated in favor of new fromBitMask and fromBitMaskNoCopy methods - New toBitMask method for converting bit sets back to Array[Long] bit masks - immutable.BitSet uses a more efficient Builder, based on mutable.BitSet (closes SI-4647) - Delete scala.tools.nsc.util.BitSet (not used anywhere) Review by @odersky
| * Special treatment of emptyValDef in reifyMartin Odersky2011-12-011-0/+2
|/ | | | emptyValDef has special meaning in the compiler, so reify needs to preserve it by identity and not just by structure.
* -Yreify-copypaste: the copy/pasteable mode for ...Eugene Burmako2011-11-281-2/+2
| | | | | | | | | | | | | | | | | -Yreify-copypaste: the copy/pasteable mode for reification When experimenting with macros, I've found out that it's helpful to use the reifier to find out what Scala idioms map to what Tree shapes. However, stuff emitted by -Yreify-debug is too verbose, that's why I decided to put up a human-readable dumper. To use the dumps, you need to first import the following things: import scala.reflect.api._ import scala.reflect.mirror._ import scala.reflect.api.Modifier._ import scala.reflect.internal.Flags._ The stuff is really experimental, e.g. the tension between flags and modifiers needs to be thought out and addressed. Review by odersky.
* Experimental version of macro definitions.Martin Odersky2011-11-281-3/+4
|
* Fix for erroneous bytecode generation.Paul Phillips2011-11-281-42/+0
| | | | | | | | | | | | | | | | | | | A remedy for an IllegalAccessError where generated bytecode referred to an inaccessible type. Closes SI-1430. Bonus materials: - tore out all the invokedynamic support. The shipped jdk7 implementation shows limited resemblance to the one this was written against; the code mostly serves to distract. (I think I could get invokedynamic working pretty quickly, except that it would mean having a codebase for java7 and one for 5-6, which is not a yak I wish to shave today.) - gave NullClass and NothingClass objects of their own, which allowed a nice polymorphic simplification of isSubClass, plus a couple other streamlinings.
* Annotations reacquainted with reification.Paul Phillips2011-11-261-3/+6
| | | | | | | Had AnnotationInfo extend Product3 since it's no longer a case class. Tried to make reflection a little more robust. Closes SI-5223, review by vogt.
* Fast PartialFunction # orElse.Martin Odersky2011-11-244-14/+21
|
* Refinements of "def seq" and murmurhash.Paul Phillips2011-11-2419-57/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | Trying to make hashcodes faster. Didn't achieve much on that front, so redirected into structural/consistency issues. The latter was lacking in terms of how/where "def seq" was defined. The documentation I can find doesn't give me much hint that the sequential form of my sequential collection might be a single-use iterator! (As in StringOps, ArrayOps.) If that's intentional it should be in huge letters. I'm assuming for now that it wasn't. Also, there was this: GenMapLike: def seq: Map[A, B] GenSetLike: def seq: Set[A] GenSeqLike: // nothing, returns Traversable So I added some def seqs where I needed the more specific types for my hashcode work. Hashcodewise, I broke the MurmurHash3 object into a reusable class and a collections-specific object, and I deprecated the methods which took GenTraversableOnce in favor of ones taking TraversableOnce, because there's no reason the hashcode library should have to know about things like "make sure to call seq before you traverse or you'll be sorry." Exclude things by their type and you can never make a mistake. End transmission.
* Preparations for new version of AbstractPartial...Martin Odersky2011-11-232-2/+10
| | | | | | Preparations for new version of AbstractPartialFunctions that also does isDefinedAt correctly. Should be a new starr. Review by extempore.
* More beautiful fast orElse infrastructure.Martin Odersky2011-11-222-7/+13
|
* First part of campaign to make orElse on partia...Martin Odersky2011-11-222-9/+38
| | | | | | | First part of campaign to make orElse on partial functions faster than exponential. In fact, now it's linear, with zero overhead for the common case. Review by extempore.
* Move allDeclarations to make it available to al...amin2011-11-221-5/+5
| | | | | | Move allDeclarations to make it available to all types, like declaration(...). Review by odersky.
* Partial cleanup and generalization of tree prin...Martin Odersky2011-11-194-4/+63
| | | | | | | Partial cleanup and generalization of tree printing. You can now print a tree in direct case class form with `showRaw(tree)`. Should make NodePrinters redundant.
* Cleanups in TypeApply creation and casting.Paul Phillips2011-11-191-1/+4
| | | | | | | | | There's every hint that it's a requirement that a TypeApply have non-empty typeArgs, but testing for and handling the empty condition is done irregularly. Made a mkTypeApply which handles the isEmpty case (returning "fun" unchanged.) Also unified most of the variations of casts under one umbrella. Review by moors.
* Added missing file from last commitMartin Odersky2011-11-151-0/+46
|
* Towards better reflection APIs.Martin Odersky2011-11-156-53/+438
|
* Changes the fork join pool detection for JVM1.7...Aleksandar Pokopec2011-11-111-1/+1
| | | | | | | | Changes the fork join pool detection for JVM1.7, for actors and parallel collections libraries. Review by phaller.
* Small changes to reflection prompted by code re...Martin Odersky2011-11-111-1/+1
| | | | | Small changes to reflection prompted by code review.
* Removed reflect.{Type, Symbol, Tree, Print} for...Martin Odersky2011-11-104-319/+0
| | | | | Removed reflect.{Type, Symbol, Tree, Print} for good.
* (1) Made ReflectionUtils an object, to take its...Martin Odersky2011-11-102-6/+6
| | | | | | | (1) Made ReflectionUtils an object, to take its members out of the reflect package. (2) Removed old Type/Symbol/Tree from reflect package. (3) Got scratchpad to work better. Review by extempore.
* Fix binary breakage.Paul Phillips2011-11-081-8/+16
| | | | | | | | | Some philistine who thinks "binary compatibility" is a computer dating site changed the names of public vals in Predef classes. I restored and then deprecated them. REVIEW BY MOORS.
* Third collections commit from Todd Vierling.Paul Phillips2011-11-0713-27/+37
| | | | | | | Misc cleanups associated with the previous commits: limiting overly expanded types, fixing externally visible types for scaladoc, utilizing abstract collection classes where possible, etc.
* Next collections commit from Todd Vierling.Paul Phillips2011-11-078-17/+23
| | | | | Changes to library code outside the collections.
* Dropped about 1.5 Mb off scala-library.jar.Paul Phillips2011-11-0774-189/+301
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit and the two subsequent commits were contributed by: Todd Vierling <tv@duh.org>. I combined some commits and mangled his commit messages, but all the credit is his. This pursues the same approach to classfile reduction seen in r19989 when AbstractFunctionN was introduced, but applies it to the collections. Thanks to -Xlint it's easy to verify that the private types don't escape. Design considerations as articulated by Todd: * Don't necessarily create concrete types for _everything_. Where a subtrait only provides a few additional methods, don't bother; instead, use the supertrait's concrete class and retain the "with". For example, "extends AbstractSeq[A] with LinearSeq[A]". * Examine all classes with .class file size greater than 10k. Named classes and class names ending in $$anon$<num> are candidates for analysis. * If a return type is currently inferred where an anon subclass would be returned, make the return type explicit. Don't allow the library-private abstract classes to leak into the public namespace [and scaladoc].
* Revert "Fix for Enumeration."Paul Phillips2011-11-041-1/+1
| | | | | Oops, didn't mean to commit that one. Opens SI-5147. No review.
* Minor change to get closer to building under -X...Paul Phillips2011-11-041-3/+2
| | | | | Minor change to get closer to building under -Xexperimental.
* Fix for Enumeration.Paul Phillips2011-11-041-1/+1
| | | | | Closes SI-5147.
* Fix doc comment. no reviewHubert Plociniczak2011-10-311-7/+7
|
* Fix for NumericRange boundary condition.Paul Phillips2011-10-311-1/+1
| | | | | Contributed by Thomas Switzer. Closes SI-4985, no review.
* Fixes NPE using iterator with an XML attribute ...Paul Phillips2011-10-313-4/+12
| | | | | | | | | Fixes NPE using iterator with an XML attribute being null or None ) (SI-5052 Also fixes incorrect size method (SI-5115 ) Contributed by Jordi Salvat i Alabart. Closes SI-5052, SI-5115, no review.