Lines Matching refs:expression
303 const Expression& expression) {
319 switch (expression.kind()) {
321 const BinaryExpression& binaryExpr = expression.as<BinaryExpression>();
328 return expression.clone();
330 const ChildCall& childCall = expression.as<ChildCall>();
338 const ConstructorArray& ctor = expression.as<ConstructorArray>();
344 const ConstructorArrayCast& ctor = expression.as<ConstructorArrayCast>();
350 const ConstructorCompound& ctor = expression.as<ConstructorCompound>();
356 const ConstructorCompoundCast& ctor = expression.as<ConstructorCompoundCast>();
362 const ConstructorDiagonalMatrix& ctor = expression.as<ConstructorDiagonalMatrix>();
368 const ConstructorMatrixResize& ctor = expression.as<ConstructorMatrixResize>();
374 const ConstructorScalarCast& ctor = expression.as<ConstructorScalarCast>();
380 const ConstructorSplat& ctor = expression.as<ConstructorSplat>();
386 const ConstructorStruct& ctor = expression.as<ConstructorStruct>();
392 const ExternalFunctionCall& externalCall = expression.as<ExternalFunctionCall>();
397 return expression.clone();
399 const FieldAccess& f = expression.as<FieldAccess>();
403 const FunctionCall& funcCall = expression.as<FunctionCall>();
411 return expression.clone();
413 const IndexExpression& idx = expression.as<IndexExpression>();
417 return expression.clone();
419 const PrefixExpression& p = expression.as<PrefixExpression>();
423 const PostfixExpression& p = expression.as<PostfixExpression>();
427 return expression.clone();
429 const Swizzle& s = expression.as<Swizzle>();
433 const TernaryExpression& t = expression.as<TernaryExpression>();
438 return expression.clone();
440 const VariableReference& v = expression.as<VariableReference>();
503 return ExpressionStatement::Make(*fContext, expr(e.expression()));
534 if (!r.expression()) {
542 // replace the function-call expression with the function's return expression.
545 *resultExpr = expr(r.expression());
557 expr(r.expression())));
614 // high-level IR and can't just drop statements into the middle of an expression or even use
617 // Since we can't insert statements into an expression, we run the inline function as extra
646 // the function-call node with the result expression.
667 // or any expression without side effects that is only accessed at most once...
670 // ... we don't need to copy it at all! We can just use the existing expression.
700 // Return our result expression as-is.
707 // It's a non-void function, but it never created a result expression--that is, it never
848 // The inliner isn't smart enough to inline the test-expression for a do-while
852 // - We cannot inline the test expression if the loop uses `continue` anywhere; that
853 // would skip over the inlined block that evaluates the test expression. There
861 this->visitExpression(&expr.expression());
877 // - We would need to insert the test-expression block at the very beginning of the
878 // for-loop's inner fStatement, and the increment-expression block at the very
880 // - The for-loop's built-in test-expression would need to be dropped entirely,
882 // test-expression. This is again something we don't support today, but it could
884 // - We cannot inline the increment-expression if the loop uses `continue` anywhere;
885 // that would skip over the inlined block that evaluates the increment expression.
888 // be viable candidates for increment-expression inlining.
900 this->visitExpression(&returnStmt.expression());
959 // safe for other types of binary expression to inline both sides.
1028 // The test expression is a candidate for inlining.
1200 // Replace the candidate function call with our replacement expression.