8#ifndef SKSL_FUNCTIONDECLARATION
9#define SKSL_FUNCTIONDECLARATION
27class FunctionDefinition;
43 std::string_view
name,
51 std::string_view
name,
57 return fModifierFlags;
75 fNextOverload = overload;
95 return fIntrinsicKind;
103 return fNextOverload;
107 return fNextOverload;
123 return fHasMainCoordsParameter ? fParameters[0] :
nullptr;
126 return fHasMainInputColorParameter ? fParameters[0] :
nullptr;
129 return fHasMainDestColorParameter ? fParameters[1] :
nullptr;
150 const Type** outReturnType)
const;
156 const Type* fReturnType =
nullptr;
159 bool fBuiltin =
false;
160 bool fIsMain =
false;
161 bool fHasMainCoordsParameter =
false;
162 bool fHasMainInputColorParameter =
false;
163 bool fHasMainDestColorParameter =
false;
const Variable * getMainInputColorParameter() const
FunctionDeclaration * mutableNextOverload() const
std::string mangledName() const
bool matches(const FunctionDeclaration &f) const
bool determineFinalTypes(const ExpressionArray &arguments, ParamTypes *outParameterTypes, const Type **outReturnType) const
void setNextOverload(FunctionDeclaration *overload)
const FunctionDeclaration * nextOverload() const
SkSpan< Variable *const > parameters() const
void setDefinition(const FunctionDefinition *definition)
const Variable * getMainCoordsParameter() const
static constexpr Kind kIRNodeKind
FunctionDeclaration(const Context &context, Position pos, ModifierFlags modifierFlags, std::string_view name, skia_private::TArray< Variable * > parameters, const Type *returnType, IntrinsicKind intrinsicKind)
std::string description() const override
const FunctionDefinition * definition() const
const Variable * getMainDestColorParameter() const
ModifierFlags modifierFlags() const
IntrinsicKind intrinsicKind() const
void setModifierFlags(ModifierFlags m)
static FunctionDeclaration * Convert(const Context &context, Position pos, const Modifiers &modifiers, std::string_view name, skia_private::TArray< std::unique_ptr< Variable > > parameters, Position returnTypePos, const Type *returnType)
const Type & returnType() const
std::string_view name() const
Symbol(Position pos, Kind kind, std::string_view name, const Type *type=nullptr)