Home
last modified time | relevance | path

Searched refs:BoolLiteral (Results 1 – 25 of 42) sorted by relevance

12

/external/skia/src/sksl/ir/
DSkSLBoolLiteral.h21 using BoolLiteral = Literal<bool>; variable
33 static std::unique_ptr<BoolLiteral> Make(const Context& context, int offset, float value) { in Make()
34 return std::make_unique<BoolLiteral>(offset, value, context.fTypes.fBool.get()); in Make()
39 static std::unique_ptr<BoolLiteral> Make(int offset, float value, const Type* type) { in Make()
41 return std::make_unique<BoolLiteral>(offset, value, type); in Make()
61 if (!other.is<BoolLiteral>()) { in compareConstant()
64 return this->value() == other.as<BoolLiteral>().value() ? ComparisonResult::kEqual in compareConstant()
69 return std::make_unique<BoolLiteral>(fOffset, this->value(), &this->type()); in clone()
DSkSLConstructorScalarCast.cpp25 return BoolLiteral::Make(expr.fOffset, value != 0, &constructorType); in cast_scalar_literal()
37 return BoolLiteral::Make(expr.fOffset, value != 0.0f, &constructorType); in cast_scalar_literal()
39 } else if (expr.is<BoolLiteral>()) { in cast_scalar_literal()
40 bool value = expr.as<BoolLiteral>().value(); in cast_scalar_literal()
49 return BoolLiteral::Make(expr.fOffset, value, &constructorType); in cast_scalar_literal()
DSkSLTernaryExpression.cpp69 if (testExpr->is<BoolLiteral>()) { in Make()
71 return testExpr->as<BoolLiteral>().value() ? std::move(ifTrue) in Make()
DSkSLIfStatement.cpp77 if (testValue->is<BoolLiteral>()) { in Make()
78 if (testValue->as<BoolLiteral>().value()) { in Make()
DSkSLPrefixExpression.cpp110 const BoolLiteral& b = value->as<BoolLiteral>(); in logical_not_operand()
111 return BoolLiteral::Make(operand->fOffset, !b.value(), &operand->type()); in logical_not_operand()
DSkSLBinaryExpression.cpp183 bool capsBitIsTrue = caps->is<BoolLiteral>() && caps->as<BoolLiteral>().value(); in Make()
184 if (capsBitIsTrue || !caps->is<BoolLiteral>()) { in Make()
DSkSLFunctionCall.cpp44 value = coalesce(value, subexpression->as<BoolLiteral>().value()); in coalesce_bool_vector()
47 return BoolLiteral::Make(arg->fOffset, value, &type.componentType()); in coalesce_bool_vector()
70 result.push_back(BoolLiteral::Make(context, leftSubexpr->fOffset, value)); in optimize_comparison_of_type()
146 return evaluate_intrinsic_1_of_type<BoolLiteral>(context, arg, evaluate); in evaluate_intrinsic_generic1()
DSkSLSetting.cpp34 return BoolLiteral::Make(context, /*offset=*/-1, (context.fCaps.*fGetCap)()); in value()
/external/skqp/src/sksl/ir/
DSkSLBoolLiteral.h19 struct BoolLiteral : public Expression { struct
20 BoolLiteral(const Context& context, int offset, bool value) in BoolLiteral() function
37 BoolLiteral& b = (BoolLiteral&) other; in compareConstant() argument
42 return std::unique_ptr<Expression>(new BoolLiteral(fOffset, fValue, &fType)); in clone() argument
50 BoolLiteral(int offset, bool value, const Type* type) in BoolLiteral() argument
DSkSLVariableReference.cpp68 return std::unique_ptr<Expression>(new BoolLiteral(irGenerator.fContext, in copy_constant()
70 ((BoolLiteral*) expr)->fValue)); in copy_constant()
DSkSLProgram.h52 return std::unique_ptr<Expression>(new BoolLiteral(context, in literal()
/external/skia/src/sksl/
DSkSLConstantFolder.cpp32 SkASSERT(right.is<BoolLiteral>()); in eliminate_no_op_boolean()
33 bool rightVal = right.as<BoolLiteral>().value(); in eliminate_no_op_boolean()
51 SkASSERT(left.is<BoolLiteral>()); in short_circuit_boolean()
52 bool leftVal = left.as<BoolLiteral>().value(); in short_circuit_boolean()
89 return BoolLiteral::Make(context, left.fOffset, equality); in simplify_vector()
352 if (left->is<BoolLiteral>() && right->is<BoolLiteral>()) { in Simplify()
353 bool leftVal = left->as<BoolLiteral>().value(); in Simplify()
354 bool rightVal = right->as<BoolLiteral>().value(); in Simplify()
364 return BoolLiteral::Make(context, offset, result); in Simplify()
368 if (left->is<BoolLiteral>()) { in Simplify()
[all …]
DSkSLDehydrator.cpp282 const BoolLiteral& b = e->as<BoolLiteral>(); in write()
DSkSLAnalysis.cpp716 expr.is<BoolLiteral>() || in IsTrivialExpression()
749 return left.as<BoolLiteral>().value() == right.as<BoolLiteral>().value(); in IsSameExpressionTree()
/external/llvm-project/clang-tools-extra/clang-tidy/readability/
DImplicitBoolConversionCheck.cpp198 StringRef getEquivalentForBoolLiteral(const CXXBoolLiteralExpr *BoolLiteral, in getEquivalentForBoolLiteral() argument
203 BoolLiteral->getValue() == false) { in getEquivalentForBoolLiteral()
209 return BoolLiteral->getValue() ? "1.0f" : "0.0f"; in getEquivalentForBoolLiteral()
211 return BoolLiteral->getValue() ? "1.0" : "0.0"; in getEquivalentForBoolLiteral()
215 return BoolLiteral->getValue() ? "1u" : "0u"; in getEquivalentForBoolLiteral()
217 return BoolLiteral->getValue() ? "1" : "0"; in getEquivalentForBoolLiteral()
384 if (const auto *BoolLiteral = in handleCastFromBool() local
387 *Cast, getEquivalentForBoolLiteral(BoolLiteral, DestType, Context)); in handleCastFromBool()
DSimplifyBooleanExprCheck.h54 const Expr *BoolLiteral);
/external/deqp/framework/randomshaders/
DrsgExpression.hpp143 class BoolLiteral : public Expression class
146 BoolLiteral (GeneratorState& state, ConstValueRangeAccess valueRange);
147 BoolLiteral (bool customValue);
148 virtual ~BoolLiteral (void) {} in ~BoolLiteral()
DrsgExpression.cpp285 { getWeight<BoolLiteral>, create<BoolLiteral> },
483 BoolLiteral::BoolLiteral (GeneratorState& state, ConstValueRangeAccess valueRange) in BoolLiteral() function in rsg::BoolLiteral
502 BoolLiteral::BoolLiteral (bool customValue) in BoolLiteral() function in rsg::BoolLiteral
515 float BoolLiteral::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight()
527 void BoolLiteral::tokenize (GeneratorState& state, TokenStream& str) const in tokenize()
/external/skqp/src/sksl/
DSkSLIRGenerator.cpp383 if (((BoolLiteral&) *test).fValue) { in convertIf()
991 return std::unique_ptr<Expression>(new BoolLiteral(fContext, expr.fOffset, in convertExpression()
1301 bool leftVal = ((BoolLiteral&) left).fValue; in short_circuit_boolean()
1305 : std::unique_ptr<Expression>(new BoolLiteral(context, left.fOffset, false)); in short_circuit_boolean()
1308 return leftVal ? std::unique_ptr<Expression>(new BoolLiteral(context, left.fOffset, true)) in short_circuit_boolean()
1339 bool leftVal = ((BoolLiteral&) left).fValue; in constantFold()
1340 bool rightVal = ((BoolLiteral&) right).fValue; in constantFold()
1348 return std::unique_ptr<Expression>(new BoolLiteral(fContext, left.fOffset, result)); in constantFold()
1424 return std::unique_ptr<Expression>(new BoolLiteral(fContext, -1, in constantFold()
1427 return std::unique_ptr<Expression>(new BoolLiteral(fContext, -1, in constantFold()
[all …]
DSkSLGLSLCodeGenerator.cpp201 this->writeBoolLiteral((BoolLiteral&) expr); in writeExpression()
940 BoolLiteral boolTrue(fContext, -1, true); in writeFunctionCall()
945 BoolLiteral boolFalse(fContext, -1, false); in writeFunctionCall()
994 void GLSLCodeGenerator::writeBoolLiteral(const BoolLiteral& b) { in writeFunctionCall()
1344 std::unique_ptr<BoolLiteral>(new BoolLiteral(fContext, -1, in writeFunctionCall()
DSkSLGLSLCodeGenerator.h172 void writeBoolLiteral(const BoolLiteral& b);
DSkSLMetalCodeGenerator.h211 void writeBoolLiteral(const BoolLiteral& b);
/external/skia/src/sksl/codegen/
DSkSLGLSLCodeGenerator.h159 void writeBoolLiteral(const BoolLiteral& b);
DSkSLGLSLCodeGenerator.cpp191 this->writeBoolLiteral(expr.as<BoolLiteral>()); in writeExpression()
888 BoolLiteral boolTrue(/*offset=*/-1, /*value=*/true, fContext.fTypes.fBool.get()); in writeShortCircuitWorkaroundExpression()
893 BoolLiteral boolFalse(/*offset=*/-1, /*value=*/false, fContext.fTypes.fBool.get()); in writeShortCircuitWorkaroundExpression()
942 void GLSLCodeGenerator::writeBoolLiteral(const BoolLiteral& b) { in writeBoolLiteral()
1271 BoolLiteral::Make(fContext, /*offset=*/-1, /*value=*/true), in writeForStatement()
DSkSLMetalCodeGenerator.h232 void writeBoolLiteral(const BoolLiteral& b);

12