summaryrefslogtreecommitdiff
path: root/src/compiler
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'refs/pull/375/head' into developPaul Phillips2012-04-12114-2158/+5426
|\
| * GroundTypeTag => ConcreteTypeTagEugene Burmako2012-04-1210-39/+39
| |
| * Next generation of macrosEugene Burmako2012-04-12114-2162/+5430
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements SIP 16: Self-cleaning macros: http://bit.ly/wjjXTZ Features: * Macro defs * Reification * Type tags * Manifests aliased to type tags * Extended reflection API * Several hundred tests * 1111 changed files Not yet implemented: * Reification of refined types * Expr.value splicing * Named and default macro expansions * Intricacies of interaction between macros and implicits * Emission of debug information for macros (compliant with JSR-45) Dedicated to Yuri Alekseyevich Gagarin
| |
| \
*-. | Merge commit 'refs/pull/373/head'; commit 'refs/pull/374/head' into developPaul Phillips2012-04-126-107/+155
|\ \|
| * | Fixed duplicate method problem for implicit wrappers.Martin Odersky2012-04-111-0/+1
| | |
| * | Implementation of SIP 13 take 2.Martin Odersky2012-04-113-27/+32
| | |
| * | Implementation of SIP 13 - implicit classesMartin Odersky2012-04-115-83/+123
| | |
| * | new annotation targets for companion classes/objects/factory methods.Martin Odersky2012-04-112-5/+7
| |/
* / Fix memory leak related to default arguments in presentation compiler.Lukas Rytz2012-04-103-6/+7
|/ | | | | | | | | | | This bug exists for a long time, but was triggered / discovered only lately by the default argument of mkParams in 118aef558f. This reverts the workaroud commit 19b6ad5ee4. The fix is tested by test/files/presentation/memory-leaks which runs the presentation compiler several times on Typers.scala. I could not reproduce the memory leak in a smaller test case.
* Fix for SI-5648.Paul Phillips2012-04-101-2/+9
| | | | More care in warning about bad comparisons.
* Cleaning up some repl mechanisms.Paul Phillips2012-04-096-33/+78
|
* Less laborious type application.Paul Phillips2012-04-0919-115/+98
| | | | | And eliminating redundancy. Reduced gratuitous usage of typeConstructor on symbols which don't have type parameters.
* Make specialize check cheaper and consistent.Paul Phillips2012-04-093-21/+26
| | | | | | | | | | | Profiler said checking hasAnnotation thousands of times is expensive. I always wondered why some things used the SPECIALIZED flag and others looked for the annotation. No reason emerges which is apparent from the tests. So: - mark an annotated symbol specialized at a convenient time - always look for the flag - create Symbol#isSpecialized to be consistent with all others
*-. Merge commit 'refs/pull/361/head'; commit 'refs/pull/362/head' into developPaul Phillips2012-04-081-0/+1
|\ \
| * | make PresentationCompilerThread a daemontkong2012-04-071-0/+1
| |/
* / More Symbols and Flags.Paul Phillips2012-04-0710-187/+257
|/ | | | | Another "three yards and a cloud of dust" in my ongoing battle against flag uncertainty.
* Flag performance and Name management.Paul Phillips2012-04-0612-84/+139
| | | | | | | | One leads to the other. Easing some more specific typing into Symbols. Getting a handle on when where and how people rename symbols to suit their fancies.
* Merge branch 'apr6-flags' of leaf:/scala/trunk into developPaul Phillips2012-04-0611-173/+198
|\
| * Moving flags around for performance.Paul Phillips2012-04-0611-173/+198
| | | | | | | | Also trimmed some cruft which had accrued in recent work.
* | Merge commit 'pull/358/head' into developPaul Phillips2012-04-062-4/+71
|\ \
| * \ Merge branch 'master' into topic/reflectMartin Odersky2012-04-0511-23/+209
| |\ \
| * | | Added overloading resolution to reflect.api.SymbolMartin Odersky2012-04-052-8/+75
| | | |
* | | | Style tweaks to b28ece2f4b .Paul Phillips2012-04-061-4/+8
| | | | | | | | | | | | | | | | We don't use Option[Symbol].
* | | | SI-4134: abstract override crasher if lacking super implSom Snytt2012-04-063-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The example from the ticket is committed as a neg test. The problem is that a super.m on an abstract override member m has no concrete implementation, that is, the trait T is not mixed in after a class C with a concrete m. The error is noticed at phase mixin when the super accessor is added to the concrete mixer. (Pun alert?) When super.m is rebound, no concrete matching symbol is found up the linearization. Previously, it was asserted that such a symbol should be found, but since this is our first opportunity to detect that there is none, an error should be emitted instead. The new message is of the form: Member method f of mixin trait T2 is missing a concrete super implementation. Additionally, a couple of flag tests were changed to use isAbstractOverride.
* | | | Fix for SI-5591.Geoff Reedy2012-04-061-1/+1
| |_|/ |/| | | | | | | | And test case for SI-5591.
* | | Fix for SI-5644.Paul Phillips2012-04-067-22/+59
| | | | | | | | | | | | | | | | | | | | | Don't let OverloadedTypes reach the backend. When you want a method from a particular symbol, avoid getMember, which may inflict upon you an OverloadedType if an inherited member has the same name. Instead, use the (just now appearing) definitions.getDecl.
* | | Disable dysfunctional inline annotation.Paul Phillips2012-04-061-1/+4
| | |
* | | Merge commit 'refs/pull/355/head^'Paul Phillips2012-04-052-2/+2
|\ \ \
| * | | avoid field init prob: make NoTreeAnnotation a defAdriaan Moors2012-04-052-2/+2
| | | |
* | | | A boatload of work on Symbols and Flags.Paul Phillips2012-04-0525-587/+970
| |_|/ |/| | | | | | | | | | | | | | | | | Finally my dream of orderliness is within sight. It's all pretty self-explanatory. More polymorphism, more immutable identity, more invariants.
* | | Symbol activity tracer.Paul Phillips2012-04-054-2/+181
| | | | | | | | | | | | | | | | | | | | | I just can't shake the feeling more people should see the things that I see. scalac -Dscalac.debug.syms foo.scala
* | | Fix for continuations issue with match blocks.Paul Phillips2012-04-051-1/+4
|/ / | | | | | | Don't type pattern trees with annotations still attached.
* | Unify "object Foo" and "Foo.type".Paul Phillips2012-04-043-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The source of many bugs over the years is that the first is represented as a TypeRef and the second a SingleType. Over a great period of time I figured out how to shield us from the more obvious bug manifestations, but a recent comment by adriaan jarred me into realizing that we can fix it at the source. This commit changes <:< and =:= to recognize when those two representations are being compared and to treat them as equivalent regardless of which is on the left. The reason I don't quash one representation entirely is that a fair bit of code depends on singleton types having an underlying type which is not the same, and regardless of that it would entail more changes and more risk. The change allows removing the type inference conditions which worried about this, and also fixes SI-4910. scala> val t1 = typeRef(ScalaPackageClass.thisType, NoneModule.moduleClass, Nil) t1: $r.intp.global.Type = None.type scala> val t2 = t1.narrow t2: $r.intp.global.Type = None.type scala> (t1.getClass, t2.getClass) res20: (Class[?0], Class[?0]) forSome { type ?0 <: $r.intp.global.Type; type ?0 <: $r.intp.global.Type } = (class scala.reflect.internal.Types$ModuleTypeRef,class scala.reflect.internal.Types$UniqueSingleType) scala> ((t1 =:= t2, t2 =:= t1, t1 <:< t2, t2 <:< t1)) res21: (Boolean, Boolean, Boolean, Boolean) = (true,true,true,true)
| |
| \
*-. \ Merge commit 'refs/pull/350/head'; commit 'refs/pull/351/head' into developPaul Phillips2012-04-033-5/+6
|\ \ \
| | * | Added presentation memory leak test.Iulian Dragos2012-04-032-2/+3
| | |/
| * / avoid memory leak by avoiding default argAdriaan Moors2012-04-031-3/+3
|/ /
* / Fix for SI-3272.Paul Phillips2012-04-021-6/+9
|/ | | | | | | | "References to the type parameters in object-private or object-protected values, variables, or methods (ยง5.2) of the class are not checked for their variance position." Review by @odersky.
* Pushed Symbol/Type creation partitioning further.Paul Phillips2012-04-019-84/+144
| | | | | Yet more funnelling of immutable creation-time known information into the identities of symbols and types.
* More principled unwrapping of types.Paul Phillips2012-04-012-32/+53
| | | | | | | Made generic type unwrapper for use by the many methods which need various types to be transparent with respect to the operation being performed. AnnotatedType, PolyType, NullaryMethodType, and ExistentialType all commonly match this description.
* Cleaned up "isTupleTypeOrSubtype".Paul Phillips2012-04-016-41/+53
| | | | | More principled logic for determining if a type is a particular type or a specialized subtype of that type.
* Merge remote-tracking branch 'adriaanm/topic/partialfun' into developPaul Phillips2012-03-307-141/+176
|\
| * specialization: see outer contexts to fix symbolsAdriaan Moors2012-03-302-2/+16
| | | | | | | | | | | | | | | | | | this corner case in Duplicators is hit when compiling the new AbstractPartialFunction (which is specialized) under -Yvirtpatmat TODO: why do we need to guard against cx.scope eq null in typers? review by @vladureche
| * virtpatmat support for the new partialfunctionAdriaan Moors2012-03-301-13/+54
| | | | | | | | | | | | avoid casting default call in applyOrElse: the result type of the match is always B1, not the result type inferred from typing the cases
| * old patmat support for the applyOrElse partial funAdriaan Moors2012-03-303-117/+96
| | | | | | | | | | | | minimal fixes for typedMatchAnonFun so it compiles TODO: support for AbstractTotalFunction (when match is exhaustive)
| * a fast, functional PartialFunction implementationPavel Pavlov2012-03-304-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime.AbstractPartialFunction provides a default implementation for the new-style partial function. In principle this class is only subclassed by compiler-generated partial functions arising from matches. Either - the apply method (old-style partialfun) or - the applyOrElse method (current scheme) must be overridden, and the isDefinedAt method implemented. The applyOrElse method implementation is provided to ease the transition from the old scheme, since starr still generates old-style PartialFunctions, but locker's library has the new AbstractPartialFunction. Thus, this implementation is intended as a drop-in replacement for the old partial function, and does not require changes to the compiler. (compiler patches, both for old and new-style pattern matching, follow) - runtime.AbstractPartialFunction is based on PartialFunction.WithDefault Original version of FunctionWithDefault by Odersky (http://article.gmane.org/gmane.comp.lang.scala.internals/4032) - better performance for OrElse#applyOrElse, OrElse#lift, PF.cond - new combinator methods: PF#run, PF#runWith, PF.apply authored by @pavelpavlov, refactored by @adriaanm, review by @paulp
* | Fix for regression with inference at arity 21+.Paul Phillips2012-03-301-2/+2
| | | | | | | | A classic "off by two" error. Closes SI-4545, SI-5633.
* | Fix for string bug in genjvm.Paul Phillips2012-03-301-4/+16
|/ | | | It's -Ycheck:jvm, not -Ycheck:genjvm. There is no genjvm.
* Cleaning up logging in specialization.Paul Phillips2012-03-293-68/+90
|
* Never write final fields outside of constructors.Paul Phillips2012-03-286-20/+42
| | | | | | Closes SI-3569, SI-3770. Also threw in experimental -Yoverride-vars. It's not robust.
* Merge remote-tracking branch 'jsuereth/remove-sbaz-update-man' into developPaul Phillips2012-03-273-324/+1
|\