aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 0.9.0-M3v0.9.0-M3Jason Zaugg2013-11-201-1/+1
|
* Merge pull request #42 from retronym/topic/hooksJason Zaugg2013-11-204-12/+58
|\ | | | | Hooks for custom async implementations
| * Abstract over use of scala.util.TryJason Zaugg2013-11-134-11/+52
| | | | | | | | | | Custom implementation of the async macro may choose to use a different data type to represent `Throwable | A`.
| * Add a hook for post-ANF transformationJason Zaugg2013-11-132-1/+6
| | | | | | | | For use by custom implementations of the async macro.
* | Merge pull request #46 from retronym/topic/pres-compiler-npeJason Zaugg2013-11-203-7/+31
|\ \ | | | | | | Presentation compiler friendliness
| * | Less hacky check for presentation compiler.Jason Zaugg2013-11-201-1/+1
| | | | | | | | | | | | "There's a method for that!"
| * | Return original macro application under presentation compiler.Jason Zaugg2013-11-202-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now, the body of an async block suffers from diminished IDE support: most notably hyperlinking doesn't work [1]. During the course of the blackbox/whitebox macro discussion, we've often talked about how the former give us the latitude to simply disable macro expansion in the IDE so we could get these features working again, at the cost of losing domain specific errors, such as "await must not be used under a nested function". But why not have our cake and eat too? This commit detects if we are running the presentation compiler and, after running our regular macro, returns the original macro application. We need to annotate that tree to prevent the typechecker from stubbornly calling our macro again. EXPERIMENTAL NOTE: This logic shouldn't live in macros: this is just a short term measure. If these experiments in async prove successful, we'll roll something similar into the macro expansion engine itself. TODO: as a performance optimization, we could just run the "unsupported await" checks, and avoid doing the more expensive state machine transformation. [1] https://www.assembla.com/spaces/scala-ide/tickets/1001449-code-navigation-fails-when-macros-are-used#/activity/ticket:
| * | Fix a NPE in the presentation compilerJason Zaugg2013-11-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were using a TypingTransformer and we called `atOwner` before we had called `transform`. This meant that `currTree` was null, which was observed when that was passed to `Context#make`. IDE ticket: https://scala-ide-portfolio.assembla.com/spaces/scala-ide/tickets/1001971#/activity/ticket: Stack trace: exception during macro expansion: java.lang.NullPointerException at scala.tools.nsc.interactive.ContextTrees$class.addContext(ContextTrees.scala:78) at scala.tools.nsc.interactive.Global.addContext(Global.scala:28) at scala.tools.nsc.interactive.Global.registerContext(Global.scala:268) at scala.tools.nsc.typechecker.Contexts$Context.make(Contexts.scala:295) at scala.tools.nsc.typechecker.Contexts$Context.make0(Contexts.scala:320) at scala.tools.nsc.typechecker.Contexts$Context.make(Contexts.scala:327) at scala.tools.nsc.typechecker.Typers$Typer.atOwner(Typers.scala:5662) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:33) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:28) at scala.async.internal.AsyncTransform$class.fixup$1(AsyncTransform.scala:191)
* | | Update README.mdPhilipp Haller2013-11-181-1/+1
|/ / | | | | Fixes #45
* | Merge pull request #44 from phaller/topic/cleanup-43Philipp Haller2013-11-151-10/+2
|\ \ | | | | | | Clean-ups found during review of PR #43
| * | Clean-ups found during review of PR #43Philipp Haller2013-11-141-10/+2
|/ /
* | Merge pull request #43 from retronym/ticket/icode-crasherPhilipp Haller2013-11-142-37/+94
|\ \ | | | | | | Fix crasher in icode due to symbol mismatches in lifted methods
| * | Fix crasher in icode due to symbol mismatches in lifted methodsJason Zaugg2013-11-142-37/+94
|/ / | | | | | | | | | | | | | | | | These stem from the handling of the internal/external view or method type parameters by `thisMethodType` in `Namers`. I've now preseversed the orginal ValDefs favoured the latter when constructing the new DefDef, and made construction of all liftables consistent in this regard.
* / Update README.mdJason Zaugg2013-11-131-0/+3
|/ | | Link to CI status
* Merge pull request #41 from retronym/topic/travisJason Zaugg2013-11-131-0/+13
|\ | | | | Enable Travis CI
| * Enable Travis CIJason Zaugg2013-11-131-0/+13
| |
* | Merge pull request #40 from retronym/topic/live-var-captureJason Zaugg2013-11-135-18/+205
|\ \ | |/ |/| Don't aggressively null out captured vars
| * Don't aggressively null out captured varsJason Zaugg2013-11-125-18/+205
|/ | | | | Once they escape, we leave the references in the state machines fields untouched.
* 0.9.0-SNAPSHOTJason Zaugg2013-11-071-1/+1
|
* Merge pull request #38 from phaller/topic/cleanup-cps-fallbackv0.9.0-M2Jason Zaugg2013-11-072-5/+3
|\ | | | | Remove left-overs of CPS fallback logic
| * Remove left-overs of CPS fallback logicPhilipp Haller2013-11-072-5/+3
| | | | | | | | Completes removal performed in #37.
* | Remove unneeded level from the group id.Jason Zaugg2013-11-072-2/+2
| |
* | v0.9.0-M2Jason Zaugg2013-11-071-1/+1
|/
* Update documentationJason Zaugg2013-11-072-7/+7
|
* Update and split the READMEJason Zaugg2013-11-072-189/+194
|
* Merge pull request #37 from retronym/topic/cleanup-cps-and-awaitJason Zaugg2013-11-0719-438/+81
|\ | | | | Minimize the public API
| * Remove scala.async.StateMachineJason Zaugg2013-11-073-20/+9
| | | | | | | | | | | | The generated code can simply extends Function1 and Function0. This class was a hacky means to get the macro working a long time ago.
| * Minimize the public APIJason Zaugg2013-11-0718-420/+74
|/ | | | | | | | | | - 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.
* Use publishSigned in the release process.Jason Zaugg2013-11-071-2/+7
|
* Merge pull request #36 from retronym/release/0.9.0-M1Jason Zaugg2013-11-072-0/+37
|\ | | | | Release/0.9.0 m1
| * document release scriptJason Zaugg2013-11-071-1/+8
| |
| * 0.9.0-SNAPSHOTJason Zaugg2013-11-071-1/+1
| |
| * 0.9.0-M1v0.9.0-M1Jason Zaugg2013-11-071-1/+1
| |
| * Release scriptJason Zaugg2013-11-071-0/+28
| |
| * Scala 2.11 compatibilityJason Zaugg2013-11-072-1/+17
| | | | | | | | | | | | We were relying on an internal API that no longer exists. We also need to tweak the way our tests infer scalaBinaryVersion.
* | Scala 2.11 compatibilityJason Zaugg2013-11-071-1/+15
|/ | | | We were relying on an internal API that no longer exists.
* Build changes before the first binary release.Jason Zaugg2013-11-071-1/+4
|
* Build changes before the first binary release.Jason Zaugg2013-11-072-3/+22
|
* Merge pull request #35 from phaller/issue/memory-retentionJason Zaugg2013-10-268-25/+444
|\ | | | | Liveness analysis to avoid memory retention issues
| * Add more doc commentsPhilipp Haller2013-10-221-1/+8
| |
| * Avoid zero-ing out dead fields of primitive value class typePhilipp Haller2013-10-223-14/+126
| | | | | | | | | | - Zero out fields of type Any - Zero out fields of value class type
| * Enables testing the resetting of lifted local variablesPhilipp Haller2013-10-226-8/+81
| | | | | | | | | | | | | | - Adds a hook that lets a derived macro insert additional code when zero-ing out a lifted field. - Adds a variant of the `AsyncId` macro that logs zeroed-out fields. - Adds a test using this mechanism
| * Fix looping issue when computing last usages of fieldsPhilipp Haller2013-10-222-23/+20
| | | | | | | | | | - A missing condition could cause an infinite loop - Various clean-ups
| * Liveness analysis to avoid memory retention issuesPhilipp Haller2013-10-224-18/+248
|/ | | | | | | | - Iterative, backwards data-flow analysis - Make sure fields captured by nested defs are never zeroed out. This is done elegantly by declaring such fields a being live at the exit of the final state; thus, they will never be zeroed out.
* Merge pull request #34 from phaller/topic/docs-cleanupsJason Zaugg2013-10-185-34/+49
|\ | | | | Various clean-ups and docs
| * More complete doc commentsPhilipp Haller2013-10-181-19/+33
| |
| * Simplify a generated CaseDef tree in resume methodPhilipp Haller2013-10-181-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OLD: case (throwable @ _) if NonFatal.apply(throwable) => { { stateMachine$1.this.result.complete(Failure.apply[Nothing](throwable)); () }; () } NEW: case (throwable @ _) if NonFatal.apply(throwable) => { stateMachine$1.this.result.complete(Failure.apply[Nothing](throwable)); () }
| * Minor clean-upsPhilipp Haller2013-10-183-10/+12
| |
| * Update Scala and sbt versionsPhilipp Haller2013-10-182-2/+2
|/
* Merge pull request #33 from retronym/topic/while-exprJason Zaugg2013-10-152-2/+20
|\ | | | | Handle while loops as expressions in ANF transform.