#include "src/sksl/ir/SkSLFunctionDeclaration.h"
#include "include/core/SkSpan.h"
#include "include/core/SkTypes.h"
#include "include/private/base/SkTo.h"
#include "src/base/SkEnumBitMask.h"
#include "src/base/SkStringView.h"
#include "src/sksl/SkSLBuiltinTypes.h"
#include "src/sksl/SkSLContext.h"
#include "src/sksl/SkSLDefines.h"
#include "src/sksl/SkSLErrorReporter.h"
#include "src/sksl/SkSLPosition.h"
#include "src/sksl/SkSLProgramKind.h"
#include "src/sksl/SkSLProgramSettings.h"
#include "src/sksl/SkSLString.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLLayout.h"
#include "src/sksl/ir/SkSLModifierFlags.h"
#include "src/sksl/ir/SkSLModifiers.h"
#include "src/sksl/ir/SkSLSymbolTable.h"
#include "src/sksl/ir/SkSLType.h"
#include "src/sksl/ir/SkSLVariable.h"
#include <cstddef>
#include <utility>
usingnamespaceskia_private;
namespace SkSL {
static bool check_modifiers(const Context& context, Position pos, ModifierFlags modifierFlags) { … }
static bool check_return_type(const Context& context, Position pos, const Type& returnType) { … }
static bool check_parameters(const Context& context,
TArray<std::unique_ptr<Variable>>& parameters,
ModifierFlags modifierFlags,
IntrinsicKind intrinsicKind) { … }
static bool type_is_valid_for_color(const Type& type) { … }
static bool type_is_valid_for_coords(const Type& type) { … }
static bool check_main_signature(const Context& context, Position pos, const Type& returnType,
TArray<std::unique_ptr<Variable>>& parameters) { … }
static int find_generic_index(const Type& concreteType,
const Type& genericType,
bool allowNarrowing) { … }
static bool type_generically_matches(const Type& concreteType, const Type& maybeGenericType) { … }
static bool parameters_match(SkSpan<const std::unique_ptr<Variable>> params,
SkSpan<Variable* const> otherParams) { … }
static bool find_existing_declaration(const Context& context,
Position pos,
ModifierFlags modifierFlags,
IntrinsicKind intrinsicKind,
std::string_view name,
TArray<std::unique_ptr<Variable>>& parameters,
Position returnTypePos,
const Type* returnType,
FunctionDeclaration** outExistingDecl) { … }
FunctionDeclaration::FunctionDeclaration(const Context& context,
Position pos,
ModifierFlags modifierFlags,
std::string_view name,
TArray<Variable*> parameters,
const Type* returnType,
IntrinsicKind intrinsicKind)
: … { … }
FunctionDeclaration* FunctionDeclaration::Convert(const Context& context,
Position pos,
const Modifiers& modifiers,
std::string_view name,
TArray<std::unique_ptr<Variable>> parameters,
Position returnTypePos,
const Type* returnType) { … }
std::string FunctionDeclaration::mangledName() const { … }
std::string FunctionDeclaration::description() const { … }
bool FunctionDeclaration::matches(const FunctionDeclaration& f) const { … }
bool FunctionDeclaration::determineFinalTypes(const ExpressionArray& arguments,
ParamTypes* outParameterTypes,
const Type** outReturnType) const { … }
}