aboutsummaryrefslogtreecommitdiffstats
path: root/libyul/optimiser/Metrics.h
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-12-13 01:56:02 +0800
committerchriseth <chris@ethereum.org>2018-12-13 19:12:54 +0800
commit60a368244ac4a92836fc64054ad7ee6130b386eb (patch)
treeb0462e0ba9df649706c3da0b3af5f308f5571cdd /libyul/optimiser/Metrics.h
parent642c69f935c41d70f0dcfb0e89fcf3e626f7b38f (diff)
downloaddexon-solidity-60a368244ac4a92836fc64054ad7ee6130b386eb.tar.gz
dexon-solidity-60a368244ac4a92836fc64054ad7ee6130b386eb.tar.zst
dexon-solidity-60a368244ac4a92836fc64054ad7ee6130b386eb.zip
Do not inline into already big functions.
Diffstat (limited to 'libyul/optimiser/Metrics.h')
-rw-r--r--libyul/optimiser/Metrics.h12
1 files changed, 6 insertions, 6 deletions
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: