| 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]
|
|
|
|
|
|
| |
- move all CPS-related code to `continuations` sub package
- fix CPS-based async implementation
- enable testing of CPS-based async implementation
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
To avoid suprises in tree retyping, the instance of this
class is immediately upcase to
StateMachine[Promise[T], ExecContext].
Allow nested non-case classes. These pop up when
we use nested async calls.
Only look for duplicate names in the subtrees
traversed by AsyncTraverser.
|
| |
|
| |
|
| |
|
| |
|
|
- Refactor the base macro implementation to be
parameterized by a FutureSystem, which is defines
the triple of types (Future, Promise, ExecutionContext)
and the operations on those types (at the AST level)
- Cleanup generation of ASTs, in particular, use
reify more widely.
|