Removed unused/nonexistent methods from IRGenerator

Change-Id: Idedc91b5b21a0cba162c14f0a37b72650aa91c81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455256
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This commit is contained in:
Ethan Nicholas 2021-10-01 17:00:49 -04:00 committed by SkCQ
parent 1f9be54238
commit a7d1e5c11c
2 changed files with 0 additions and 31 deletions

View File

@ -65,16 +65,6 @@ namespace SkSL {
IRGenerator::IRGenerator(const Context* context)
: fContext(*context) {}
std::unique_ptr<Extension> IRGenerator::convertExtension(int line, skstd::string_view name) {
if (this->programKind() != ProgramKind::kFragment &&
this->programKind() != ProgramKind::kVertex) {
this->errorReporter().error(line, "extensions are not allowed in this kind of program");
return nullptr;
}
return std::make_unique<Extension>(line, name);
}
void IRGenerator::checkVarDeclaration(int line, const Modifiers& modifiers, const Type* baseType,
Variable::Storage storage) {
if (this->strictES2Mode() && baseType->isArray()) {
@ -211,11 +201,6 @@ std::unique_ptr<Statement> IRGenerator::convertVarDeclaration(int line,
return this->convertVarDeclaration(std::move(var), std::move(value));
}
std::unique_ptr<Statement> IRGenerator::convertReturn(int line,
std::unique_ptr<Expression> result) {
return ReturnStatement::Make(line, std::move(result));
}
void IRGenerator::appendRTAdjustFixupToVertexMain(const FunctionDeclaration& decl, Block* body) {
using namespace SkSL::dsl;
using SkSL::dsl::Swizzle; // disambiguate from SkSL::Swizzle
@ -552,11 +537,6 @@ std::unique_ptr<Expression> IRGenerator::call(int line,
}
}
std::unique_ptr<Expression> IRGenerator::convertSwizzle(std::unique_ptr<Expression> base,
skstd::string_view fields) {
return Swizzle::Convert(fContext, std::move(base), fields);
}
void IRGenerator::start(const ParsedModule& base,
bool isBuiltinCode,
std::vector<std::unique_ptr<ProgramElement>>* elements,

View File

@ -130,21 +130,10 @@ private:
const FunctionDeclaration* findBestFunctionForCall(
const std::vector<const FunctionDeclaration*>& functions,
const ExpressionArray& arguments) const;
CoercionCost coercionCost(const Expression& expr, const Type& type);
bool containsConstantZero(Expression& expr);
bool dividesByZero(Operator op, Expression& right);
std::unique_ptr<Extension> convertExtension(int line, skstd::string_view name);
std::unique_ptr<Expression> convertField(std::unique_ptr<Expression> base,
skstd::string_view field);
void scanInterfaceBlock(SkSL::InterfaceBlock& intf);
Modifiers convertModifiers(const Modifiers& m);
std::unique_ptr<Statement> convertReturn(int line, std::unique_ptr<Expression> result);
std::unique_ptr<Expression> convertSwizzle(std::unique_ptr<Expression> base,
skstd::string_view fields);
/** Appends sk_Position fixup to the bottom of main() if this is a vertex program. */
void appendRTAdjustFixupToVertexMain(const FunctionDeclaration& decl, Block* body);
bool setRefKind(Expression& expr, VariableReference::RefKind kind);
void copyIntrinsicIfNeeded(const FunctionDeclaration& function);
// Runtime effects (and the interpreter, which uses the same CPU runtime) require adherence to