summaryrefslogtreecommitdiff
path: root/src/library
Commit message (Collapse)AuthorAgeFilesLines
* Moved ClassfileAnnotation/StaticAnnotation/Anno...Paul Phillips2010-12-0636-55/+48
| | | | | | | Moved ClassfileAnnotation/StaticAnnotation/Annotation/TypeConstraint into scala.annotation and enabled the deprecated type aliases in scala.* to point there. Also enclosed is a new starr to bootstrap. No review.
* Mopping up after the deprecation of exit and er...Paul Phillips2010-12-0519-48/+49
| | | | | | | | | | | | | | Mopping up after the deprecation of exit and error. It is decidedly non-trivial (at least for the IDE-impaired) to be completely sure of which error function was being called when there were about twenty with the same signature in trunk and they are being variously inherited, imported, shadowed, etc. So although I was careful, the possibility exists that something is now calling a different "error" function than before. Caveat programmer. (And let's all make it our policy not to name anything "error" or "exit" from here on out....) No review.
* Remedied a return type oops in the system package.Paul Phillips2010-12-043-6/+5
| | | | | | Deprecated the rest of the elements with comments saying "deprecate me." No review.
* Introducing scala.system, the product of a whir...Paul Phillips2010-12-044-9/+164
| | | | | | | | | | Introducing scala.system, the product of a whirlwind couple of hours. More useful stuff than you can shake three sticks at. See the scala.system package object. It's even documented. And since it has methods error and exit, proceeded to deprecate the ones in Predef. No review.
* Some refactoring of genjvm trying to separate o...Paul Phillips2010-12-041-55/+49
| | | | | | | Some refactoring of genjvm trying to separate out some of the relatively immutable logic from the parts more in flux, and slightly ease the process of keeping separable things separate. Review by dragos.
* Fixes an inconsistency in primitive hashcode ca...Paul Phillips2010-12-041-1/+3
| | | | | | | | Fixes an inconsistency in primitive hashcode calculation. I did have a test trying to spot exactly this situation, which says something about either me or about testing or about me and testing. Closes #3957, no review.
* A selection of collections additions from the l...Paul Phillips2010-12-0410-76/+156
| | | | | | | | | | | | | | | | | | | | | | | | A selection of collections additions from the lower end of the controversy scale. // TraversableOnce def collectFirst[B](pf: PartialFunction[A, B]): Option[B] def maxBy[B](f: A => B)(implicit cmp: Ordering[B]): A def minBy[B](f: A => B)(implicit cmp: Ordering[B]): A // Iterator def span(p: A => Boolean): (Iterator[A], Iterator[A]) // Traversable def inits: Iterator[Repr] def tails: Iterator[Repr] def unzip3[A1, A2, A3](implicit asTriple: A => (A1, A2, A3)): (CC[A1], CC[A2], CC[A3]) // Sequences def permutations: Iterator[Repr] Review by odersky.
* Starting the mopping up now that names have som...Paul Phillips2010-12-032-3/+3
| | | | | | | | | | | | | | Starting the mopping up now that names have some more sense of their place in the universe. Cleaned up some heavy multi-boolean logic. Added more documentation on the relationships between entities in Symbols and some other compiler things which often blur together. Fun fact: the incorrect usage of nme.ScalaObject in Contexts which I reported when first broaching the namespace subject became a compile time error during the writing of this patch, because there is no longer any such thing as nme.ScalaObject. It's a little bit like magic. No review.
* close #3951. review by dubochet.Lukas Rytz2010-12-031-2/+11
|
* Recovered ++: from the dustbin and dropped it o...Paul Phillips2010-12-032-25/+32
| | | | | | | | Recovered ++: from the dustbin and dropped it on Traversable. Removed a very unfortunate deprecated method from BufferLike which it was not authorized to deprecate because it's a Seq. Closes #3471, review by prokopec.
* Eliminated SYNTHETICMETH flag.Paul Phillips2010-12-031-3/+1
| | | | | | | meaningful name inside the pattern matcher. Created a tracker for TRANS_FLAG which could enforce the transience it promises us, but didn't turn it on. No review.
* Parameterizes TraversableFactory.range so it ca...Paul Phillips2010-12-033-12/+18
| | | | | | Parameterizes TraversableFactory.range so it can be used with any integral type. Closes #3542, no review.
* immutable.Map keySet returns immutable.Set.Paul Phillips2010-12-033-3/+7
|
* Overrides immutable.{ Map, Set, Seq } to return...Paul Phillips2010-12-033-0/+4
| | | | | | | Overrides immutable.{ Map, Set, Seq } to return self on the corresponding toMap/toSet/toSeq. Closes #3953, review by prokopec.
* Added missing file for delayed initMartin Odersky2010-12-021-0/+12
|
* It's a big one!Paul Phillips2010-12-025-58/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TermName and TypeName are exposed throughout the compiler based on what kind of name a given abstraction ought to have. (There remain places where one needs to create a name without knowing yet what it will be, and those will always be Names.) The nme object in the compiler now holds only term names. To reference a known type name, use tpnme: nme.List == ("List": TermName) tpnme.List == ("List": TypeName) The contents of nme and tpname are defined in traits, many of which are shared, so if a name should exist only as a Type and not a Term, it should be defined in CompilerTypeNames, but otherwise in CompilerTermNames or CompilerCommonNames. This is partially complete but I'm sure there are still many shared which should pick a side. Usage of .toTermName and .toTypeName is strongly discouraged. After the dust has settled, there will be very few places where it will make sense to hop between namespaces like that. There are some implicits to smooth everything out, most of which should be removable eventually. // these two are in no hurry to go anywhere String => TermName String => TypeName // but not String => Name: def view in the compiler is no longer implicit // these two are temporary, and can log when they kick off to help us flush // out remaining issues of "name migration" Name => TermName Name => TypeName There is more work to be done before we're properly protected from naming errors, but I will not allow another eight hour tragedy to befall lukas or anyone else! Review by rytz. (Formality.)
* delayed init now supportedMartin Odersky2010-12-022-1/+24
|
* Bug in ListMap. Closes #4046, no review.Paul Phillips2010-12-011-1/+1
|
* Some collections overrides for more efficient t...Paul Phillips2010-12-014-7/+25
| | | | | | Some collections overrides for more efficient toSeq and toBuffer where possible. Closes #2972, review by malayeri.
* Deprecated the @serializable annotation, introd...Lukas Rytz2010-11-3062-165/+150
| | | | | | | | | | | | | | | | | | | Deprecated the @serializable annotation, introduce a new trait "scala.Serializable" which has to be extended instead (cross-platform). Known issues: - Companion objects of serializable classes (including case classes) are automatically made serializable. However, they don't extend "Serializable" statically because of the known difficulty (should be done before typing, but hard). - Writing "case class C() extends Serializable" gives "error: trait Serializable is inherited twice" - Functions are serializable, but don't extend Serializable dynamically (could be fixed by making FunctionN Serializable - shouldn't we?) Note that @SerialVersionUID continues to be an annotation; it generates a static field, which is not possible otherwise in scala. Review by dragos, extempore. Question to dragos: in JavaPlatform.isMaybeBoxed, why is there a test for "JavaSerializableClass"? Is that correct?
* It looks like the fix for #2318 was causing pro...Paul Phillips2010-11-301-0/+11
| | | | | | | It looks like the fix for #2318 was causing problems, so I gave it some more graceful failure. Leaving #2318 open because the implementation could still work harder to find the right method. No review.
* The initial implementation of TraversableOnce c...Paul Phillips2010-11-2920-77/+77
| | | | | | | | | | | | | | | | | | The initial implementation of TraversableOnce could not supply concrete methods or even signatures for map and flatMap because they have different signatures in Iterator and TraversableLike. But we can take another approach which works out as nicely: 1) Create implicits which install those methods and flatten on TraversableOnce instances. 2) Generalize the signatures of flatten and flatMap to work with A => TraversableOnce[B] instead of A => Traversable[B]. And voila, you can mix and match Iterators and Traversables in a for comprehension, map, flatMap, and flatten, without the tedious process of sprinkling .iterator or .toList around to appease the compiler. No review.
* Fleshed out Equiv[T] so that it can be used in ...Paul Phillips2010-11-291-26/+43
| | | | | | Fleshed out Equiv[T] so that it can be used in a manner similar to Ordering[T]. No review.
* "I invite everyone to change this rule, and obs...Paul Phillips2010-11-292-29/+22
| | | | | | | | | | | | | | | | | | | | | "I invite everyone to change this rule, and observe what breaks!" This much beloved comment from #1208 has been on my radar for two years. The worm has turned. Closes #1208. The inferred type of an object is now Foo.type instead of "object Foo". What once was this: scala> val x: Map[Int, Singleton] = Map(1 -> None) <console>:5: error: type mismatch; found : (Int, object None) required: (Int, Singleton) Now exudes a pleasing aura of workingness: scala> val x: Map[Int, Singleton] = Map(1 -> None) x: Map[Int,Singleton] = Map(1 -> None) No review.
* Followed up on the claim that wrapArray can be ...Paul Phillips2010-11-271-13/+1
| | | | | Followed up on the claim that wrapArray can be removed. No review.
* Refactored parallel collections for pluggable t...Aleksandar Pokopec2010-11-2713-49/+50
| | | | | | | | Refactored parallel collections for pluggable task support implementations. No review.
* A manifest init order issue motivates some shuf...Paul Phillips2010-11-262-37/+34
| | | | | | A manifest init order issue motivates some shuffling around and making confusing identifiers more explicit. No review.
* Changes to the vector class that will be needed...Aleksandar Pokopec2010-11-261-1/+10
| | | | | | | Changes to the vector class that will be needed for ParVector. Review by Rompf.
* Added toParIterable, toParSeq, toParSet and toP...Aleksandar Pokopec2010-11-2516-15/+129
| | | | | | | Added toParIterable, toParSeq, toParSet and toParMap conversions. No review.
* Fix for #3621.Aleksandar Pokopec2010-11-243-0/+21
| | | | | | | Added varargs annotation. Review by Rytz.
* Applied patch from davetron5000, improving docu...Iulian Dragos2010-11-241-8/+9
| | | | | | Applied patch from davetron5000, improving documentation on ProductN and FunctionN traits. Closes #4021.
* Fixes #3630.Aleksandar Pokopec2010-11-223-1/+12
| | | | | Review by extempore.
* Added some docs.Martin Odersky2010-11-201-1/+11
|
* Fixes #3647, closes #3647, adds a test case for...Aleksandar Pokopec2010-11-191-4/+3
| | | | | | | | Fixes #3647, closes #3647, adds a test case for it, and a missing test case for #3935. No review.
* Fix for #3686. No review.Aleksandar Pokopec2010-11-191-2/+2
|
* Removed inline annotation on a private stream m...Aleksandar Pokopec2010-11-191-1/+1
| | | | | | | Removed inline annotation on a private stream method. No review.
* Fixes #3686 by special casing Stream transforme...Aleksandar Pokopec2010-11-191-16/+39
| | | | | | | | Fixes #3686 by special casing Stream transformers depending on target type. Review by extempore.
* Applying patch by Daniel Sobral for #3796.Aleksandar Pokopec2010-11-191-33/+111
| | | | | No review.
* Better integration for mutable list and queue.Aleksandar Pokopec2010-11-192-10/+27
| | | | | No review.x
* Fixes #3935.Aleksandar Pokopec2010-11-193-4/+21
| | | | | No review.
* Rewording for #3958, and a few doc changes.Aleksandar Pokopec2010-11-195-9/+31
| | | | | No review.
* Another fix for #3989, regarding the `-` which ...Aleksandar Pokopec2010-11-171-7/+25
| | | | | | Another fix for #3989, regarding the `-` which also used to cause stack overflows. No review.
* Closes #3958. No review.Aleksandar Pokopec2010-11-171-0/+3
|
* Added another fix for #3970.Aleksandar Pokopec2010-11-171-15/+8
| | | | | No review.
* Fixes #3970 and a bunch of other issues.Aleksandar Pokopec2010-11-173-6/+101
| | | | | Review by extempore.
* Fixes #3989.Aleksandar Pokopec2010-11-171-16/+8
| | | | | No review.
* Fixes #3989, adding test cases for #3989 and #3...Aleksandar Pokopec2010-11-171-12/+29
| | | | | | | Fixes #3989, adding test cases for #3989 and #3996. No review.
* Fixes #3996.Aleksandar Pokopec2010-11-171-1/+3
| | | | | No review.
* Cleaned up some hangover from equality struggle...Paul Phillips2010-11-153-8/+15
| | | | | | Cleaned up some hangover from equality struggles of yore. Deprecated now pointless vals. Close #3998, no review.
* Merge branch 'master' of /scala/trunkPaul Phillips2010-11-141-2/+6
|