moved SkSL VarDeclarations data into IRNode

Change-Id: I03bdef43c79bc3c997f9a9a6aa8fbb1a7194943a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326437
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLDehydrator.cpp b/src/sksl/SkSLDehydrator.cpp
index 1492412..6bbcfd4 100644
--- a/src/sksl/SkSLDehydrator.cpp
+++ b/src/sksl/SkSLDehydrator.cpp
@@ -485,13 +485,13 @@
             case Statement::Kind::kVarDeclaration: {
                 const VarDeclaration& v = s->as<VarDeclaration>();
                 this->writeCommand(Rehydrator::kVarDeclaration_Command);
-                this->writeU16(this->symbolId(v.fVar));
-                this->write(v.fBaseType);
-                this->writeU8(v.fSizes.size());
-                for (const std::unique_ptr<Expression>& sizeExpr : v.fSizes) {
-                    this->write(sizeExpr.get());
+                this->writeU16(this->symbolId(&v.var()));
+                this->write(v.baseType());
+                this->writeU8(v.sizeCount());
+                for (int i = 0; i < v.sizeCount(); ++i) {
+                    this->write(v.size(i).get());
                 }
-                this->write(v.fValue.get());
+                this->write(v.value().get());
                 break;
             }
             case Statement::Kind::kWhile: {
@@ -562,7 +562,7 @@
         case ProgramElement::Kind::kGlobalVar: {
             const GlobalVarDeclaration& v = e.as<GlobalVarDeclaration>();
             this->writeCommand(Rehydrator::kVarDeclarations_Command);
-            this->write(v.fDecl.get());
+            this->write(v.declaration().get());
             break;
         }
     }