| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If I work on this patch any longer without checking in I will go
stark raving mad. It is broken up into a couple pieces. This one is
the changes to test/. It includes fixing a bunch of tests, removing
deprecated constructs, moving jars used by tests to the most specific
plausible location rather than having all jars on the classpath of all
tests, and some filesystem layout change (continuations get their whole
own srcpath.) This would be the world's most tedious review, so let's
say no review.
[Note: after this commit, I doubt things will build very smoothly until
the rest of the partest changes follow. Which should only be seconds,
but just in case.]
|
| |
|
| |
|
|
|
|
|
|
|
| |
closes #3203, overriding more of the TraversableLike methods. also
tightened access privileges to internal fields and methods. review by
community.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While working on partest discovered that CompilerCommand ignores half
its constructor arguments and a couple dozen places blithely pass it
those arguments as if they're being used. Then there were setups like
this:
class OfflineCompilerCommand(
arguments: List[String],
settings: Settings,
error: String => Unit,
interactive: Boolean)
extends CompilerCommand(arguments, new Settings(error), error, false)
Hey offline compiler command, why throw away the perfectly good settings
you were given? Ever heard 'reduce, reuse, recycle'? How did you ever
work... or do you? No review.
|
|
|
|
|
| |
Apparently I can't fix a test case to save my life. No review.
|
| |
|
|
|
|
|
|
| |
Fixed an issue with no-parameter-list methods not being elided. No
review.
|
| |
|
|
|
|
|
|
| |
Although it was working fine, a test case for @elidable to make sure
that state of affairs continues. No review.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Went ahead and implemented classpaths as described in email to
scala-internals on the theory that at this point I must know what I'm
doing.
** PUBLIC SERVICE ANNOUNCEMENT **
If your code of whatever kind stopped working with this commit (most
likely the error is something like "object scala not found") you can get
it working again with either of:
passing -usejavacp on the command line
set system property "scala.usejavacp" to "true"
Either of these will alert scala that you want the java application
classpath to be utilized by scala as well.
Review by community.
|
|
|
|
|
|
|
|
|
| |
During my last look at r21224 I noticed what must be a long standing
bug in Array.update handling. Fixing this probably never to be noticed
corner case (see bug3175.scala) seduced me into drumming out some
duplication. At least we got some nice commenting out of it. Review by
dubochet.
|
|
|
|
|
|
|
| |
Some work on the Array methods as they manifest in refinement types:
tightening when Array code is generated and also what code is generated.
Review by dubochet.
|
|
|
|
|
|
|
|
| |
Returning to the thrilling world of equality and hashCodes now
that Any.## is a reality. Moved the hash functions from Predef to
ScalaRunTime, and made what appears to be an optimization to equals by
not losing the result of an instanceof test. Review by community.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to BufferLike (++ and similar now create a new collection.)
Removed MapLikeBase. Annotated all the methods in mutable.{ Map, Set }
which mutated in-place in 2.7 to note that they create new
collections, and implemented same.
At this point the only +/- like method which mutates in place which I am
aware of is BufferLike.+ (see source comment for my observations.)
Also tweaked some collections return types as necessitated by these
changes, such as mutable.Set.clone() now returning "This" rather than
mutable.Set[A].
References #3089, closes #3179. Review by odersky.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Leveraged -Xmigration to burn off some warts which arose in the new
collections. Warnings put in place for behavioral changes, allowing the
following. 1) Buffers: create new collections on
++ and -- like all the other collections. 2) Maps: eliminated
never-shipped redundant method valuesIterable and supplied these
return types:
def keys: Iterable[A]
def keysIterator: Iterator[A]
def values: Iterable[B]
def valuesIterator: Iterator[B]
def keySet: Set[A]
I concluded that keys should return Iterable because keySet also exists
on Map, and is not solely in the province of Maps even if we wanted to
change it: it's defined on Sorted and also appears in some Sets. So it
seems sensible to have keySet return a Set and keys return the more
general type.
Closes #3089, #3145. Review by odersky.
|
| |
|
| |
|
|
|
|
|
|
| |
Temporarily disabling failing test until I can finish my partest work.
No review.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
- new immutable HashMap implementation based on a hash trie. this is the
first iteration, more optimizations will be added later. - updated test
cases to reflect new ordering of elements - made Map.empty and Set.empty
singletons, deprecating classes Map.EmptyMap and Set.EmptySet Review by
extempore, odersky.
|
|
|
|
|
|
| |
null, and thrown MatchErrors don't NPE trying to stringify null. No
review.
|
|
|
|
|
|
|
|
|
| |
Fix for #3136 by reverting the line in r18184 which caused this and
other regressions. The downside is that the #1697 test case no longer
passes, but protracted shrug because it wasn't entirely fixed anyway.
Review by moors. (Can you triangulate your way to a patch where both
work simultaneously? It's today's bonus challenge!)
|
| |
|
|
|
|
|
|
| |
ScalaRunTime method to perform sameElements as fix for #2867. Review by
odersky.
|
|
|
|
|
|
|
|
| |
what must be legacy scalatest.* properties to partest.*, boldly assuming
that the fact that partest is pretty much unusable outside of scalac
means there are no users outside of scalac who might be disrupted by
eliminating old property names. Review by community.
|
|
|
|
|
| |
specialized implementations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added ## method to Any as our scala hashCode method which provides
consistent answers for primitive types. And I'm sure we're all tired of
new starrs, but it's hard to add a method to Any without one. This patch
only brings ## into existence, but nothing calls it yet.
// some true assertions
scala> assert(5.5f.## == 5.5f.hashCode)
scala> assert(5.0f.## != 5.0f.hashCode && 5.0f.## == 5L.##)
No review. (Already reviewed by odersky.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Quite a lot more work on XML equality than I can properly justify
spending time on, but you know how it is once you get started on
something. This commit will likely break some code out there in the
world but this is impossible to avoid if we are to achieve sane equality
in trunk.
For anyone who was relying upon the 2.7 equality behavior for
scala.xml.* classes, using "xml_==" instead of "==" for comparisons will
restore the old behavior. The standard == on xml elements now attempts
to behave in such a way that symmetry and hashCode contracts will be
preserved. It's probably not 100% there yet, but I can tell you this: it
is closer today than it was yesterday.
Review by community.
|
|
|
|
|
|
| |
Specialized types are not substituted inside type arguments. Closes
#3085, no review.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
there with this one. Documentation to come. Review by community.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is final and does not conform to the pattern, it will no longer compile.
See all the exciting things you can no longer do:
"bob".reverse match { case Seq('b', 'o', 'b') => true } // denied!
"bob".toArray match { case Seq('b', 'o', 'b') => true } // rejected!
final class Dunk
def f3(x: Dunk) = x match { case Seq('b', 'o', 'b') => true } // uh-uh!
And so forth. Review by odersky.
|
| |
|
|
|
|
|
|
|
| |
More classpath work, and cleanups in the vicinities of everything
manipulating classpaths. Review by anyone willing to slog through the
approximately dozen different ways the classpath can be influenced.
|
| |
|
|
|
|
|
|
| |
Unique's seeming victory is overruled by committee. It is "distinct",
not "unique", wherein lies the nub. No review.
|
|
|
|
|
|
|
|
|
|
|
|
| |
A big push to make the interpreter easier to instantiate without having
to dodge bullets. It shouldn't have to be any harder than this:
scala> new scala.tools.nsc.Interpreter().evalExpr[Int]("5*5")
res0: Int = 25
...and now it isn't. Review by community.
|
|
|
|
|
|
|
|
|
| |
Striking while the iron is hot, renamed removeDuplicates to unique and
deprecated removeDuplicates. The debate between distinct and unique was
vigorous but unique won by a freckle. (Dark horse 'nub' was disqualified
for taking performance enhancers.) The only thing which might need
review is the choice of name, but review by odersky.
|
|
|
|
|
|
| |
Made sliding/grouped throw an exception when read past the end. Closes
#3017.
|
|
|
|
|
|
|
|
|
| |
A compact tree printer, for primitives like myself who do all their
debugging in the console and need extraneous information filtered out.
New option: -Ycompact-trees. Supply that in conjunction with -Xprint:all
and suddenly the output is a (relative) masterpiece of concision. Review
by anyone who is game to review such a thing. Community?
|
| |
|