| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
| |
By declararing the parameter of `async` as by-name.
Fixes #150 (the bug in the original ticket.)
|
|
|
|
|
|
|
|
| |
- Link to the 2.10.x branch from the README
- use `scala.annotation.compileTimeOnly` (from scala-library.jar)
- no longer impose a transitive dependency on scala-reflect and
scala-compiler.
- Update Travis CI configuration to use only 2.11.0-SNAPSHOT
|
|
|
|
| |
2013 must have been unlucky.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Remove the CPS fallback version of async. That was not intended
to be part of 1.0.
- Lookup the await method beside the macro, rather than requiring
all calls to go to AsyncBase.await.
- Create a minimal version of Async that just contains await/async
and delegates to the macro implementation in internal._
- Add scaladoc.
|
|
|
|
|
| |
If we intend to keep CPS fallback around for any length of time
it should probably move there too.
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Avoid reset + retypecheck, instead hang onto the original types/symbols
- Eliminated duplication between AsyncDefinitionUseAnalyzer and ExprBuilder
- Instead, decide what do lift *after* running ExprBuilder
- Account for transitive references local classes/objects and lift them
as needed.
- Make the execution context an regular implicit parameter of the macro
- Fixes interaction with existential skolems and singleton types
Fixes #6, #13, #16, #17, #19, #21.
|
|
|
|
|
|
| |
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.
|
| |
|