Reland "Revert "moved BinaryExpression's data into IRNode""

This reverts commit 1d3e0e0054b243b7a62029c29090e7e76a19a805.

Reason for revert: possibly causing https://task-scheduler.skia.org/task/F1DoniJAddPuEkH9ETTE

Original change's description:
> Revert "Revert "moved BinaryExpression's data into IRNode""
> 
> This reverts commit b61c3a9a01c44840eaa35b28cae0a4b358727f3c.
> 
> Change-Id: I4689e1f4977fab3233ff492cee06fbc301b5c689
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317386
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

# Not skipping CQ checks because this is a reland.

Change-Id: Id0f3f211f09fbf31b626c648ed141fc6154a450c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317395
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLGLSLCodeGenerator.cpp b/src/sksl/SkSLGLSLCodeGenerator.cpp
index 6ef3b9b..433b11b 100644
--- a/src/sksl/SkSLGLSLCodeGenerator.cpp
+++ b/src/sksl/SkSLGLSLCodeGenerator.cpp
@@ -913,33 +913,31 @@
 
 void GLSLCodeGenerator::writeBinaryExpression(const BinaryExpression& b,
                                               Precedence parentPrecedence) {
-    const Expression& left = b.left();
-    const Expression& right = b.right();
-    Token::Kind op = b.getOperator();
     if (fProgram.fSettings.fCaps->unfoldShortCircuitAsTernary() &&
-            (op == Token::Kind::TK_LOGICALAND || op == Token::Kind::TK_LOGICALOR)) {
+            (b.fOperator == Token::Kind::TK_LOGICALAND ||
+             b.fOperator == Token::Kind::TK_LOGICALOR)) {
         this->writeShortCircuitWorkaroundExpression(b, parentPrecedence);
         return;
     }
 
-    Precedence precedence = GetBinaryPrecedence(op);
+    Precedence precedence = GetBinaryPrecedence(b.fOperator);
     if (precedence >= parentPrecedence) {
         this->write("(");
     }
     bool positionWorkaround = fProgramKind == Program::Kind::kVertex_Kind &&
-                              Compiler::IsAssignment(op) &&
-                              left.kind() == Expression::Kind::kFieldAccess &&
-                              is_sk_position((FieldAccess&) left) &&
-                              !right.containsRTAdjust() &&
+                              Compiler::IsAssignment(b.fOperator) &&
+                              b.fLeft->kind() == Expression::Kind::kFieldAccess &&
+                              is_sk_position((FieldAccess&) *b.fLeft) &&
+                              !b.fRight->containsRTAdjust() &&
                               !fProgram.fSettings.fCaps->canUseFragCoord();
     if (positionWorkaround) {
         this->write("sk_FragCoord_Workaround = (");
     }
-    this->writeExpression(left, precedence);
+    this->writeExpression(*b.fLeft, precedence);
     this->write(" ");
-    this->write(Compiler::OperatorName(op));
+    this->write(Compiler::OperatorName(b.fOperator));
     this->write(" ");
-    this->writeExpression(right, precedence);
+    this->writeExpression(*b.fRight, precedence);
     if (positionWorkaround) {
         this->write(")");
     }
@@ -957,20 +955,20 @@
     // Transform:
     // a && b  =>   a ? b : false
     // a || b  =>   a ? true : b
-    this->writeExpression(b.left(), kTernary_Precedence);
+    this->writeExpression(*b.fLeft, kTernary_Precedence);
     this->write(" ? ");
-    if (b.getOperator() == Token::Kind::TK_LOGICALAND) {
-        this->writeExpression(b.right(), kTernary_Precedence);
+    if (b.fOperator == Token::Kind::TK_LOGICALAND) {
+        this->writeExpression(*b.fRight, kTernary_Precedence);
     } else {
         BoolLiteral boolTrue(fContext, -1, true);
         this->writeBoolLiteral(boolTrue);
     }
     this->write(" : ");
-    if (b.getOperator() == Token::Kind::TK_LOGICALAND) {
+    if (b.fOperator == Token::Kind::TK_LOGICALAND) {
         BoolLiteral boolFalse(fContext, -1, false);
         this->writeBoolLiteral(boolFalse);
     } else {
-        this->writeExpression(b.right(), kTernary_Precedence);
+        this->writeExpression(*b.fRight, kTernary_Precedence);
     }
     if (kTernary_Precedence >= parentPrecedence) {
         this->write(")");