summaryrefslogtreecommitdiff
path: root/src/library
Commit message (Collapse)AuthorAgeFilesLines
* Fix tasksupport field initialization for the checkInit build.Aleksandar Prokopec2012-03-149-4/+78
|
* Merge remote-tracking branches 'adriaanm/ticket/5189' and ↵Paul Phillips2012-03-115-19/+24
|\ | | | | | | 'jsuereth/better-starr-flow' into develop
| * SI-5189 fixed: safe type infer for constr patternAdriaan Moors2012-03-094-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | several fixes to the standard library due to - the safer type checker this fix gives us (thus, some casts had to be inserted) - SI-5548 - type inference gets a bit more complicated, it needs help (chainl1 in combinator.Parsers) To deal with the type slack between actual (run-time) types and statically known types, for each abstract type T, reflect its variance as a skolem that is upper-bounded by T (covariant position), or lower-bounded by T (contravariant). Consider the following example: class AbsWrapperCov[+A] case class Wrapper[B](x: Wrapped[B]) extends AbsWrapperCov[B] def unwrap[T](x: AbsWrapperCov[T]): Wrapped[T] = x match { case Wrapper(wrapped) => // Wrapper's type parameter must not be assumed to be equal to T, // it's *upper-bounded* by it wrapped // : Wrapped[_ <: T] } this method should type check if and only if Wrapped is covariant in its type parameter before inferring Wrapper's type parameter B from x's type AbsWrapperCov[T], we must take into account that x's actual type is: AbsWrapperCov[Tactual] forSome {type Tactual <: T} since AbsWrapperCov is covariant in A -- in other words, we must not assume we know T exactly, all we know is its upper bound since method application is the only way to generate this slack between run-time and compile-time types (TODO: right!?), we can simply replace skolems that represent method type parameters as seen from the method's body by other skolems that are (upper/lower)-bounded by that type-parameter skolem (depending on the variance position of the skolem in the statically assumed type of the scrutinee, pt) this type slack is introduced by adaptConstrPattern: before it calls inferConstructorInstance, it creates a new context that holds the new existential skolems the context created by adaptConstrPattern must not be a CaseDef, since that confuses instantiateTypeVar and the whole pushTypeBounds/restoreTypeBounds dance (CaseDef contexts remember the bounds of the type params that we clobbered during GADT typing) typedCase deskolemizes the existential skolems back to the method skolems, since they don't serve any further purpose (except confusing the old pattern matcher) typedCase is now better at finding that context (using nextEnclosing)
| * SI-5189 1/2: inferConstrInst uses correct varianceAdriaan Moors2012-03-091-2/+8
| | | | | | | | | | fixed concurrent.impl.Promise by making FState invariant (it would be unsound to make it covariant)
* | Add symbol to Manifests.Paul Phillips2012-03-092-7/+22
|/ | | | | Phantom types were vanishing during the erasure which takes place from manifest -> class object -> tpe.
*-. Merge remote-tracking branches 'dragos/master', ↵Paul Phillips2012-03-052-9/+30
|\ \ | | | | | | | | | 'axel22/feature/pc-execution-contexts', 'VladUreche/issue/5527-noPos' and 'retronym/topic/tolerant-interpolator' into develop
| | * Handle empty format specifiers in the formatting interpolator.Jason Zaugg2012-03-031-6/+7
| |/ |/| | | | | f"${foo}" is treated like f"${foo}%s".
| * Make task support implementations public.Aleksandar Prokopec2012-03-051-3/+23
|/
* Adding execution context based task support implementation.Aleksandar Prokopec2012-03-024-51/+104
| | | | | | | | | | Parallel collections now get the execution context task support which by default picks the execution context from the scala concurrent package. This execution context task support forwards calls to either a fork join task support or the thread pool task support. Additionally, the default execution context now uses either a fork join pool or a thread pool executor, depending on the JVM vendor and version.
* Merge branch 'master' into feature/pc-execution-contextsAleksandar Prokopec2012-03-02100-691/+795
|\ | | | | | | | | | | | | Conflicts: src/library/scala/collection/parallel/Combiner.scala src/library/scala/collection/parallel/ParIterableLike.scala src/library/scala/collection/parallel/mutable/ParCtrie.scala
| * Whitespace commit.Paul Phillips2012-02-2997-680/+679
| | | | | | | | | | | | | | Removed all the trailing whitespace to make eugene happier. Will try to keep it that way by protecting at the merge level. Left the tabs in place because they can't be uniformly changed to spaces, some are 2, some are 4, some are 8, whee.
| * Reworking synchronized patch.Paul Phillips2012-02-281-15/+0
| | | | | | | | Eliminated annotation and custom phase. Kept SYNCHRONIZED flag.
| * Merge remote-tracking branch 'szabolcsberecz/SI-64' into SI-64-freshPaul Phillips2012-02-281-0/+15
| |\
| | * replace methods containing a synchronized body with synchronized methodsSzabolcs Berecz2012-02-161-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following: def f = synchronized { ... } will be rewritten to: <synchronized> def f = ... which is then emitted to the classfile with the synchronized flag set. Inlining of such transformed methods are disabled for now This transformation is not done on methods defined in a trait.
| * | Specialized NonLocalReturnControl.Paul Phillips2012-02-272-3/+5
| | | | | | | | | | | | From the extempore archive of already implemented things.
| * | Improvement to API docs: GenTraversableLike and List. Fixes SI-5522.Heather Miller2012-02-252-1/+11
| | |
| * | Fleshed out the @elidable documentation.Paul Phillips2012-02-231-15/+43
| | |
| * | update api docs for @elidable to match the behaviour more closely.Szabolcs Berecz2012-02-231-4/+7
| | |
| * | One more to derive trees.Paul Phillips2012-02-231-4/+38
| | | | | | | | | | | | | | | | | | ClassDefs, CaseDefs, and LabelDefs. Dotting eyes, crossing tees. Point of diminishing returns is reached, declare victory and withdraw.
| * | Methods to derive ValDefs and Templates.Paul Phillips2012-02-231-0/+29
| | | | | | | | | | | | | | | | | | It's a lot like the last one. I also found trees being duplicated before being sent to the tree copier. Looks like xerox has gotten a mole in here. Trust no one.
* | | Add tasksupport as a configurable field in parallel collections.Aleksandar Prokopec2012-02-2315-220/+295
|/ / | | | | | | | | | | | | | | | | This required a bit of refactoring in the tasks objects and implementations of various operations. Combiners now hold a reference to a tasksupport object and pass it on to their result if `resultWithTaskSupport` is called. Additionally, several bugs that have to do with CanBuildFrom and combiner resolution have been fixed.
* | Methods to derive new DefDefs.Paul Phillips2012-02-231-1/+28
| | | | | | | | | | | | | | | | | | | | | | I guess I'd seen DefDef(mods, name, tparams, vparamss, tpt, rhs) one too many times and went a little crazy. What do you prefer: - val DefDef(mods, name, tparams, vparamss, tpt, rhs) = tree1 - treeCopy.DefDef(tree1, mods, name, tparams, vparamss, tpt, transform(rhs)) + deriveDefDef(tree1)(transform) Me too.
* | Specialize Tuple2 on more types.Paul Phillips2012-02-191-1/+1
| | | | | | | | This one is a no-brainer now.
* | Cleanup in aisle New.Paul Phillips2012-02-181-3/+2
| | | | | | | | More trees created more uniformly.
* | Fix for "type _$1 defined twice".Paul Phillips2012-02-175-143/+127
| | | | | | | | | | | | | | | | | | | | | | Actually not a fix, only a workaround. Package objects strike again: you don't want to have existentials in there, like this: private val resolverFunction: PartialFunction[Throwable, Try[_]] = ... There are a few irrelevant-to-that-bug changes included which I did while debugging and figured I'd keep them. With this patch I can merge/am merging the scala.concurrent work.
* | Merge remote-tracking branch 'phaller/execution-context' into feb17-alexPaul Phillips2012-02-1728-115/+2582
|\ \
| * | Disable execution context and futures implementation in the default package.Aleksandar Prokopec2012-02-168-9/+10
| | | | | | | | | | | | | | | | | | | | | Fixed some tests so that they work now. The Transactions.scala test was failing when defined in scala.concurrent package, reporting that type `_$1` is defined twice. Until we figure out the reason for this, the package name in that test is renamed.
| * | Merge branch 'master' into execution-contextAleksandar Prokopec2012-02-16135-1152/+3891
| |\ \ | | | | | | | | | | | | | | | | Conflicts: src/library/scala/package.scala
| * | | Change the default reportFailure implementation.Aleksandar Prokopec2012-02-031-2/+3
| | | |
| * | | Fix typo in Future trait. Simplify recoverWith.Philipp Haller2012-02-031-5/+2
| | | |
| * | | Rename to recoverWith and fallbackTo in Future.aleksandar2012-02-011-2/+2
| | | |
| * | | Replaced Either with Try throughout scala.concurrent.Heather Miller2012-01-319-115/+122
| | | |
| * | | Add some missing methods, remove obsolete methods in futures.aleksandar2012-01-306-36/+41
| | | | | | | | | | | | | | | | | | | | | | | | Remove `ensure`. Add `reportFailure` to execution contexts. Add `zip` to futures.
| * | | Refactor the Try monad a bit.aleksandar2012-01-301-45/+37
| | | |
| * | | Changed the comments a bit, removed on* methods on Try.aleksandar2012-01-301-55/+32
| | | |
| * | | Added first cut of Try type, refactored from twitter util.Heather Miller2012-01-301-0/+196
| | | |
| * | | Merge branch 'execution-context' of https://github.com/phaller/scala into ↵Vojin Jovanovic2012-01-271-20/+66
| |\ \ \ | | | | | | | | | | | | | | | execution-context
| | * | | Implement the ensure and andThen methods on futures.aleksandar2012-01-271-1/+56
| | | | |
| | * | | Change the implementation of the future failed projection.aleksandar2012-01-271-20/+11
| | | | |
| * | | | Merge branch 'master' into execution-contextVojin Jovanovic2012-01-2533-61/+837
| |\ \ \ \ | | |/ / / | |/| | |
| * | | | Removed the nondeterministic implicit. Added rescue.aleksandar2012-01-246-54/+74
| | | | |
| * | | | Fixed the way callbacks are handled. Removed executor from base future trait.aleksandar2012-01-234-14/+13
| | | | |
| * | | | Add implicit for duration.aleksandar2012-01-201-0/+7
| | | | |
| * | | | Add NonDeterministic evidence needed to call nondeterministic methods.aleksandar2012-01-196-54/+91
| | | | |
| * | | | Add implicit conversion for futures that enables calling nondeterministic ↵aleksandar2012-01-194-100/+113
| | | | | | | | | | | | | | | | | | | | methods.
| * | | | Deprecating some traits in scala.concurrent.aleksandar2012-01-1910-5/+23
| | | | |
| * | | | Fix `all` combinator on futures, refactor execution context, remove disabled ↵aleksandar2012-01-197-1262/+88
| | | | | | | | | | | | | | | | | | | | files.
| * | | | Added implementations for any and find on collections of futures.Heather Miller2012-01-193-7/+55
| | | | |
| * | | | Refactor concurrent package and execution contexts.aleksandar2012-01-167-55/+101
| | | | |
| * | | | Work in progress.brijest2012-01-166-19/+48
| | | | |