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 /libsolidity/analysis | |
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 'libsolidity/analysis')
-rw-r--r-- | libsolidity/analysis/ReferencesResolver.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libsolidity/analysis/ReferencesResolver.cpp b/libsolidity/analysis/ReferencesResolver.cpp index f62d9c3b..2adc8e77 100644 --- a/libsolidity/analysis/ReferencesResolver.cpp +++ b/libsolidity/analysis/ReferencesResolver.cpp @@ -271,16 +271,16 @@ bool ReferencesResolver::visit(InlineAssembly const& _inlineAssembly) ErrorReporter errorsIgnored(errors); yul::ExternalIdentifierAccess::Resolver resolver = [&](assembly::Identifier const& _identifier, yul::IdentifierContext, bool _crossesFunctionBoundary) { - auto declarations = m_resolver.nameFromCurrentScope(_identifier.name); - bool isSlot = boost::algorithm::ends_with(_identifier.name, "_slot"); - bool isOffset = boost::algorithm::ends_with(_identifier.name, "_offset"); + auto declarations = m_resolver.nameFromCurrentScope(_identifier.name.str()); + bool isSlot = boost::algorithm::ends_with(_identifier.name.str(), "_slot"); + bool isOffset = boost::algorithm::ends_with(_identifier.name.str(), "_offset"); if (isSlot || isOffset) { // special mode to access storage variables if (!declarations.empty()) // the special identifier exists itself, we should not allow that. return size_t(-1); - string realName = _identifier.name.substr(0, _identifier.name.size() - ( + string realName = _identifier.name.str().substr(0, _identifier.name.str().size() - ( isSlot ? string("_slot").size() : string("_offset").size() |