ShiftedMethodGenerator

cps.plugin.ShiftedMethodGenerator

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def buildParamssMap(tp: Type, oldParamss: List[ParamClause], newParamss: List[List[Tree]])(using Context): Map[Symbol, Tree]
def checkApplicableForMakeCPS(tree: DefDef)(using Context): Either[String, Unit]

transform a function which is returned from the high-order annotated function

transform a function which is returned from the high-order annotated function

Attributes

def filterParamsValDef(params: List[ParamClause]): List[ValDef]
def generateShiftedMethod(md: DefDef)(using Context): Option[DefDef]
def getHighOrderArgs(tree: DefDef)(using Context): List[ValDef]
def insertAwait(tree: Tree, tF: Tree, monadCtx: Tree)(using Context): Tree
def isFunction(tp: Type)(using Context): Boolean
def isHightOrderByArg(tree: DefDef)(using Context): Boolean
def selectHighOrderParamss(paramss: List[List[TypeDef | ValDef]])(using Context): List[ValDef]
def shiftParamTypes(paramTypes: List[Type], nesting: Int, ftp: Type)(using Context): (List[Type], Int)
def shiftedFunctionMethodType(mt: MethodType, ftp: Type)(using Context): Type
def shiftedFunctionPolyType(f: DefDef)(using Context): Type
def shiftedFunctionReturnType(tp: Type, nesting: Int, ftp: Type, shiftedParamWasFound: Boolean)(using Context): Type
def transformFunсBody(tree: Tree, functionParams: List[ValDef], newParamss: List[List[Tree]])(using Context): Tree

transform rhs of the annotated function

transform rhs of the annotated function

Value parameters

functionParams
  • function params of the functions (we want to insert await-s for them)
newParamss
  • new parameters of the function
tree
  • rhs of the function

Attributes