| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit includes Doug Lea's updates to ForkJoinPool, as of January
25th, 2012. Details of the changes and performance improvements
available at: http://markmail.org/message/323vxzn6irkk5yrg.
The ForkJoinPool used in this commit comes from the most recent JSR166y.
Additionally, also included are minimal changes to parts of the Scala
Actors library which interface with the ForkJoinPool, as the
ForkJoinPool's interface has changed (prior to the release of Java 7)
since we last updated it for the Scala 2.8 release.
Of note- this is part of the planned overhaul of scala.concurrent,
and corresponds to ticket SI-5523.
For testing this was built on JDK 1.6, and passes all tests on both
JDK 1.5 and 1.6.
A new forkjoin.jar is necessary prior to applying these changes.
Using this source, the new jar can be built by running:
ant newforkjoin forkjoin.done
This creates a new forkjoin.jar in build/libs/. It must replace
lib/forkjoin.jar.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One of my more recent warnings tells us this a bunch of places
if we compile with -Xlint, one example:
scala/actors/ReplyReactorTask.scala:26: warning:
private[this] value reactor in class ReplyReactorTask shadows
mutable reactor inherited from class ReactorTask. Changes to reactor
will not be visible within class ReplyReactorTask - you may want to
give them distinct names.
In some cases (like that one) I was not confident whether the shadowing
was intentional, in which case I left the semantics but changed the name
anyway because it will be eternally confusing otherwise.
Review by @phaller.
|
| |
|
|
|
|
|
|
|
|
| |
Changes the fork join pool detection for JVM1.7, for actors and parallel
collections libraries.
Review by phaller.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Contributed by Todd Vierling with minor mods by extempore. This is an
obvious extension of AbstractFunctionN which I had some issue making
work at the time. Sounds kind of pitiful given that the compiler patch
is about two lines, but let's all agree to believe it was a different
world then.
This example program is impacted as follows:
class A {
def f: PartialFunction[Any, Int] = { case x: String => 1 }
def g: PartialFunction[Any, Int] = f orElse { case x: List[_] => 2 }
def h: PartialFunction[Any, Int] = g orElse { case x: Set[_] => 3 }
}
Before: 34943 bytes of bytecode
After: 4217 bytes of bytecode
A mere 88% reduction in size. "'Tis but a trifle!" Closes SI-5096,
SI-5097.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Rename a file to celebrate our glorious ant overlords, no review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Contributed by Simon Ochsenreither.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding some Sets/Maps to perRunCaches, and eliminating ambiguously named
imports.
Did a tour of the compiler adding a few longer-lived mutable structures
to the per-run cache clearing mechanism. Some of these were not a big
threat, but there is (almost) literally no cost to tracking them and the
fewer mutable structures which are created "lone wolf style" the easier
it is to spot the one playing by his own rules.
While I was at it I followed through on long held ambition to eliminate
the importing of highly ambiguous names like "Map" and "HashSet" from
the mutable and immutable packages. I didn't quite manage elimination
but it's pretty close. Something potentially as pernicious which I
didn't do much about is this import:
import scala.collection._
Imagine coming across that one on lines 407 and 474 of a 1271 file.
That's not cool. Some poor future programmer will be on line 1100 and
use "Map[A, B]" in some function and only after the product has shipped
will it be discovered that the signature is wrong and the rocket will
now be crashing into the mountainside straightaway. No review.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I wrote a warning when nullary methods return Unit. I wimped out of
including it in this patch because we had about 200 of them, and that's
what is fixed in this patch. I will add the warning to some kind of
"-Xlint" feature after 2.9.
This is motivated at least partly by the resolution of #4506, which
indicates the distinction between "def foo()" and "def foo" will
continue to jab its pointy stick into our eyes, so I believe we have a
minimal duty of at least following our own advice about what they mean
and not making a semirandom choice as to whether a method has parens or
not. Review by community.
|
|
|
|
|
| |
Updated a bunch of @deprecated annotations to have a version, no review.
|
|
|
|
|
|
|
| |
Various addenda to soc's patch: regenerating Product/Tuple/Function
classes and AnyVal sources, making versioning consistent, etc. Closes
#4477, no review.
|
|
|
|
|
|
| |
for the patch, as it's a change I've always wanted. Moving up in the
glamorous world of scala commits! No review.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Review by phaller.
|
|
|
|
|
|
| |
workaround for see #3936, allows building everything inside intellij. no
review
|
| |
|
|
|
|
|
|
| |
Who knew system was such a popular sentence ending choice. Fixes some
doc comments caught up in the s/// net, no review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Imported sbt.Process into trunk, in the guise of package
scala.sys.process. It is largely indistinguishable from the version in
sbt, at least from the outside.
Also, I renamed package system to sys. I wanted to do that from the
beginning and the desire has only grown since then. Sometimes a short
identifier is just critical to usability: with a function like error("")
called from hundreds of places, the difference between system.error and
sys.error is too big. sys.error and sys.exit have good vibes (at least
as good as the vibes can be for functions which error and exit.)
Note: this is just the first cut. I need to check this in to finish
fixing partest. I will be going over it with a comb and writing
documentation which will leave you enchanted, as well as removing other
bits which are now redundant or inferior. No review.
|
|
|
|
|
|
|
|
|
| |
Override checks and self-types still needed some work (ticket #2808.)
I believe this is the right change. The modifications in parallel and
actors were a result of the files failing to compile after the change to
allOverriddenSymbols. (I am taking the position that that aspect is a
feature.) Review by malayeri, odersky.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mopping up after the deprecation of exit and error. It is decidedly
non-trivial (at least for the IDE-impaired) to be completely sure of
which error function was being called when there were about twenty with
the same signature in trunk and they are being variously inherited,
imported, shadowed, etc. So although I was careful, the possibility
exists that something is now calling a different "error" function than
before. Caveat programmer.
(And let's all make it our policy not to name anything "error" or "exit"
from here on out....) No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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?
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Updated LinkedBlockingQueue to latest jsr166
version. Verified bug fix using test case in
[http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6806875 JDK bug
report 6806875]. Closes #3629.
|
|
|
|
|
|
| |
Added doc comment to Actor trait explaining the use of thread-blocking
methods.
|
|
|
|
|
| |
Addresses see #3470 by adding a method Reactor.restart. Review by rompf.
|
| |
|
|
|
|
|
| |
Removed more than 3400 svn '$Id' keywords and related junk.
|
| |
|
|
|
|
|
|
|
| |
Deprecated two members of RemoteActor which clearly should not be in the
public API. Removed unnecessary casts. Some more complete doc comments.
No review.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Fixed scaladoc output for several types and members. No review.
|
| |
|
|
|
|
|
|
| |
Reverted change of Reactor.exceptionHandler's type of see r21650. Review
by plocinic.
|
|
|
|
|
|
|
| |
Reactor.exceptionHandler is defined on Throwable instead of Exception.
Fixes potential problem with visibility of changes to a field. Review by
plocinic.
|
|
|
|
|
|
|
|
|
|
| |
Specialization removed a 'private' modifier on Actor.resumeActor. Mixin
did not mix this method in actor implementations, believing it was
private. At runtime, an AbstractMethodError was thrown, but swallowed by
forkjoin (probably), resulting in an apparent deadlock. It would have
been much faster to find and fix if the stacktrace was printed, as it is
in Java 1.5. No review.
|
| |
|
| |
|
|
|
|
|
|
| |
Improved handling of uncaught exceptions in actors. See #711. Review by
community.
|