diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-02-14 16:42:22 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-02-15 13:05:57 +0100 |
commit | 2216c68fcc104c3a9a40fcbec8b0654f5f2bb6c2 (patch) | |
tree | 31db3ba4fb3e0dae62bade80844a176b5ad76d01 /src/main/scala/scala/async/internal/AsyncBase.scala | |
parent | 38a85e7196c843d43fd61203c06903bc0cb53a46 (diff) | |
download | scala-async-2216c68fcc104c3a9a40fcbec8b0654f5f2bb6c2.tar.gz scala-async-2216c68fcc104c3a9a40fcbec8b0654f5f2bb6c2.tar.bz2 scala-async-2216c68fcc104c3a9a40fcbec8b0654f5f2bb6c2.zip |
removes logic that branches on forInteractive
Diffstat (limited to 'src/main/scala/scala/async/internal/AsyncBase.scala')
-rw-r--r-- | src/main/scala/scala/async/internal/AsyncBase.scala | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/main/scala/scala/async/internal/AsyncBase.scala b/src/main/scala/scala/async/internal/AsyncBase.scala index c9cd101..537385f 100644 --- a/src/main/scala/scala/async/internal/AsyncBase.scala +++ b/src/main/scala/scala/async/internal/AsyncBase.scala @@ -46,24 +46,15 @@ abstract class AsyncBase { import compat._ val asyncMacro = AsyncMacro(c, self) - val isPresentationCompiler = asyncMacro.global.forInteractive - val code = asyncMacro.asyncTransform[T]( body.tree.asInstanceOf[asyncMacro.global.Tree], execContext.tree.asInstanceOf[asyncMacro.global.Tree] )(implicitly[c.WeakTypeTag[T]].asInstanceOf[asyncMacro.global.WeakTypeTag[T]]).asInstanceOf[Tree] - AsyncUtils.vprintln(s"async state machine transform expands to:\n ${code}") - val result = if (isPresentationCompiler) { - asyncMacro.suppressExpansion() - c.macroApplication - } else { - // Mark range positions for synthetic code as transparent to allow some wiggle room for overlapping ranges - for (t <- code) - t.pos = t.pos.makeTransparent - code - } - c.Expr[futureSystem.Fut[T]](result) + + // Mark range positions for synthetic code as transparent to allow some wiggle room for overlapping ranges + for (t <- code) t.pos = t.pos.makeTransparent + c.Expr[futureSystem.Fut[T]](code) } protected[async] def awaitMethod(u: Universe)(asyncMacroSymbol: u.Symbol): u.Symbol = { |