| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Eliminated the var, the Option[Boolean]s, and the Unit-returning init
method. If they were accomplishing something I could not discern, I
trust hubert will now apprise me. Review by plocinic.
|
|
|
|
|
| |
No review.
|
|
|
|
|
| |
Fix for bumpy proxy equals. Closes SI-4807, no review.
|
|
|
|
|
|
|
|
| |
scalac -Xlint said:
warning: side-effecting nullary methods are discouraged: suggest defining as `def initErrorCheck()` instead
x 56. Plus a couple other linty things. No review.
|
|
|
|
|
|
|
|
|
| |
added missing getExcludedFiles in <scalac> Ant task (same change is
pending for <pending> Ant task).
A new starr is needed for that features to work in build.xml (and other
Ant scripts).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Various and sundry manipulations to allow for objects to be overridden
when the mood is right. It is not enabled by default.
The major contributor of change turned out to be the decoupling of
the FINAL flag (and the "isFinal" test which examines only that flag)
and the many semantics which were attributed to this interpretation
of finality in different circumstances. Since objects no longer have
the FINAL flag automatically applied (only top-level objects and those
marked final in source code do) we need apply a more nuanced test.
Fortunately there is such a nuanced test: isEffectivelyFinal,
which is always true if the FINAL flag is set but also in various
other circumstances. In almost every case, you should be testing
"isEffectivelyFinal", not "isFinal".
To enable overridable objects, use:
-Yoverride-objects
-Xexperimental // includes the above and others
Remain to be done: working out transition logistics. Most likely this
would involve bumping the scala signature version, and all objects in
versions before that would be assumed final.
Review by moors.
|
|
|
|
|
|
| |
Integrates recent speed improvements to algorithm.
Contributed by Ruediger Keller, no review.
|
|
|
|
|
| |
I missed inlining warnings - need to get better glasses. No review
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are no more direct calls to context.error from Typers and Infer,
so more work needs to be done to finish it for Implicits and Namers.
I am pushing it to trunk so that all of you can share my pain (and
complain). Please do not add any more context.error randomly in that
code, instead deal with it appropriately (by creating specific error
tree).
I was trying to be as informative when it comes to error tree names
as possible, but if you feel like changing names to something more
appropriate then feel free to do so. When it comes to printing error
messages I tried to follow test suite as closily as possible but
obviously there were few changes to some tests (mostly positive, I
believe).
On my machine performance drawback was neglible but I am working on more
aggressive caching to reduce the penalty of containsError() calls even
more. Any suggestions welcome.
At the moment the code supports both styles i.e. throwing type errors
for the cases that are not yet handled and generating error trees. But
in the future we will drop the former completely (apart from cyclic
errors which can pop up almost everywhere).
Review by odersky, extempore and anyone who feels like it.
|
|
|
|
|
|
|
|
| |
Offer warning when demonstrably non-side-effecting expressions appear in
statement position, which should be unintentional by definition. Threw
in removal of six places with useless discarded expressions which the
warning informed me about. No review.
|
|
|
|
|
| |
Removed the type parameter from sliding, no review.
|
| |
|
|
|
|
|
|
| |
Some great AnyVal class hierarchy documentation from Iain McGinniss. No
Review.
|
|
|
|
|
|
|
|
|
| |
Document the usage and methods of scala.sys.process.
From the first international scaladoc marathon.
Contributed by: Daniel Sobral
|
| |
|
|
|
|
|
| |
Fixing up a few instances of suboptimal reversing, no review.
|
|
|
|
|
|
| |
Replaced various now-unnecessary casts with straight getClass calls.
Closes SI-4780, no review.
|
| |
|
|
|
|
|
|
|
| |
Modified scala.reflect package object not to throw an exception at
initialization time if it can't instantiate the value in question.
Review by odersky.
|
|
|
|
|
| |
corrected misspelled type params (capitalized names 3x)
|
|
|
|
|
|
|
| |
Improved documentation for scala.collection.immutable.List and
scala.collection.immutable.Queue. Contributed by Matthew Pocock during
the Monthly Docspree. Review by phaller.
|
| |
|
| |
|
|
|
|
|
|
| |
Literals now take Any as argument (used to represent free values in
reified trees).
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A conceivably pretty bad performance bug in builders.
SI-4821 pointed out that ArrayBuffer's ++ checks for a cheap size method
by matching on IndexedSeq, but mutable.IndexedSeq, so all immutable
collections are thrown in the same group as linear seqs. I went looking
for other examples of this and found them, in key classes like Builder.
The "type shadowing trap" is a serious issue in the collections. Closes
SI-4821, no review.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 sequence search algorithms.
Contributed by Rex Kerr. Closes SI-4828, no review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moved the classes and objects which are defined in package objects out.
In principle this is something you should be able to do. In practice
right now it means bugs, to no advantage.
I also deprecated RangeUtils, an unused, undocumented trait in the
immutable package. It seems like there is a ton of stuff in the public
API which should not be in the public API. It's really tedious having to
go through a whole deprecation cycle to dispose of what could have been
an internal-only class (and was presumably intended as such given the
the absence of documentation.)
No review.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Adds documentation to the scala.math package object. Contributed by
Christian Krause. No review.
|
|
|
|
|
|
|
| |
Removed unused import in collection.immutable.WrappedString.
No review.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sped up traversal over mutable maps by a factor of two.
There was this comment in HashTable explaining why foreach was
implemented in terms of iterator. /*
* We should implement this as a primitive operation over the
* underlying array, but it can cause a behaviour change in edge cases
* where:
* - Someone modifies a map during iteration
* - The insertion point is close to the iteration point.
*/
Item 1: foreach and iterator didn't behave the same if the map was
mutated in the midst of the traversal anyway. Item 2: protecting some
particular undefinition of inherently undefined behavior is a pretty
unconvincing reason to impose a 2x penalty on foreach.
Here are the before/after times for traversing the keys with foreach
vs. with iterator. Same impact on values and on the map itself. The
benchmark code is included in this commit.
before: foreach 143700900 iterator 143848900
after: foreach 67024400 iterator 144890300
Respecting the fact that this might be causing some behavior somewhere
to change, even though it would be pretty sick to be relying upon it,
** ATTENTION! POSSIBLE BEHAVIOR CHANGE! **
Review by dragos.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
output generation (but only then, since otherwise we're not creating the
jar):
1) -Xmain-class foo.Bar will give the jar a Main-Class of foo.Bar 2)
Alternatively, if there is only one runnable program, that will be
the Main-Class 3) Always, the jar's manifest will have an entry for
Scala-Compiler-Version.
Not very relatedly, a warning is now issued when a module has a main
method but a runnable program will not be generated. Closes SI-4861.
This represents an opening step toward automatically recognizing
mismatched bytecode situations: coarse, but useful and safe. Review by
mirco.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Update Scaladoc for LinkedList and for some of the functions/operators
- that it inherits. Completed Scaladoc for append Added example
- in GenSeqLike for apply. Added $collectExample to collect in
- GenTraversableLike and supplied an actual example in LinkedList
Contributed by Donald McLean.
|
|
|
|
|
|
|
|
| |
Move vector descrition from the obejct to the class, where it actually
makes sense. Preserve previously existing attribute definitions.
Contributed by Daniel C. Sobral
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Following up on things that -Xlint told me, sometimes because Mr. Linty
was being sensible and other times just to shut him up so we can hear
better in the future.
- made xml.Equality public because it occurs in public method signatures
- made some actor classes with inaccessible-unoverridable methods final
- eliminated a bunch of "dead code follows" warnings by deleting the
dead code which really did follow - improved the reliability of warnings
about inaccessible types
For the changes in actors, review by phaller.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Ywarn-adapted-args // also included in -Xlint
-Yno-adapted-args
The former warns when a () is inserted or an argument list is implicitly
tupled. The latter errors under the same conditions. Using these options
I found several bugs in the distribution which would otherwise be nearly
impossible to spot. These bugs were innocuous (I think) but similar bugs
could easily be (and have been) otherwise.
Certain particularly threatening scenarios are at minimum warned about
regardless of options given. Closes SI-4851, no review.
|
|
|
|
|
| |
No review.
|
| |
|
|
|
|
|
|
|
|
| |
Start of an attempt to abstract above some hardcoded name mangling
decisions so they can be modified, something we need to do to fix
long-standing problems with inner classes. It's not easy. This commit
doesn't actually change much, it's primarily setup. No review.
|