aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/scala/async/AsyncAnalysis.scala
Commit message (Collapse)AuthorAgeFilesLines
* Address deprecation warnings in Scala 2.10.1Jason Zaugg2013-04-101-1/+1
|
* Resolve merge conflictphaller2012-12-191-5/+14
|\
| * New fix for #1861: Add fall-back to CPS for all unsupported uses of awaitphaller2012-12-191-4/+14
| | | | | | | | | | | | | | 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.
* | Prohibit lazy vals in async blocks.Jason Zaugg2012-12-101-3/+6
| |
* | Workaround non-idempotency of typing pattern matching anonymous functions.Jason Zaugg2012-12-101-10/+14
|/ | | | | | | - 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
* Rewrite the state machine to a class, rather than an object.Jason Zaugg2012-11-261-1/+2
| | | | | | | | | | | | 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.
* Lift local defs and functions.Jason Zaugg2012-11-261-6/+33
| | | | | | | Any vals referred to in the body of these must also be lifted. Fixes #36
* Fix await in if condition / match scrutinee.Jason Zaugg2012-11-261-3/+0
| | | | | | 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.
* Extract vals for all names bound in a pattern.Jason Zaugg2012-11-261-13/+16
| | | | | | | These gives us something to lift to vars to be accessed from multiple states of the state machine. Fixes #35
* Simplify attachCopy in TransformUtilsphaller2012-11-261-2/+2
| | | | This refactoring removes a group of factory methods.
* Remove modifiers of case class parametersphaller2012-11-261-1/+1
|
* Favouring composition over inheritance.Jason Zaugg2012-11-241-3/+6
|
* add missing copyrightJason Zaugg2012-11-241-0/+4
|
* Prohibit await in if condition (for now)Jason Zaugg2012-11-241-0/+4
| | | | | | Test nested loops. Control ANF tracing with another system property.
* Prohibit return.Jason Zaugg2012-11-231-0/+2
| | | | Closes #21
* Explicitly prohibit await in nested methods.Jason Zaugg2012-11-231-0/+4
|
* Support await in a while loop.Jason Zaugg2012-11-231-0/+2
|
* Test for await in while (currently forbidden).Jason Zaugg2012-11-231-2/+2
| | | | Lookup the ValDef symbol from Assign#rhs.symbol.
* Forbid await in try/catch.Jason Zaugg2012-11-231-0/+10
|
* Tightenen up modifiers and other refactoring.Jason Zaugg2012-11-231-1/+1
|
* Convert null check to an assert.Jason Zaugg2012-11-231-5/+4
| | | | We seem to be symful now.
* Ensure unique names for definitions in the async block.Jason Zaugg2012-11-231-4/+14
| | | | | | | | - 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.)
* Refactor the analyzers to a seprarate file.Jason Zaugg2012-11-221-0/+110