object async extends AsyncPhase
- Alphabetic
- By Inheritance
- async
- AsyncPhase
- LiveVariables
- Lifter
- ExprBuilder
- AsyncAnalysis
- AnfTransform
- TransformUtils
- AsyncTransformStates
- TypingTransformers
- Transform
- SubComponent
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final class AnfTransformer extends transform.async.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
- 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 transform.async.AnfTransform.ThicketTransformer
- Definition Classes
- AnfTransform
- class Tracing extends AnyRef
- Definition Classes
- AnfTransform
- 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.AstTransformer
- Definition Classes
- TypingTransformers
- final class AsyncTransformer extends TypingTransformer
- Definition Classes
- AsyncPhase
- class AsyncTransformState extends AnyRef
- Definition Classes
- AsyncTransformStates
- trait AsyncBlock extends AnyRef
- Definition Classes
- ExprBuilder
- final class AsyncState extends AnyRef
- Definition Classes
- ExprBuilder
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- 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(classOf[java.lang.CloneNotSupportedException]) @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
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): 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
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val global: Global.this.type
The global environment; overridden by instantiation in Global.
The global environment; overridden by instantiation in Global.
- Definition Classes
- async → AsyncTransformStates → TypingTransformers → SubComponent
- def hashCode(): Int
SubComponents are added to a HashSet and two phases are the same if they have the same name.
SubComponents 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
- Definition Classes
- AsyncPhase
- 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.AstTransformer
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 runsAfter: collection.immutable.List[String]
Names of phases that must run before this phase.
Names of phases that must run before this phase.
- Definition Classes
- async → 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
- val runsRightAfter: None.type
Name of the phase that this phase must follow immediately.
Name of the phase that this phase must follow immediately.
- Definition Classes
- async → 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[transform.async]
- Definition Classes
- AsyncPhase → AnfTransform
- def typedBasePos(tree: Global.Tree): Global.Tree
- Definition Classes
- TransformUtils
- def typedCurrentPos(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(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- object MatchEnd
- Definition Classes
- TransformUtils
- object UnwrapBoxedUnit
- Definition Classes
- TransformUtils
- object cleanupContainsAwaitAttachments extends Global.Traverser
- Definition Classes
- TransformUtils
The Scala compiler and reflection APIs.