| 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`.
|
|
|
|
|
|
| |
Rather than as @deprecated.
This commit means we can no longer build against 2.10.0.
|
|
|
|
|
|
| |
- 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.
|
|\ \
| |/
|/| |
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
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
We can then use this as a replacement for `Future { expr }`.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Adapt the compiler's standard ResetAttrs to keep
This() nodes don't refer to a symbol defined in the
current async block.
|
|
|
|
|
|
|
|
| |
There is a fly in the ointment: any This() trees in the provided
code are getting rebound to this class. Sounds like more
resetAttrs fun ahead.
The object also serves as the Future {} thunk.
|
|
|
|
|
|
|
| |
Any vals referred to in the body of these
must also be lifted.
Fixes #36
|
| |
|
| |
|
|
|
|
| |
Goal is to make ExprBuilder less cluttered.
|
| |
|
| |
|
|
|
|
|
| |
Seeing as we know in advance the full set of lifted vars,
we don't need to thread this information through ExprBuilder.
|
| |
|
|
|
|
|
|
|
|
| |
Prepend {(); ... } before starting the ANF transform.
Add tracing to the anf/inline transform.
Also enables and addresses SIP-18 warnings.
|
|
|
|
|
|
|
|
| |
- transform the provided tree using reflect.internal.Symbols#Symbol.name_=
and treeCopy.{Ident, Select}.
- not sure if this is possible within the public Symbol API.
- move checking for unsupported nested module/class to AsyncAnalysis.
- make block merging selective (only do so if there are nested await calls.)
|
| |
|
|
|
|
|
|
|
|
| |
- corrects detection of await calls in the ANF transform.
- Split AsyncAnalyzer into two parts. Unsupported await
detection must happen prior to the async transform to
prevent the ANF lifting out by-name arguments to
vals and hence changing the semantics.
|
|
|
|
|
| |
- Move now-working duplicate definition tests from `neg` to `run`.
- Renames and small code beautification around the var lifting analysis
|
| |
|
|
|
|
|
|
| |
Change the way state IDs are allocated to avoid the need to ration them out.
Also make the logging tolerant of a toolbox setting that doesn't have a source file.
|
| |
|
| |
|
|
|
|
|
|
| |
Accurate reporting of misplaced awaits.
Attempt to collect the minimal set of vars to lift.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- Does not descend into class and module defs
- Adds several tests, including tests for if-else
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
- checks that only one function is synthesized
- checks the set of vars created (TODO minimize these)
- use x$1 rather than x1 for the freshened names for lifted vars.
- make execContext a val, not a var.
|
| |
|
|
|
|
| |
(onCompleteHandler and resume refer to each other)
|
| |
|
|
|
|
|
|
|
|
| |
We're now down to two inner classes per async block:
the `onComplete` function, and the by-name argument
to the initial call to `future`.
Also caches the execution context in a val.
|
|
|
|
| |
Rather than a function applied to the state.
|
| |
|
| |
|