Lines Matching refs:Expression

27 struct Constructor : public Expression {
28 Constructor(int offset, const Type& type, std::vector<std::unique_ptr<Expression>> arguments) in Constructor()
32 std::unique_ptr<Expression> constantPropagate(const IRGenerator& irGenerator, in constantPropagate()
34 if (fArguments.size() == 1 && fArguments[0]->fKind == Expression::kIntLiteral_Kind) { in constantPropagate()
38 return std::unique_ptr<Expression>(new FloatLiteral(irGenerator.fContext, in constantPropagate()
44 return std::unique_ptr<Expression>(new IntLiteral(fOffset, in constantPropagate()
61 std::unique_ptr<Expression> clone() const override { in clone()
62 std::vector<std::unique_ptr<Expression>> cloned; in clone()
66 return std::unique_ptr<Expression>(new Constructor(fOffset, fType, std::move(cloned))); in clone()
90 bool compareConstant(const Context& context, const Expression& other) const override { in compareConstant()
91 SkASSERT(other.fKind == Expression::kConstructor_Kind && other.fType == fType); in compareConstant()
107 const Expression* zero; in compareConstant()
116 const Expression* component1 = getMatComponent(col, row); in compareConstant()
117 const Expression* component2 = c.getMatComponent(col, row); in compareConstant()
128 const Expression& getVecComponent(int index) const { in getVecComponent()
143 SkASSERT(arg->fKind == Expression::kConstructor_Kind); in getVecComponent()
162 const Expression* getMatComponent(int col, int row) const { in getMatComponent()
176 SkASSERT(fArguments[0]->fKind == Expression::kConstructor_Kind); in getMatComponent()
197 SkASSERT(arg->fKind == Expression::kConstructor_Kind); in getMatComponent()
206 std::vector<std::unique_ptr<Expression>> fArguments;
208 typedef Expression INHERITED;