| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| | |
- 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.
|
|/ / |
|
|/ |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This augments the on-complete handler for an async state with await as follows:
if (tr.isFailure)
result$async.complete(tr.asInstanceOf[Try[T]])
else {
<resultName> = tr.get.asInstanceOf[<resultType>]
<nextState>
<mkResumeApply>
}
|
|\
| |
| | |
Port futures tests of scala.concurrent
|
| | |
|
| |
| |
| |
| |
| |
| | |
These tests do not use async/await, yet.
Refs #23
|
| | |
|
| |
| |
| |
| | |
We can then use this as a replacement for `Future { expr }`.
|
| |
| |
| |
| |
| |
| | |
We need not, and should not, rename definitions
beyond the scope of the async transform, e.g.
in nested classes of function bodies.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| | |
The type-checking performed in ANF transform is
precarious, and needed to use the original condition/
scrutinee in a throwaway tree to get things to work.
|
| |
| |
| |
| |
| |
| |
| | |
These gives us something to lift to vars to be accessed
from multiple states of the state machine.
Fixes #35
|
| | |
|
|\ \
| | |
| | | |
Fix #19
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| | |
- Add tests where the result of an await is assigned to a variable external
to the async block.
- Clean up HygieneSpec.
|
| | |
|
| |
| |
| |
| | |
This refactoring removes a group of factory methods.
|
|/ |
|
| |
|
| |
|
|
|
|
| |
Brings uniformity to the result generation of AsyncStateBuilder.
|
|
|
|
| |
Rather than three separate parameters.
|
|
|
|
|
| |
No more extension from concrete classes; no more
dummy values for nextState.
|
|
|
|
|
|
| |
- Moving some private methods out of the top-billing at the
head of the file
- Replace three nullable fields with one Option.
|
| |
|
|
|
|
| |
Goal is to make ExprBuilder less cluttered.
|
| |
|
| |
|
| |
|
|
|
|
| |
- show the AST on one line.
|
| |
|
|
|
|
|
| |
Seeing as we know in advance the full set of lifted vars,
we don't need to thread this information through ExprBuilder.
|
|
|
|
|
|
|
| |
-preserve LabelDef symbols to allow use of Symbol,
rather than Names as map keys.
-a label jump overwrites the nextState of an AsyncState.
This is cleaner than inserting a return { state = 12; resume() }.
|
|
|
|
|
|
| |
Test nested loops.
Control ANF tracing with another system property.
|
|
|
|
| |
Closes #21
|
| |
|