class FoldSelectorBuilderImpl extends SelectorBuilderImpl
- Alphabetic
- By Inheritance
- FoldSelectorBuilderImpl
- SelectorBuilderImpl
- ASTUtilImpl
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new FoldSelectorBuilderImpl(c: Context)
Type Members
- class FoldActionGenerator extends ActionGenerator
- case class FoldParse(stateVal: scala.reflect.macros.Universe.ValDef, stateSelectRole: SelectRole, projections: List[FoldParseProjection], selectValName: scala.reflect.macros.blackbox.Context.TermName, selectCases: List[scala.reflect.macros.Universe.CaseDef]) extends Product with Serializable
- case class FoldParseProjection(sym: scala.reflect.macros.blackbox.Context.Symbol, selectRole: SelectRole) extends Product with Serializable
- sealed trait SelectRole extends AnyRef
- trait ActionGenerator extends AnyRef
- Definition Classes
- SelectorBuilderImpl
- class DefaultActionGenerator extends ActionGenerator
- Definition Classes
- SelectorBuilderImpl
- trait SelectCaseDefAcceptor[A, B] extends AnyRef
- Definition Classes
- SelectorBuilderImpl
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
- def acceptSelectCaseDefPattern[A, B](caseDef: scala.reflect.macros.Universe.CaseDef, a: A, acceptor: SelectCaseDefAcceptor[A, B]): B
- Definition Classes
- SelectorBuilderImpl
- def afold[S](s: scala.reflect.macros.blackbox.Context.Expr[S])(op: scala.reflect.macros.blackbox.Context.Expr[(S, FoldSelect[S]) => S])(implicit arg0: scala.reflect.macros.blackbox.Context.WeakTypeTag[S]): scala.reflect.macros.blackbox.Context.Expr[Future[S]]
selector.afold(s0) { (s, selector) => selector match { case x1: in1.read => f1 case x2: in2.read => f2 case x3: out3.write if (x3==v) => f3 case _ : in,d case _ => f4 } }
will be transformed to
selector.afold(s0) { (s, selector) => selector match { case x1: in1.read => f1 case x2: in2.read => f2 case x3: out3.write if (x3==v) => f3 case _ : in,d case _ => f4 } }
will be transformed to
var s = s0 val bn = new FoldSelector(3) bn.reading(in1)(x1 => f1 map {s=_; s }) bn.reading(in2)(x2 => f2 map {s=_; s }) bn.writing(out3,v)(x2 => f2 map {s=_; s}) bn.idle(f4 map {s=_; s})
also supported partial function syntax:
selector.afold((0,1)){ case ((x,y),s) => s match { case x1: in1.read => f1 case x2: in2.read => f2 case x3: out3.write if (x3==v) => f3 case _ => f4 }
will be transformed to:
var s = s0 val bn = new FoldSelector(3) bn.reading(in1)(x1 => async{ val x = s._1; val y = s._2; s = f1; s} }) bn.reading(in2)(x2 => { val x = s._1; val y = s._2; s=f2; s} }) bn.writing(out3,v[x/s._1;y/s._2]) (x2 => s=f2; s})
Using channels as part of fold state:
selector.afold(ch){ case (ch,s) => s match { case x: ch.read => generated.write(x) ch.filter(_ % x == 0) } }
will be transformed to
var s = ch val bn = new FoldSelector //val ef = new FoldSelectorEffectedInput(()=>s) bn.readingFoldEffected(0)(x => async{ generated.write(x) s.filter(_ % x == 0)})
- def apply[T](f: scala.reflect.macros.blackbox.Context.Expr[PartialFunction[Any, T]]): scala.reflect.macros.blackbox.Context.Expr[Future[T]]
- Definition Classes
- SelectorBuilderImpl
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def beforeRefresh(foldSelect: scala.reflect.macros.Universe.TermName): scala.reflect.macros.blackbox.Context.Tree
- def builder[T](f: scala.reflect.macros.blackbox.Context.Expr[PartialFunction[Any, T]]): scala.reflect.macros.blackbox.Context.Tree
- Definition Classes
- SelectorBuilderImpl
- val c: Context
- Definition Classes
- FoldSelectorBuilderImpl → SelectorBuilderImpl → ASTUtilImpl
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- val defaultActionGenerator: DefaultActionGenerator
- Definition Classes
- SelectorBuilderImpl
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fold[S](s: scala.reflect.macros.blackbox.Context.Expr[S])(op: scala.reflect.macros.blackbox.Context.Expr[(S, FoldSelect[S]) => S])(implicit arg0: scala.reflect.macros.blackbox.Context.WeakTypeTag[S]): scala.reflect.macros.blackbox.Context.Expr[S]
- def foreach[T](f: scala.reflect.macros.blackbox.Context.Expr[(Any) => T]): scala.reflect.macros.blackbox.Context.Expr[T]
- Definition Classes
- SelectorBuilderImpl
- def foreachBuildMatch(cases: List[scala.reflect.macros.Universe.CaseDef]): scala.reflect.macros.blackbox.Context.Tree
- Definition Classes
- SelectorBuilderImpl
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def input[T](f: scala.reflect.macros.blackbox.Context.Expr[PartialFunction[Any, T]])(implicit arg0: scala.reflect.macros.blackbox.Context.WeakTypeTag[T]): scala.reflect.macros.blackbox.Context.Expr[Input[T]]
- Definition Classes
- SelectorBuilderImpl
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def loop[T](f: scala.reflect.macros.blackbox.Context.Expr[PartialFunction[Any, T]]): scala.reflect.macros.blackbox.Context.Expr[Unit]
processor: loop => just add waiters to this selector.
processor: loop => just add waiters to this selector.
- Definition Classes
- SelectorBuilderImpl
- def makeProj(name: scala.reflect.macros.Universe.TermName, n: Int): scala.reflect.macros.blackbox.Context.Tree
- def map[T](f: scala.reflect.macros.blackbox.Context.Expr[(Any) => T])(implicit arg0: scala.reflect.macros.blackbox.Context.WeakTypeTag[T]): scala.reflect.macros.blackbox.Context.Expr[CloseableInput[T]]
- Definition Classes
- SelectorBuilderImpl
- def mapBuildMatch[T](cases: List[scala.reflect.macros.Universe.CaseDef], actionGenerator: ActionGenerator)(implicit arg0: scala.reflect.macros.blackbox.Context.WeakTypeTag[T]): scala.reflect.macros.blackbox.Context.Tree
- Definition Classes
- SelectorBuilderImpl
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def parseFold[S](op: scala.reflect.macros.blackbox.Context.Expr[(S, FoldSelect[S]) => S]): FoldParse
- def parseGuardInSelectorCaseDef(name: scala.reflect.macros.blackbox.Context.TermName, guard: scala.reflect.macros.blackbox.Context.Tree): scala.reflect.macros.blackbox.Context.Tree
- Definition Classes
- ASTUtilImpl
- def preTransformCaseDef(fp: FoldParse, foldSelect: scala.reflect.macros.Universe.TermName, cd: scala.reflect.macros.Universe.CaseDef, stableName: scala.reflect.macros.Universe.TermName): scala.reflect.macros.Universe.CaseDef
- def preTransformCaseDefBody(fp: FoldParse, foldSelect: scala.reflect.macros.Universe.TermName, patSymbol: scala.reflect.macros.Universe.Symbol, body: scala.reflect.macros.blackbox.Context.Tree): scala.reflect.macros.blackbox.Context.Tree
- def readingFoldEffected[A, B, S](ch: scala.reflect.macros.blackbox.Context.Expr[Input[A]], projIndex: scala.reflect.macros.blackbox.Context.Expr[Int])(f: scala.reflect.macros.blackbox.Context.Expr[(A) => B])(implicit arg0: scala.reflect.macros.blackbox.Context.WeakTypeTag[B]): scala.reflect.macros.blackbox.Context.Expr[S]
- def refreshEffected(fp: FoldParse, foldSelect: scala.reflect.macros.Universe.TermName): List[scala.reflect.macros.blackbox.Context.Tree]
- def substProj(foldParse: FoldParse, newName: scala.reflect.macros.blackbox.Context.TermName, body: scala.reflect.macros.blackbox.Context.Tree, substEffected: Boolean, debug: Boolean): scala.reflect.macros.blackbox.Context.Tree
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def transformSelectCaseDef(builderName: scala.reflect.macros.blackbox.Context.TermName, caseDef: scala.reflect.macros.Universe.CaseDef, caseDefIndex: Int, actionGenerator: ActionGenerator): scala.reflect.macros.blackbox.Context.Tree
- Definition Classes
- SelectorBuilderImpl
- def transformSelectMatch(bn: scala.reflect.macros.Universe.TermName, cases: List[scala.reflect.macros.Universe.CaseDef], actionGenerator: ActionGenerator): List[scala.reflect.macros.blackbox.Context.Tree]
- Definition Classes
- SelectorBuilderImpl
- 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()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def withProjAssignments(fp: FoldParse, patSymbol: scala.reflect.macros.Universe.Symbol, body: scala.reflect.macros.blackbox.Context.Tree): scala.reflect.macros.blackbox.Context.Tree
- def writingFoldEffected[A, T, S](ch: scala.reflect.macros.blackbox.Context.Expr[Output[A]], projIndex: scala.reflect.macros.blackbox.Context.Expr[Int], x: scala.reflect.macros.blackbox.Context.Expr[A])(f: scala.reflect.macros.blackbox.Context.Expr[(A) => T])(implicit arg0: scala.reflect.macros.blackbox.Context.WeakTypeTag[T]): scala.reflect.macros.blackbox.Context.Expr[S]
- object SelectRole
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated