diff options
author | chriseth <chris@ethereum.org> | 2018-10-29 22:12:02 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-11-08 02:30:27 +0800 |
commit | 674e17c2a895eff6729357d8c10db709ac368b79 (patch) | |
tree | 300a55700b068709f36340563db1b43e5b8b1188 /libyul/optimiser/Disambiguator.h | |
parent | 0a96f091ab63e8d77106e00590a442c59714eecb (diff) | |
download | dexon-solidity-674e17c2a895eff6729357d8c10db709ac368b79.tar dexon-solidity-674e17c2a895eff6729357d8c10db709ac368b79.tar.gz dexon-solidity-674e17c2a895eff6729357d8c10db709ac368b79.tar.bz2 dexon-solidity-674e17c2a895eff6729357d8c10db709ac368b79.tar.lz dexon-solidity-674e17c2a895eff6729357d8c10db709ac368b79.tar.xz dexon-solidity-674e17c2a895eff6729357d8c10db709ac368b79.tar.zst dexon-solidity-674e17c2a895eff6729357d8c10db709ac368b79.zip |
Performance: Replace string by special single-copy YulString class.
Diffstat (limited to 'libyul/optimiser/Disambiguator.h')
-rw-r--r-- | libyul/optimiser/Disambiguator.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libyul/optimiser/Disambiguator.h b/libyul/optimiser/Disambiguator.h index 74a491ab..bfb65682 100644 --- a/libyul/optimiser/Disambiguator.h +++ b/libyul/optimiser/Disambiguator.h @@ -45,7 +45,7 @@ class Disambiguator: public ASTCopier public: explicit Disambiguator( solidity::assembly::AsmAnalysisInfo const& _analysisInfo, - std::set<std::string> const& _externallyUsedIdentifiers = {} + std::set<YulString> const& _externallyUsedIdentifiers = {} ): m_info(_analysisInfo), m_externallyUsedIdentifiers(_externallyUsedIdentifiers), m_nameDispenser(m_externallyUsedIdentifiers) { @@ -56,16 +56,16 @@ protected: virtual void leaveScope(Block const& _block) override; virtual void enterFunction(FunctionDefinition const& _function) override; virtual void leaveFunction(FunctionDefinition const& _function) override; - virtual std::string translateIdentifier(std::string const& _name) override; + virtual YulString translateIdentifier(YulString _name) override; void enterScopeInternal(solidity::assembly::Scope& _scope); void leaveScopeInternal(solidity::assembly::Scope& _scope); solidity::assembly::AsmAnalysisInfo const& m_info; - std::set<std::string> const& m_externallyUsedIdentifiers; + std::set<YulString> const& m_externallyUsedIdentifiers; std::vector<solidity::assembly::Scope*> m_scopes; - std::map<void const*, std::string> m_translations; + std::map<void const*, YulString> m_translations; NameDispenser m_nameDispenser; }; |