From 60a368244ac4a92836fc64054ad7ee6130b386eb Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 12 Dec 2018 18:56:02 +0100 Subject: Do not inline into already big functions. --- libyul/optimiser/Metrics.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libyul/optimiser/Metrics.h') diff --git a/libyul/optimiser/Metrics.h b/libyul/optimiser/Metrics.h index ca244600..d26ecbd9 100644 --- a/libyul/optimiser/Metrics.h +++ b/libyul/optimiser/Metrics.h @@ -25,17 +25,17 @@ namespace yul { +/** + * Metric for the size of code. + * More specifically, the number of AST nodes. + * Ignores function definitions while traversing the AST. + * If you want to know the size of a function, you have to invoke this on its body. + */ class CodeSize: public ASTWalker { public: - /// Returns a metric for the code size of an AST element. - /// More specifically, it returns the number of AST nodes. static size_t codeSize(Statement const& _statement); - /// Returns a metric for the code size of an AST element. - /// More specifically, it returns the number of AST nodes. static size_t codeSize(Expression const& _expression); - /// Returns a metric for the code size of an AST element. - /// More specifically, it returns the number of AST nodes. static size_t codeSize(Block const& _block); private: -- cgit