aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/CompilerContext.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/codegen/CompilerContext.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/codegen/CompilerContext.cpp')
-rw-r--r--libsolidity/codegen/CompilerContext.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libsolidity/codegen/CompilerContext.cpp b/libsolidity/codegen/CompilerContext.cpp
index 210b613d..6e14d68a 100644
--- a/libsolidity/codegen/CompilerContext.cpp
+++ b/libsolidity/codegen/CompilerContext.cpp
@@ -32,6 +32,7 @@
#include <libsolidity/inlineasm/AsmCodeGen.h>
#include <libsolidity/inlineasm/AsmAnalysis.h>
#include <libsolidity/inlineasm/AsmAnalysisInfo.h>
+#include <libyul/YulString.h>
#include <boost/algorithm/string/replace.hpp>
@@ -326,7 +327,7 @@ void CompilerContext::appendInlineAssembly(
bool
)
{
- auto it = std::find(_localVariables.begin(), _localVariables.end(), _identifier.name);
+ auto it = std::find(_localVariables.begin(), _localVariables.end(), _identifier.name.str());
return it == _localVariables.end() ? size_t(-1) : 1;
};
identifierAccess.generateCode = [&](
@@ -335,7 +336,7 @@ void CompilerContext::appendInlineAssembly(
yul::AbstractAssembly& _assembly
)
{
- auto it = std::find(_localVariables.begin(), _localVariables.end(), _identifier.name);
+ auto it = std::find(_localVariables.begin(), _localVariables.end(), _identifier.name.str());
solAssert(it != _localVariables.end(), "");
int stackDepth = _localVariables.end() - it;
int stackDiff = _assembly.stackHeight() - startStackHeight + stackDepth;