@@ -532,7 +532,7 @@ std::unique_ptr<Statement> IRGenerator::convertIf(const ASTNode& n) {
532532 }
533533 if (test->kind () == Expression::Kind::kBoolLiteral ) {
534534 // static boolean value, fold down to a single branch
535- if (test->as <BoolLiteral>().fValue ) {
535+ if (test->as <BoolLiteral>().value () ) {
536536 return ifTrue;
537537 } else if (ifFalse) {
538538 return ifFalse;
@@ -1710,7 +1710,7 @@ static std::unique_ptr<Expression> short_circuit_boolean(const Context& context,
17101710 Token::Kind op,
17111711 const Expression& right) {
17121712 SkASSERT (left.kind () == Expression::Kind::kBoolLiteral );
1713- bool leftVal = left.as <BoolLiteral>().fValue ;
1713+ bool leftVal = left.as <BoolLiteral>().value () ;
17141714 if (op == Token::Kind::TK_LOGICALAND) {
17151715 // (true && expr) -> (expr) and (false && expr) -> (false)
17161716 return leftVal ? right.clone ()
@@ -1753,8 +1753,8 @@ std::unique_ptr<Expression> IRGenerator::constantFold(const Expression& left,
17531753 // types, which will let us be more intelligent about this.
17541754 if (left.kind () == Expression::Kind::kBoolLiteral &&
17551755 right.kind () == Expression::Kind::kBoolLiteral ) {
1756- bool leftVal = left.as <BoolLiteral>().fValue ;
1757- bool rightVal = right.as <BoolLiteral>().fValue ;
1756+ bool leftVal = left.as <BoolLiteral>().value () ;
1757+ bool rightVal = right.as <BoolLiteral>().value () ;
17581758 bool result;
17591759 switch (op) {
17601760 case Token::Kind::TK_LOGICALAND: result = leftVal && rightVal; break ;
@@ -2013,7 +2013,7 @@ std::unique_ptr<Expression> IRGenerator::convertTernaryExpression(const ASTNode&
20132013 }
20142014 if (test->kind () == Expression::Kind::kBoolLiteral ) {
20152015 // static boolean test, just return one of the branches
2016- if (test->as <BoolLiteral>().fValue ) {
2016+ if (test->as <BoolLiteral>().value () ) {
20172017 return ifTrue;
20182018 } else {
20192019 return ifFalse;
@@ -2409,7 +2409,7 @@ std::unique_ptr<Expression> IRGenerator::convertPrefixExpression(const ASTNode&
24092409 }
24102410 if (base->kind () == Expression::Kind::kBoolLiteral ) {
24112411 return std::make_unique<BoolLiteral>(fContext , base->fOffset ,
2412- !base->as <BoolLiteral>().fValue );
2412+ !base->as <BoolLiteral>().value () );
24132413 }
24142414 break ;
24152415 case Token::Kind::TK_BITWISENOT:
0 commit comments