diff options
author | chriseth <chris@ethereum.org> | 2018-12-21 01:55:32 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2019-01-07 23:41:03 +0800 |
commit | 9222eff08fad8e6a0ea7df8b299880f90c68c8b3 (patch) | |
tree | 20b9a2e40164fb693ab52e75ad1cd2388d142473 /libyul/optimiser/NameDispenser.h | |
parent | d9910f2a1258e8d16d7a57905dabcd09db4e6a8d (diff) | |
download | dexon-solidity-9222eff08fad8e6a0ea7df8b299880f90c68c8b3.tar.gz dexon-solidity-9222eff08fad8e6a0ea7df8b299880f90c68c8b3.tar.zst dexon-solidity-9222eff08fad8e6a0ea7df8b299880f90c68c8b3.zip |
Make the dialect available everywhere.
Diffstat (limited to 'libyul/optimiser/NameDispenser.h')
-rw-r--r-- | libyul/optimiser/NameDispenser.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libyul/optimiser/NameDispenser.h b/libyul/optimiser/NameDispenser.h index 664a5265..719743e6 100644 --- a/libyul/optimiser/NameDispenser.h +++ b/libyul/optimiser/NameDispenser.h @@ -27,6 +27,7 @@ namespace yul { +struct Dialect; /** * Optimizer component that can be used to generate new names that @@ -38,9 +39,9 @@ class NameDispenser { public: /// Initialize the name dispenser with all the names used in the given AST. - explicit NameDispenser(Block const& _ast); + explicit NameDispenser(Dialect const& _dialect, Block const& _ast); /// Initialize the name dispenser with the given used names. - explicit NameDispenser(std::set<YulString> _usedNames); + explicit NameDispenser(Dialect const& _dialect, std::set<YulString> _usedNames); /// @returns a currently unused name that should be similar to _nameHint /// and prefixed by _context if present. @@ -51,6 +52,7 @@ public: private: YulString newNameInternal(YulString _nameHint); + Dialect const& m_dialect; std::set<YulString> m_usedNames; size_t m_counter = 0; }; |