summaryrefslogtreecommitdiff
path: root/src/compiler
Commit message (Collapse)AuthorAgeFilesLines
* resurrects manifests in their pre-2.10 gloryEugene Burmako2012-04-233-1/+129
|
* migrates stdlib and compiler to tagsEugene Burmako2012-04-2332-148/+155
| | | | | * all usages of ClassManifest and Manifest are replaced with tags * all manifest tests are replaced with tag tests
* rethinks tagsEugene Burmako2012-04-2319-250/+273
| | | | | * introduces ArrayTag and ErasureTag * all type tags now feature erasure
*-. Merge commit 'refs/pull/419/head'; commit 'refs/pull/420/head'; commit ↵Paul Phillips2012-04-2225-601/+663
|\ \ | | | | | | | | | 'refs/pull/421/head'; commit 'refs/pull/422/head' into develop
| | * Reflection and reification: Names and Symbols.Paul Phillips2012-04-2223-598/+660
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Consolidating many islands of name organization. Folds NameManglers into StdNames. Brings more of the string constants together with similar constants. Move name manipulation methods which produce TypeNames into object tpnme rather than nme. - Starting on MethodSymbolApi, ClassSymbolApi, etc so we can put sensible methods on sensible entities. This pushed into Definitions, where I pulled a whole bunch out of the api side (or at least marked my intention to do so -- too many tests use them to make them easy to remove) and on the compiler side, returned something more specific than Symbol a bunch of places. - Added a number of conveniences to Definitions to make it easier to get properly typed symbols. Note: one way in which you might notice having better typed Symbols is with Sets, which have the annoying property of inferring a type based on what they've been constructed with and then hard failing when you test for the presence of a more general type. So this: val mySet = Set(a, b) println(mySet(c)) ..goes from compiling to not compiling if a and b receive more specific types (e.g. they are MethodSymbols) and c is a Symbol or ClassSymbol or whatever. This is easily remedied on a site-by-site basis - create Set[Symbol](...) not Set(...) - but is an interesting and unfortunate consequence of type inference married to invariance. The changes to DummyMirror where things became ??? were driven by the need to lower its tax; type "Nothing" is a lot more forgiving about changes than is any specific symbol type.
| * | fixes SI-5689Eugene Burmako2012-04-211-1/+1
| |/
| *-. Merge commit 'refs/pull/414/head'; commit 'refs/pull/415/head'; commit ↵Paul Phillips2012-04-202-2/+2
| |\ \ | | | | | | | | | | | | 'refs/pull/416/head'; commit 'refs/pull/417/head'; commit 'refs/pull/418/head' into develop
| | | * fixes SI-5680Eugene Burmako2012-04-201-1/+1
| | |/ | |/|
| | * minor fix to macro tracingEugene Burmako2012-04-201-1/+1
| |/
* / scala.reflect.api: Reporters => FrontEndsEugene Burmako2012-04-2011-133/+122
|/
* Minor optimizations with nested list operations.Paul Phillips2012-04-188-26/+42
| | | | | | I also tried transforming a comment into an assertion and to my shock and happy surprise everything still worked. Let's express those preconditions in code when we can, mmm?
* Sigh, sbt needs this one too.Paul Phillips2012-04-182-3/+4
|
* fixes testsEugene Burmako2012-04-171-1/+1
|
* assorted stability fixesEugene Burmako2012-04-1710-358/+448
|
* adds erasures to concrete type tagsEugene Burmako2012-04-1719-94/+188
|
* Try to fix sbt.Paul Phillips2012-04-172-3/+8
| | | | It depended on the signature of uncheckedWarnings.
* Merge commit 'refs/pull/408/head'Paul Phillips2012-04-168-40/+79
|\
| * Inliner won't touch private/protected fields anymoreVlad Ureche2012-04-164-8/+17
| | | | | | | | And we'll need a separate mechanism for making internal fields public.
| * don't emit tiny switches: optimizer chokes on themAdriaan Moors2012-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | workaround for inliner bug in run/t3835 see SI-5672 for the optimizer bug tiny switches (2 cases or less) don't make sense anyway, so this is not a big deal the annotDepMethType.flags contained -Xexperimental, which causes Any* to be considered as a valid return type, before we weren't exposed to this, because the product methods used (tiny) switches; with this change, they went back to pattern matches in any case, the -Xexperimental was intended to turn on dependent method types, not Any* as valid type (I can only assume), and they are now on by default the other tests were affected by our refusal to emit tiny switches
| * restore typedMatchAnonFun in all its gloryAdriaan Moors2012-04-144-31/+61
| | | | | | | | | | | | | | | | | | detect partialfunction in cpsannotationchecker emit apply/isDefinedAt if PF has @cps targs (applyOrElse can't be typed) further hacky improvements to selective anf better try/catch support in selective cps using freshly minted anonfun match make virtpatmat resilient to scaladoc (after uncurry, don't translate matches TODO: factor out translation all together so presentation compiler/scaladoc can skip it)
* | New facility: TypeDestructurers.Paul Phillips2012-04-1622-186/+678
| | | | | | | | | | | | Would prefer to bake a little longer, but, scala days. More elaboration to come.
| |
| \
*-. \ Merge commit 'refs/pull/401/head'; commit 'refs/pull/402/head'; commit ↵Paul Phillips2012-04-1411-140/+261
|\ \ \ | | |/ | |/| | | | 'refs/pull/403/head'; commit 'refs/pull/404/head'; commit 'refs/pull/405/head' into develop
| | * implements reification of tough typesEugene Burmako2012-04-1411-140/+261
| | |
* | | Made checkFeature conditionally run immediately. Adapted Macros to make use ↵Martin Odersky2012-04-142-14/+24
|/ / | | | | | | of it.
| |
| \
| \
| \
| \
| \
*-----. \ Merge commit 'refs/pull/387/head'; commit 'refs/pull/388/head'; commit ↵Paul Phillips2012-04-144-48/+89
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 'refs/pull/392/head'; commit 'refs/pull/397/head' into develop
| | | | * | Reimplemented shadowing between class membersVlad Ureche2012-04-141-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | and implicit pimped on members. Thanks to Lukas for pointing it out!
| | | | * | Fixing the docs.scalap breakageVlad Ureche2012-04-141-0/+2
| | | | |/
| | | * | SI-5663: Tweak warnings on case class equalsSom Snytt2012-04-131-22/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-enable testing the sensibility of comparing instances of two case classes. In particular, warn if we detect that the two objects inherit from different case classes. In addition, avoid emitting misleading warnings when comparing "new C".
| | * | | Improved formatting/display of documentation.Simon Ochsenreither2012-04-131-24/+24
| |/ / / | | | | | | | | | | | | Made the primary constructors private to prevent them from appearing in ScalaDoc.
* | | | Merge branch 'develop'Paul Phillips2012-04-1422-173/+392
|\ \ \ \
| | \ \ \
| | \ \ \
| *-. \ \ \ Merge commit 'refs/pull/391/head'; commit 'refs/pull/390/head' into developPaul Phillips2012-04-1418-154/+366
| |\ \ \ \ \
| | | * | | | enable implicit enrichment when typing patternsAdriaan Moors2012-04-132-5/+47
| | | | | | |
| | | * | | | parse patterns, not exprs in interpolatedString's holesAdriaan Moors2012-04-131-7/+13
| | | | | | |
| | * | | | | virtpatmat on by default; chicken out: -XoldpatmatAdriaan Moors2012-04-147-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | some tests (unreachability, exhaustivity, @switch annotation checking) are still run under -Xoldpatmat, but that will change before we go into RC mode (then the test/ partest of this commit will be reverted) removed irrelevant dependency on patmat
| | * | | | | virtpatmat: initial CPS supportAdriaan Moors2012-04-142-23/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | typers&patmatvirtualizer have ad-hoc support for dropping annotations in a way that makes the CPS plugins happy... this is not ideal, but unless virtpatmat runs after the plugin phases, I don't see how to solve it running virtpatmat after the CPS plugin would mean the pattern matching evaluation cannot be captured by CPS, so it's not even desirable to move it to a later phase - typedIf must lub annotated types - drop selector.tpe's annotations - drop annots in matchEnd's argument type - deal with annots in casts synth by in virtpatmat (drop them from type arg to asInstanceof, recover them using type ascription) - workaround skolemize existential dropping annots CPS is the main reason why typedMatchAnonFun is not used anymore, and PartialFunction synthesis is moved back to uncurry (which is quite painful due to labeldefs being so broken) we can't synth partialfunction during typer since T @cps[U] does not conform to Any, so we can't pass it as a type arg to PartialFunction, so we can't type a cps-transformed PF after the CPS plugin, T @cps[U] becomes ControlContext[...], which is a type we can pass to PartialFunction virtpatmat is now also run until right before uncurry (so, can't use isPastTyper, although it means more or less the same thing -- we don't run after uncurry) the main functional improvements are in the selective ANF transform its treatment of labeldefs was broken: for example, LabelDef L1; LabelDef L2 --> DefDef L1; L1(); DefDef L2; L2() but this does not take into account L1 may jump over L2 to another label since methods always return (or fail), and the ANF transform generates ValDefs to store the result of those method calls, both L1 and L2 would always be executed (so you would run a match with N cases N times, with each partial run starting at a later case) also fixed a couple of weird bugs in selective anf that caused matches to be duplicated (with the duplicate being nested in the original) since label defs are turned into method defs, and later defs will be nested in the flatMap calls on the controlcontext yielded by earlier statements, we reverse the list of method definitions, so that earlier (in the control flow sense) methods are visible in later ones selective CPS now generates a catch that's directly digestible by backend
| | * | | | | wip: put skeleton for typetag-based typetests in placeAdriaan Moors2012-04-142-7/+73
| | | | | | |
| | * | | | | more prudent bridging to unapply[Seq]Adriaan Moors2012-04-141-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | since we can't statically know whether the unapply we'll be bridging to is synthetic, drop this condition, and do pessimistic bridging for all unapply[Seq] (i.e., if we can't statically guarantee the type that would be assumed to be safe to cast to by a synthetic extractor, do the type test and return None if it fails)
| | * | | | | synth PartialFunction in uncurryAdriaan Moors2012-04-145-99/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | due to interaction with the CPS plugin, can't synth PartialFun during typer (the types don't work out: in PartialFun[T, U @cps[V]], U @cps[V] does not conform to Any, and we can't move the annot from the type arg directly to applyOrElse's result, since then it won't override anything) thus, we face the pain of mangling labeldefs again resetLocalAttrsKeepLabels can't use leaveAlone don't cast matcherror throw, uncurry gets confused uncurry: cast selector valdef's rhs to avoid skolem mismatch NOTE: I'm not happy about this code, but I don't know how to make the clean way (typedMatchAnonFun) compatible with the CPS plugin one avenue to explor would be to introduce PartialFunCPS, which is transformed into a regular PartialFun when T @cps[U] is turned into ControlContext[T, U]
| | * | | | | cleanup in refchecksAdriaan Moors2012-04-141-1/+2
| | | | | | |
| | * | | | | print labeldef's parameter typesAdriaan Moors2012-04-141-1/+11
| | | |_|_|/ | | |/| | |
| * | | | | Merge commit '625397b02e'; commit 'refs/pull/396/head' into developPaul Phillips2012-04-142-1/+14
| |\ \ \ \ \
| | * | | | | restores some disabled macro tests, makes checkFeature synchronous when used ↵Eugene Burmako2012-04-142-1/+14
| | |/ / / / | | | | | | | | | | | | | | | | | | for macros
| * / / / / Added NameTree Tree interface.Paul Phillips2012-04-142-18/+12
| |/ / / /
* / / / / Move primitive widening implicits to companions.Paul Phillips2012-04-141-1/+15
|/ / / / | | | | | | | | | | | | | | | | Take a 15-implicit load off Predef and put it where it belongs: on those brave souls who like their longs to get floaty by way of T.
| | | |
| \ \ \
*-. \ \ \ Merge commit 'refs/pull/389/head'; commit 'refs/pull/393/head' into developPaul Phillips2012-04-145-14/+138
|\ \ \ \ \ | | | |/ / | | |/| |
| * | | | rule out sequence arg to applyDynamicAdriaan Moors2012-04-132-5/+16
| | | | |
| * | | | implement SIP Type DynamicAdriaan Moors2012-04-134-14/+127
| | |/ / | |/| |
* | | | Merge branch 'master' into topic/sip18Martin Odersky2012-04-1332-360/+1491
|\ \ \ \
| * | | | Renamed seven files.Paul Phillips2012-04-132-0/+0
| | |/ / | |/| | | | | | | | | | | | | | Hey everyone, if classnames don't match filenames, ant will recompile said file on every run until the end of time. Still here, ant is.
| * | | Small cleanup in typeref toStringPaul Phillips2012-04-131-4/+4
| | | |