abstract class AsyncPhase extends SubComponent with Transform with TypingTransformers with AnfTransform with Lifter with LiveVariables
- Alphabetic
- By Inheritance
- AsyncPhase
- LiveVariables
- Lifter
- ExprBuilder
- AsyncAnalysis
- AnfTransform
- TransformUtils
- AsyncTransformStates
- TypingTransformers
- Transform
- SubComponent
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new AsyncPhase()
Type Members
-
abstract
class
StdPhase extends GlobalPhase
A standard phase template
A standard phase template
- Definition Classes
- SubComponent
-
class
Phase extends StdPhase
The phase defined by this transform
The phase defined by this transform
- Definition Classes
- Transform
-
abstract
class
ThicketTransformer extends TypingTransformer
A base class for typing transformers that need to perform "thicket expansion".
A base class for typing transformers that need to perform "thicket expansion". A thicket is the output of a transformation that is flattened into the enclosing block.
- Definition Classes
- TypingTransformers
-
abstract
class
TypingTransformer extends Global.Transformer
- Definition Classes
- TypingTransformers
-
final
class
AnfTransformer extends AnfTransform.TypingTransformer
Transform
tree
into "A-Normal Form", such that within subtrees that enclose anawait
:Transform
tree
into "A-Normal Form", such that within subtrees that enclose anawait
:if
,match
, and other control-flow constructs are only used as statements; they cannot be used as expressions;- calls to
await
are not allowed in compound expressions; - execution order is reified in the tree by extracting temporary vals
- Definition Classes
- AnfTransform
- final class AsyncTransformer extends TypingTransformer
-
trait
AsyncTraverser extends Global.Traverser
Descends into the regions of the tree that are subject to the translation to a state machine by
async
.Descends into the regions of the tree that are subject to the translation to a state machine by
async
. When a nested template, function, or by-name argument is encountered, the descent stops, andnestedClass
etc are invoked.- Definition Classes
- TransformUtils
-
final
class
MatchResultTransformer extends AnfTransform.ThicketTransformer
- Definition Classes
- AnfTransform
-
class
Tracing extends AnyRef
- Definition Classes
- AnfTransform
-
class
AsyncTransformState extends AnyRef
- Definition Classes
- AsyncTransformStates
-
trait
AsyncBlock extends AnyRef
- Definition Classes
- ExprBuilder
-
final
class
AsyncState extends AnyRef
- Definition Classes
- ExprBuilder
Abstract Value Members
-
abstract
val
global: Global
- Definition Classes
- AsyncTransformStates → TypingTransformers
-
abstract
val
runsAfter: List[String]
Names of phases that must run before this phase.
Names of phases that must run before this phase.
- Definition Classes
- SubComponent
-
abstract
val
runsRightAfter: Option[String]
Name of the phase that this phase must follow immediately.
Name of the phase that this phase must follow immediately.
- Definition Classes
- SubComponent
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from AsyncPhase to any2stringadd[AsyncPhase] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (AsyncPhase, B)
- Implicit
- This member is added by an implicit conversion from AsyncPhase to ArrowAssoc[AsyncPhase] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
lazy val
IllegalStateExceptionClass: Global.Symbol
- Definition Classes
- TransformUtils
-
lazy val
IllegalStateExceptionClass_NEW_String: Global.Symbol
- Definition Classes
- TransformUtils
-
def
adaptToUnit(rhs: List[Global.Tree]): Global.Block
- Definition Classes
- TransformUtils
-
def
addLabelState(label: Global.Symbol): Int
- Definition Classes
- ExprBuilder
-
final
def
afterOwnPhase[T](op: ⇒ T): T
- Definition Classes
- SubComponent
- Annotations
- @inline()
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
assignUnitType(t: Global.Tree): t.type
- Definition Classes
- TransformUtils
-
final
def
beforeOwnPhase[T](op: ⇒ T): T
- Definition Classes
- SubComponent
- Annotations
- @inline()
-
def
buildAsyncBlock(block: Global.Block): AsyncBlock
Uses
AsyncBlockBuilder
to create an instance ofAsyncBlock
.Uses
AsyncBlockBuilder
to create an instance ofAsyncBlock
.- block
a
Block
tree in ANF- returns
an
AsyncBlock
- Definition Classes
- ExprBuilder
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
containsAwait(t: Global.Tree): Boolean
Efficiently decorate each subtree within
t
with the result oft exists isAwait
, and return a function that can be used on derived trees to efficiently test the same condition.Efficiently decorate each subtree within
t
with the result oft exists isAwait
, and return a function that can be used on derived trees to efficiently test the same condition.If the derived tree contains synthetic wrapper trees, these will be recursed into in search of a sub tree that was decorated with the cached answer.
Requires markContainsAwaitTraverser has previously traversed
t
.- Definition Classes
- TransformUtils
-
final
def
deriveTree(tree: Global.Tree, exprType: Global.Type)(deriveExpr: (Global.Tree) ⇒ Global.Tree): Global.Tree
- Definition Classes
- TransformUtils
-
def
enabled: Boolean
Is this component enabled? Default is true.
Is this component enabled? Default is true.
- Definition Classes
- AsyncPhase → SubComponent
-
def
ensuring(cond: (AsyncPhase) ⇒ Boolean, msg: ⇒ Any): AsyncPhase
- Implicit
- This member is added by an implicit conversion from AsyncPhase to Ensuring[AsyncPhase] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (AsyncPhase) ⇒ Boolean): AsyncPhase
- Implicit
- This member is added by an implicit conversion from AsyncPhase to Ensuring[AsyncPhase] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): AsyncPhase
- Implicit
- This member is added by an implicit conversion from AsyncPhase to Ensuring[AsyncPhase] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): AsyncPhase
- Implicit
- This member is added by an implicit conversion from AsyncPhase to Ensuring[AsyncPhase] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
fieldsToNullOut(asyncStates: List[AsyncState], finalState: AsyncState, liftables: List[Global.Tree]): LinkedHashMap[Int, (LinkedHashSet[Global.Symbol], LinkedHashSet[Global.Symbol])]
Live variables data-flow analysis.
Live variables data-flow analysis.
Find, for each lifted field, the last state where the field is used.
- asyncStates
the states of an
async
block- liftables
the lifted fields
- returns
a map which indicates fields which are used for the final time in each state.
- Definition Classes
- LiveVariables
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
flattenBlock(tree: Global.Tree)(f: (Global.Tree) ⇒ Unit): Unit
- Definition Classes
- TransformUtils
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from AsyncPhase to StringFormat[AsyncPhase] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
SubComponent are added to a HashSet and two phases are the same if they have the same name
SubComponent are added to a HashSet and two phases are the same if they have the same name
- Definition Classes
- SubComponent → AnyRef → Any
-
val
initial: Boolean
True if this phase runs before all other phases.
True if this phase runs before all other phases. Usually,
parser
.- Definition Classes
- SubComponent
-
val
internal: Boolean
True if this phase is not provided by a plug-in.
True if this phase is not provided by a plug-in.
- Definition Classes
- SubComponent
-
def
isAwait(fun: Global.Tree): Boolean
- Definition Classes
- TransformUtils
-
def
isBooleanAnd(sym: Global.Symbol): Boolean
- Definition Classes
- TransformUtils
-
def
isBooleanOr(sym: Global.Symbol): Boolean
- Definition Classes
- TransformUtils
-
def
isCaseLabel(sym: Global.Symbol): Boolean
- Definition Classes
- TransformUtils
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isLabel(sym: Global.Symbol): Boolean
- Definition Classes
- TransformUtils
-
def
isLiteralUnit(t: Global.Tree): Boolean
- Definition Classes
- TransformUtils
-
val
isMatchEnd: (Global.Tree) ⇒ Boolean
- Definition Classes
- TransformUtils
-
def
isMatchEndLabel(sym: Global.Symbol): Boolean
- Definition Classes
- TransformUtils
-
def
isUnitType(tp: Global.Type): Boolean
- Definition Classes
- TransformUtils
-
def
liftables(asyncStates: List[AsyncState]): List[Global.Tree]
Identify which DefTrees are used (including transitively) which are declared in some state but used (including transitively) in another state.
Identify which DefTrees are used (including transitively) which are declared in some state but used (including transitively) in another state.
These will need to be lifted to class members of the state machine.
- Definition Classes
- Lifter
-
def
listToBlock(trees: List[Global.Tree]): Global.Block
- Definition Classes
- TransformUtils
-
def
literalBool(b: Boolean): Global.Tree
- Definition Classes
- TransformUtils
-
def
literalBoxedUnit: Global.Tree
- Definition Classes
- TransformUtils
-
def
literalUnit: Global.Tree
- Definition Classes
- TransformUtils
-
def
markContainsAwait(t: Global.Tree): Unit
- Definition Classes
- TransformUtils
-
final
def
markForAsyncTransform(owner: Global.Symbol, method: Global.DefDef, awaitMethod: Global.Symbol, config: Map[String, AnyRef]): Global.DefDef
Mark the given method as requiring an async transform.
Mark the given method as requiring an async transform. Refer to documentation in the public API that forwards to this method in src/reflect/scala/reflect/api/Internals.scala
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
newPhase(prev: nsc.Phase): StdPhase
Create a new phase which applies transformer
Create a new phase which applies transformer
- Definition Classes
- Transform → SubComponent
-
def
newRootLocalTyper(unit: Global.CompilationUnit): (analyzer)#Typer
- Attributes
- protected
- Definition Classes
- TypingTransformers
-
def
newTransformer(unit: Global.CompilationUnit): Global.Transformer
The transformer factory
The transformer factory
- Definition Classes
- AsyncPhase → Transform
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
ownPhase: nsc.Phase
The phase corresponding to this subcomponent in the current compiler run
The phase corresponding to this subcomponent in the current compiler run
- Definition Classes
- SubComponent
-
val
phaseName: String
The name of the phase
The name of the phase
- Definition Classes
- AsyncPhase → SubComponent
-
def
phaseNewFlags: Long
New flags defined by the phase which are not valid before
New flags defined by the phase which are not valid before
- Definition Classes
- SubComponent
-
def
phaseNextFlags: Long
New flags defined by the phase which are not valid until immediately after it
New flags defined by the phase which are not valid until immediately after it
- Definition Classes
- SubComponent
-
def
reportUnsupportedAwaits(tree: Global.Tree): Unit
Analyze the contents of an
async
block in order to: - Report unsupportedawait
calls under nested templates, functions, by-name arguments.Analyze the contents of an
async
block in order to: - Report unsupportedawait
calls under nested templates, functions, by-name arguments.Must be called on the original tree, not on the ANF transformed tree.
- Definition Classes
- AsyncAnalysis
-
val
requires: List[String]
Names of phases required by this component.
Names of phases required by this component. Default is
Nil
.- Definition Classes
- SubComponent
-
val
runsBefore: List[String]
Names of phases that must run after this phase.
Names of phases that must run after this phase. Default is
Nil
.- Definition Classes
- SubComponent
-
def
statsAndExpr(tree: Global.Tree): (List[Global.Tree], Global.Tree)
- Definition Classes
- TransformUtils
-
def
substituteTrees(t: Global.Tree, from: List[Global.Symbol], to: List[Global.Tree]): Global.Tree
- Definition Classes
- TransformUtils
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
val
terminal: Boolean
True if this phase runs after all other phases.
True if this phase runs after all other phases. Usually,
terminal
.- Definition Classes
- SubComponent
-
def
toMultiMap[A, B](abs: Iterable[(A, B)]): LinkedHashMap[A, List[B]]
- Definition Classes
- TransformUtils
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
val
tracing: Tracing
- Attributes
- protected[async]
- Definition Classes
- AsyncPhase → AnfTransform
-
def
typed(tree: Global.Tree): Global.Tree
- Definition Classes
- TransformUtils
-
def
typedPos(pos: Global.Position)(tree: Global.Tree): Global.Tree
- Definition Classes
- TransformUtils
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
→[B](y: B): (AsyncPhase, B)
- Implicit
- This member is added by an implicit conversion from AsyncPhase to ArrowAssoc[AsyncPhase] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
-
object
MatchEnd
- Definition Classes
- TransformUtils
-
object
UnwrapBoxedUnit
- Definition Classes
- TransformUtils
-
object
cleanupContainsAwaitAttachments extends Global.Traverser
- Definition Classes
- TransformUtils
The Scala compiler and reflection APIs.