summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* One last attempt at getting the presentation co...Iulian Dragos2011-01-262-3/+4
| | | | | | One last attempt at getting the presentation compiler pass some tests. no review.
* Merge branch 'work'Aleksandar Pokopec2011-01-2612-4/+122
| | | | | | Conflicts: src/library/scala/concurrent/SyncVar.scala
* closes #3619, #4141.Adriaan Moors2011-01-261-0/+34
| | | | | | | | | | | | | | | | replaced the epic outer.outer.outer by something more robust that goes to the context corresponding to the enclosing class nextOuter determines which context is searched next for implicits (after `this`, which contributes `newImplicits` below) in most cases, it is simply the outer context if we're owned by a constructor, the actual current context and the conceptual context are different when it comes to scoping: the current conceptual scope is the context enclosing the blocks that represent the constructor body (TODO: why is there more than one such block in the outer chain?) review by odersky, extempore
* closes #4137.Adriaan Moors2011-01-262-0/+20
|
* closes #2741, #4079: pickling now ensures that ...Adriaan Moors2011-01-265-0/+54
| | | | | | | | | | | | | | | closes #2741, #4079: pickling now ensures that a local type param with a non-local owner, which will thus get a localized owner, will only get a class as its localized owner if its old owner was a class (otherwise, NoSymbol) this ensures that asSeenFrom does not treat typerefs to this symbol differently after pickling. todo: should we pro-actively set the owner of these type params to something else than the type alias that they originate from? see notes in typeFunAnon review by odersky
* closes #3977.Adriaan Moors2011-01-262-0/+17
| | | | | | review by extempore (because of recent sin against this holy principle)
* A new murmur3 hashcode implementation contribut...Paul Phillips2011-01-252-1/+241
| | | | | | | | | | | | | A new murmur3 hashcode implementation contributed by rex kerr. I'm really happy with it. There is benchmarking code included but you can use the pudding for proof: the compiler compiling itself is clearly faster. I deleted the existing murmur2 implementation which has never left trunk in a release. There remain some possible points of improvement with inlining and/or synthetic method generation, but this is a major improvement over the status quo. Closes #2537, review by prokopec.
* Skip getClass (signature changes between JDK 1....Iulian Dragos2011-01-254-13/+16
| | | | | | | | Skip getClass (signature changes between JDK 1.5 and 1.6) and resolve encoding issue of unicode method name. Disabled part of a test that was not handled correctly by the presentation compiler (yet). Added correct encoding for the presentation compiler test. no review.
* Stripped one more embarrasing absolute path fro...Iulian Dragos2011-01-251-2/+2
| | | | | Stripped one more embarrasing absolute path from test output. no review.
* Increased the timeout for presentation compiler...Iulian Dragos2011-01-241-3/+3
| | | | | | Increased the timeout for presentation compiler tests and stripped aboslute paths from the check file. no review.
* Added presentation compiler tests.Iulian Dragos2011-01-246-0/+491
|
* [scaladoc] Fixed failing test.Gilles Dubochet2011-01-241-21/+16
|
* The AnyVal types become source files instead of...Paul Phillips2011-01-241-8/+8
| | | | | | | | | | | | | | | | | | | The AnyVal types become source files instead of polite compiler fictions. !! You'll need a serious "ant all.clean" now. !! As of this commit the system is fully bootstrapped and the synthetic code eliminated: only the source files remain. The sort-of-AnyVal-companions in scala.runtime.* have all been eliminated because the actual companions can do everything; deprecated vals in the scala.runtime package object point to the companions. This left AnyValCompanion as the only AnyVal related thing in the runtime package: that made little sense, so I deprecated and moved it as well. Starr is based on r24066 plus this commit. Closes #4121. Review by rytz, odersky.
* Disabled failing test, no review.Paul Phillips2011-01-231-0/+0
|
* The empty string commit made me hungry to actua...Paul Phillips2011-01-211-2/+2
| | | | | | | The empty string commit made me hungry to actually know what's in stuff. Now it prints quotes around a string if it's empty or if either the first or last character is whitespace. No review.
* Defer a check from the typer to refcheck so the...Paul Phillips2011-01-202-0/+13
| | | | | | Defer a check from the typer to refcheck so the error message makes some sense. Closes #4174, review by rytz.
* Integrated contributed non-recursive implementa...Paul Phillips2011-01-201-0/+8
| | | | | | | | | | | | Integrated contributed non-recursive implementation of permutations, combinations, subsets, by EastSun. Also gave mutable Seqs an in-place transform method like the one Map has. And couldn't resist slightly reformulating a few set methods, because how can we settle for "forall(that.contains)" when we could have "this forall that". (Which is also what normal people hear when we talk about sets.) Closes #4060, #3644, review by moors.
* Look even harder for attempts to sneak "this" i...Paul Phillips2011-01-204-2/+17
| | | | | | Look even harder for attempts to sneak "this" into superconstructor arguments, and improve positioning. Closes #4166, no review.
* Made ().## and null.## not crash anymore.Paul Phillips2011-01-201-0/+6
|
* Updated copyright notices to 2011Antonio Cunei2011-01-207-7/+7
|
* introduce NullaryMethodType to disambiguate Pol...Adriaan Moors2011-01-203-19/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | introduce NullaryMethodType to disambiguate PolyType motivation: given `def foo[T]: (T, T)` and `type Foo[T] = (T, T)`, `foo.info` and `TypeRef(_, Foo, Nil).normalize` are both `PolyType(List(T), Pair[T, T])` uncurry has been relying on an ugly hack to distinguish these cases based on ad-hoc kind inference without this distinction, the type alias's info (a type function) would be transformed to `PolyType(List(T), MethodType(Nil, Pair[T, T]))` anonymous type functions are being used more often (see #2741, #4017, #4079, #3443, #3106), which makes a proper treatment of PolyTypes more pressing change to type representation: PolyType(Nil, tp) -> NullaryMethodType(tp) PolyType(tps, tp) -> PolyType(tps, NullaryMethodType(tp)) (if the polytype denoted a polymorphic nullary method) PolyType(Nil, tp) is now invalid the kind of a PolyType is * iff its resulttype is a NullaryMethodType or a MethodType (i.e., it's a polymorphic value) in all other cases a PolyType now denotes a type constructor NullaryMethodType is eliminated during uncurry pickling: for backwards compatibility, a NullaryMethodType(tp) is still pickled as a PolyType(Nil, tp), unpickling rewrites pre-2.9-pickled PolyTypes according to the expected kind of the unpickled type (similar to what we used to do in uncurry) a pickled PolyType(Nil, restpe) is unpickled to NullaryMethodType(restpe) a pickled PolyType(tps, restpe) is unpickled to PolyType(tps, NullaryMethodType(restpe)) when the type is expected to have kind * the rewrite probably isn't complete, but was validated by compiling against the old scalacheck jar (which has plenty of polymorphic nullary methods) nevertheless, this commit includes a new scalacheck jar summary of the refactoring: * PolyType(List(), tp) or PolyType(Nil, tp) or PolyType(parms, tp) if params.isEmpty ==> NullaryMethodType(tp) * whenever there was a case PolyType(tps, tp) (irrespective of tps isEmpty), now need to consider the case PolyType(tps, NullaryMethodType(tp)); just add a case NullaryMethodType(tp), since usually: - there already is a PolyType case that recurses on the result type, - the polytype case applied to empty and non-empty type parameter lists alike * tp.resultType, where tp was assumed to be a PolyType that represents a polymorphic nullary method type before, tp == PolyType(tps, res), now tp == PolyType(tps, NullaryMethodType(res)) * got bitten again (last time was dependent-method types refactoring) by a TypeMap not being the identity when dropNonConstraintAnnotations is true (despite having an identity apply method). Since asSeenFrom is skipped when isTrivial, the annotations aren't dropped. The cps plugin relies on asSeenFrom dropping these annotations for trivial types though. Therefore, NullaryMethodType pretends to never be trivial. Better fix(?) in AsSeenFromMap: `if(tp.isTrivial) dropNonContraintAnnotations(tp) else ...` TODO: scalap and eclipse review by odersky, rytz
* Updated check file for namesdefault test.Iulian Dragos2011-01-191-2/+2
|
* Removed the probe for integers in spec-matrix.Iulian Dragos2011-01-192-2/+1
|
* Moved and removed a bunch of tests from pending.Paul Phillips2011-01-1915-111/+32
|
* What is, I think, the only possible solution to...Paul Phillips2011-01-182-0/+23
| | | | | | | What is, I think, the only possible solution to bug #4158 given the current ways of controlling implicits. Let's just be glad there's one instead of zero. Closes #4158, review by moors.
* Allow box(unbox) elimination for the Null type,...Iulian Dragos2011-01-185-8/+65710
| | | | | | Allow box(unbox) elimination for the Null type, plus testing that specialization tests do not box too much. review by extempore.
* second version of close #3649. no reviewLukas Rytz2011-01-182-1/+8
|
* test case close #3649. no reviewLukas Rytz2011-01-182-0/+5
|
* Disabled failing specialization test.Aleksandar Pokopec2011-01-172-3/+0
| | | | | No review.
* Added jdk1.5 version of the instrumented librar...Aleksandar Pokopec2011-01-171-1/+1
| | | | | | | Added jdk1.5 version of the instrumented library classes jar. No review.
* Added specialized test to ant build, and ported...Aleksandar Pokopec2011-01-171-1/+1
| | | | | | | | Added specialized test to ant build, and ported old specialized 'run' tests to check the number of boxings. No review.
* Adapted specialization tests to track number of...Aleksandar Pokopec2011-01-1724-8/+47
| | | | | | | Adapted specialization tests to track number of boxings. Review by dragos
* Added 'specialized' tests.Aleksandar Pokopec2011-01-174-0/+917
| | | | | | | | | | Added a new test group - specialized. Modified partest to add a jar with instrumented classes to classpath when compiling and running tests. Added a primary version of the instrumented BoxesRuntime, and a script to produce a jar for it. Added the 'speclib' folder to partest files, which contains the jar with the instrumented classes. Review by dragos.
* This outlaws explicit isInstanceOf tests on val...Paul Phillips2011-01-152-0/+8
| | | | | | | This outlaws explicit isInstanceOf tests on value types, which are nonsense in any case, as long threatened in ticket #1872. Closes #1872, review by rytz.
* Optimization to string concatenation.Paul Phillips2011-01-151-0/+15
| | | | | | | | | | | | | | | with a primitive CONCAT and several opcodes, I'm assuming nobody will oppose this on principle. Given an expression of the exact form "" + x (that is, the NPE-immune and much less ugly way to call .toString) we used to get 4x the bytecode and create an unneeded StringBuilder. Now this: 0: aload_1 1: invokestatic #20; //Method java/lang/String.valueOf:(Ljava/lang/Object;)Ljava/lang/String; 4: areturn Closes #4160, review by dragos.
* Deleted duplicate test which must have been a r...Paul Phillips2011-01-132-59/+0
| | | | | | Deleted duplicate test which must have been a real monkey wrench. No review.
* Some modifications to @elidable: for reasons lo...Paul Phillips2011-01-123-1/+30
| | | | | | | | Some modifications to @elidable: for reasons lost to me now it had a default value such that annotated methods might be elided even if the option wasn't given. It now does nothing in that situation. Closes #4051, #4151, no review.
* Disabled the process test. No review.Paul Phillips2011-01-121-0/+0
|
* Merge branch 'work'Aleksandar Pokopec2011-01-124-4/+12
|
* Some fixes for partest issues.Paul Phillips2011-01-123-6/+5
| | | | | | | | prejudice and puts the new process code to work instead. There are still a couple bugs on my short term partest list. If this commit causes some weird issue which only arises on virtualized windows you can expect to hear from me next by postcard from st. lucia. No review.
* Imported sbt.Process into trunk, in the guise o...Paul Phillips2011-01-1210-21/+181
| | | | | | | | | | | | | | | | | | | Imported sbt.Process into trunk, in the guise of package scala.sys.process. It is largely indistinguishable from the version in sbt, at least from the outside. Also, I renamed package system to sys. I wanted to do that from the beginning and the desire has only grown since then. Sometimes a short identifier is just critical to usability: with a function like error("") called from hundreds of places, the difference between system.error and sys.error is too big. sys.error and sys.exit have good vibes (at least as good as the vibes can be for functions which error and exit.) Note: this is just the first cut. I need to check this in to finish fixing partest. I will be going over it with a comb and writing documentation which will leave you enchanted, as well as removing other bits which are now redundant or inferior. No review.
* In r22807 an optimization was added to remove B...Paul Phillips2011-01-112-0/+12
| | | | | | | | In r22807 an optimization was added to remove Box(Unbox(x)) combinations. It turns out that without this in place, an expression like "x".asInstanceOf[Int] will no longer throw an exception. Refined the optimization. Closes #4148, review by dragos.
* A test case for recently fixed #4114. Plus!Paul Phillips2011-01-103-0/+27
| | | | | | | | | I had closed #2441 as a duplicate of that, but unfortunately #4114 did not bring #2441 along with it. Then I realized I'm a programmer, not a helpless trac watcher. As is often the case with thes things, fixing that revealed a bug in the library. Closes #2441 for real, review by odersky.
* Test case closes #2873, no review.Paul Phillips2011-01-101-0/+5
|
* Added test file.Martin Odersky2011-01-101-0/+8
|
* Fixes #4112. Closes #4112.Aleksandar Pokopec2011-01-101-0/+12
| | | | | No review.
* Fixes #4054.Aleksandar Pokopec2011-01-101-0/+25
| | | | | No review.
* Enabled parallel group by.Aleksandar Pokopec2011-01-102-1/+2
| | | | | No review.
* Couldn't stop working on tailcalls.Paul Phillips2011-01-101-1/+1
|
* A pretty severe bug in the recognition of tail ...Paul Phillips2011-01-104-14/+38
| | | | | | | | | | | | | | | | | | | | A pretty severe bug in the recognition of tail call elimination. It turns out that Tailcalls will perform "partial elimination" in situations such as: @annotation.tailrec final def f(x: Int): Int = f(f(x)) The outer call to f1 becomes a jump, but the inner call remains as it was. I implemented @tailrec under the impression that if the optimization had taken place, it had gone all the way. So this is now fixed with a direct examination of the rewritten tree. While I was in there I threw in some improved error reporting: the error positioning is now on the call which is not in tail position rather than the method declaration. Closes #4135, no review.