summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | Making the Meter test expand and compile.Martin Odersky2012-02-074-23/+23
| | | | |
| | * | | Removing unnecessary AnyVal code.Paul Phillips2012-02-063-54/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...since it works from source. The parser must be forcibly restrained from adding a bogus constructor, but other than that it's pretty much smooth sailing. To give an idea how smooth, if I change scala.Short like so: trait Bippy extends Any final class Short extends AnyVal with Bippy Then it just works, at least until the fiction is revealed. scala> def f(x: Bippy) = x f: (x: Bippy)Bippy scala> f(5) <console>:9: error: type mismatch; found : Int(5) required: Bippy f(5) ^ scala> f(5: Short) java.lang.ClassCastException: java.lang.Short cannot be cast to scala.Bippy at .<init>(<console>:9) at .<clinit>(<console>) at .<init>(<console>:11)
| | * | | Merge branch 'master' into topic/inlinePaul Phillips2012-02-0671-891/+2187
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/Global.scala test/files/run/programmatic-main.check
| | * \ \ \ Merge remote-tracking branch 'odersky/topic/inline' into inline-remergePaul Phillips2012-02-0623-36/+55
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/reflect/internal/Definitions.scala src/compiler/scala/tools/nsc/typechecker/Namers.scala src/library/scala/AnyVal.scala test/files/run/primitive-sigs-2.check test/files/run/t4172.check test/files/scalap/abstractClass/result.test test/files/scalap/abstractMethod/result.test test/files/scalap/caseClass/result.test test/files/scalap/cbnParam/result.test test/files/scalap/classPrivate/result.test test/files/scalap/classWithExistential/result.test test/files/scalap/classWithSelfAnnotation/result.test test/files/scalap/covariantParam/result.test test/files/scalap/implicitParam/result.test test/files/scalap/paramClauses/result.test test/files/scalap/paramNames/result.test test/files/scalap/sequenceParam/result.test test/files/scalap/simpleClass/result.test test/files/scalap/traitObject/result.test test/files/scalap/typeAnnotations/result.test test/files/scalap/valAndVar/result.test test/files/scalap/wildcardType/result.test
| | | * | | | Added hook in erasure.Martin Odersky2012-02-061-0/+3
| | | | | | |
| | | * | | | A first bunch of Any-extending traits.Martin Odersky2012-02-0616-18/+22
| | | | | | |
| | | * | | | Removing AnyVal as a source class. Removing automatic addition of ↵Martin Odersky2012-02-067-65/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ScalaObject. Undoing wrong fix in ExtensionMethods.
| | | * | | | Definitions are now initialized in reflection (was missing before).Martin Odersky2012-02-062-0/+7
| | | | | | |
| | | * | | | Different treatment of Null <:< T, to allow for Any-extending traits. ↵Martin Odersky2012-02-061-83/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without the change, val x: List[String] with Ordered[String] = null would be illegal. The change is reflected in my local copy of the spec. Where it now says in the section of conformance: \item For every non-bottom class type $T$, $\mbox{\code{scala.Null}} \conforms T$, unless $T \conforms \mbox{\code{scala.AnyVal}}$ or $T \conforms \mbox{\code{scala.NotNull}}$.
| | | * | | | Fix in Definitions that now enables bootstrap without AnyVal.scala present. ↵Martin Odersky2012-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This should be a new starr.
| * | | | | | Merge branch 'merge-inline' of /scratch/trunk3 into developPaul Phillips2012-03-1456-281/+673
| |\ \ \ \ \ \
| | * | | | | | Cleaning up stray ScalaObject references.Paul Phillips2012-03-142-10/+1
| | | | | | | |
| | * | | | | | New starr to support new fundamental laws of reality.Paul Phillips2012-03-142-572/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And grueling recovery from branch drift. Merges a portion (and only a portion) of topic/inline into master. The major changes which come with this merge are: AnyVal is unsealed, can be extended directly. ScalaObject is no longer with us.
| | * | | | | | Merge branch 'master' into merge-inlinePaul Phillips2012-03-14310-8167/+17287
| | |\ \ \ \ \ \ | | | |/ / / / / | | |/| | | | / | | | | |_|_|/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: lib/scala-compiler.jar.desired.sha1 lib/scala-library-src.jar.desired.sha1 lib/scala-library.jar.desired.sha1 src/compiler/scala/reflect/internal/Definitions.scala src/compiler/scala/reflect/internal/Importers.scala src/compiler/scala/reflect/internal/Symbols.scala src/compiler/scala/reflect/internal/Trees.scala src/compiler/scala/reflect/internal/Types.scala src/compiler/scala/tools/nsc/Global.scala src/compiler/scala/tools/nsc/transform/Erasure.scala src/compiler/scala/tools/nsc/transform/LiftCode.scala src/compiler/scala/tools/nsc/transform/UnCurry.scala src/compiler/scala/tools/nsc/typechecker/RefChecks.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala test/files/run/programmatic-main.check test/files/speclib/instrumented.jar.desired.sha1
| | * | | | | Made a typer hack less hacky.Paul Phillips2012-02-041-4/+6
| | | | | | |
| | * | | | | Hardening in Constructors.Paul Phillips2012-02-041-2/+2
| | | | | | |
| | * | | | | A little msil I missed un-reverting.Paul Phillips2012-02-041-5/+4
| | | | | | |
| | * | | | | Hardened/documented AnyVal constructor switcheroo.Paul Phillips2012-02-042-0/+3
| | | | | | |
| | * | | | | Tweaking parent printing a little further.Paul Phillips2012-02-041-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Not too many Object/AnyRef parents, not too few.
| | * | | | | Fixing AnyVal verify error and reflection.Paul Phillips2012-02-041-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Have to give AnyVal a constructor and simultaneously pacify both the typer (which knows Any has no constructor) and the jvm (which mandates a constructor must call its superconstructor.) It's the usual angle of adding a not-quite-right tree during parsing and then finishing it later (in this case, in AddInterfaces.)
| | * | | | | Merge branch 'master' into topic/inlinePaul Phillips2012-02-042-1/+12
| | |\ \ \ \ \
| | * | | | | | Fixed all but one of the scalap tests.Paul Phillips2012-02-041-7/+5
| | | | | | | |
| | * | | | | | Restored msil.Paul Phillips2012-02-0410-364/+359
| | | | | | | |
| | * | | | | | Utilizing convenience methods martin hasn't discovered yet.Paul Phillips2012-02-041-7/+2
| | | | | | | |
| | * | | | | | Making AnyVal into a class instead of a trait.Paul Phillips2012-02-046-38/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- traits can extend Any, AnyRef, or AnyVal -- classes can extend AnyRef or AnyVal but not Any. This breaks reflection for the moment as it smuggles AnyVal so far downstream that it's reflecting its way into bytecode (or something) but the following test case goes five for six as anticipated. trait Foo1 extends Any trait Foo2 extends AnyVal trait Foo3 extends AnyRef class Bar1 extends Any // fail @inline class Bar2 extends AnyVal class Bar3 extends AnyRef Eliminated various hijinx from definitions.
| | * | | | | | Having Proxy extend Any as well.Paul Phillips2012-02-041-3/+2
| | | | | | | |
| | * | | | | | Guard List_apply from premature forcitude.Paul Phillips2012-02-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Solved the annotation cycle puzzle. Was being burned again by the hack which preferentially treats List() as Nil to avoid List's extractor. This commit includes a new starr which fully bootstraps. Also at this point traits can extend Any and will not be given an AnyRef parent (until erasure.) This is the case for AnyVal and NotNull.
| | * | | | | | Made Any parents work more.Paul Phillips2012-02-0410-67/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Working on type printing logic.
| | * | | | | | ant and diff friendlier msil-disabling.Paul Phillips2012-02-046-3564/+3570
| | | | | | | |
| | * | | | | | Disabled all things MSIL.Paul Phillips2012-02-0311-3842/+3842
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a huge drag when making fundamental changes.
| | * | | | | | Eliminated ScalaObject.Paul Phillips2012-02-036-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "This too shall pass."
| | * | | | | | Mostly eliminated ScalaObject.Paul Phillips2012-02-0322-61/+19
| | | | | | | |
| | * | | | | | Merge branch 'master' into topic/inlinePaul Phillips2012-02-0332-892/+1184
| | |\ \ \ \ \ \ | | | |_|_|/ / / | | |/| | | | |
| | * | | | | | intermediate work towards a new starr for value classes.Martin Odersky2012-02-0311-80/+128
| | | | | | | |
| | * | | | | | First steps towards erasure of inline classes.Martin Odersky2012-01-312-0/+20
| | | | | | | |
| | * | | | | | New trait for erasure of inline classes.Martin Odersky2012-01-311-0/+9
| | | | | | | |
| | * | | | | | More work on inline classes.Paul Phillips2012-01-307-14/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fail compile if AnyVal is inherited by a trait, a non-@inline class, or a class with an AnyRef parent somewhere. Added tests. Added logging, like [log extmethods] Inline class class Bippy spawns extension method. Old: def getClass: Class[_ <: Bippy] New: final def extension$getClass($this: Bippy): Class[_ <: Bippy] Fixed what I hope was a bug in ExtensionMethods where the original method params were dropped. Since adding a NonNull parent was also inflicting an AnyRef on AnyVal subclasses, suppressed that for those. Had the bright idea that AnyVal could extend NotNull. It doesn't seem to accomplish much, but then, I don't think NotNull accomplishes much. Still, maybe it's time to restrict the ways one can use AnyVal so one can't do this: scala> var x: AnyVal = _ x: AnyVal = null
| | * | | | | | Merge branch 'master' into inlinePaul Phillips2012-01-302-19/+35
| | |\ \ \ \ \ \
| | * | | | | | | Synthesize getClass method for AnyVal children.Paul Phillips2012-01-301-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The synthetic method is only a null for now.
| | * | | | | | | Eliminated 2500 lines of whitespace changes.Paul Phillips2012-01-3021-478/+478
| | | | | | | | |
| | * | | | | | | Merge branch 'master' into inlinePaul Phillips2012-01-306-193/+263
| | |\ \ \ \ \ \ \
| | * | | | | | | | Working AnyVal#getClass.Paul Phillips2012-01-301-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Renamed newMethod in Definitions to enterNewMethod to better indicate what it does, and also so AnyVal's getClass can avoid the "enter" part.
| | * | | | | | | | Moving getClassReturnType out of erasure.Paul Phillips2012-01-303-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And other post-merge cleanup.
| | * | | | | | | | Merge branch 'master' into inlinePaul Phillips2012-01-3013-283/+316
| | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/reflect/internal/Definitions.scala
| | * | | | | | | | | Resinstantiating anyval-children test. Getting he complete build to run.Martin Odersky2012-01-305-50/+61
| | | | | | | | | | |
| | * | | | | | | | | Fixed problems with step 2Martin Odersky2012-01-302-7/+8
| | | | | | | | | | |
| | * | | | | | | | | New phase that creates extension methods for inline classes.Martin Odersky2012-01-301-0/+161
| | | | | | | | | | |
| | * | | | | | | | | Merge remote-tracking branch 'paulp/inline' into topic/inlineMartin Odersky2012-01-2976-4292/+547
| | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Temporarily removed getClass from AnyVal to get build going. Disabled anyval-childen test. Fixed some other build problems. Implemented step 1 + 2 of inline classes proposal.
| | | * \ \ \ \ \ \ \ \ Merge branch 'unsealed-anyval' into inlinePaul Phillips2012-01-2872-4276/+530
| | | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
| | | | * | | | | | | | | Unsealed AnyVal.Paul Phillips2012-01-2819-332/+346
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hacks here and there to allow them to survive at least to erasure. Since nothing is done with them there yet, they inevitably crash and burn a little ways beyond that.