| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
- async { } block can now generate a subclass of an existing trait
- future system can directly return the state machine instance
from async, without spawning an actual future
- adds iterator-based async implementation with future system
|
|
|
|
| |
Removes method `TransformUtils.applied`.
|
|
|
|
|
| |
Adds `Result[A]` type member to `FutureSystem` and
`def resultType[A]` to `FutureSystem#Ops`.
|
| |
|
|
|
|
|
|
|
|
|
| |
Adds the following methods to `FutureSystem#Ops`:
def isFailedResult(name: TermName): Expr[Boolean]
def resultValue(name: TermName, resultType: Type): Tree
Introduces `TryBasedFutureSystem` trait.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces the single, `Try`-dependent `completeProm` method with:
def completeProm[A: WeakTypeTag](
prom: Expr[Prom[A]], value: Expr[A]): Expr[Unit]
def completePromWithExceptionTopLevel[A: WeakTypeTag](
prom: Expr[Prom[A]], exception: Expr[Throwable]): Expr[Unit]
def completePromWithFailedResult[A: WeakTypeTag](
prom: Expr[Prom[A]], resultName: TermName): Expr[Unit]
|
|\
| |
| | |
Mark `await` as @compileTimeOnly
|
|/
|
|
|
|
| |
Rather than as @deprecated.
This commit means we can no longer build against 2.10.0.
|
|\
| |
| | |
Allow await in applications with multiple argument lists
|
| |
| |
| |
| | |
Addresses review comments
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before, we levied an implementation restriction to prevent
this. As it turned out, that needlessly prevented use of
`await` in the receiver of a multi-param-list application.
This commit lifts the restriction altogether, and treats
such applications holistically, being careful to preserve the
left-to-right evaluation order of arguments in the translated
code.
- use `TreeInfo.Applied` and `Type#paramss` from `reflect.internal`
to get the info we need
- use the parameter name for the lifted argument val, rather than
`argN`
- encapsulate handling of by-name-ness and parameter names
in `mapArgumentss`
- test for evaluation order preservation
|
|\ \
| | |
| | | |
Remove CPS dependency from default async implementation
|
|/ /
| |
| |
| |
| |
| | |
- move all CPS-related code to `continuations` sub package
- fix CPS-based async implementation
- enable testing of CPS-based async implementation
|
|\ \
| | |
| | | |
Scala 2.10.1 compatibility
|
| |/
| |
| |
| | |
We've got a perfectly good expression at hand.
|
| |
| |
| |
| | |
This time in the ANF/Inline transformation.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since SI-6187, the default case of a partial function is now included in the tree.
Before, it was a tree attachment, conditionally inserted in the pattern matcher.
I had hoped that that change would allow us to do away with
`RestorePatternMatchingFunctions` altogether, but it seems that
we aren't so lucky.
Instead, I've adapted that transformer to account for the new scheme.
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
Update README.md
|
| |
| |
| | |
Technically line 5 is very blocking.
|
|\ \
| |/
|/| |
fix github url
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
This is a re-implementation of a previous fix. It is more modular, since
it enables the definition of a CPS-based fall-back as a subclass of `AsyncBase`.
Thus, it's possible to define fall-back-enabled subclasses of `AsyncBase`
targetting not only Scala Futures.
|
| | |
|
|\ \
| | |
| | | |
Topic/patmat partial function
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Undo the transformation that takes place in Typers to
leave us with Match(EmptyTree, cases).
- Make sure we don't descend into the cases of such a
tree when peforming the async transform
|
| |/
|/| |
|
|\ \
| | |
| | | |
Fix ANF transform involving `xs: _*` trees.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We need to unwrap and inline `xs`, then
rewrap the result expression with the wildcard
star.
Addresses the first half of #46.
|
|/ / |
|
| | |
|
|\|
| |
| | |
Ticket/33 by name 2
|
| |
| |
| |
| |
| |
| | |
We use `isExprSafeToInline` from the non-public reflection
API to check. In addtion, we now that an untyped Ident("await$N")
is also an inlinable expression.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We can allow it, but we need to treat nested
Apply trees holistically, in order to lift out
all the arguments and maintain the correct
evaluation order.
Fixes #33.
|
|/
|
|
|
|
|
|
| |
- If we lift one arg, we must lift them all.
This preserves evaluation order.
- But, never lift an by-name arg
Addresses the first half of #33.
|
| |
|
|
|
|
|
|
| |
And change TreeInterrogation to set if via this means,
rather than through a direct means, which seems to
assume too much about classloaders.
|
|\
| |
| | |
Topic/exception handling
|