/** * The unrollability information for an ES2-compatible loop.
*/ struct LoopUnrollInfo { const Variable* fIndex; double fStart; double fDelta; int fCount;
};
/** * A 'for' statement.
*/ class ForStatement final : public Statement { public: inlinestatic constexpr Kind kIRNodeKind = Kind::kFor;
// Creates an SkSL for loop; handles type-coercion and uses the ErrorReporter to report errors. static std::unique_ptr<Statement> Convert(const Context& context,
Position pos,
ForLoopPositions forLoopPositions,
std::unique_ptr<Statement> initializer,
std::unique_ptr<Expression> test,
std::unique_ptr<Expression> next,
std::unique_ptr<Statement> statement,
std::unique_ptr<SymbolTable> symbolTable);
// Creates an SkSL while loop; handles type-coercion and uses the ErrorReporter for errors. static std::unique_ptr<Statement> ConvertWhile(const Context& context,
Position pos,
std::unique_ptr<Expression> test,
std::unique_ptr<Statement> statement);
// Creates an SkSL for/while loop. Assumes properly coerced types and reports errors via assert. static std::unique_ptr<Statement> Make(const Context& context,
Position pos,
ForLoopPositions forLoopPositions,
std::unique_ptr<Statement> initializer,
std::unique_ptr<Expression> test,
std::unique_ptr<Expression> next,
std::unique_ptr<Statement> statement,
std::unique_ptr<LoopUnrollInfo> unrollInfo,
std::unique_ptr<SymbolTable> symbolTable);
/** Loop-unroll information is only supported in strict-ES2 code. Null is returned in ES3+. */ const LoopUnrollInfo* unrollInfo() const { return fUnrollInfo.get();
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.