Avoid descending into Expressions unnecessarily.
We know expressions can't contain @if or @switch statements inside of them, so we can avoid recursing into them and run this check slightly faster. Change-Id: I60cd6dd40ddda74f7af259fd13e5ea0779982384 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/370076 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
8dabeac58c
commit
59e3456695
@ -1648,6 +1648,11 @@ void Compiler::verifyStaticTests(const Program& program) {
|
||||
return INHERITED::visitStatement(stmt);
|
||||
}
|
||||
|
||||
bool visitExpression(const Expression&) override {
|
||||
// We aren't looking for anything inside an Expression, so skip them entirely.
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
using INHERITED = ProgramVisitor;
|
||||
ErrorReporter* fReporter;
|
||||
|
Loading…
Reference in New Issue
Block a user