Internals: Use and enforce class final for ~5% performance boost.

This commit is contained in:
Wilson Snyder
2020-11-18 21:32:16 -05:00
parent c0888c1b0f
commit b6ded59c2b
224 changed files with 976 additions and 949 deletions
+3 -3
View File
@@ -29,7 +29,7 @@
/// we'll count instructions from either the 'if' or the 'else' branch,
/// whichever is larger. We know we won't run both.
class InstrCountVisitor : public AstNVisitor {
class InstrCountVisitor final : public AstNVisitor {
private:
// NODE STATE
// AstNode::user4() -> int. Path cost + 1, 0 means don't dump
@@ -46,7 +46,7 @@ private:
// TYPES
// Little class to cleanly call startVisitBase/endVisitBase
class VisitBase {
class VisitBase final {
private:
// MEMBERS
uint32_t m_savedCount;
@@ -258,7 +258,7 @@ private:
};
// Iterate the graph printing the critical path marked by previous visitation
class InstrCountDumpVisitor : public AstNVisitor {
class InstrCountDumpVisitor final : public AstNVisitor {
private:
// NODE STATE
// AstNode::user4() -> int. Path cost, 0 means don't dump