Skip to content

Commit 877bef6

Browse files
committed
Merge pull request #38 from phaller/topic/cleanup-cps-fallback
Remove left-overs of CPS fallback logic
2 parents 8e1f8a9 + 1ef0edf commit 877bef6

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/main/scala/scala/async/internal/AsyncBase.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ abstract class AsyncBase {
3939
@compileTimeOnly("`await` must be enclosed in an `async` block")
4040
def await[T](awaitable: futureSystem.Fut[T]): T = ???
4141

42-
protected[async] def fallbackEnabled = false
43-
4442
def asyncImpl[T: c.WeakTypeTag](c: Context)
4543
(body: c.Expr[T])
4644
(execContext: c.Expr[futureSystem.ExecContext]): c.Expr[futureSystem.Fut[T]] = {
@@ -50,8 +48,8 @@ abstract class AsyncBase {
5048

5149
val code = asyncMacro.asyncTransform[T](
5250
body.tree.asInstanceOf[asyncMacro.global.Tree],
53-
execContext.tree.asInstanceOf[asyncMacro.global.Tree],
54-
fallbackEnabled)(implicitly[c.WeakTypeTag[T]].asInstanceOf[asyncMacro.global.WeakTypeTag[T]]).asInstanceOf[Tree]
51+
execContext.tree.asInstanceOf[asyncMacro.global.Tree]
52+
)(implicitly[c.WeakTypeTag[T]].asInstanceOf[asyncMacro.global.WeakTypeTag[T]]).asInstanceOf[Tree]
5553

5654
// Mark range positions for synthetic code as transparent to allow some wiggle room for overlapping ranges
5755
for (t <- code)

src/main/scala/scala/async/internal/AsyncTransform.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ trait AsyncTransform {
77

88
val asyncBase: AsyncBase
99

10-
def asyncTransform[T](body: Tree, execContext: Tree, cpsFallbackEnabled: Boolean)
10+
def asyncTransform[T](body: Tree, execContext: Tree)
1111
(resultType: WeakTypeTag[T]): Tree = {
1212

1313
// We annotate the type of the whole expression as `T @uncheckedBounds` so as not to introduce

0 commit comments

Comments
 (0)