summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Fixes to value classes: Flags now double definitions, private constructors ↵Martin Odersky2012-03-065-17/+54
| | | | as errors. Fixed erasure scheme.
* Added check that primary constructor of a value class must be public.Martin Odersky2012-03-051-0/+6
|
* new and updated test cases for value classes.Martin Odersky2012-03-054-2/+39
|
* Compiler now ready to accept value classes in standard library. Time for a ↵Martin Odersky2012-02-222-5/+2
| | | | new STARR!
* Updatwd check file.Martin Odersky2012-02-221-2/+2
|
* Implemented super access in value classes, restrictions for value classes.Martin Odersky2012-02-196-34/+132
|
* New FlatArray scheme for handling value classes.Martin Odersky2012-02-171-12/+21
|
* Trying generic value classes. Does not work yet, but fixed on bug already.Martin Odersky2012-02-151-0/+12
|
* Updated check file.Martin Odersky2012-02-151-0/+11
|
* New scheme for "Rows" of value classes.Martin Odersky2012-02-151-28/+12
|
* Changed array erasure scheme to never unbox elements of inline classes.Martin Odersky2012-02-151-16/+18
|
* Changed erasure behavior of arrays to use always boxed representation.Martin Odersky2012-02-141-0/+41
| | | | | | Conflicts: test/files/run/Meter.scala
* Fixing problems with generation of isInstanceOf, classOf.Martin Odersky2012-02-141-0/+1
|
* Setting up things to demonstrate a swallowed type error in manifest generation.Martin Odersky2012-02-131-0/+2
|
* Added missing files from last commitMartin Odersky2012-02-133-0/+24
|
* All steps of value class proposal implemented. Most restrictions are now ↵Martin Odersky2012-02-136-24/+53
| | | | enforced. Super calls and specialized still missing.
* Added test case.Martin Odersky2012-02-071-0/+19
|
* Removing unnecessary AnyVal code.Paul Phillips2012-02-069-46/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...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-0646-196/+1279
|\ | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/Global.scala test/files/run/programmatic-main.check
| * Merge branch 'master' into feature/pc-ctrieAleksandar Prokopec2012-02-06133-197/+699
| |\
| | * Revert "Scaladoc @usecase annotation overriding / SI-5287"Paul Phillips2012-02-053-253/+34
| | | | | | | | | | | | This reverts commit 7946ac410ad74894cd0eb6dfd29447f173911b99.
| | * Refining the reflection api.Paul Phillips2012-02-052-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the pursuit of simplicity and consistency. - Method names like getType, getClass, and getValue are far too ambiguous, both internally and especially with java reflection names. Methods which accept or return scala symbols should not refer to them as "classes" in the reflection library. (We can live with the FooClass convention for naming the well-known symbols, it's names like "getClass" and "classToType" which are needlessly conflationary.) - Meaningless names like "subst" have to be expanded. - We should hew closely to the terms which are used by scala programmers wherever possible, thus using "thisType" to mean "C.this" can only beget confusion, given that "thisType" doesn't mean "this.type" but what is normally called the "self type." - It's either "enclosing" or "encl", not both, and similar consistency issues. - Eliminated getAnnotations. - Removed what I could get away with from the API; would like to push those which are presently justified as being "required for LiftCode" out of the core. - Changed a number of AnyRefs to Any both on general principles and because before long it may actually matter. - There are !!!s scattered all over this commit, mostly where I think the name could be better. - I think we should standardize on method names like "vmSignature, vmClass" etc. when we are talking about jvm (and ostensibly other vm) things. There are a bunch more places to make this distinction clear (e.g. Symbol's javaBinaryName, etc.) - There is a lot more I want to do on this and I don't know where the time will come from to do it. Review by @odersky, @scalamacros.
| | *-----. Merge remote-tracking branches 'VladUreche/feature/compiler-rootdoc', ↵Paul Phillips2012-02-0512-39/+281
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | 'scalamacros/pullrequest/5334', 'scalamacros/pullrequest/5272' and 'VladUreche/issue/5287-cleanup' into develop
| | | | | | * Scaladoc @usecase annotation overriding / SI-5287Vlad Ureche2012-02-053-34/+253
| | | | |_|/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From now on, the usecases inherit the comments from their parents, such as the explanation and the annotations: @param, @tparam, @return, etc. An example of usecase comment inheritance is: /** * The test function tests the parameter param for ... * * @param theParam the implicit parameter to be tested for ... * @return the result of the test * * * * @usecase def test(): Bool * * The test function tests the parameter taken implicitly from scope. * Example: `test()` * * @return the result of the test for the current scope * * * * @usecase def test(theParam: SomeType): Bool * * This takes the explicit value passed. * Example: `test(3)` * * @param theParam the explicit parameter to be tested for ... */ def test(implicit theParam: SomeType): Bool Notice both usecases override the explanation with their own examples. The first usecase also overrides the "@return" annotation while the 2nd usecase overrides the "@param theParam" annotation. If they didn't override the explanations and annotations, they would inherit the values from the actual implementation, def test(implicit ...) This will be followed by @inheritdoc, which enables more fine-grained control over comment inheritance. The full explanation of using comment inheritance and @inheritdoc and their interaction with variables is given at https://wiki.scala-lang.org/display/SW/Tags+and+Annotations in the "Comment inheritance" and "Inheritance Example" sections.
| | | | | * Fixes https://issues.scala-lang.org/browse/SI-5272Eugene Burmako2012-02-055-1/+18
| | | |_|/ | | |/| |
| | | | * Fixes https://issues.scala-lang.org/browse/SI-5334Eugene Burmako2012-02-054-4/+10
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New version of reification isn't susceptible to this bug. The problem was with Code.lift generating not only a tree, but also a manifest with the type of that tree. That led to an issue in the case of the type of the manifest depending on a class declared inside the quasiquote. Now manifests in reification are gone, so is the problem.
| | * | Replaced LiftCode with a function in MacroContextEugene Burmako2012-02-0520-171/+46
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Major cleanup of reification: * LiftCode phase has been removed * Code has been deprecated and will be removed as we roll a new starr * Logic related to type-directed lifting has been purged scala.reflect.macro.Context#reify now provides the same services as LiftCode provided (except that it returns Tree, not Code). For testing purposes, I've retained the oh-so-convenient automagic lift. test/files/codelib/code.jar now hosts Code.lift reimplemented in a macro, so that the tests can continue working as if nothing has happened.
| * | Add tests for parallel Ctrie.Aleksandar Prokopec2012-02-036-16/+126
| | | | | | | | | | | | Changed parameters in some tests to speed them up.
| * | Fix some issues in parallel Ctrie.Aleksandar Prokopec2012-02-032-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change resolves some issues with ParCtrie splitters and their `remaining` method, which currently evaluates the size of the Ctrie. Since this is still not done lazily, nor in parallel, it has a certain cost, which is unacceptable. Change #1: The `shouldSplitFurther` method is by default implemented by calling the `remaining` method. This method now forwards the call to the same method in the splitter which is by default implemented in the same way as before, but can be overridden by custom collections such as the ParCtrie. Change #2: ParCtrie splitter now has a `level` member which just counts how many times the method has been split. This information is used to override the default `shouldSplitFurther` implementation. Change #3: The tasks and splitters rely heavily on the `remaining` method in the splitter for most operations. There is an additional method called `isRemainingCheap` which returns true by default, but can be overridden by custom collections such as the `Ctrie`.
| * | Incorporate Ctrie into standard library.Aleksandar Prokopec2012-02-023-2/+14
| | | | | | | | | | | | Implemented Ctrie serialization. Improved hashcode computation.
| * | Add the Ctrie concurrent map implementation.Aleksandar Prokopec2012-02-018-0/+1040
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ctrie is a scalable concurrent map implementation that supports constant time lock-free lazy snapshots. Due to the well-known private volatile field problem, atomic reference updaters cannot be used efficiently in Scala yet. For this reason, 4 java files had to be included as well. None of these pollute the namespace, as most of the classes are private. Unit tests and a scalacheck check is also included.
* | | Merge remote-tracking branch 'odersky/topic/inline' into inline-remergePaul Phillips2012-02-0621-26/+26
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Fixed a bunch of scalap check files to account for absence of ScalaObjectMartin Odersky2012-02-0619-24/+24
| | | |
| * | | Removing AnyVal as a source class. Removing automatic addition of ↵Martin Odersky2012-02-0612-30/+22
| | | | | | | | | | | | | | | | ScalaObject. Undoing wrong fix in ExtensionMethods.
* | | | All tests passed... not counting scaladoc.Paul Phillips2012-02-041-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Disabled failing scaladoc test rather than fixing it because they're too hard to fix, even though it is almost certainly a trivial output change. (The fact that I don't know for sure that it is a trivial output change is also suboptimal.)
* | | | A couple more checkfiles and comments.Paul Phillips2012-02-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I guess I have to suck up the "C with Object" here in order to get the "Array[T with Object]" I need in a different test. Now all tests pass for reals.
* | | | Checkfile output update for AnyVal class.Paul Phillips2012-02-041-1/+4
| | | | | | | | | | | | | | | | And with that one, I believe all tests pass.
* | | | Fixed all but one of the scalap tests.Paul Phillips2012-02-0419-21/+21
| | | |
* | | | Fixed specialized tests.Paul Phillips2012-02-041-1/+1
| | | |
* | | | Fixed scalacheck tests.Paul Phillips2012-02-041-1/+1
| | | |
* | | | Making AnyVal into a class instead of a trait.Paul Phillips2012-02-042-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 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.
* | | | Simple test manipulating Any-derived traits.Paul Phillips2012-02-041-0/+16
| | | |
* | | | Updated checkfiles to subtract ScalaObject.Paul Phillips2012-02-0418-37/+26
| | | |
* | | | Merge branch 'master' into topic/inlinePaul Phillips2012-02-03119-24/+684
|\ \ \ \ | |/ / / |/| | / | | |/ | |/|
| * | Updated Flags toString/documentation.Paul Phillips2012-02-028-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a stunningly unusual demonstration of farsightedness, I was able to generate these changes only by running: scala scala.tools.nsc.util.FlagsUtilCompiler With this much time in between runs: -// Generated by mkFlagsTable() at Mon Oct 11 10:01:09 PDT 2010 +// Generated by mkFlagsTable() at Thu Feb 02 20:31:52 PST 2012
| * | Merge commit 'c58b240' into developPaul Phillips2012-02-023-0/+54
| |\ \
| | * | [vpm] __match determines match semantics; virtualizationAdriaan Moors2012-02-023-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | determine match strategy by typing `__match` factored out the interface to generate code in this monad, cleaned up codegen a bit no longer solving a context bound to determine the match strategy and the monad's type constructor it's too expensive don't consider implicits looking for __match implicit search causes HUGE slowdowns -- now the overhead is about 4% compared to just assuming there's no __match in scope to support virtualization&staging, we use the type of `__match.one` as the prototype for how to wrap "pure" types and types "in the monad" pure types T are wrapped as P[T], and T goes into the monad as M[T], if one is defined as: def one[T](x: P[T]): M[T] for staging, P will typically be the Rep type constructor, and type M[T] = Rep[Option[T]] furthermore, naive codegen no longer supplies type information -- type inference will have to work it out optimized codegen still does, of course, and that's enough since we only bootstrap that way TODO: improve the test (currently the condition is not represented)
| * | | Fixes reifyThisEugene Burmako2012-02-0230-2/+2
| | | |
| * | | Miscellaneous fixes to reificationEugene Burmako2012-02-0243-2/+269
| |/ / | | | | | | | | | | | | | | | | | | | | | More specifically: * Importers now preserve wasEmpty and original * ToolBoxes no longer auto-evaluate nullary functions returned by runExpr * All local symbols from previous typechecks are now correctly erased by ResetAttrs * Originals are now reified
| | |
| | \
| *-. \ Merge remote-tracking branches 'scalamacros/pullrequest/5258' and ↵Paul Phillips2012-02-0122-0/+169
| |\ \ \ | | | | | | | | | | | | | | | 'scalamacros/pullrequest/5256' into develop