Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Generate cleaner code for Unit-typed if-else expressions | phaller | 2012-11-16 | 2 | -13/+39 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of generating an assignment to a Unit-typed variable, just add the Unit value after the if-else expression: [async] scala.async.Async.async[Unit]({ val f: scala.concurrent.Future[Int] = AnfTestClass.this.base(y); if (y.>(0)) State.result_=(scala.async.Async.await[Int](f).+(2)) else State.result_=(scala.async.Async.await[Int](f).-(2)) }) [async] ANF transform expands to: { val f: scala.concurrent.Future[Int] = AnfTestClass.this.base(y); if (y.>(0)) { val await$8: Int = scala.async.Async.await[Int](f); State.result_=(await$8.+(2)) } else { val await$9: Int = scala.async.Async.await[Int](f); State.result_=(await$9.-(2)) }; () } | ||||
* | Add TransformUtils class for shared utilities | phaller | 2012-11-16 | 3 | -21/+25 |
| | |||||
* | Clean up and improve debug/error output | phaller | 2012-11-16 | 3 | -6/+5 |
| | |||||
* | Add selective ANF transform | phaller | 2012-11-16 | 4 | -12/+224 |
| | | | | | - Does not descend into class and module defs - Adds several tests, including tests for if-else | ||||
* | Fix typos | phaller | 2012-11-12 | 1 | -2/+2 |
| | |||||
* | Resolve feature warnings | phaller | 2012-11-12 | 3 | -3/+5 |
| | |||||
* | Reduce visibility of members of ExprBuilder | phaller | 2012-11-12 | 2 | -14/+13 |
| | |||||
* | Fix doc comment of await | phaller | 2012-11-12 | 1 | -7/+7 |
| | |||||
* | Merge pull request #9 from phaller/topic/local-classes | Philipp Haller | 2012-11-12 | 3 | -1/+130 |
|\ | | | | | #8 - Clean compilation error when defining local class inside async block | ||||
| * | Fix merge conflicts and tests | phaller | 2012-11-12 | 20 | -435/+611 |
| |\ | |/ |/| | |||||
* | | Merge pull request #10 from phaller/topic/abstract-future-2 | Philipp Haller | 2012-11-12 | 19 | -433/+601 |
|\ \ | | | | | | | Topic/abstract future 2 | ||||
| * | | Add a test to interrogate the expanded tree. | Jason Zaugg | 2012-11-11 | 4 | -6/+49 |
| | | | | | | | | | | | | | | | | | | | | | - 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. | ||||
| * | | Fixes #7, allow async blocks without await or with a single expression. | Jason Zaugg | 2012-11-11 | 3 | -85/+121 |
| | | | |||||
| * | | Use a var rather than a lazy val to break a cycle. | Jason Zaugg | 2012-11-11 | 1 | -4/+4 |
| | | | | | | | | | | | | (onCompleteHandler and resume refer to each other) | ||||
| * | | Refer to an relevant bug in the comments. | Jason Zaugg | 2012-11-11 | 1 | -1/+1 |
| | | | |||||
| * | | Collapse all the onComplete handlers into a single function. | Jason Zaugg | 2012-11-11 | 3 | -46/+68 |
| | | | | | | | | | | | | | | | | | | | | | | | | 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. | ||||
| * | | Synthezise a match directly. | Jason Zaugg | 2012-11-11 | 2 | -24/+9 |
| | | | | | | | | | | | | Rather than a function applied to the state. | ||||
| * | | Shuffle a bit more code around. | Jason Zaugg | 2012-11-11 | 3 | -32/+19 |
| | | | |||||
| * | | Synthesize `case 23 => rhs` rather than `case any @ (_: Int) if any == 25)` | Jason Zaugg | 2012-11-11 | 2 | -14/+1 |
| | | | |||||
| * | | Synthesize a Function1, rather than a PartialFunction. | Jason Zaugg | 2012-11-11 | 2 | -43/+14 |
| | | | |||||
| * | | Minor refactorings | Jason Zaugg | 2012-11-11 | 2 | -19/+19 |
| | | | |||||
| * | | Deleting unused code. | Jason Zaugg | 2012-11-11 | 1 | -143/+1 |
| | | | |||||
| * | | Synthesize a single PartialFunction rather than two and an orElse call. | Jason Zaugg | 2012-11-10 | 2 | -30/+33 |
| | | | | | | | | | | | | Give the handler a real class name. | ||||
| * | | Remove unneed (). | Jason Zaugg | 2012-11-09 | 1 | -5/+2 |
| | | | |||||
| * | | Test with less trivial types. | Jason Zaugg | 2012-11-09 | 1 | -0/+39 |
| | | | | | | | | | | | | Works like it says on the box. | ||||
| * | | Avoid hygiene problems by suffixing result/result/state. | Jason Zaugg | 2012-11-09 | 3 | -8/+67 |
| | | | | | | | | | | | | Perhaps we should freshen them, but that will be a little awkward in our reify block. | ||||
| * | | Doc fix. | Jason Zaugg | 2012-11-09 | 1 | -2/+3 |
| | | | |||||
| * | | Remove sleeps from the tests. | Jason Zaugg | 2012-11-09 | 10 | -14/+0 |
| | | | |||||
| * | | Further cleanup in AST generation | Jason Zaugg | 2012-11-09 | 2 | -84/+104 |
| | | | | | | | | | | | | | | | | | | | | | | | | - centralize names - centralize more module/class lookup - reduce duplication - centralize use of resetAllAttrs - remove uses of asInstanceOf | ||||
| * | | Abstract over the future implementation. | Jason Zaugg | 2012-11-09 | 3 | -167/+341 |
|/ / | | | | | | | | | | | | | | | | | - 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. | ||||
| * | Reject local object definitions | phaller | 2012-11-09 | 2 | -0/+17 |
| | | |||||
| * | Add comment, and decode class names | phaller | 2012-11-09 | 2 | -1/+19 |
| | | |||||
| * | Make test names uniform | phaller | 2012-11-09 | 1 | -4/+4 |
| | | |||||
| * | Reject local classes without crashing | phaller | 2012-11-09 | 3 | -45/+86 |
| | | |||||
| * | Add failing test case for local classes inside async blocks | phaller | 2012-11-09 | 1 | -0/+45 |
|/ | |||||
* | Fix bash build script | phaller | 2012-11-07 | 1 | -1/+1 |
| | |||||
* | Merge pull request #5 from phaller/wip-match | Jason Zaugg | 2012-11-06 | 2 | -23/+152 |
|\ | | | | | Support await inside match expressions | ||||
| * | Support await inside match expressions | phaller | 2012-11-06 | 2 | -23/+152 |
| | | |||||
* | | Merge pull request #6 from phaller/topic/fresh | Philipp Haller | 2012-11-06 | 2 | -7/+2 |
|\ \ | | | | | | | Use the fresh name generator provided by the macro API. | ||||
| * | | Use the fresh name generator provided by the macro API. | Jason Zaugg | 2012-11-06 | 2 | -7/+2 |
|/ / | |||||
* | | Use @deprecated as a poor-man's @compileTimeOnly | Jason Zaugg | 2012-11-06 | 5 | -25/+44 |
| | | | | | | | | This helps detect naked awaits. | ||||
* | | Merge pull request #4 from phaller/topic/sbt-build | Philipp Haller | 2012-11-05 | 39 | -1320/+651 |
|\| | | | | | Topic/sbt build | ||||
| * | Small cleanups in the tree crafting. | Jason Zaugg | 2012-11-05 | 2 | -136/+135 |
| | | | | | | | | | | | | - Use imports of c.universe._ rather than fully qualifying - Use attributed idents to refer to standard library symbols - Refactor duplicated code for default values | ||||
| * | Typo corrected. | Jason Zaugg | 2012-11-05 | 1 | -1/+1 |
| | | |||||
| * | File naming consistency. | Jason Zaugg | 2012-11-05 | 1 | -0/+0 |
| | | |||||
| * | Move test utils into a package object, rather than base class. | Jason Zaugg | 2012-11-05 | 11 | -50/+50 |
| | | |||||
| * | More verbosity for `sbt test`. | Jason Zaugg | 2012-11-05 | 1 | -0/+2 |
| | | | | | | | | So you know that something is happening... | ||||
| * | Expand build configuration. | Jason Zaugg | 2012-11-05 | 9 | -17/+55 |
| | | | | | | | | | | | | | | - Enable continuations plugin - Fill in project metadata - Enable stricter compiler options - satisfy -Xlint with some empty parens. | ||||
| * | Further (re-)moving files. | Jason Zaugg | 2012-11-05 | 6 | -0/+0 |
| | | |||||
| * | Update README | Jason Zaugg | 2012-11-05 | 1 | -36/+3 |
| | |