aboutsummaryrefslogtreecommitdiff
path: root/src/main
Commit message (Collapse)AuthorAgeFilesLines
* Turn object into defphaller2012-11-261-12/+11
|
* Simplify attachCopy in TransformUtilsphaller2012-11-263-39/+14
| | | | This refactoring removes a group of factory methods.
* Remove modifiers of case class parametersphaller2012-11-264-4/+4
|
* Refactor some tree creation from Async to ExprBuilder.Jason Zaugg2012-11-243-72/+89
|
* Tiny aesthetic refactorings.Jason Zaugg2012-11-242-14/+14
|
* Refactoring to avoid unneeded mutable fields.Jason Zaugg2012-11-241-34/+21
| | | | Brings uniformity to the result generation of AsyncStateBuilder.
* Refactoring to use AwaitableJason Zaugg2012-11-241-19/+16
| | | | Rather than three separate parameters.
* Refactor AsyncState heirarchy.Jason Zaugg2012-11-241-34/+38
| | | | | No more extension from concrete classes; no more dummy values for nextState.
* More refactoring in ExprBuilder.Jason Zaugg2012-11-241-41/+33
| | | | | | - Moving some private methods out of the top-billing at the head of the file - Replace three nullable fields with one Option.
* Address a little duplication in ExprBuilder.Jason Zaugg2012-11-241-20/+19
|
* More small refactorings.Jason Zaugg2012-11-243-27/+14
| | | | Goal is to make ExprBuilder less cluttered.
* Refactor name substitution out of ExprBuilder.Jason Zaugg2012-11-242-12/+17
|
* Favouring composition over inheritance.Jason Zaugg2012-11-245-31/+31
|
* add missing copyrightJason Zaugg2012-11-248-5/+18
|
* Refine tracing of ANF.Jason Zaugg2012-11-241-2/+3
| | | | - show the AST on one line.
* Centralize naming.Jason Zaugg2012-11-243-29/+33
|
* Cleanup var lifting.Jason Zaugg2012-11-242-33/+12
| | | | | Seeing as we know in advance the full set of lifted vars, we don't need to thread this information through ExprBuilder.
* Cleaner while rewritingJason Zaugg2012-11-242-21/+22
| | | | | | | -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() }.
* Prohibit await in if condition (for now)Jason Zaugg2012-11-243-6/+14
| | | | | | 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-232-0/+8
|
* Enable debug logging with a system property.Jason Zaugg2012-11-231-1/+1
|
* Support await in a while loop.Jason Zaugg2012-11-234-15/+52
|
* Test for await in while (currently forbidden).Jason Zaugg2012-11-232-3/+3
| | | | 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-234-18/+13
|
* Fix #31, Unfinished ANF transformJason Zaugg2012-11-232-9/+33
| | | | | | | | Prepend {(); ... } before starting the ANF transform. Add tracing to the anf/inline transform. Also enables and addresses SIP-18 warnings.
* 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-234-17/+80
| | | | | | | | - 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-224-124/+218
| | | | | | | | - 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.
* Cleanups and docs.Jason Zaugg2012-11-222-64/+76
| | | | | - 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-222-70/+67
|
* Preserve ValDef symbol.Jason Zaugg2012-11-212-1/+5
|
* Only transform if/match-s that contain an await.Jason Zaugg2012-11-212-2/+91
| | | | | | 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
|
* Remove obsolete transformationsphaller2012-11-211-3/+3
|
* Change type of name mapphaller2012-11-212-9/+10
|
* Generate cleaner code for Unit-typed if-else expressionsphaller2012-11-161-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
|