summaryrefslogtreecommitdiff
path: root/src/compiler
Commit message (Collapse)AuthorAgeFilesLines
* Some long overdue conveniences.Paul Phillips2012-04-2511-24/+58
| | | | | | Not just conveniences though. One of the clearest statements made by profiling is that collections methods of the form of the enclosed flatCollect are materially faster than the alternatives.
* Merge commit 'refs/pull/436/head'Paul Phillips2012-04-251-0/+1
|\
| * fixes SI-5706Eugene Burmako2012-04-251-0/+1
| |
* | Fix reifier crashing repl.Paul Phillips2012-04-252-16/+23
| | | | | | | | | | | | Very first time I tried "reify" in the repl and it crashed. I changed an assert to issue a proper error, as best I could figure out how. We probably need to do a lot more of this.
* | fixes SI-5707Eugene Burmako2012-04-252-3/+3
|/
* Moved ancillary methods off specialized traits.Paul Phillips2012-04-241-2/+0
| | | | | | | Moved compose/andThen off Function1, curried/tupled off Function2. Pushed Tuple2 zipped into auxiliary class. Created implicits to plaster over the changes. This drops several hundred classfiles and takes (unoptimized) scala-library.jar from 7.8 Mb to 7.4 Mb.
* Reordering genBlock match cases by frequency.Paul Phillips2012-04-241-36/+68
|
* Merge commit 'refs/pull/433/head' into developPaul Phillips2012-04-241-1/+1
|\
| * fixes SI-5704Eugene Burmako2012-04-241-1/+1
| |
* | copy BackQuotedIdent trees (don't copy as Ident)Adriaan Moors2012-04-243-1/+7
| | | | | | | | | | | | | | typer synthesized the wrong isDefinedAt method in typedMatchAnon because a BackQuotedIdent was copied as an Ident, so that the equality check was performed in applyOrElse (since it operates on the original tree), but not in isDefinedAt (since it operates on the copy, which collapsed Ident and BackQuotedIdent)
* | generate well-formed patterns in parserAdriaan Moors2012-04-242-6/+25
|/ | | | | | | | | | | | | | | | val pattern: Type = expr desugared to val x = expr match { case pattern: Type => (var_1, ..., var_N)} but `pattern: Type` is only a valid pattern if `pattern` is an Ident thus, we desugar to val x = (expr: Type) match { case pattern => (var_1, ..., var_N)} ... in this case (see def makePatDef) also, MaybeBoundType now fails on illegal patterns (to defend against similar regressions)
* Express flags as bit shifts.Paul Phillips2012-04-241-57/+57
| | | | For those of us robots who still have a little human blood.
* Merge commit 'refs/pull/431/head'Paul Phillips2012-04-241-2/+2
|\
| * $op_name, $op_names, $plus and $eq are not macroKato Kazuyoshi2012-04-241-2/+2
| |
* | adds isStatic to Symbols API in macro contextEugene Burmako2012-04-231-0/+2
| | | | | | | | @paulp I think this is the place we should dump the contents of AbsSymbolInternal to
| |
| \
*-. \ Merge commit 'refs/pull/427/head'; commit 'refs/pull/428/head' into developPaul Phillips2012-04-2348-394/+564
|\ \ \ | | |/ | |/|
| | * interop between manifests and tagsEugene Burmako2012-04-232-1/+13
| | |
| | * 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
* | | Revert "Fix for range positions."Paul Phillips2012-04-231-6/+1
| | | | | | | | | | | | | | | | | | This reverts commit b47189ad06e027c310d93b071fc8bf15d979225d. This never happened.
* | | Merge branch 'range-redux' of /scratch/trunk2Paul Phillips2012-04-231-1/+6
|\ \ \ | |/ / |/| |
| * | Fix for range positions.Paul Phillips2012-04-231-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You are a fireman, leading a team of firemen on a rescue in a burning building. When you have cleared a room, you place a sticker on the door which says "Room cleared!" If the other firemen see that sticker, they will skip that room, knowing there are no small children or adorable puppies behind it. As the lead fireman, here is what you should not do: run from door to door slapping "Room cleared!" stickers on them all, so the other firemen shrug and go home. Translation: when recursion depends on a condition, if you alter the condition before you recurse, you may not recurse at all.
* | | Merge commit 'refs/pull/424/head' into developPaul Phillips2012-04-231-0/+1
|\ \ \ | |_|/ |/| |
| * | minor fixes to reificationEugene Burmako2012-04-231-0/+1
| | |
| | |
| \ \
*-. \ \ 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".