summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Overhaul of JavaConver{sions,ters}.Paul Phillips2012-03-2110-1303/+1489
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initially motivated by SI-5580, then just motivated. I broke up the opaquely named JavaConversions and JavaConverters into the following traits encapsulating some permutation of { to java, to scala, bidirectional } { wrappers, decorators } I named everything consistently in terms of either Wrappers or Decorators. Decorators install those asJava/asScala methods onto collections of the right kind; Wrappers hide the process. JavaConversions then reduces to an object which (ill-advisedly) extends both WrapAsJava and WrapAsScala. And JavaConverters is an object extending DecorateAsScala and DecorateAsJava. However other more clearly named vals exist in the newly created scala.collection.convert package object. val decorateAsJava = new DecorateAsJava { } val decorateAsScala = new DecorateAsScala { } val decorateAll = new DecorateAsJava with DecorateAsScala { } val wrapAsJava = new WrapAsJava { } val wrapAsScala = new WrapAsScala { } val wrapAll = new WrapAsJava with WrapAsScala { } So for instance to import asScala decorators, and only those: scala> import scala.collection.convert.decorateAsScala._ import scala.collection.convert.decorateAsScala._ scala> new java.util.ArrayList[String].asScala groupBy (x => x) res0: scala.collection.immutable.Map[String,scala.collection.mutable.Buffer[String]] = Map() I propose we put those vals or a subset of them in the scala package object rather than way down in scala.collection.convert.
* Fix for SI-5580.Paul Phillips2012-03-211-11/+37
| | | | | Lub explosions mean we can't expect sane types in error messages. Defend against the insane.
* Clarifying MethodSynthesis.Paul Phillips2012-03-212-9/+49
| | | | | Tried to paint a picture of how one might synthesize an implicit method to accompany an implicit class.
* Overhauling mixin.Paul Phillips2012-03-211-146/+140
| | | | Feel the bugs falling away.
* Restore irrefutability commits.Paul Phillips2012-03-203-21/+35
| | | | This reverts commit d8ba5d091e5641553b438ef9930a6023a2709dcd.
* Fix for stability failure.Paul Phillips2012-03-201-1/+1
| | | | | | | Pattern matcher! Totally unrelated to irrefutability, the pattern matcher at some point stopped sorting its lookup switch cases, and the butterfly's wings flapped enough to swap two cases. Now they're sorted in ascending order like they're supposed to be.
* Lots of tedious warning and tree printing work.Paul Phillips2012-03-2021-120/+182
| | | | | | | | | | | Fewer deprecation warnings, prettier trees, prettier symbols, more polished error messages. Oh the interesting people you meet handling warnings, I feel sorry for you all that I get to do it all the time. One of the characters I met invited me into the "Dead Code Society" and that's what I'm doing on Tuesdays now. No of course you haven't, it's a SECRET society.
* Tweak to string coloring.Paul Phillips2012-03-203-13/+22
| | | | Concluded String->String would be more useful more often.
* Revert irrefutability commits.Paul Phillips2012-03-203-35/+21
| | | | | Temporary reversion of irrefutability commits in interests of stable milestone. Expect to restore shortly.
*-. Merge remote-tracking branches 'vjovanov/duration-cleanup', ↵Paul Phillips2012-03-2068-1709/+2241
|\ \ | | | | | | | | | 'adriaanm/topic/virtpatmat' and 'vjovanov/actor-hierarchy' into develop
| | * Prepared actors hierarchy for migration.Vojin Jovanovic2012-03-2014-646/+702
| | | | | | | | | | | | | | | | | | Internal nodes added so methods relevant to akka can be overridden. Review by: @phaller
| * | [vpm] pack types of if branches before lubbingAdriaan Moors2012-03-201-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this way we don't end up with fresh, incompatible, skolems for every branch, but a neatly packed existential you get much nicer lubs this way -- threw in a fast path (I hope) that avoids lubbing when unnecessary (same types) since lub isn't robust enough to deal with the result of packedType, and we only really need the trivial case (S =:= T), special case it for now ... don't pack in ifs after typer, also only when virtPatmat
| * | [vpm] fix half of my existential troublesAdriaan Moors2012-03-203-15/+10
| | | | | | | | | | | | | | | | | | | | | no need for the clunky repackExistential pack the type of each case instead, since the skolems we've created shouldn't last beyond the case anyway this way we don't end up with fresh, incompatible, skolems for every case, but a neatly packed existential
| * | [vpm] typer synths Function{} for empty-sel matchAdriaan Moors2012-03-204-161/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | typedMatchAnonFun is called from typedFunction when the function's body is a match this is work-in-progres: the compiler currently won't bootstrap under -Yvirtpatmat see also the pending test make sure to use the right context in typeFunction when the body is a Match when typer is set up for type checking a Function, the current owner is the symbol for the function, but we'll type check a Block(List(ClassDef(cd)), New(cd)) when the function is a match, and the function symbol is nowhere to be found, so go to outer context in patmatvirt: - simplified default case gen (no need for a Casegen instance) - using CASE | SYNTHETIC to detect generated matches (for switches) and avoid typing them endlessly more uniform, and necessary for new-style anon Function class instance gen for matches
| * | specialize symbols for labeldef paramsAdriaan Moors2012-03-201-2/+10
| | |
| * | [vpm] tailcalls support for jumpy vpmAdriaan Moors2012-03-202-12/+119
| | |
| * | [vpm] label-based translation of matchesAdriaan Moors2012-03-201-185/+173
| | |
| * | [vpm] TODO note: make unapply type list stricterAdriaan Moors2012-03-201-0/+5
| |/ | | | | | | | | | | | | | | when an unapply returns Option[T] where T is some ProductN, does that mean the unapply returns 1 result, i.e., that T, or did it mean to return N results? to disambiguate, falling back to stricter spec-adherence, which requires T be exactly TupleN for N results for now, allow extractor result to be any product, not just tuple
| *-. Merge remote-tracking branches 'hubertp/topic/buildinfo', ↵Paul Phillips2012-03-2020-265/+457
| |\ \ | | | | | | | | | | | | 'VladUreche/issue/5248' and 'VladUreche/issue/5054-usecase-cleanup2' into develop
| | | * Merge branch 'issue/5054-usecase-cleanup'Vlad Ureche2012-03-2017-261/+435
| | |/| | |/| | | | | | | | | | | | | | Conflicts: test/scaladoc/scala/html/HtmlFactoryTest.scala
| | | * Adapted usecases to full signature displayVlad Ureche2012-03-2014-243/+359
| | | |
| | | * Adapted indentation in scaladoc code blocksVlad Ureche2012-03-203-18/+76
| | | | | | | | | | | | | | | | | | | | and fixed a pesky crash in the syntax highlighting caused by invalid chars (0x0E) in MarkupParser.scala.
| | * | Fixes SI-5248Vlad Ureche2012-03-203-4/+22
| |/ /
| * | Discovered filter was still being generated.Paul Phillips2012-03-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than withFilter, for a subset of for comprehension structures. Not sure if this was somewhat by design - only seems possible because refchecks was only looking for nme.filter, not nme.withFilter, so perhaps this was intended as some secret irrefutability backchannel? Really have to document that sort of thing if it's intentional. I assumed it wasn't and unified everything.
| * | Finally did something about broken irrefutability.Paul Phillips2012-03-192-20/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parser has always been confused about tuple patterns in for comprehensions. It thinks it can fail to recognize an irrefutable pattern and have it removed in refchecks, but it is sadly mistaken, because the unnecessary filter has a tendency to fail the compile in typer. Look more intently for irrefutable patterns and don't insert the unnecessary filter. Closes SI-5589, SI-1336.
| * | Merge remote-tracking branch 'vjovanov/actors-move' into developPaul Phillips2012-03-1911-19/+115
| |\ \
| | * | Separating Scala Actors from the Scala Library.Vojin Jovanovic2012-03-1911-19/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scala actors are now in scala-actors.jar. Changes that were done are: - Fixed partest to include actors library for various test usages - Created the entry for the new jar in build.xml - Added maven entries for scala actors Review by: @jsuereth
| * | | Merge remote-tracking branch 'adriaanm/ticket/5189' into developPaul Phillips2012-03-196-29/+53
| |\ \ \
| | * | | SI-5189: refined GADT soundness fixAdriaan Moors2012-03-196-29/+53
| | |/ / | | | | | | | | | | | | | | | | extrapolate GADT skolems: only complicate types when needed make sure we only deskolemize GADT skolems after typedCase
| * | | Chill out repl ctrl-char filter.Paul Phillips2012-03-191-9/+11
| | | | | | | | | | | | | | | | So colors can come through unscathed.
| * | | Overhaul of NodePrinters.Paul Phillips2012-03-192-384/+287
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drawing on the previous, a half-decade overdue overhaul of NodePrinters. Now with colors if you like colors. % scalac -Xprint:all -Yshow-trees -Dscala.colors a.scala Am heading toward general purpose color configuration.
| * | | Tree adjustments.Paul Phillips2012-03-196-10/+24
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed that if we gave Ident a "qualifier" method which is always EmptyTree, a whole bunch of code could be simplified. A transparent subclass of Apply which preserves the source level "new" a little longer than never. Since productPrefix is tied up in reification - and oh I detest this "String"-based programming, we shouldn't have to wait until everyone learns this independently to change it - I added "printingPrefix" to Tree, which defaults to productPrefix but can be changed without breaking reify.
* / / Cleaned up Duration for the standard library.Vojin Jovanovic2012-03-2013-530/+594
|/ / | | | | | | | | | | | | | | | | | | | | - Removed Timeout from the library. Each library should provide its own implementation of Timeout - Removed duration package object and replaced it with regular object - Removed usages of post Java 1.5 TimeUnit members - Added factory methods for FiniteDuration - Cleaned up some unnecessary comments - Merged duration DSL with Duration.scala file Review by: @phaller
* | Merge branch 'mar17-colorize'Paul Phillips2012-03-185-0/+549
|\ \
| * | Library for ansi color management.Paul Phillips2012-03-185-0/+549
| | | | | | | | | | | | | | | | | | | | | | | | | | | Having now experienced the unbelievable difference it makes to have one's voluminous debugging output effectively color-coded, I had to librarize the ansi codes in order to use them. This could all go in the standard library, or as soon as I can easily make use of compiler dependencies, a separate library altogether. For now it hides away in scala.tools.util.color.
* | | Merge remote-tracking branches 'axel22/feature/checkinit-transient' and ↵Paul Phillips2012-03-1834-318/+565
|\ \ \ | | | | | | | | | | | | 'jsuereth/mirrored-seq-extractors' into develop
| * | | Added +: and :+ extractors to mirror append/prepend.Josh Suereth2012-03-162-0/+24
| |/ / | | | | | | | | | | | | | | | | | | | | | * +: does head/tail decomposition on any Seq * :+ does init/last decomposition on any Seq * Both preserve specific Seq types. Review by @odersky
| * | Eliminating warnings in Cleanup.Paul Phillips2012-03-163-74/+67
| | | | | | | | | | | | | | | | | | | | | | | | And un-overabstracting it a bit. When a method takes four parameters in two parameter lists, one of which is a closure acting on a tuple, and it turns out there are a total of three call sites and they all pass identical values for the first three parameters, it may be time to brush up on your YAGNI.
| * | Testing compiler asSeenFrom directly.Paul Phillips2012-03-164-17/+52
| | | | | | | | | | | | | | | | | | | | | It's more of a "dump what it says to a file so we'll know if any of this ever changes" than a "test" per se. It could use some wheat/chaff/nonsense/sense sorting. Still, it would be great to have more stuff like this.
| | |
| | \
| | \
| | \
| | \
| | \
| | \
| | \
| | \
| | \
| *---------. \ Merge remote-tracking branches 'VladUreche/feature/inheritdoc-clean', ↵Paul Phillips2012-03-1623-186/+406
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 'acruise/t1118', 'hubertp/issue/5572', 'hubertp/topic/nightly-checkinit', 'axel22/feature/pc-ctrie', 'jsuereth/master-version-fixin' and 'axel22/feature/checkinit-transient' into develop
| | | | | | | * | Fixed maven deployment issues for new versioning scheme.Josh Suereth2012-03-162-15/+20
| | | | | | | | |
| | | | | | | * | Finished migrating to new versioning schemeJosh Suereth2012-03-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: build.xml tools/get-scala-revision.bat
| | | | | | | * | properties loading is now maven/osgi version aware. yippie.Josh Suereth2012-03-161-14/+13
| | | | | | | | |
| | | | | | | * | Modified build for new versioning scheme.Josh Suereth2012-03-162-3/+4
| | | | | | | |/
| | | | | | * | Renamed concurrent trie source files.Aleksandar Prokopec2012-03-162-0/+0
| | | | | | | |
| | | | | | * | Renaming Ctrie to ConcurrentTrieMap.Aleksandar Prokopec2012-03-162-77/+77
| | | | | | | |
| | | | * | | | Remove assert given the test. Fixes #SI-5572.Hubert Plociniczak2012-03-161-1/+0
| | | | |/ / /
| | | * | | | Tweaked deprecation annotations to avoid warningAlex Cruise2012-03-152-2/+2
| | | | | | |
| | | * | | | Re-fixed 2.10-style literals. Oh, silly Windows and your line endings.Alex Cruise2012-03-151-1/+1
| | | | | | |
| | | * | | | SI-1118:Alex Cruise2012-03-152-462/+459
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use new-style deprecation annotations * Slightly less cutesy test text * Move t1118.scala to the right directory