sun::ast::GenericCallAST
class · Source (opens in a new tab)
class sun::ast::GenericCallAST : public sun::ast::ExprASTGeneric function call: create<Type>(args...) or create<Type1, Type2>(args...) Used for generic free functions like create<T>, destroy, etc.
Inherits
- sun::ast::ExprAST (public)
Public Functions
- GenericCallAST
- dotLabel
- forEachChildSlot
- getArgConversions
- getArgs
- getArgsMutable
- getFunctionName
- getGenericFunctionAST
- getResolvedCalleeType
- getResolvedTypeArgs
- getType
- getTypeArguments
- hasGenericFunctionAST
- hasResolvedTypeArgs
- setArgConversions
- setGenericFunctionAST
- setResolvedCalleeType
- setResolvedTypeArgs
- toString
GenericCallAST
public · function · Source (opens in a new tab)
sun::ast::GenericCallAST::GenericCallAST(std::string name, std::vector< std::unique_ptr< TypeAnnotation > > typeArgs, std::vector< std::unique_ptr< ExprAST > > arguments)Creates this syntax node and takes ownership of any supplied child expressions.
Related: TypeAnnotation, ExprAST
dotLabel
public · function · Source (opens in a new tab)
std::string sun::ast::GenericCallAST::dotLabel() const overrideReturns the node label used in syntax-tree graph visualizations.
forEachChildSlot
public · function · Source (opens in a new tab)
void sun::ast::GenericCallAST::forEachChildSlot(const ChildSlotFn &fn) overrideVisits replaceable child expressions so tree passes can rewrite them in place.
Related: ChildSlotFn
getArgConversions
public · function · Source (opens in a new tab)
const std::vector< sun::semantic_analysis::ArgConversion > & sun::ast::GenericCallAST::getArgConversions() constReturns the argument conversions selected by analysis.
Related: sun::semantic_analysis::ArgConversion
getArgs
public · function · Source (opens in a new tab)
const std::vector< std::unique_ptr< ExprAST > > & sun::ast::GenericCallAST::getArgs() constProvides the ordered arguments associated with this expression.
Related: ExprAST
getArgsMutable
public · function · Source (opens in a new tab)
std::vector< std::unique_ptr< ExprAST > > & sun::ast::GenericCallAST::getArgsMutable()Mutable access to the argument list (used to expand variadic packs into concrete args during semantic analysis).
Related: ExprAST
getFunctionName
public · function · Source (opens in a new tab)
const std::string & sun::ast::GenericCallAST::getFunctionName() constReturns the function name stored by this object.
getGenericFunctionAST
public · function · Source (opens in a new tab)
const FunctionAST * sun::ast::GenericCallAST::getGenericFunctionAST() constReturns the generic function syntax tree stored by this object.
Related: FunctionAST
getResolvedCalleeType
public · function · Source (opens in a new tab)
TypePtr sun::ast::GenericCallAST::getResolvedCalleeType() constReturn the concrete callable signature, or null in an abstract template.
Related: TypePtr
getResolvedTypeArgs
public · function · Source (opens in a new tab)
const std::vector< TypePtr > & sun::ast::GenericCallAST::getResolvedTypeArgs() constReturns the concrete generic type arguments.
Related: TypePtr
getType
public · function · Source (opens in a new tab)
ASTNodeType sun::ast::GenericCallAST::getType() const overrideReturns the syntax-node kind used to dispatch tree visitors.
Related: ASTNodeType
getTypeArguments
public · function · Source (opens in a new tab)
const std::vector< std::unique_ptr< TypeAnnotation > > & sun::ast::GenericCallAST::getTypeArguments() constProvides the concrete types supplied for generic specialization.
Related: TypeAnnotation
hasGenericFunctionAST
public · function · Source (opens in a new tab)
bool sun::ast::GenericCallAST::hasGenericFunctionAST() constReports whether this object has generic function syntax tree.
hasResolvedTypeArgs
public · function · Source (opens in a new tab)
bool sun::ast::GenericCallAST::hasResolvedTypeArgs() constReports whether this object has resolved type args.
setArgConversions
public · function · Source (opens in a new tab)
void sun::ast::GenericCallAST::setArgConversions(std::vector< sun::semantic_analysis::ArgConversion > conversions) constResolved type arguments (set by semantic analyzer after type param substitution) How each argument reaches its parameter (set by the semantic analyzer once the specialization is known; one entry per argument).
Related: sun::semantic_analysis::ArgConversion
setGenericFunctionAST
public · function · Source (opens in a new tab)
void sun::ast::GenericCallAST::setGenericFunctionAST(const FunctionAST *ast) constGeneric function AST (set by semantic analyzer).
Related: FunctionAST
setResolvedCalleeType
public · function · Source (opens in a new tab)
void sun::ast::GenericCallAST::setResolvedCalleeType(TypePtr type) constRecord the instantiated callable signature used to check this call.
Related: TypePtr
setResolvedTypeArgs
public · function · Source (opens in a new tab)
void sun::ast::GenericCallAST::setResolvedTypeArgs(std::vector< TypePtr > types) constUpdates the concrete generic type arguments.
Related: TypePtr
toString
public · function · Source (opens in a new tab)
std::string sun::ast::GenericCallAST::toString() const overrideReturns a readable representation for diagnostics and debugging.
Protected Functions
ensureAnalysis
protected · function · Source (opens in a new tab)
void sun::ast::GenericCallAST::ensureAnalysis() const overrideOverride to allocate GenericCallAnalysis instead of base ExprAnalysis.
Related: GenericCallAnalysis, ExprAnalysis
Private Functions
gcAnalysis
private · function · Source (opens in a new tab)
GenericCallAnalysis & sun::ast::GenericCallAST::gcAnalysis() constAccess as GenericCallAnalysis.
Related: GenericCallAnalysis
Private Fields
args
private · variable · Source (opens in a new tab)
std::vector<std::unique_ptr<ExprAST> > sun::ast::GenericCallAST::argsNo documentation comment.
Related: ExprAST
functionName
private · variable · Source (opens in a new tab)
std::string sun::ast::GenericCallAST::functionNameNo documentation comment.
typeArguments
private · variable · Source (opens in a new tab)
std::vector<std::unique_ptr<TypeAnnotation> > sun::ast::GenericCallAST::typeArgumentsNo documentation comment.
Related: TypeAnnotation