summaryrefslogtreecommitdiff
path: root/src/actors
Commit message (Collapse)AuthorAgeFilesLines
* a fast, functional PartialFunction implementationPavel Pavlov2012-03-303-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | runtime.AbstractPartialFunction provides a default implementation for the new-style partial function. In principle this class is only subclassed by compiler-generated partial functions arising from matches. Either - the apply method (old-style partialfun) or - the applyOrElse method (current scheme) must be overridden, and the isDefinedAt method implemented. The applyOrElse method implementation is provided to ease the transition from the old scheme, since starr still generates old-style PartialFunctions, but locker's library has the new AbstractPartialFunction. Thus, this implementation is intended as a drop-in replacement for the old partial function, and does not require changes to the compiler. (compiler patches, both for old and new-style pattern matching, follow) - runtime.AbstractPartialFunction is based on PartialFunction.WithDefault Original version of FunctionWithDefault by Odersky (http://article.gmane.org/gmane.comp.lang.scala.internals/4032) - better performance for OrElse#applyOrElse, OrElse#lift, PF.cond - new combinator methods: PF#run, PF#runWith, PF.apply authored by @pavelpavlov, refactored by @adriaanm, review by @paulp
* Prepared actors hierarchy for migration.Vojin Jovanovic2012-03-2014-646/+702
| | | | | | Internal nodes added so methods relevant to akka can be overridden. Review by: @phaller
* Added updated ForkJoinPool, w/ necessary updates to Scala Actors.Heather Miller2012-02-252-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Changed shadowed constructor parameter names.Paul Phillips2011-12-072-6/+20
| | | | | | | | | | | | | | | | | 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.
* Fast PartialFunction # orElse.Martin Odersky2011-11-243-3/+3
|
* Changes the fork join pool detection for JVM1.7...Aleksandar Pokopec2011-11-111-1/+1
| | | | | | | | Changes the fork join pool detection for JVM1.7, for actors and parallel collections libraries. Review by phaller.
* AbstractPartialFunction.Paul Phillips2011-10-193-4/+3
| | | | | | | | | | | | | | | | | | | | | | | 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 sin...Paul Phillips2011-08-154-62/+0
| | | | | | | 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 ove...Paul Phillips2011-08-011-0/+0
| | | | | Rename a file to celebrate our glorious ant overlords, no review.
* Following up on things that -Xlint told me, som...Paul Phillips2011-07-291-3/+7
| | | | | | | | | | | | | | | 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.
* Added two new compiler options:Paul Phillips2011-07-291-1/+3
| | | | | | | | | | | | | | | -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.
* Removed classes and methods deprecated before 2.8.Paul Phillips2011-07-165-61/+3
| | | | | Contributed by Simon Ochsenreither.
* 3rd round of clean ups (see r25285, r25292)michelou2011-07-1515-244/+176
|
* Adding some Sets/Maps to perRunCaches, and elim...Paul Phillips2011-07-146-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fixes SI-4759Philipp Haller2011-07-071-10/+17
|
* I wrote a warning when nullary methods return U...Paul Phillips2011-04-284-6/+6
| | | | | | | | | | | | | | | 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 h...Paul Phillips2011-04-241-1/+1
| | | | | Updated a bunch of @deprecated annotations to have a version, no review.
* Various addenda to soc's patch: regenerating Pr...Paul Phillips2011-04-141-1/+1
| | | | | | | Various addenda to soc's patch: regenerating Product/Tuple/Function classes and AnyVal sources, making versioning consistent, etc. Closes #4477, no review.
* Adds "since" field to @deprecated.Paul Phillips2011-04-149-22/+22
| | | | | | for the patch, as it's a change I've always wanted. Moving up in the glamorous world of scala commits! No review.
* Closed #4454.Philipp Haller2011-04-141-2/+3
|
* Removed uniqueness annotations. Review by rytz.Philipp Haller2011-03-172-11/+7
|
* Closes #3838. Review by prokopec.Philipp Haller2011-03-151-12/+15
|
* Applying davetron5000's actors docs patches.Aleksandar Pokopec2011-02-1520-88/+109
| | | | | Review by phaller.
* workaround for see #3936, allows building every...Lukas Rytz2011-01-262-2/+2
| | | | | | workaround for see #3936, allows building everything inside intellij. no review
* Updated copyright notices to 2011Antonio Cunei2011-01-2043-43/+43
|
* Who knew system was such a popular sentence end...Paul Phillips2011-01-181-1/+1
| | | | | | 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 o...Paul Phillips2011-01-125-8/+8
| | | | | | | | | | | | | | | | | | | 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 som...Paul Phillips2011-01-083-2/+4
| | | | | | | | | 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.
* Added uniqueness annotations. Review by rytz.Philipp Haller2010-12-072-7/+11
|
* Mopping up after the deprecation of exit and er...Paul Phillips2010-12-055-10/+10
| | | | | | | | | | | | | | 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, introd...Lukas Rytz2010-11-303-14/+10
| | | | | | | | | | | | | | | | | | | 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?
* Closes #3920. Review by prokopec.Philipp Haller2010-10-261-1/+3
|
* removed generics warnings in actorsmichelou2010-07-128-19/+23
|
* Updated LinkedBlockingQueue to latest jsr166 ve...Philipp Haller2010-07-122-323/+417
| | | | | | | | 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...Philipp Haller2010-06-281-2/+39
| | | | | | Added doc comment to Actor trait explaining the use of thread-blocking methods.
* Addresses see #3470 by adding a method Reactor....Philipp Haller2010-05-252-24/+37
| | | | | Addresses see #3470 by adding a method Reactor.restart. Review by rompf.
* Fixed -Xcheckinit build. No review.Philipp Haller2010-05-171-1/+1
|
* Removed more than 3400 svn '$Id' keywords and r...Antonio Cunei2010-05-1236-36/+0
| | | | | Removed more than 3400 svn '$Id' keywords and related junk.
* Closes #3407. Closes #3412. Review by plocinic.Philipp Haller2010-05-094-82/+105
|
* Deprecated two members of RemoteActor which cle...Philipp Haller2010-04-294-11/+20
| | | | | | | Deprecated two members of RemoteActor which clearly should not be in the public API. Removed unnecessary casts. Some more complete doc comments. No review.
* UncaughtException is now a case class (see #2017).Philipp Haller2010-04-292-10/+11
|
* Closes #3369. Review by plocinic.Philipp Haller2010-04-291-0/+39
|
* Closes #3365.Philipp Haller2010-04-286-11/+35
|
* Closes #3364. No review.Philipp Haller2010-04-281-1/+1
|
* Fixed scaladoc output for several types and mem...Philipp Haller2010-04-273-41/+33
| | | | | Fixed scaladoc output for several types and members. No review.
* Closes #3356.Philipp Haller2010-04-253-107/+42
|
* Reverted change of Reactor.exceptionHandler's t...Philipp Haller2010-04-222-4/+3
| | | | | | Reverted change of Reactor.exceptionHandler's type of see r21650. Review by plocinic.
* Reactor.exceptionHandler is defined on Throwabl...Philipp Haller2010-04-224-25/+30
| | | | | | | Reactor.exceptionHandler is defined on Throwable instead of Exception. Fixes potential problem with visibility of changes to a field. Review by plocinic.
* Fixed deadlocking behavior in actors.Iulian Dragos2010-04-131-1/+1
| | | | | | | | | | 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.
* Reverted r21523. No review.Philipp Haller2010-04-134-25/+11
|