summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* cleanup of reflection- and macro-related stuffEugene Burmako2012-08-1572-399/+168
| | | | | | mostly removes [Eugene] marks that I left back then and reviews related code some of those tokens got left in place, because I don't know to how fix them without imposing risks on 2.10.0
* adds the `skipPackage` attribute to ScaladocEugene Burmako2012-08-151-1/+12
| | | | | Present in http://www.slideshare.net/VladUreche/scaladoc-reflection but not actually implemented in the ant task. Seems to be overlooked.
* Merge pull request #1137 from scalamacros/topic/ensimeVlad Ureche2012-08-142-0/+28
|\ | | | | .ensime template for compiler development
| * .ensime template for compiler developmentEugene Burmako2012-08-122-0/+28
| | | | | | | | | | | | | | | | Provides a template of an .ensime file to be used for compiler hacking together with an ENSIME-enabled text editor. Also includes a readme that outlines what editors support ENSIME. To the best of my knowledge these are Emacs, TextMate, jEdit and Sublime Text 2
* | Merge pull request #1136 from ingoem/scaladoc/implicits2.10Adriaan Moors2012-08-147-19/+37
|\ \ | | | | | | Add Scaladoc flag to specify hidden implicit conversions
| * | Add Scaladoc flag to specify hidden implicit conversionsingoem2012-08-147-19/+37
| | |
* | | Merge pull request #1134 from adriaanm/patmat-miscAdriaan Moors2012-08-142-25/+25
|\ \ \ | |/ / |/| | patmat tweaks: compiler performance, better error on unsupported pattern
| * | don't catch StackOverFlowError: kills performanceAdriaan Moors2012-08-141-24/+23
| | | | | | | | | | | | | | | | | | instead, use a recursion counter in negationNormalForm as in conjunctiveNormalForm (except we only limit recursion depth, not formula-size reuse the same config variable in hopes it'll do for both)
| * | don't crash on unsupported pattern -- diagnoseAdriaan Moors2012-08-142-1/+2
| | |
* | | Merge pull request #1101 from scalamacros/ticket/5940Josh Suereth2012-08-148-250/+373
|\ \ \ | |/ / |/| | SI-5940 impls are no longer in macro def pickles
| * | accommodated the feedback for the pull requestEugene Burmako2012-08-142-142/+119
| | | | | | | | | | | | For the discussion see: https://github.com/scala/scala/pull/1101
| * | macro implementations must be publicEugene Burmako2012-08-135-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The immediate motivator for this change was the desire to keep things simple during macro expansion. Here's the story. When you expand a macro, you need to reflectively load a macro implementation method and invoke it. However private methods in Scala can sometime have their names mangled, so the reflector has to check multiple variants of the same name (the normal one and the mangled one). The problem is that since the previous commit we don't have an access to a symbol of the macro impl, hence we cannot just use `impl.expandedName` like we did before. Sure I could duplicate the logic of expandedName, but I have a better suggestion. Let's prohibit non-public macro implementations. This doesn't seem to hurt, and it lets us avoid extra bit of complexity in Macros.scala. If this measure turns out to be a hassle during the trial period of macros, non-public macros can always be allowed. In fact, we can even have this feature back for free when we migrate from Java reflection to Scala reflection for invoking macro implementations (because Scala reflection knows how to account for mangled private names). But that's the 2.10.x business.
| * | SI-5940 impls are no longer in macro def picklesEugene Burmako2012-08-133-161/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first officially released version of macros persisted macro def -> impl bindings across compilation runs using a neat trick. The right-hand side of macro definition (which contains a reference to an impl) was typechecked and then put verbatim into an annotation on macro definition. This solution is very simple, but unfortunately it's also lacking. If we use it then signatures of macro defs become transitively dependent on scala-reflect.jar (because they refer to macro impls, and macro impls refer to scala.reflect.macros.Context defined in scala-reflect.jar). More details can be found in https://issues.scala-lang.org/browse/SI-5940. Therefore we have to avoid putting macro impls into binding pickles and come up with our own serialization format. Situation is further complicated by the fact that it's not enough to just pickle impl's class and method names, because macro expansion needs knowledge about the shape of impl's signature (which we can't pickle). Hence we precompute necessary stuff (e.g. the layout of type parameters) when compiling macro defs.
| * | Rewrite of transformTypeTagEvidenceParams.Paul Phillips2012-08-131-27/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes what a bug where the prefix seems to be checked but is ignored; however I rewrote this method purely out of a desire for tighter code. I would consider it a great personal favor if you would study the before/after and endeavor to internalize the mechanisms I applied. Points of particular note: - Before you write Option[Symbol], remember we already have an Option[Symbol], and it's Symbol. None == NoSymbol. - flatMap can be to an Option, you don't have to create a one element List for flatMap's enjoyment - lastOption and headOption are rarely the way to go ... especially if you start with if (xs.isEmpty) return - The method which checks for emptiness is ".isEmpty", it is NOT ".length == 0" I should add a pattern matcher warning for when you have a lower case name in scope (like "contextParam") and then use a lower case pattern variable of the same name, which of course ignores the one outside the pattern and matches everything. Review by @xeno-by.
* | | Merge pull request #1131 from paulp/topic/view-isemptyJosh Suereth2012-08-138-20/+36
|\ \ \ | | | | | | | | Topic/view isempty
| * | | Fix for view isEmpty.Paul Phillips2012-08-138-20/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Views have been inheriting the very inefficient isEmpty from Traversable, and since isEmpty is not specifically forwarded to the underlying collections, views miss out on all the important optimizations in those collections which tend to be implemented via method override. Not to mention, they miss out on correctness, because calling foreach has a habit of forcing the first element of the view.
* | | | Merge pull request #1130 from non/si6223-2.10.xJosh Suereth2012-08-133-4/+18
|\ \ \ \ | | | | | | | | | | Move side-effecting call out of debuglog(). Fixes SI-6223.
| * | | | Move side-effecting call out of debuglog(). Fixes SI-6223.Erik Osheim2012-08-133-4/+18
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes a situation in which method calls aren't being properly specialized. All the existing tests pass; in addition, it likely fixes other specialization bugs (and improves performance of specialized code). Also includes a small regression test.
* | | | Merge pull request #1100 from adriaanm/ticket-6022bJosh Suereth2012-08-132-96/+146
|\ \ \ \ | | | | | | | | | | SI-6022 cleaner model of variable equality modulo <:
| * | | | SI-6022 cleaner model of variable equality modulo <:Adriaan Moors2012-08-092-38/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a more conservative "excludes": no need to reason about types (TODO: check we don't get any spurious unreachability errors in the eclipse build, which is a good canary for this kind of thing)
| * | | | SI-6022 refactor to clean up model of variable equality modulo <:Adriaan Moors2012-08-091-94/+89
| | |/ / | |/| | | | | | | | | | this commit does a functionality-preserving refactoring
* | | | Merge pull request #1102 from phaller/partest-local-flagsJosh Suereth2012-08-131-1/+12
|\ \ \ \ | | | | | | | | | | Support per-group flags files in partest
| * | | | Support per-group flags files in partestphaller2012-08-091-1/+12
| | | | | | | | | | | | | | | | | | | | In a directory-based test with file A_1.scala, scalac flags that should apply only to A_1.scala can be put in the file A_1.flags. Local flags are appended to global flags.
* | | | | Merge pull request #1121 from odersky/topic/inline2Vlad Ureche2012-08-131-1/+4
|\ \ \ \ \ | |_|_|/ / |/| | | | Added make not private logic for @inline accesses back to ExplicitOuter.
| * | | | Added make not private logic for @inline accesses back to ExplicitOuter.Martin Odersky2012-08-111-1/+4
| | | | | | | | | | | | | | | | | | | | As discussed in https://mail.google.com/mail/u/0/?hl=en&tab=Tm#search/inlining+changes+needed/1390c955960d7cb5, we need to move access widenings back to ExplicitOuter, so that outer fields are correctly widened. The previous logiv in SuperAccessors can go once the inliner is adapted to the new scheme. I leave SuperAccessors for the moment as is, in order not to slide back even further with inlining.
* | | | | Merge pull request #1125 from hubertp/2.10.x-issue/6214Josh Suereth2012-08-133-9/+12
|\ \ \ \ \ | | | | | | | | | | | | Fixes SI-6214.
| * | | | | Fixes SI-6214.Hubert Plociniczak2012-08-123-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | addSynthetics was calling typedStat that caused flushing error buffer. Typically that would result in errors being re-added but addSynthetics was the last thing to run in typedStats. Instead of adding yet another check I used this as an opportunity to cleanup the once necessary workaround for typing stats. Since we are now chaining buffers of contexts manual handling is no longer necessary. Review by @odersky (I recall that you were planning to cleanup that part at some point).
* | | | | | Merge pull request #1123 from paulp/topic/unpickle-resilience-2Josh Suereth2012-08-136-28/+74
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | Topic/unpickle resilience 2
| * | | | | More resilience to missing classes.Paul Phillips2012-08-116-28/+74
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The situation (I don't know how to make partest test this) is package s class A ; class S { def f(): A = ??? } If one compiles this and removes A.class, should references to class S cause the compiler to explode eagerly and fail to load S, or explode lazily if and when it needs to know something about A? This patch takes us from the former strategy to the latter. Review by @xeno-by.
* | | | | Merge pull request #1120 from paulp/ticket-6184-revisedJosh Suereth2012-08-112-18/+21
|\ \ \ \ \ | | | | | | | | | | | | Ticket 6184 revised
| * | | | | A little less indirection.Paul Phillips2012-08-111-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | We don't have to call length on that there List.
| * | | | | SI-6184 don't introduce dummies in checkableTypeAdriaan Moors2012-08-092-18/+22
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | this should fix the crash in asSeenFrom that resulted from calling baseTypeSeq on a type that had an unbound type parameter in it also, simplify widenToClass
* | | | | Merge pull request #1116 from scalamacros/topic/flags-againJosh Suereth2012-08-116-13/+7
|\ \ \ \ \ | |_|/ / / |/| | | | a follow up on e01ec05a1e
| * | | | a follow up on e01ec05a1eEugene Burmako2012-08-106-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes all traces of flags from symbol API, adds general flag set (hasFlag) to Modifiers (because Modifiers don't have isXXX checks that symbols have). This also removes macros.Symbol.setFlags, because taking into account current state of affairs that method was at best incomplete.
* | | | | Merge pull request #1107 from odersky/topic/leaner-statisticsJosh Suereth2012-08-111-8/+8
|\ \ \ \ \ | | | | | | | | | | | | Removed hot statistics call in normal path.
| * | | | | Removed hot statistics call in normal path.Martin Odersky2012-08-091-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | Some calls to Statistics are now subject to the compile-time constant hotEnabled, which means they will be eliminated entirely in the default case where hotEnabled = false.
* | | | | | Merge pull request #1118 from scalamacros/ticket/6201Josh Suereth2012-08-113-3/+15
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-6201 minor fixes in key points
| * | | | | | SI-6201 minor fixes in key pointsEugene Burmako2012-08-113-3/+15
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes several oversights that led to 6201. RootPackage should have been static, refactored implementation of hasSymbolWhich shouldn't have checked hasSymbol. Full discussion is here: http://groups.google.com/group/scala-internals/browse_thread/thread/9500348f273a8aa.
* | | | | | Merge pull request #1105 from rklaehn/SI-6197Josh Suereth2012-08-113-1/+27
|\ \ \ \ \ \ | | | | | | | | | | | | | | Only create a HashTrieSet if necessary.
| * | | | | | Added test to check that removing all but one element from a HashTrieSet ↵Ruediger Klaehn2012-08-112-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | yields a HashSet1 as it should
| * | | | | | Only create a HashTrieSet if necessary.Ruediger Klaehn2012-08-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If allow HashTrieSets with one element, you can get a degenerate tree that is six levels deep yet contains only one element by first building a large tree and then removing elements
* | | | | | | Merge pull request #1097 from rklaehn/SI-6198Josh Suereth2012-08-114-12/+38
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | Si 6198
| * | | | | | Added test for SI-6198Ruediger Klaehn2012-08-112-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This tests that ListSet.tail is O(1) as well as testing that a HashSetCollision1 is turned back into a HashSet1 when removing all but one element
| * | | | | | Create a HashSet1 in case ks1 contains just one entryRuediger Klaehn2012-08-091-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Create HashSetCollision1 only if there is more than one element
| * | | | | | Renamed elem to head and next to tailRuediger Klaehn2012-08-091-9/+9
| |/ / / / / | | | | | | | | | | | | | | | | | | both head and tail are now O(1) with very low overhead like you would expect for a list-like data structure
* | | | | | Merge pull request #1111 from scalamacros/ticket/6212Josh Suereth2012-08-106-53/+49
|\ \ \ \ \ \ | | | | | | | | | | | | | | refines api.FlagSets
| * | | | | | refines api.FlagSetsEugene Burmako2012-08-106-53/+49
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the current vision of flags, they should only be used to construct trees, because tests are subsumed by the numerous isXXX methods that we have. Hence we need to remove `hasFlag` and the flags that don't make sense being added to tree modifiers manually. A good example of that is MODULE. There's an isModule check, so hasFlag MODULE is redundant. On the other hand, you don't need MODULE to construct a ModuleDef so it's redundant in this department as well.
* | | | | | Merge pull request #1108 from rklaehn/SI-5879Josh Suereth2012-08-101-14/+18
|\ \ \ \ \ \ | | | | | | | | | | | | | | Ensure that a.merged(b)(null) always chooses a in case of collisions
| * | | | | | Ensure that a.merged(b)(null) always chooses a in case of collisionsRuediger Klaehn2012-08-091-14/+18
| | |/ / / / | |/| | | | | | | | | | | | | | | | Moved definition of liftMerger to companion object and replaced null with a default merger so merge works predictably if you pass null as a merger. Maybe we should just not allow null as a merge function at all.
* | | | | | Merge pull request #1113 from adriaanm/copyrightJosh Suereth2012-08-104-4/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | some more copyright cleanup for 2012