Moved SkSL type into IRNode, now accessed via a method
This change doesn't accomplish anything by itself, but is a necessary
prerequisite for followup changes to node handling. Eventually all data
is going to be stored within IRNode itself, and the subclasses will not
add any fields; this is just the first step in that process.
Change-Id: If2bea4c62bd8f680e9d9f39248bb9679332b245b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315867
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLDehydrator.cpp b/src/sksl/SkSLDehydrator.cpp
index b9b0646..0035a21 100644
--- a/src/sksl/SkSLDehydrator.cpp
+++ b/src/sksl/SkSLDehydrator.cpp
@@ -210,7 +210,7 @@
this->writeId(&v);
this->write(v.fModifiers);
this->write(v.fName);
- this->write(v.fType);
+ this->write(v.type());
this->writeU8(v.fStorage);
break;
}
@@ -261,7 +261,7 @@
this->write(b.fLeft.get());
this->writeU8((int) b.fOperator);
this->write(b.fRight.get());
- this->write(b.fType);
+ this->write(b.type());
break;
}
case Expression::Kind::kBoolLiteral: {
@@ -273,7 +273,7 @@
case Expression::Kind::kConstructor: {
const Constructor& c = e->as<Constructor>();
this->writeU8(Rehydrator::kConstructor_Command);
- this->write(c.fType);
+ this->write(c.type());
this->writeU8(c.fArguments.size());
for (const auto& a : c.fArguments) {
this->write(a.get());
@@ -305,7 +305,7 @@
case Expression::Kind::kFunctionCall: {
const FunctionCall& f = e->as<FunctionCall>();
this->writeU8(Rehydrator::kFunctionCall_Command);
- this->write(f.fType);
+ this->write(f.type());
this->writeId(&f.fFunction);
this->writeU8(f.fArguments.size());
for (const auto& a : f.fArguments) {