summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Minor fixes to Scaladoc man page.Kato Kazuyoshi2011-07-061-2/+2
|
* Add a test for #4421 and clean up a little.Kato Kazuyoshi2011-07-063-8/+25
|
* Adds support for @throws in ScalaDoc.Kato Kazuyoshi2011-07-061-1/+10
|
* Changes semantics so that protected access rule...Martin Odersky2011-07-061-11/+14
| | | | | | | Changes semantics so that protected access rule (selector must be subclass of current class) does not hold for type members. Fixes t4737. Review by extempore. Spec change in a seperate commit.
* Fix to handling of imports in namers to make ID...Martin Odersky2011-07-062-0/+5
| | | | | | Fix to handling of imports in namers to make IDE structure building work correctly.
* scratchpad works in interactive REPL; ready to ...Martin Odersky2011-07-067-78/+154
| | | | | scratchpad works in interactive REPL; ready to be integrate in Eclipse.
* Reverts r18939.Iulian Dragos2011-07-062-18/+0
|
* Don't populate 'originalOwner' in presentation ...Iulian Dragos2011-07-062-2/+16
| | | | | | | | Don't populate 'originalOwner' in presentation compiler runs. This is a source of memory leaks, as the map is never cleared. A better, more consistent mechanism should be developed for such maps, and ensure they are cleared on a new Run, or in resetTyper. no review.
* Fixing Gen* builder dispatch so that methods th...Aleksandar Pokopec2011-07-052-20/+40
| | | | | | | | | Fixing Gen* builder dispatch so that methods that require an implicit builder factory decide to run in parallel if the builder is a combiner, rather than if the builder factory is parallel. Review by odersky.
* Fixed a bug in the optimizer which was preventi...Paul Phillips2011-07-0413-58/+163
| | | | | | | | | | | | | | | | | | | | | | | 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.
* corrected typo in scaladoc commentmichelou2011-07-041-3/+3
|
* quick fix to get the build going again on Java 1.5Adriaan Moors2011-07-041-1/+2
|
* Towards a scratchpad functionality for the IDEMartin Odersky2011-07-049-5/+373
|
* Discovered another impressive source of unneces...Paul Phillips2011-07-0443-49/+49
| | | | | | | | | | Discovered another impressive source of unnecessary garbage is every collection creating a new GenericCanBuildFrom for every map ever performed. They can all use the same one: they all have the same implementation. It looks like tiark had already figured this out and done it for Vector: I followed with the other fifty. I really haven't the least idea who to have review most things. No review.
* Hard to explain garbage led me to this innocent...Paul Phillips2011-07-041-0/+1
| | | | | | | | | | | | Hard to explain garbage led me to this innocent seeming change. Not that innocent. A function like this should create no garbage: final def f[T](xs: List[T], num: Int) { if (num > 0) f(Nil ::: xs ::: Nil, num - 1) } Instead it was creating a lot. No review.
* Looking forward to working positions.Paul Phillips2011-07-033-9/+18
|
* Modified return type inference not to allow T* ...Paul Phillips2011-07-032-1/+22
| | | | | | | | | | | | | | | Modified return type inference not to allow T* to leak from varargs methods. Since I don't know what is supposed to be done about eta expansion of these methods, I left the behavior as it was (except the return type) and a boolean val in Types to change it. def id[T](xs: T*) = xs etaExpandKeepsStar = true // (id[Int] _) is Int* => Seq[Int] etaExpandKeepsStar = false // (id[Int] _) is Seq[Int] => Seq[Int] References #4176, leaving open pending resolution of eta expansion. Review by odersky.
* Logic bug in repl :paste parsing, no review.Paul Phillips2011-07-035-22/+44
|
* evalOnce needs to pack the type before using it...Paul Phillips2011-07-033-10/+33
| | | | | | evalOnce needs to pack the type before using it on new valdefs to avoid existential mismatches. Closes #3960, review by moors.
* Fixing -Xlint warnings, no review.Paul Phillips2011-07-032-5/+5
|
* Test case for #4757, no review.Paul Phillips2011-07-023-0/+13
|
* Existentially quantified symbols, when read by ...Paul Phillips2011-07-021-2/+8
| | | | | | | Existentially quantified symbols, when read by the unpickler, do not have the existential flag set. This leads to failure. This patch seeks improvement. Closes #4757, review by odersky.
* Fixed a bug involving classOf[Foo] having the w...Paul Phillips2011-07-014-3/+24
| | | | | | | 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.
* Fix a scalap checkfile, no review.Paul Phillips2011-07-011-0/+1
|
* Stable hashCodes for case objects.Paul Phillips2011-07-013-11/+37
| | | | | | | | | | | | 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.
* Fixed a path issue in partest, no review.Paul Phillips2011-07-013-7/+10
|
* Fixes scaladoc layout for function arguments wi...Vlad Ureche2011-07-011-2/+2
| | | | | | Fixes scaladoc layout for function arguments with default values. Contributed by Ruediger Keller. Closes SI-4588, no review.
* Keep BufferedSource from losing buffered data w...Paul Phillips2011-07-013-10/+108
| | | | | | Keep BufferedSource from losing buffered data when a derivative iterator is created via getLines. Closes #4671, #4662, no review.
* Further refinement of the tiark RefinedType patch.Paul Phillips2011-06-301-4/+3
| | | | | I think this is fastest and simplest both. Review by rompf.
* Fix for unfortunate bug in Range.init.Paul Phillips2011-06-302-1/+8
|
* Restored tiark's RefinedType-exclusion fast pat...Paul Phillips2011-06-301-5/+7
| | | | | | | | | | | | Restored tiark's RefinedType-exclusion fast path for implicit search. The issue was that in a subtype check like lhs <:< { val someName } ...you cannot determine it is impossible if the left hand side is an abstract type, because you don't know what its members will be. Review by rompf.
* Having established that r25051 is not responsib...Paul Phillips2011-06-302-9/+3
| | | | | | Having established that r25051 is not responsible for the compilation issue with scalaz, it is hereby restored. Review by moors.
* Fix for recently introduced performance regress...Paul Phillips2011-06-303-7/+7
| | | | | Fix for recently introduced performance regression, no review.
* Small change to doCookJavaInfo, to have it run ...Martin Odersky2011-06-303-8/+12
| | | | | | Small change to doCookJavaInfo, to have it run less often. Some more changes in comments. Review by moors.
* Oh yeah. Backward compatibility stubs, no review.Paul Phillips2011-06-301-0/+5
|
* Warning! Warning! Yes, that's what's in this co...Paul Phillips2011-06-2921-42/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Warning! Warning! Yes, that's what's in this commit. Why are you panicking? Mostly new command line options: -Xlint // basically, the ones which aren't noisy Ywarn-all -Ywarn-dead-code Ywarn-inaccessible // try this one on the library: -it makes some good points Ywarn-nullary-override Ywarn-nullary-unit -Ywarn-numeric-widen Ywarn-value-discard Some accumulated motivations: The wontfix resolution of ticket #4506 indicates that "def foo" and "def foo()" are always going to be treated differently in some situations and the same in others without users having any way to fix it. Summary expressed in latest comment with which I agree (and quite sadly, given that I've done a lot of work to try to make them usable) is "avoid using structural types like the plague." But the least we can do is warn if you're using parentheses "wrong". I think it would be better if the warning about "def foo()" overriding "def foo" were an error instead. If we have to live with this... trait Me { def f(): Int } class A { def f: Int = 5 } class C extends A with Me { } // error: Int does not take parameters def f(x: C) = x.f() // compiles def f(x: Me) = x.f() // error: Int does not take parameters. Mmph, how can a method be // legal with parameter "Foo" and illegal with parameter "Foo with // Bar" ? def f(x: Me with C) = x.f() The warning about a method contains a reference to a type which is less accessible than the method itself is obviously to those who recall it a response to GenTraversable being private and appearing in flatMap's signature during the 2.9.0 RCs. It avoids warning in the case where the unnormalized type is inaccessible but the normalized version would be, but it could use further refinement.
* overeager optimisation caused timeout in neg/t3...Adriaan Moors2011-06-291-4/+4
| | | | | overeager optimisation caused timeout in neg/t3399. no review
* Use the correct encoding in the browsing loader...Iulian Dragos2011-06-291-2/+2
| | | | | | Use the correct encoding in the browsing loader for the presentation compiler. This should be backported to 2.9 and 2.8. no review.
* Export correct packages from MANIFEST.MF.Iulian Dragos2011-06-291-2/+7
|
* Revert "Check that 'info' is only called on the...Iulian Dragos2011-06-294-36/+8
| | | | | | | | Revert "Check that 'info' is only called on the presentation compiler thread. This is a temporary debugging option" This reverts commit 29329aa84a1f8cff4ff866044faf2490a39dadd5.
* slight improvement to lubList so that the simpl...Adriaan Moors2011-06-292-21/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | slight improvement to lubList so that the simple case of lubbing type constructors works. review by extempore the strategy is to detect when the ts in lub(ts) are actually type constructors and remember their type parameters the BTS of a type constructor is a list of proper types (the type constructors have been applied to their dummy arguments, which are simply type refs to the original type parameters) in lubList, we undo this damage by stripping these dummy arguments (they refer to type parameters that are meant to be bound) a better fix would be to actually bind those type parameters that appear free in error, but that would require major changes to the BTS infrastructure example that only kindasorta works now... given: trait Container[+T] trait Template[+CC[X] <: Container[X]] class C1[T] extends Template[Container] with Container[T] C1's BTS contains Template[Container] with Container[T], but that should really be [T] => Template[Container] with Container[T] instead of wrapping it in a polytype, the current approach uses elimHOTparams to patch up this type so that it looks more like a type ctor: Template[Container] with Container, but this is ill-kinded as Template[Container] is a proper type, whereas Container is not the performance impact should be minimal, but caveat reviewer
* Check that 'info' is only called on the present...Iulian Dragos2011-06-294-8/+36
| | | | | | | Check that 'info' is only called on the presentation compiler thread. This is a temporary debugging option for the presentation compiler. no review.
* Profiler suggested it would be worthwhile to sh...Paul Phillips2011-06-297-116/+131
| | | | | | | | Profiler suggested it would be worthwhile to short-circuit allOverriddenSymbols.isEmpty, and one thing led to another. I don't know how much I accomplished performancewise, but the cosmetology is outstanding. Review by moors.
* Continuing to press on RefChecks, discovered wh...Paul Phillips2011-06-281-6/+10
| | | | | | | | | | | | | | | | | | | Continuing to press on RefChecks, discovered what seemed a pretty spectacular performance bug, at least at first. I was disappointed to see that the time gain didn't measure up. Still, nanos are nanos. According to YourKit, millis spent in List#foreach on a compilation of src/library broke down like this: | +---LinearSeqOptimized$class.foreach | 173,123 100 % | | +---RefChecks$RefCheckTransformer.register$1 | 117,658 68 % | I think that is largely a profiler lie, but there is enough truth. After adjusting to prune before recursing, the number of invocations of method register in validateBaseTypes drops by 98%. Review by odersky.
* Suppressing a failing assert which isn't accomp...Paul Phillips2011-06-281-1/+11
| | | | | | | Suppressing a failing assert which isn't accomplishing anything but annoyance. Why is this suddenly tripping with frequency? I do not know. No review.
* Don't infer anonymous classes.Paul Phillips2011-06-276-9/+30
| | | | | | | | | | | | | | 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.
* Profiling revealed a suspiciously heavy consume...Paul Phillips2011-06-271-19/+26
| | | | | | | | | | | | | Profiling revealed a suspiciously heavy consumer of CPU time during refchecks called checkOverloadedRestrictions. Turns out it was looking for overloads where more than one method defined default arguments, but with N^2 carved on its checking stick. Time spent in checkOverloadedRestrictions in quick.lib drops from 5800ms to 300ms. Review by rytz.
* Avoided a ton of unnecessary garbage by creatin...Paul Phillips2011-06-261-11/+20
| | | | | | | | Avoided a ton of unnecessary garbage by creating singletons for <:< and =:= and giving them to all comers. Mother Earth is pleased. Thanks to Michael Bayne for pointing out the suboptimality of giving everyone their own instance. Review by moors.
* Generalizing some TreeGen machinery on an oppor...Paul Phillips2011-06-259-49/+97
| | | | | | | Generalizing some TreeGen machinery on an opportunistic basis. Better documenting how Class types and classOf are implemented. Cleaning up the manifest code. No review.
* Test cases close #2782, #2171, no review.Paul Phillips2011-06-253-0/+26
|