![]() |
Flutter Engine
The Flutter Engine
|
#include <SkSLBinaryExpression.h>
Public Member Functions | |
BinaryExpression (Position pos, std::unique_ptr< Expression > left, Operator op, std::unique_ptr< Expression > right, const Type *type) | |
std::unique_ptr< Expression > & | left () |
const std::unique_ptr< Expression > & | left () const |
std::unique_ptr< Expression > & | right () |
const std::unique_ptr< Expression > & | right () const |
Operator | getOperator () const |
std::unique_ptr< Expression > | clone (Position pos) const override |
std::string | description (OperatorPrecedence parentPrecedence) const override |
VariableReference * | isAssignmentIntoVariable () |
![]() | |
Expression (Position pos, Kind kind, const Type *type) | |
Kind | kind () const |
const Type & | type () const |
bool | isAnyConstructor () const |
bool | isIntLiteral () const |
bool | isFloatLiteral () const |
bool | isBoolLiteral () const |
AnyConstructor & | asAnyConstructor () |
const AnyConstructor & | asAnyConstructor () const |
bool | isIncomplete (const Context &context) const |
virtual ComparisonResult | compareConstant (const Expression &other) const |
CoercionCost | coercionCost (const Type &target) const |
virtual bool | supportsConstantValues () const |
virtual std::optional< double > | getConstantValue (int n) const |
virtual std::unique_ptr< Expression > | clone (Position pos) const =0 |
std::unique_ptr< Expression > | clone () const |
std::string | description () const final |
virtual std::string | description (OperatorPrecedence parentPrecedence) const =0 |
![]() | |
virtual | ~IRNode () |
virtual std::string | description () const =0 |
IRNode (const IRNode &)=delete | |
IRNode & | operator= (const IRNode &)=delete |
Position | position () const |
void | setPosition (Position p) |
template<typename T > | |
bool | is () const |
template<typename T > | |
const T & | as () const |
template<typename T > | |
T & | as () |
Static Public Member Functions | |
static std::unique_ptr< Expression > | Convert (const Context &context, Position pos, std::unique_ptr< Expression > left, Operator op, std::unique_ptr< Expression > right) |
static std::unique_ptr< Expression > | Make (const Context &context, Position pos, std::unique_ptr< Expression > left, Operator op, std::unique_ptr< Expression > right) |
static std::unique_ptr< Expression > | Make (const Context &context, Position pos, std::unique_ptr< Expression > left, Operator op, std::unique_ptr< Expression > right, const Type *resultType) |
![]() | |
static void * | operator new (const size_t size) |
static void | operator delete (void *ptr) |
Static Public Attributes | |
static constexpr Kind | kIRNodeKind = Kind::kBinary |
Additional Inherited Members | |
![]() | |
enum class | ComparisonResult { kUnknown = -1 , kNotEqual , kEqual } |
using | Kind = ExpressionKind |
![]() | |
Position | fPosition |
![]() | |
IRNode (Position position, int kind) | |
![]() | |
int | fKind |
A binary operation.
Definition at line 30 of file SkSLBinaryExpression.h.
|
inline |
Definition at line 34 of file SkSLBinaryExpression.h.
|
overridevirtual |
Implements SkSL::Expression.
Definition at line 166 of file SkSLBinaryExpression.cpp.
|
static |
Definition at line 24 of file SkSLBinaryExpression.cpp.
|
overridevirtual |
Implements SkSL::Expression.
Definition at line 174 of file SkSLBinaryExpression.cpp.
|
inline |
Definition at line 85 of file SkSLBinaryExpression.h.
VariableReference * SkSL::BinaryExpression::isAssignmentIntoVariable | ( | ) |
If the expression is an assignment like a = 1
or a += sin(b)
, returns the VariableReference that will be written to. For other types of expressions, returns null. Complex expressions that contain inner assignments, like (a = b) * 2
, will return null.
Definition at line 184 of file SkSLBinaryExpression.cpp.
|
inline |
Definition at line 69 of file SkSLBinaryExpression.h.
|
inline |
Definition at line 73 of file SkSLBinaryExpression.h.
|
static |
Definition at line 97 of file SkSLBinaryExpression.cpp.
|
static |
Definition at line 112 of file SkSLBinaryExpression.cpp.
|
inline |
Definition at line 77 of file SkSLBinaryExpression.h.
|
inline |
Definition at line 81 of file SkSLBinaryExpression.h.
|
inlinestaticconstexpr |
Definition at line 32 of file SkSLBinaryExpression.h.