summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* made virtpatmat codegen type-directedAdriaan Moors2011-10-212-53/+68
| | | | | | | | | | | | iff the matching monad is Option (the default MatchingStrategy), optimize flatMap/orElse/guard to the equivalent if-then-else (otherwise, emit flatMap/orElse,... calls) also, triggering support for <outer> when opt.virtPatmat (was opt.experimental) no review
* virtpatmat, hidden behind -YvirtpatmatAdriaan Moors2011-10-2051-5/+1238
| | | | | | | | | at least one imminent TODO: undo hardwired generation of if/then/else, and decide based on type whether to call flatMap/orElse or inline those methods from Option review by extempore
* explicitouter support for virtpatmat synthetic ...Adriaan Moors2011-10-202-0/+24
| | | | | | | explicitouter support for virtpatmat synthetic <outer> is turned into the actual outer accessor since pattern matching virtualisation is done during typer, not explicitouter like the real pattern matcher, we don't know what the outerAccessor is yet when emitting outer checks -- thus use a synthetic select that is transformed into the real thing during explicitouter no review
* setting the stage for the virtualizing pattern ...Adriaan Moors2011-10-202-29/+34
| | | | | | | | setting the stage for the virtualizing pattern matcher no actual changes though no review
* misc fixes while working on virtualizing patter...Adriaan Moors2011-10-2010-23/+29
| | | | | | | | misc fixes while working on virtualizing pattern matching not directly related to pattern matching, though review by extempore
* infer singleton when asking for itAdriaan Moors2011-10-206-31/+59
| | | | | | | | | | | | | a type var's constraint now also tracks whether the type var was compared to a stable type if it was, we probably shouldn't widen the type argument that's inferred for this var, as the result will surely fail to type check NOTE: must be enabled using -Xexperimental review by extempore
* more flexible inference wrt type skolemsAdriaan Moors2011-10-203-18/+52
| | | | | | | | | | | | | instead of barring types that have been skolemized after the TypeVar they're being compared against, (isRelatable) simply remember when a type var is compared to a type skolem from a later skolemization level finally, repack the solution for the type var into a fresh existential if the compared level exceeded ours NOTE: must be enabled using -Xexperimental review by extempore
* 5033: align bound syms when comparing method typesAdriaan Moors2011-10-202-6/+19
| | | | | | | | | | | | can't believe I missed that one... closes SI-5033 more complete test case to make sure the multi-arglist case works as well no review
* dependent methods types are now always enabledAdriaan Moors2011-10-2022-45/+19
| | | | | | | | | | for now, left the old if(settings.YdepMethTpes.value) guards in comments removed *.flags containing -Ydependent-method-types also updated one check file with one fewer error no review
* no need to add an x field to everythingAdriaan Moors2011-10-202-15/+15
| | | | | | | | | | | however, it must be possible to inline Ensuring, ArrowAssoc methods renamed the public val x to something a little less intrusive fixed check file to reflect better error message (see! it wasn't that uncommon for people to write `foo.x` -- NEWS AT ELEVEN) no review
* eternalized Paul's findings wrt thisSymAdriaan Moors2011-10-201-2/+20
|
* cleaned up addEvidenceParams a bitAdriaan Moors2011-10-201-12/+8
| | | | | | | | implemented my own feedback from https://codereview.scala-lang.org/fisheye/cru/SR-1022#CFR-23393 no review
* More decomposition of Namers.Paul Phillips2011-10-203-90/+88
| | | | | | | | Having I think established this isn't merely a dance around the maypole, I'm going to continue breaking down Namers because it's hard to figure out where my stubbing mechanism is colliding with the existing logic. Getting there, no review.
* AbstractPartialFunction.Paul Phillips2011-10-1912-13/+25
| | | | | | | | | | | | | | | | | | | | | | | Contributed by Todd Vierling with minor mods by extempore. This is an obvious extension of AbstractFunctionN which I had some issue making work at the time. Sounds kind of pitiful given that the compiler patch is about two lines, but let's all agree to believe it was a different world then. This example program is impacted as follows: class A { def f: PartialFunction[Any, Int] = { case x: String => 1 } def g: PartialFunction[Any, Int] = f orElse { case x: List[_] => 2 } def h: PartialFunction[Any, Int] = g orElse { case x: Set[_] => 3 } } Before: 34943 bytes of bytecode After: 4217 bytes of bytecode A mere 88% reduction in size. "'Tis but a trifle!" Closes SI-5096, SI-5097.
* Overhaul of mixin.Paul Phillips2011-10-1911-410/+432
| | | | | | | | If extempore is going to fix the hard bugs then first he is going to make them less hard to fix. The major work of interest in here is the decomplification of the bitmap logic. Hopefully this will come in handy for anyone wishing to try out other encodings.
* Cycle defense.Paul Phillips2011-10-194-2/+24
| | | | | | Notice when a typeref's info creates an obvious cycle, so we can see an error instead of a stack overflow. Closes SI-5093, review by moors.
* Tweaks to Any and AnyRef documentation, courtes...Heather Miller2011-10-182-2/+5
| | | | | | Tweaks to Any and AnyRef documentation, courtesy of Seth Tisue. No review.
* Documentation to Namers.Paul Phillips2011-10-181-0/+10
| | | | | Added some reverse engineered documentation to Namers, no review.
* Fixing valueOfTerm in the repl.Paul Phillips2011-10-184-7/+27
| | | | | | | Impressed at the amount of ticket traffic for an unadvertised internal method. All the more reason to work toward that support repl API. Don't worry, it'll come. Closes SI-4899, no review.
* Shutdown hook modification.Paul Phillips2011-10-184-8/+60
| | | | | | | | Don't mark shutdown hooks as daemon threads, although it does not seem to make any difference. Instead have the code which waits for all threads to be complete be smarted about which codes to monitor. No review.
* Fix for comparison warnings.Paul Phillips2011-10-184-26/+40
| | | | | | | | | | | | true == new java.lang.Boolean(true) will in fact sometimes be true. Also fixes a bug caused by this change in r23627. - lazy val SerializableClass = getClass(sn.Serializable) + lazy val SerializableClass = getClass("scala.Serializable") It used to be java.io.Serializable. Hey, let's not change the meaning of existing symbols which are in active use. No review.
* Overhaul of Namers.Paul Phillips2011-10-178-575/+627
| | | | | | | | | | | | | I can't go bear hunting without a clean gun. Basically I iterated over Namers until I could understand it. I added a variety of documentation there and elsewhere. There shouldn't be anything particularly behavioral changing in this commit, but I did delete some years-old code (having huge commented out blocks of way-out-of-date code is not a boon to understanding) and the debugging output will look different. Better, one can hope. How about, review by moors.
* Reverting r25787 (caused test.scaladoc failures...Antonio Cunei2011-10-178-302/+183
| | | | | Reverting r25787 (caused test.scaladoc failures on certain systems)
* Cleaning up debug logging.Paul Phillips2011-10-176-11/+22
| | | | | No review.
* Do not depend on java.rmi.* when not necessary.Grzegorz Kossakowski2011-10-171-2/+2
| | | | | | | | | This is small correction of fix committed in r25814. We need to swap terms in logical conjuction so java.rmi.* stuff is accessed only if triggered by @remote annotation. No review.
* Big improvements to scala.Either.Heather Miller2011-10-161-14/+287
|
* Addendum to previous patch.Paul Phillips2011-10-161-10/+9
| | | | | | | | In one of those unlikely accidents, I managed to lose the call to evalOnce while still fixing the reported bug in a different way (function composition led to the target only being called once anyway.) No review.
* Fix for multiple evaluation in structural calls.Paul Phillips2011-10-163-100/+140
| | | | | | | | | | | An interesting bug during cleanup: runtime checks on the target of a structural invocation duplicated the selection without regard for the fact that it might be an expression. So if the name of the method being invoked allowed the possibility that the target was a primitive type (such as "toInt") the expression would be evaluated three times. Closes SI-5080, no review.
* revise and expand root-level ScaladocPaul Phillips2011-10-151-15/+24
| | | | | | added section headers, tightened the wording, shortened the list of selected important packages, and explained automatic imports more
* Donated some parens to Any.Paul Phillips2011-10-151-4/+4
| | | | | And a touch of documentation correctness. Closes SI-5077, no review.
* Test case closes SI-3898, no review.Paul Phillips2011-10-151-0/+6
|
* Harden the typer against surprise unapply types.Paul Phillips2011-10-153-1/+28
| | | | | Closes SI-5078, no review.
* Changed a power mode import.Paul Phillips2011-10-151-1/+1
| | | | | Applying a bandaid since I'll never get the globals lined up. No review.
* removed quotes in partest.bat, added svn propsmichelou2011-10-151-3/+3
|
* Fix regression in companion check.Paul Phillips2011-10-155-7/+22
| | | | | | | | | Pulling back from expensive path normalization caused a regression where companions were no longer recognized as such after specialization. (Specifically, the paths turned up as "test.scala" and "./test.scala".) I made it a two-level check, doing the expensive one before failing. Closes SI-5023, no review.
* Another swing at r25823.Paul Phillips2011-10-144-1/+46
| | | | | | I verified this creates identical library bytecode so I anticipate no regressions. Review by prokopec anyway.
* Better error when abstract methods are missing.Paul Phillips2011-10-1413-53/+250
| | | | | | | | When many methods are missing, print a list of signatures the way they need to be implemented, and throw in ??? stub implementations so it should be compilable code. If anyone would like this logic exposed more generally (for the IDE or whatever) just let me know. No review.
* Reverted r25823 as it breaks specialization of ...Grzegorz Kossakowski2011-10-132-24/+1
| | | | | Reverted r25823 as it breaks specialization of traits.
* Renamed isPureExpr to isExprSafeToInline.Paul Phillips2011-10-137-27/+32
| | | | | | Taking adriaan's advice for what name would better describe this method. Yours in reduction of ambiguous terminology, no review.
* Adjustment to @switch.Paul Phillips2011-10-132-1/+11
| | | | | | Don't require a tableswitch if the matcher elected not to emit one because there were so few cases. No review.
* Added back reporting of comment tokens from the...Iulian Dragos2011-10-121-0/+8
| | | | | | Added back reporting of comment tokens from the Scanner. This allows the IDE to show 'TODO' tasks in the Tasks view.
* Propagate self-type to specialized subclasses.Paul Phillips2011-10-112-1/+24
| | | | | Closes SI-5071, review by prokopec.
* Throw different exception.Paul Phillips2011-10-111-2/+2
| | | | | Booleans aren't numbers. Closes SI-5032, no review.
* Added check file for test.Martin Odersky2011-10-113-8/+8
|
* Simple test case for string interpolation.Martin Odersky2011-10-112-0/+10
|
* Presentation compiler: let ShutdownReq propagat...Iulian Dragos2011-10-111-1/+2
| | | | | | Presentation compiler: let ShutdownReq propagate from the background compiler, and don't mark a unit as crashed in that case.
* Batting back a java.rmi.* dependency.Paul Phillips2011-10-103-20/+18
| | | | | | The scala gwt project does not like have a sudden dependency on java.rmi.Remote show up in the mail. Review by grek.
* Avoiding String.isEmpty.Paul Phillips2011-10-102-2/+2
| | | | | It has a full quiver of ways to break us, no review.
* String interpolation added as experimental feat...Martin Odersky2011-10-104-25/+116
| | | | | String interpolation added as experimental feature. Review by extempore.
* Moved meta annotations to annotation.meta, plus.Paul Phillips2011-10-1037-267/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It took me a long time to find a trivial error while adjusting the annotation packages, so I spent even longer trying to make sure next time it would take me less time. It's the usual business of eliminating duplication and unnecessary indirection. Behavioral note: there was no consistency or deducible reasoning regarding when annotation checks would be performed against the typeSymbol directly (thus excluding annotation subclasses) or when they would do a subclass check. I saw no reason it shouldn't always be a subclass check; if the annotation isn't supposed to be subclassed it should be final, and if it is, then the subclasses had probably better not stop exhibiting the behavior of the base class. Example: this now draws deprecated warnings, but did not before. class bippy extends deprecated("hi mom", "burma shave") @bippy def f = 5 (The deprecation message isn't printed so we're not there yet, but closer.) There is some new internal documentation on annotations, sadly lacking in my famous ascii diagrams, and some new conveniences. Review by rytz.