summaryrefslogtreecommitdiff
path: root/test/files/run
Commit message (Collapse)AuthorAgeFilesLines
* Don't transform patterns during superaccessors:...Paul Phillips2010-12-062-0/+18
| | | | | | Don't transform patterns during superaccessors: the matcher can't deal with funny trees. Closes #4062, review by dragos.
* Moved ClassfileAnnotation/StaticAnnotation/Anno...Paul Phillips2010-12-062-8/+8
| | | | | | | Moved ClassfileAnnotation/StaticAnnotation/Annotation/TypeConstraint into scala.annotation and enabled the deprecated type aliases in scala.* to point there. Also enclosed is a new starr to bootstrap. No review.
* Burned by a last minute text change.Paul Phillips2010-12-051-1/+1
|
* Cleaned up and brought up to date the help text...Paul Phillips2010-12-051-25/+27
| | | | | | | | Cleaned up and brought up to date the help text for -X and -Y options. Made some enhancements to PhasesSetting, which are documented if you run scalac -X or -Y. (Try it!) Disabled some dead settings and renamed others to reflect their current purpose. No review.
* close #4036, fix #2489.Lukas Rytz2010-12-031-0/+1
|
* Parameterizes TraversableFactory.range so it ca...Paul Phillips2010-12-031-7/+1
| | | | | | Parameterizes TraversableFactory.range so it can be used with any integral type. Closes #3542, no review.
* Overrides immutable.{ Map, Set, Seq } to return...Paul Phillips2010-12-031-0/+11
| | | | | | | Overrides immutable.{ Map, Set, Seq } to return self on the corresponding toMap/toSet/toSeq. Closes #3953, review by prokopec.
* Generalizes catch blocks to include any Partial...Paul Phillips2010-12-032-0/+38
| | | | | | | | | | | | | | | | | | | Generalizes catch blocks to include any PartialFunction[Throwable, T]. Existing catch blocks will compile exactly as before. Anything else (which mean: the token after CATCH is not a left brace, or it is a left brace not immediately followed by CASE) is desugared as follows: try body catch expr // becomes try body catch { case x => val catchFn = expr if (catchFn isDefinedAt x) catchFn(x) else throw x } Review by odersky.
* Disabled test after failing to read linux's mind.Paul Phillips2010-12-012-40/+0
|
* Attempt to fix failing test. No review.Paul Phillips2010-11-301-3/+4
|
* Deprecated the @serializable annotation, introd...Lukas Rytz2010-11-302-0/+34
| | | | | | | | | | | | | | | | | | | Deprecated the @serializable annotation, introduce a new trait "scala.Serializable" which has to be extended instead (cross-platform). Known issues: - Companion objects of serializable classes (including case classes) are automatically made serializable. However, they don't extend "Serializable" statically because of the known difficulty (should be done before typing, but hard). - Writing "case class C() extends Serializable" gives "error: trait Serializable is inherited twice" - Functions are serializable, but don't extend Serializable dynamically (could be fixed by making FunctionN Serializable - shouldn't we?) Note that @SerialVersionUID continues to be an annotation; it generates a static field, which is not possible otherwise in scala. Review by dragos, extempore. Question to dragos: in JavaPlatform.isMaybeBoxed, why is there a test for "JavaSerializableClass"? Is that correct?
* It looks like the fix for #2318 was causing pro...Paul Phillips2010-11-302-0/+39
| | | | | | | It looks like the fix for #2318 was causing problems, so I gave it some more graceful failure. Leaving #2318 open because the implementation could still work harder to find the right method. No review.
* Fleshed out the mock code a little further so i...Paul Phillips2010-11-282-0/+32
| | | | | | | | | | | | | | | | | | | Fleshed out the mock code a little further so it's easy for closures to become SAMs. // implicit not necessary, but improves fun factor scala> implicit def mkUFn(x: AnyRef) = scala.tools.reflect.UniversalFn(x) mkUFn: (x: AnyRef)scala.tools.reflect.UniversalFn scala> (() => 5*5*5).as[java.util.concurrent.Callable[Int]] res1: java.util.concurrent.Callable[Int] = <function1> scala> res1.call res2: Int = 125 No review.
* Disabled possibly failing test.Aleksandar Pokopec2010-11-261-0/+4
| | | | | No review.
* A test for collection conversions.Aleksandar Pokopec2010-11-261-0/+78
| | | | | No review.
* Fixes #3647, closes #3647, adds a test case for...Aleksandar Pokopec2010-11-192-0/+38
| | | | | | | | Fixes #3647, closes #3647, adds a test case for it, and a missing test case for #3935. No review.
* Added another fix for #3970.Aleksandar Pokopec2010-11-171-0/+21
| | | | | No review.
* Fixes #3989.Aleksandar Pokopec2010-11-172-0/+2
| | | | | No review.
* Fixes #3989, adding test cases for #3989 and #3...Aleksandar Pokopec2010-11-172-0/+28
| | | | | | | Fixes #3989, adding test cases for #3989 and #3996. No review.
* Fix InnerClasses attribute: anonymous classes d...Iulian Dragos2010-11-131-2/+2
| | | | | | | | Fix InnerClasses attribute: anonymous classes don't have an outer name. EnclosingMethod is correctly generated. Fixed isAnonymousClass definition. Updated test that depends on anonymous inner class names. Closes (again) #3249, references #2749. review by odersky,extempore.
* A test case having some issues. No review.Paul Phillips2010-11-112-3/+4
|
* Some more work on options related to showing co...Paul Phillips2010-11-112-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some more work on options related to showing compiler structures during compilation. The pickler knew more than was healthy about things like compiler settings, so I let the pickler worry about pickling and moved that logic somewhere closer to the surface. Some convenience oriented tweaks to command line phase parsing. The end result is as follows (some output trimmed for brevity.) // dippy.scala class Dippy { def f[T <: Dippy](x: T) = (x, x) object DingusDippy extends util.Random { } } // className@phaseString should be reliably unambiguous % scalac -Xshow-class Dippy@typer,erasure,jvm dippy.scala <<-- class Dippy after phase 'typer' -->> Members (excluding Any/AnyRef unless overridden): final object DingusDippy extends object Dippy.this.DingusDippy def f[T <: Dippy](x: T): (T, T) <<-- class Dippy after phase 'erasure' -->> Members (excluding Any/AnyRef unless overridden): private lazy var DingusDippy$module: object Dippy#DingusDippy lazy val DingusDippy(): object Dippy#DingusDippy def f(x: Dippy): Tuple2 <<-- class Dippy after phase 'jvm' -->> Members (excluding Any/AnyRef unless overridden): protected var bitmap$0: Int private lazy var DingusDippy$module: object Dippy$DingusDippy lazy val DingusDippy(): object Dippy$DingusDippy def f(x: Dippy): Tuple2 No review.
* Unsuppressed generic signatures for members wit...Paul Phillips2010-11-114-0/+52
| | | | | | Unsuppressed generic signatures for members with expanded names. Closes #3897, review by dragos.
* Introduces "Origins" for all your superhero bac...Paul Phillips2010-11-112-0/+27
| | | | | | | | Introduces "Origins" for all your superhero backstory needs. It logs where all the calls are coming from: that's all for the moment. It's explained in the comments and test case, so I'm sure you don't need it all repeated here. No review.
* Closes #3980. Review by dragos.Hubert Plociniczak2010-11-092-0/+22
|
* Iteration bug in TrieIterator.Paul Phillips2010-11-091-0/+21
|
* A bit of -Xshow-class / -Xshow-object which did...Paul Phillips2010-11-082-0/+83
| | | | | | | | | | | | A bit of -Xshow-class / -Xshow-object which didn't quite make the Global patch. Now type selections should do the right thing, e.g. scalac -Xshow-class Global#Run src/compiler/scala/tools/nsc/Global.scala will show you interesting things about Run. Or see the test case for even more thrills. No review.
* Added size maps to flat hash tables.Aleksandar Pokopec2010-11-081-0/+125
| | | | | | | | | | | Added parallel mutable hash sets. Implemented parallel mutable hash set iterators. Implemented parallel mutable hash set combiners. Factored out unrolled linked lists into a separate class UnrolledBuffer, added tests. Added parallel mutable hash set tests, and debugged hashsets. No review.
* An overhaul of Global.Paul Phillips2010-11-071-25/+26
| | | | | | | | | | | | | | | | | | consistently, and remove things which are not being used anywhere in the visible universe. Beyond general polish here are some of the feature-like additions I can remember: * -Xshow-phases now includes descriptions of the phases. * -Xshow-class and -Xshow-object did not work as far as I could tell: if they didn't, now they do. If they did, now they work better. And you don't have to give it a fully qualified name anymore. * -Xprint-icode will generate *.icode files (don't also have to say -Xprint:icode) * counts of deprecation and unchcked warnings are given * More documentation of what global is doing. I tried not to break anything which might be using Global, but let me know if I overshot somewhere. No review.
* Closes #3973. Review by extempore.Iulian Dragos2010-11-022-0/+24
|
* Added separate bitmaps for private and transien...Hubert Plociniczak2010-11-0210-0/+284
| | | | | | | | | | Added separate bitmaps for private and transient lazy vals. Closes #3038, #1573. Review by dragos. I had to fix a couple of initialization issues that checkinit forced me to do and that weren't a problem before because the bitmap was serialized even for @transitive. For that I needed to change the setters in checkinit so that they also update the bitmap.
* Closes #3932, #1537. Review by extemporeHubert Plociniczak2010-11-024-0/+61
|
* Achieved similar simplicity gains in NumericRan...Paul Phillips2010-11-011-8/+9
| | | | | | | | | | Achieved similar simplicity gains in NumericRange to those now in Range. Obvious remaining task is to specialize NumericRange and after verifying the performance, eliminate one or the other. For now, both soldier onward despite near-convergence of implementation. Closes #3232, no review.
* Eliminated duplication among the Rich* wrappers...Paul Phillips2010-11-011-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminated duplication among the Rich* wrappers, careful not to impact performance on RichInt in particular. Attempted to make Proxy a little bit typier. Proxy creates an asymmetric equals method by design so it's unfixable in that regard, but achieved a minor miracle anyway by making the Rich* wrappers behave symmetrically. Note: said miracle involved having the wrappers extend ScalaNumber in order to induce the special == semantics. This in turn led to implicit conversion conflicts with the boxed types on methods like .intValue(). Resolved by moving the Rich* implicits into LowPriorityImplicits. This of course also removed the intentional ambiguity which prevents primitives from automatically becoming AnyRefs. Solved THAT one by creating dedicated, laser-precise ambiguity creating implicits in Predef which exclude only the AnyRef methods. Although this is admittedly less than elegant, it is still better than it was: this way it is direct and explicit rather than depending upon the "implicit implicit conflict" where the barrier to promotion is intermingled with the definitions of wrapper classes. (See the history of BoxedUnit/RichUnit for a good example of why these concerns require separation.) It's all worth it: assert(intWrapper(5) == 5) assert(5 == intWrapper(5)) assert(5 == (5: java.lang.Integer)) assert((5: java.lang.Integer) == 5) assert((5: java.lang.Integer) == intWrapper(5)) assert(intWrapper(5) == (5: java.lang.Integer)) Review by community.
* Took a step back and massively simplified Range.Paul Phillips2010-11-011-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | all the boundary conditions I'm aware of, including not yet reported ones such as scala> 5 until 5 last res0: Int = 4 and scala> 1073741823 to Int.MaxValue by (1 << 24) size res0: Int = 65 scala> 1073741823 to Int.MaxValue by (1 << 24) drop 100 size res1: Int = 256 Also includes conformance improvements (e.g. 5 until 5 init should throw an exception, not return empty) and general improvements (e.g. 1 to 10 tail should return a Range.) Will close associated tickets such as #3232 after I complete similar work on NumericRange. Review by community.
* A double goodness whammy involving type inferen...Paul Phillips2010-10-272-0/+18
| | | | | | | | | | | | | | | | | | | | A double goodness whammy involving type inference at the borders. 1) Implicit search preserves singleton type fidelity. 2) Unification of parent bounds is (closer to) correct. Result of 1: "implicit def f(x: Foo.type)" will convert object Foo. Result of 2: "new Trait[Int] { }" may enjoy its type constructor being inferred, no longer foiled by the anonymous class. Also included are some clarity-enhnancing renamings and refactorings. Performance note: I heavily benchmarked the change to isSubArgs and it is reproducibly faster than the previous implementation. Numbers and methodology available upon request. Closes #2693, #3964. Review by moors, who wrote most of this patch but might like to review the comments.
* Merge branch 'oct26' of /scala/trunkPaul Phillips2010-10-273-17/+50
|
* close #3954, no reviewLukas Rytz2010-10-262-0/+21
|
* Case accessors are always public else the patte...Paul Phillips2010-10-261-0/+33
| | | | | | | Case accessors are always public else the pattern matcher goes south. A more discriminating fix may be possible at some point, but it looks to be an involved endeavor. Closes #3714, review by odersky.
* removed warnings in test filesmichelou2010-10-232-2/+2
|
* Closes #3059, #3895 (the only difference betwee...Hubert Plociniczak2010-10-204-0/+63
| | | | | | | | Closes #3059, #3895 (the only difference between this and r23232 is the forced info transformation that ensures that nested objects are viewed as lazy vals). sbt integration requires new starr for this commit to work.
* Closes #3670, #3877.Hubert Plociniczak2010-10-204-0/+221
|
* Fix involving xml equality, contributed by mark...Paul Phillips2010-10-201-0/+11
| | | | | | Fix involving xml equality, contributed by mark harrah. Closes #3886, no review.
* As pointed out to me by plocinic, the pattern m...Paul Phillips2010-10-191-0/+11
| | | | | | | | As pointed out to me by plocinic, the pattern matcher has been indiscriminately clearing the MUTABLE flag on synthetic vals because it is signalling itself with that bit and it didn't think anyone else would ever notice. Someone did. Closes #3699, review by plocinic.
* A modified approach to map withDefault[Value].Paul Phillips2010-10-191-6/+2
|
* Reverts r23251 because it hangs on windows.Paul Phillips2010-10-192-28/+0
|
* Reverting r23232. No review.Hubert Plociniczak2010-10-153-33/+0
|
* Modification to the widening logic to treat loc...Paul Phillips2010-10-142-3/+3
| | | | | | | | | | | | | | | | | | Modification to the widening logic to treat locally defined symbols like final members thus allowing more constants to be inlined. Concretely, that means that in code like this: def f: Unit = { val b = false ; if (b) println("ok") } The call to println is no longer generated at all, and in this code: def f(x: Int) = { val X = 1 ; val Y = 2; x match { case X => 1 ; case Y => 2 } } A tableswitch is generated instead of the present if/then/else. I also added a big comment to the former widenIfNotFinal (now widenIfNecessary for obvious reasons.) Review by rytz.
* All this time with Nil only claiming to be equa...Paul Phillips2010-10-141-0/+8
| | | | | | All this time with Nil only claiming to be equal to immutable.Seqs, how is it possible? Closes #3923, no review.
* Fixing issue with XMLEventReader.stop failing t...Paul Phillips2010-10-142-0/+28
| | | | | | Fixing issue with XMLEventReader.stop failing to stop the parser thread. Contributed by Jean-Laurent Huynh, reviewed by extempore. Closes #3881.