#include <SkSLExpressionStatement.h>
A lone expression being used as a statement.
Definition at line 26 of file SkSLExpressionStatement.h.
◆ ExpressionStatement()
SkSL::ExpressionStatement::ExpressionStatement |
( |
std::unique_ptr< Expression > |
expression | ) |
|
|
inline |
Definition at line 30 of file SkSLExpressionStatement.h.
static constexpr Kind kIRNodeKind
const std::unique_ptr< Expression > & expression() const
◆ Convert()
Definition at line 21 of file SkSLExpressionStatement.cpp.
22 {
23
24
25 if (expr->isIncomplete(context)) {
26 return nullptr;
27 }
29}
static std::unique_ptr< Statement > Make(const Context &context, std::unique_ptr< Expression > expr)
◆ description()
std::string SkSL::ExpressionStatement::description |
( |
| ) |
const |
|
overridevirtual |
◆ expression() [1/2]
std::unique_ptr< Expression > & SkSL::ExpressionStatement::expression |
( |
| ) |
|
|
inline |
◆ expression() [2/2]
const std::unique_ptr< Expression > & SkSL::ExpressionStatement::expression |
( |
| ) |
const |
|
inline |
◆ Make()
Definition at line 31 of file SkSLExpressionStatement.cpp.
32 {
33 SkASSERT(!expr->isIncomplete(context));
34
35 if (context.fConfig->fSettings.fOptimize) {
36
39 }
40
41
42
43
44
45 if (expr->is<BinaryExpression>()) {
46 BinaryExpression&
binary = expr->as<BinaryExpression>();
47 if (VariableReference* assignedVar =
binary.isAssignmentIntoVariable()) {
50 }
51 }
52 }
53 }
54
55 return std::make_unique<ExpressionStatement>(std::move(expr));
56}
static std::unique_ptr< Statement > Make()
bool HasSideEffects(const Expression &expr)
◆ kIRNodeKind
constexpr Kind SkSL::ExpressionStatement::kIRNodeKind = Kind::kExpression |
|
inlinestaticconstexpr |
The documentation for this class was generated from the following files: