aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis/ReferencesResolver.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-11-08 03:26:33 +0800
committerGitHub <noreply@github.com>2018-11-08 03:26:33 +0800
commitdeed8e21f6149a9712ebd77556cdb6e3b4b9c566 (patch)
tree300a55700b068709f36340563db1b43e5b8b1188 /libsolidity/analysis/ReferencesResolver.cpp
parent0a96f091ab63e8d77106e00590a442c59714eecb (diff)
parent674e17c2a895eff6729357d8c10db709ac368b79 (diff)
downloaddexon-solidity-deed8e21f6149a9712ebd77556cdb6e3b4b9c566.tar.gz
dexon-solidity-deed8e21f6149a9712ebd77556cdb6e3b4b9c566.tar.zst
dexon-solidity-deed8e21f6149a9712ebd77556cdb6e3b4b9c566.zip
Merge pull request #5334 from ethereum/stringPerformance
[Yul] String performance
Diffstat (limited to 'libsolidity/analysis/ReferencesResolver.cpp')
-rw-r--r--libsolidity/analysis/ReferencesResolver.cpp8
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()