aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/scala/async/internal/AsyncAnalysis.scala
Commit message (Collapse)AuthorAgeFilesLines
* Reduce logging overhead and minor cleanupsRory Graves2017-06-211-3/+1
|
* Compatibility with Scala 2.12.0-RC1Jason Zaugg2016-09-081-0/+2
| | | | | | | | | | | | | | | | - method local lazy vals are now encoded as a single ValDef rather than a ValDef + DefDef pair. We need to treat ValDef-s with the LAZY flag in the same way as we used to treat the DefDef. - Rename one of the symbols `ANF,anf` in the same scope to avoid generating anonymous class names that differ only in case. The compiler warned about this one. - When patching the LabelDefs to have a `Unit` result type, propagate this other LabelDefs conclude with a jump to that label. Not sure why, but without this we now hit an error in the backend about the nonsensical attempt to emit a coercion from void to int. - Use crossScalaVersions in the build and update the Scala versions tested in CI.
* Avoid spurious "illegal await" error in IDE with nestingJason Zaugg2015-10-091-5/+15
| | | | | | | | | | | | | | | | | | | The presentation compiler runs with `-Ymacro-expand:discard`, which retains the macro expandee in the typechecked trees, rather than substituting in the expansion. This mode was motivated as a means to keep IDE functionality working (e.g. completion, navigation, refactoring) inside macro applications. However, if one has nested async macro applications, as reported in the IDE ticket: https://www.assembla.com/spaces/scala-ide/tickets/1002561 ... the expansion of the outer async application was reporting await calls enclosed by the inner async application. This change tweaks the traversers used for this analysis to stop whenever it sees an async.
* Incorporate pull request feedbackJason Zaugg2014-03-271-1/+1
| | | | | | | - remove unneeded `setType(NoType)`, which was leftover from my first attempts to find this bug. - fix typo in error message - optimize imports
* Allow lazy vals without await in the initializerJason Zaugg2014-03-271-3/+2
| | | | | | | | | | | | | | | | | | | | We were incorrectly typechecking the `ClassDef` of the state machine in the macro in a way that discarded the resulting trees, and only kept around the symbol. The led to the the macro engine retypechecking that node, which somehow led to duplicated lazy val initiaializer `DefDef`-s in the template, which manifest as a `VerifyError`. This commit: - rescues the typechecked `ClassDef` node from the eager typechecking by the macro - loosens the restriction on lazy vals in async blocks. They are still prohibited if they contain an await on the RHS - Adds a test that shows evalution is indeed lazy. Fixes #52
* AsyncMacro.global is goneEugene Burmako2014-02-151-1/+1
|
* cleans up AsyncAnalysisEugene Burmako2014-02-151-1/+1
|
* abort => c.abortEugene Burmako2014-02-151-3/+3
|
* silences a warning in AsyncAnalysisEugene Burmako2014-02-121-1/+1
|
* Update copyright years.Jason Zaugg2014-01-141-1/+1
| | | | 2013 must have been unlucky.
* Minimize the public APIJason Zaugg2013-11-071-5/+4
| | | | | | | | | | - 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.
* Disallow await in pattern guards (for now)Jason Zaugg2013-07-251-0/+3
|
* Move implementation details to scala.async.internal._.Jason Zaugg2013-07-071-0/+91
If we intend to keep CPS fallback around for any length of time it should probably move there too.