summaryrefslogtreecommitdiff
path: root/test/files/run
Commit message (Collapse)AuthorAgeFilesLines
* New reification code for symbols and types.Martin Odersky2011-08-231-7/+0
|
* Created infrastructure for testing icode + sett...Paul Phillips2011-08-222-0/+643
| | | | | | | | | | | | | | | | Created infrastructure for testing icode + settings/partest yak shaving. See enclosed test files/run/inline-ex-handlers.scala. To compare optimized and unoptimized icode after a given phase, all you need in a partest source file is this: import scala.tools.partest.IcodeTest object Test extends IcodeTest { override def printIcodeAfterPhase = "inlineExceptionHandlers" } Other things can be done, see IcodeTest.scala. Review by ureche.
* Bug in optimizer eliminated potentially excepti...Paul Phillips2011-08-213-0/+23
| | | | | | Bug in optimizer eliminated potentially exceptional not-dead code. Streamlined isSideEffecting logic. Review by ureche.
* [recommit] Backend optimization: Inline excepti...Vlad Ureche2011-08-191-27/+28
| | | | | | [recommit] Backend optimization: Inline exception handlers. Review by dragos.
* Removing the code which has been deprecated sin...Paul Phillips2011-08-1528-82/+84
| | | | | | | Removing the code which has been deprecated since 2.8.0. Contributed by Simon Ochsenreither, although deleting code is such fun one hesitates to call it a contribution. Still, we will. Closes SI-4860, no review.
* Reversed the values of "is" and "is not" in rec...Paul Phillips2011-08-107-23/+35
| | | | | | | | | | | | | | | | | | | | | | | | Reversed the values of "is" and "is not" in recent for comprehension deprecation. DO NOT BLOW HATCH REPEAT DO NOT BLOW HATCH "Roger! Hatch blown." Events reveal it was all baby, no bathwater. It turns out that the specification is merely a document, not infallible holy writ as we had all previously believed. So it is not the ABSENCE of val in a for comprehension assignment which is deprecated, it is the PRESENCE of val. Summarizing again, more accurately perhaps: for (x <- 1 to 5 ; y = x) yield x+y // THAT's the one for (val x <- 1 to 5 ; y = x) yield x+y // fail for (val x <- 1 to 5 ; val y = x) yield x+y // fail for (x <- 1 to 5 ; val y = x) yield x+y // deprecated No review.
* Optimizations for Seq's implementations of sequ...Paul Phillips2011-08-092-0/+64
| | | | | | Optimizations for Seq's implementations of sequence search algorithms. Contributed by Rex Kerr. Closes SI-4828, no review.
* Another "great moments in java5 vs.Paul Phillips2011-08-092-2/+1
| | | | | | | have lived through before: java5 wrongly prints "volatile" next to bridge methods, because ACC_BRIDGE uses the same bit as ACC_VOLATILE. Result: partest failure! No review.
* Fix java signature generation for traits: no cl...Paul Phillips2011-08-094-0/+53
| | | | | | Fix java signature generation for traits: no classes as parents. Closes SI-4891, review by grek.
* Don't discard deprecation/unchecked warnings re...Paul Phillips2011-08-092-0/+84
| | | | | | | | | | | | | | | Don't discard deprecation/unchecked warnings regardless of settings. Changed warnings code to accumulate them rather than thoughtlessly discarding them and issuing its well-known taunt. In the repl you can take advantage of this with the :warnings command, which will show the suppressed warnings from the last line which had any. Be advised that at the moment it has some issues: unchecked warnings aren't making it out, and near repl startup neither are deprecation warnings, so don't open a bunch of tickets please. References SI-4594, no review.
* Fixing all the tests and source which still use...Paul Phillips2011-08-087-23/+22
| | | | | | | Fixing all the tests and source which still use the old for comprehension syntax with vals where there are no vals and no vals where there are vals. No review.
* Fix for a bug in CharArrayReader which made tri...Paul Phillips2011-08-082-0/+31
| | | | | | | | | | Fix for a bug in CharArrayReader which made triple quoted strings fail to parse sometimes. Note: when the temptation strikes to adjust for special cases by letting the regular case happen and subsequently attempting to fix the ball of mutation by selectively applying what seems like the inverse operation, please consider the possibility that this is not the optimal approach. Closes SI-4785, no review.
* Fixed bug in the disambiguation of f(foo='bar')...Paul Phillips2011-08-062-0/+13
| | | | | | | | Fixed bug in the disambiguation of f(foo='bar') style method calls in the presence of overloading, parameterization, and by-name arguments. Took the opportunity to clean things up a little bit. Closes SI-4592, review by rytz.
* LiftCode works again, now integrated with new r...Martin Odersky2011-07-302-0/+12
| | | | | | | | LiftCode works again, now integrated with new reflection library. Other changes: def Literal(x: Any) has been deprecated, and all its uses removed. Modifiers has lost positions as fourth case class argument; is now a field, mirroring Tree.pos (this removes junk in patterns and makes reification simpler). Review by extempore.
* Disabled all the old scala.reflect._ tests whic...Paul Phillips2011-07-292-8/+0
| | | | | | Disabled all the old scala.reflect._ tests which are now crash-failing, no review.
* Changed forwarders not to generate final method...Paul Phillips2011-07-282-0/+33
| | | | | | | Changed forwarders not to generate final methods, which otherwise would induce VerifyErrors anytime the companion class was subclassed and had a method with the same signature. Closes SI-4827, no review.
* Test case closes SI-4172 - I think the output i...Paul Phillips2011-07-272-0/+18
| | | | | Test case closes SI-4172 - I think the output is right anyway - review by rytz.
* "Freed the lisp test." Tweaked partest defaults...Paul Phillips2011-07-272-0/+544
| | | | | | "Freed the lisp test." Tweaked partest defaults a little in the hopes that seth tisue is correct in his analysis. No review.
* Fix/workaround for inliner bug uncovered by fin...Paul Phillips2011-07-273-0/+33
| | | | | | | | | | Fix/workaround for inliner bug uncovered by finalizing Option methods. Something in the backend is leaving open but empty blocks in the worklist. Rather than freaking out at the merest mention of an empty block, I quietly remove the empty ones. A proper fix will involve not leaving empty blocks lying around but we're on a schedule here people. Review by dragos.
* Adding the missing ParMap and GenMap methods.Aleksandar Pokopec2011-07-261-0/+52
| | | | | No review.
* Restored test case for SI-2873 which hubert had...Paul Phillips2011-07-192-0/+6
| | | | | | | Restored test case for SI-2873 which hubert had callously deleted back when it was briefly irrelevant. It would have been failing were it around, but now it passes. Closes SI-2873, no review.
* Modified erasure so we have enough information ...Paul Phillips2011-07-182-0/+11
| | | | | | | | | | | | Modified erasure so we have enough information to determine whether we need to use scala or java erasure semantics. This fixes the runtime failure illustrated here: % scala29 -e 'java.util.Collections.max(null)' java.lang.NoSuchMethodError: java.util.Collections.max(Ljava/util/Collection;)Ljava/lang/Comparable; Review by odersky.
* Test case for ticket #4582.Paul Phillips2011-07-161-0/+11
| | | | | Contributed by Daniel C. Sobral.
* Changes to reflection.Martin Odersky2011-07-161-1/+1
|
* Bounded wildcard types arising during pattern t...Paul Phillips2011-07-132-0/+23
| | | | | | Bounded wildcard types arising during pattern type inference can cause unnecessary crashes. Closes #1048, review by odersky.
* Making power mode startup a little less glacial...Paul Phillips2011-07-121-1/+1
| | | | | Making power mode startup a little less glacial, no review.
* A bunch of repl stuff.Paul Phillips2011-07-121-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | type mismatches, for real this time. :power mode goes to phase typer automatically. You can get the symbols for repl-defined names more directly: scala> case class Bippy(x: Int) defined class Bippy scala> intp.terms("Bippy") res1: intp.global.Symbol = object Bippy scala> intp.types("Bippy") res2: intp.global.Symbol = class Bippy scala> intp("Bippy") // tries type first res3: intp.global.Symbol = class Bippy scala> intp("scala.collection.Map") // falls back to fully qualified res4: intp.global.Symbol = trait Map I changed the implicit which used to install "tpe" and "symbol" to install "tpe_" and "symbol_" because it was too easy to do something you didn't mean to, like calling x.tpe where x is a Manifest. Said implicit now handles manifest type arguments, so you can get the full translation from a manifest representation to a compiler type, at least for simple types and only as much as manifests work, which is not that much. Fortunately that situation is all changing soon. scala> List(List(1, 2, 3)).tpe_ res5: power.Type = List[List[Int]] scala> res5.typeArgs res6: List[power.global.Type] = List(List[Int]) Review by moors.
* Fixes #4398.Aleksandar Pokopec2011-07-111-0/+11
| | | | | Review by extempore.
* Fixes #4709.Aleksandar Pokopec2011-07-111-0/+10
| | | | | Review by extempore.
* Fixes #4723.Aleksandar Pokopec2011-07-111-0/+9
| | | | | Review by extempore.
* Making empty streams serializable.Aleksandar Pokopec2011-07-112-0/+26
| | | | | No review.
* Fixes #4761.Aleksandar Pokopec2011-07-112-0/+19
| | | | | | | This changes the signature of flatten - I do not see how to use a @bridge annotation here, since after erasure both the bridge and the original method have the same signature. Review by extempore.
* Fix for failing test, review by extempore.Kato Kazuyoshi2011-07-091-1/+1
|
* Fixed a bug in the optimizer which was preventi...Paul Phillips2011-07-043-0/+54
| | | | | | | | | | | | | | | | | | | | | | | Fixed a bug in the optimizer which was preventing private methods from being inlined. Also relaxes a condition related to the "liftedTry" problem: the inliner has to exclude certain methods from consideration if there is a value on the stack and the method being inlined has exception handlers. The new condition is as before, except that it does not exclude methods of the "try/finally" variety (i.e. finalizers, but no other exception handlers.) This is necessary to optimize this common pattern: @inline private def foo(body: => Unit) { val saved = something try body finally something = saved } The closure for "body" can be fully eliminated, but only if the contents of foo can be inlined into the caller. Closes #4764, review by rompf.
* Looking forward to working positions.Paul Phillips2011-07-032-4/+8
|
* Logic bug in repl :paste parsing, no review.Paul Phillips2011-07-034-21/+43
|
* Fixed a bug involving classOf[Foo] having the w...Paul Phillips2011-07-012-0/+13
| | | | | | | Fixed a bug involving classOf[Foo] having the wrong erasure. Luckily I had only days ago deciphered the unique handling of classOf, so I knew what was up. Closes #4753, review by odersky.
* Stable hashCodes for case objects.Paul Phillips2011-07-011-0/+10
| | | | | | | | | | | | Somehow case objects fell through the cracks and have had default hashCode implementations, leading to new hashCodes on each jvm run. Now we use the productPrefix, and inline it right into the bytecode. scala> None.## == "None".## res0: Boolean = true Closes #4752, no review.
* Keep BufferedSource from losing buffered data w...Paul Phillips2011-07-012-0/+59
| | | | | | Keep BufferedSource from losing buffered data when a derivative iterator is created via getLines. Closes #4671, #4662, no review.
* Don't infer anonymous classes.Paul Phillips2011-06-272-0/+13
| | | | | | | | | | | | | | possible, just far enough to avoid all kinds of undesirable consequences which accompany the preservation of too much type information. (The problems are akin to inferring the singleton type too freely.) // Example of code which did not compile, but now does class A class B[T <: A](cons: T) object C extends B(new A {}) Closes #4110, #3048. I already ran this by moors, so review by odersky.
* getting the revamped getClass to work on Java 5Adriaan Moors2011-06-232-0/+84
| | | | | | | | | | | | | | | | | hunch by adriaan (needed to change Object to Any in strategic location), location + fix determined by paul, menial work (reverts of obsolete spears and introduction of fix) by adriaan review by extempore Revert "A line missed from spear thrust, no review. Revert " "Thrusting spear into darkened alcove attempting to slay java5 " Revert "New theory: fails running on java 1.5. Put in hack to " discover Revert "Everything builds for me, but apparently not for " jenkins. First "
* New theory: fails running on java 1.5.Paul Phillips2011-06-222-84/+0
| | | | | truth of theory. No review.
* Moved test for #4727 to where it was supposed t...Paul Phillips2011-06-221-7/+0
| | | | | Moved test for #4727 to where it was supposed to go, no review.
* A total rewrite of "runtimeClass", discarding t...Paul Phillips2011-06-222-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A total rewrite of "runtimeClass", discarding the user-space approach in favor of simply fixing getClass. def f1 = 5.getClass // Class[Int] def f2 = (5: AnyVal).getClass // Class[_ <: AnyVal] def f3 = (5: java.lang.Integer).getClass // Class[_ <: java.lang.Integer] class A class B extends A def f1 = (new B: Any).getClass().newInstance() // Any def f2 = (new B: AnyRef).getClass().newInstance() // AnyRef def f3 = (new B: A).getClass().newInstance() // A def f4 = (new B: B).getClass().newInstance() // B But that's not all! def f0[T >: B] = (new B: T).getClass().newInstance() def f5 = f0[Any] // Any def f6 = f0[AnyRef] // AnyRef def f7 = f0[A] // A def f8 = f0[B] // B Closes #490, #896, #4696. Review by moors. (Note: I think this is pretty good, but picky review requested.)
* Test case closes #4727, no review.Paul Phillips2011-06-221-0/+7
|
* Removed "isInterpreterWrapper" from the conditi...Paul Phillips2011-06-212-0/+13
| | | | | | | | Removed "isInterpreterWrapper" from the conditions which imply an effective root. This was an old hack from before my time which is no longer necessary and then recently became actively hostile. Closes #4710, no review.
* Routed Stream.+: through cons to avoid some tru...Paul Phillips2011-06-212-0/+9
| | | | | | Routed Stream.+: through cons to avoid some truly pathological performance. Closes #4697, no review.
* Test case closes #4601, no review.Paul Phillips2011-06-212-0/+16
|
* Moved a test to pending.Aleksandar Pokopec2011-06-201-31/+0
| | | | | No review.
* Disabled failing test.Aleksandar Pokopec2011-06-201-0/+2
| | | | | No review.