aboutsummaryrefslogtreecommitdiffstats
path: root/libyul/optimiser/Semantics.h
diff options
context:
space:
mode:
Diffstat (limited to 'libyul/optimiser/Semantics.h')
-rw-r--r--libyul/optimiser/Semantics.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/libyul/optimiser/Semantics.h b/libyul/optimiser/Semantics.h
index 70c50806..a81a489f 100644
--- a/libyul/optimiser/Semantics.h
+++ b/libyul/optimiser/Semantics.h
@@ -26,6 +26,7 @@
namespace yul
{
+struct Dialect;
/**
* Specific AST walker that determines whether an expression is movable.
@@ -33,8 +34,8 @@ namespace yul
class MovableChecker: public ASTWalker
{
public:
- MovableChecker() = default;
- explicit MovableChecker(Expression const& _expression);
+ explicit MovableChecker(Dialect const& _dialect);
+ MovableChecker(Dialect const& _dialect, Expression const& _expression);
void operator()(Identifier const& _identifier) override;
void operator()(FunctionalInstruction const& _functionalInstruction) override;
@@ -48,6 +49,7 @@ public:
std::set<YulString> const& referencedVariables() const { return m_variableReferences; }
private:
+ Dialect const& m_dialect;
/// Which variables the current expression references.
std::set<YulString> m_variableReferences;
/// Is the current expression movable or not.