22 class IsDynamicallyUniformExpressionVisitor :
public ProgramVisitor {
24 bool visitExpression(
const Expression& expr)
override {
25 switch (expr.
kind()) {
26 case Expression::Kind::kBinary:
27 case Expression::Kind::kConstructorArray:
28 case Expression::Kind::kConstructorArrayCast:
29 case Expression::Kind::kConstructorCompound:
30 case Expression::Kind::kConstructorCompoundCast:
31 case Expression::Kind::kConstructorDiagonalMatrix:
32 case Expression::Kind::kConstructorMatrixResize:
33 case Expression::Kind::kConstructorScalarCast:
34 case Expression::Kind::kConstructorSplat:
35 case Expression::Kind::kConstructorStruct:
36 case Expression::Kind::kFieldAccess:
38 case Expression::Kind::kPostfix:
39 case Expression::Kind::kPrefix:
40 case Expression::Kind::kSwizzle:
41 case Expression::Kind::kTernary:
46 case Expression::Kind::kVariableReference: {
53 fIsDynamicallyUniform =
false;
56 case Expression::Kind::kFunctionCall: {
62 fIsDynamicallyUniform =
false;
71 fIsDynamicallyUniform =
false;
74 return INHERITED::visitExpression(expr);
77 bool fIsDynamicallyUniform =
true;
81 IsDynamicallyUniformExpressionVisitor visitor;
82 visitor.visitExpression(expr);
83 return visitor.fIsDynamicallyUniform;
#define INHERITED(method,...)
ModifierFlags modifierFlags() const
ModifierFlags modifierFlags() const
Dart_NativeFunction function
bool IsDynamicallyUniformExpression(const Expression &expr)