8#ifndef SkSLAnalysis_DEFINED
9#define SkSLAnalysis_DEFINED
23class FunctionDeclaration;
24class FunctionDefinition;
31class VariableReference;
33struct ForLoopPositions;
50 const Variable& child,
51 bool writesToSampleCoords =
true,
52 int* elidedSampleCoordCount =
nullptr);
121std::unique_ptr<ProgramUsage>
GetUsage(
const Program& program);
122std::unique_ptr<ProgramUsage>
GetUsage(
const Module& module);
229 std::unique_ptr<Expression>* loopTestPtr,
273 return fStackToPop !=
nullptr;
277 std::vector<SymbolTable*>* fStackToPop =
nullptr;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
SymbolTableStackBuilder(const Statement *stmt, std::vector< SymbolTable * > *stack)
~SymbolTableStackBuilder()
Dart_NativeFunction function
bool IsCompileTimeConstant(const Expression &expr)
ReturnComplexity GetReturnComplexity(const FunctionDefinition &funcDef)
bool ContainsVariable(const Expression &expr, const Variable &var)
std::unique_ptr< LoopUnrollInfo > GetLoopUnrollInfo(const Context &context, Position pos, const ForLoopPositions &positions, const Statement *loopInitializer, std::unique_ptr< Expression > *loopTestPtr, const Expression *loopNext, const Statement *loopStatement, ErrorReporter *errors)
bool ContainsRTAdjust(const Expression &expr)
bool ReturnsOpaqueColor(const FunctionDefinition &function)
bool ReferencesBuiltin(const Program &program, int builtin)
bool IsConstantExpression(const Expression &expr)
bool ReferencesFragCoords(const Program &program)
void ValidateIndexingForES2(const ProgramElement &pe, ErrorReporter &errors)
SampleUsage GetSampleUsage(const Program &program, const Variable &child, bool writesToSampleCoords=true, int *elidedSampleCoordCount=nullptr)
LoopControlFlowInfo GetLoopControlFlowInfo(const Statement &stmt)
bool ReturnsInputAlpha(const FunctionDefinition &function, const ProgramUsage &usage)
int NodeCountUpToLimit(const FunctionDefinition &function, int limit)
bool IsSameExpressionTree(const Expression &left, const Expression &right)
bool CanExitWithoutReturningValue(const FunctionDeclaration &funcDecl, const Statement &body)
bool SwitchCaseContainsUnconditionalExit(const Statement &stmt)
bool IsTrivialExpression(const Expression &expr)
bool HasSideEffects(const Expression &expr)
skia_private::TArray< const SkSL::Variable * > GetComputeShaderMainParams(const Context &context, const Program &program)
bool ReferencesSampleCoords(const Program &program)
std::unique_ptr< ProgramUsage > GetUsage(const Program &program)
void CheckSymbolTableCorrectness(const Program &program)
bool DetectVarDeclarationWithoutScope(const Statement &stmt, ErrorReporter *errors=nullptr)
bool CallsColorTransformIntrinsics(const Program &program)
bool UpdateVariableRefKind(Expression *expr, VariableRefKind kind, ErrorReporter *errors=nullptr)
bool CheckProgramStructure(const Program &program, bool enforceSizeLimit)
void DoFinalizationChecks(const Program &program)
bool CallsSampleOutsideMain(const Program &program)
bool StatementWritesToVariable(const Statement &stmt, const Variable &var)
bool SwitchCaseContainsConditionalExit(const Statement &stmt)
bool IsAssignable(Expression &expr, AssignmentInfo *info=nullptr, ErrorReporter *errors=nullptr)
bool IsDynamicallyUniformExpression(const Expression &expr)
static void usage(char *argv0)
VariableReference * fAssignedVar