aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Forbid await in try/catch.Jason Zaugg2012-11-232-0/+40
|
* Tightenen up modifiers and other refactoring.Jason Zaugg2012-11-234-18/+13
|
* Fix #31, Unfinished ANF transformJason Zaugg2012-11-235-12/+69
| | | | | | | | Prepend {(); ... } before starting the ANF transform. Add tracing to the anf/inline transform. Also enables and addresses SIP-18 warnings.
* Move TestUtils contents directly into the package object.Jason Zaugg2012-11-232-59/+42
| | | | Why suffer SI-4695 needlessly?
* Fix scaladoc formatting.Jason Zaugg2012-11-231-3/+3
|
* Preserve positions and attachments.Jason Zaugg2012-11-232-28/+78
| | | | | | | | | Not quite sure how to test this yet; the original trees coming from toolbox don't seem to come with position to start with. But this is a start.
* 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-236-49/+113
| | | | | | | | - 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.)
* Minor refactoring in ANF transform.Jason Zaugg2012-11-221-31/+27
|
* Add TODO comment.Jason Zaugg2012-11-221-1/+1
|
* Make the ANF transform more selective.Jason Zaugg2012-11-221-57/+52
|
* Refactor the analyzers to a seprarate file.Jason Zaugg2012-11-224-103/+114
|
* Lookup await symbol in AsyncBase.Jason Zaugg2012-11-221-3/+3
|
* Comment.Jason Zaugg2012-11-221-0/+2
|
* Support match as an expression.Jason Zaugg2012-11-228-152/+272
| | | | | | | | - 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.
* Merge pull request #25 from phaller/topic/minimal-var-lifting-2Philipp Haller2012-11-2210-102/+542
|\ | | | | Topic/minimal var lifting 2
| * Cleanups and docs.Jason Zaugg2012-11-224-123/+108
| | | | | | | | | | - Move now-working duplicate definition tests from `neg` to `run`. - Renames and small code beautification around the var lifting analysis
| * Remove unused imports.Jason Zaugg2012-11-221-8/+4
| |
| * Frugality is no longer required with state IDs.Jason Zaugg2012-11-223-56/+52
| | | | | | | | | | | | 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.
| * Minimize lifting of vars.Jason Zaugg2012-11-223-72/+68
| |
| * Preserve ValDef symbol.Jason Zaugg2012-11-213-2/+8
| |
| * Only transform if/match-s that contain an await.Jason Zaugg2012-11-215-6/+167
| | | | | | | | | | | | Accurate reporting of misplaced awaits. Attempt to collect the minimal set of vars to lift.
| * Slight simplification of in-flight type checking.Jason Zaugg2012-11-212-7/+6
| |
| * Disable parallel test execution.Jason Zaugg2012-11-211-0/+2
| | | | | | | | Due to a suspected bug in JUnit SBT integration.
| * Remove obsolete transformationsphaller2012-11-211-3/+3
| |
| * Change type of name mapphaller2012-11-212-9/+10
| |
| * Add negative tests for inlining blocks in ANF transformphaller2012-11-201-0/+57
| |
| * Generate cleaner code for Unit-typed if-else expressionsphaller2012-11-162-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 utilitiesphaller2012-11-163-21/+25
| |
| * Clean up and improve debug/error outputphaller2012-11-163-6/+5
| |
| * Add selective ANF transformphaller2012-11-164-12/+224
|/ | | | | - Does not descend into class and module defs - Adds several tests, including tests for if-else
* Fix typosphaller2012-11-121-2/+2
|
* Resolve feature warningsphaller2012-11-123-3/+5
|
* Reduce visibility of members of ExprBuilderphaller2012-11-122-14/+13
|
* Fix doc comment of awaitphaller2012-11-121-7/+7
|
* Merge pull request #9 from phaller/topic/local-classesPhilipp Haller2012-11-123-1/+130
|\ | | | | #8 - Clean compilation error when defining local class inside async block
| * Fix merge conflicts and testsphaller2012-11-1220-435/+611
| |\ | |/ |/|
* | Merge pull request #10 from phaller/topic/abstract-future-2Philipp Haller2012-11-1219-433/+601
|\ \ | | | | | | Topic/abstract future 2
| * | Add a test to interrogate the expanded tree.Jason Zaugg2012-11-114-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 Zaugg2012-11-113-85/+121
| | |
| * | Use a var rather than a lazy val to break a cycle.Jason Zaugg2012-11-111-4/+4
| | | | | | | | | | | | (onCompleteHandler and resume refer to each other)
| * | Refer to an relevant bug in the comments.Jason Zaugg2012-11-111-1/+1
| | |
| * | Collapse all the onComplete handlers into a single function.Jason Zaugg2012-11-113-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 Zaugg2012-11-112-24/+9
| | | | | | | | | | | | Rather than a function applied to the state.
| * | Shuffle a bit more code around.Jason Zaugg2012-11-113-32/+19
| | |
| * | Synthesize `case 23 => rhs` rather than `case any @ (_: Int) if any == 25)`Jason Zaugg2012-11-112-14/+1
| | |
| * | Synthesize a Function1, rather than a PartialFunction.Jason Zaugg2012-11-112-43/+14
| | |
| * | Minor refactoringsJason Zaugg2012-11-112-19/+19
| | |
| * | Deleting unused code.Jason Zaugg2012-11-111-143/+1
| | |
| * | Synthesize a single PartialFunction rather than two and an orElse call.Jason Zaugg2012-11-102-30/+33
| | | | | | | | | | | | Give the handler a real class name.