aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2017-01-26 00:24:50 +0800
committerchriseth <c@ethdev.com>2017-01-26 00:26:11 +0800
commita5696e1f0a87a2912cc64d2538751836658e7c63 (patch)
tree85b9a5d3631f8bc6d99a26aa2d34e179bab3a459 /libsolidity
parent27ba665694c4a961e098559cb36176aeafd5ec44 (diff)
downloaddexon-solidity-a5696e1f0a87a2912cc64d2538751836658e7c63.tar
dexon-solidity-a5696e1f0a87a2912cc64d2538751836658e7c63.tar.gz
dexon-solidity-a5696e1f0a87a2912cc64d2538751836658e7c63.tar.bz2
dexon-solidity-a5696e1f0a87a2912cc64d2538751836658e7c63.tar.lz
dexon-solidity-a5696e1f0a87a2912cc64d2538751836658e7c63.tar.xz
dexon-solidity-a5696e1f0a87a2912cc64d2538751836658e7c63.tar.zst
dexon-solidity-a5696e1f0a87a2912cc64d2538751836658e7c63.zip
Renamed function.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/inlineasm/AsmParser.cpp8
-rw-r--r--libsolidity/inlineasm/AsmParser.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/libsolidity/inlineasm/AsmParser.cpp b/libsolidity/inlineasm/AsmParser.cpp
index cd3ea0da..048d916d 100644
--- a/libsolidity/inlineasm/AsmParser.cpp
+++ b/libsolidity/inlineasm/AsmParser.cpp
@@ -130,7 +130,7 @@ assembly::Statement Parser::parseExpression()
return operation;
}
-std::map<string, dev::solidity::Instruction> Parser::getInstructions()
+std::map<string, dev::solidity::Instruction> const& Parser::instructions()
{
// Allowed instructions, lowercase names.
static map<string, dev::solidity::Instruction> s_instructions;
@@ -156,7 +156,7 @@ std::map<string, dev::solidity::Instruction> Parser::getInstructions()
assembly::Statement Parser::parseElementaryOperation(bool _onlySinglePusher)
{
- map<string, dev::solidity::Instruction> s_instructions = getInstructions();
+ map<string, dev::solidity::Instruction> const& s_instructions = instructions();
Statement ret;
switch (m_scanner->currentToken())
@@ -178,7 +178,7 @@ assembly::Statement Parser::parseElementaryOperation(bool _onlySinglePusher)
// first search the set of instructions.
if (s_instructions.count(literal))
{
- dev::solidity::Instruction const& instr = s_instructions[literal];
+ dev::solidity::Instruction const& instr = s_instructions.at(literal);
if (_onlySinglePusher)
{
InstructionInfo info = dev::solidity::instructionInfo(instr);
@@ -210,7 +210,7 @@ assembly::Statement Parser::parseElementaryOperation(bool _onlySinglePusher)
assembly::VariableDeclaration Parser::parseVariableDeclaration()
{
- map<string, dev::solidity::Instruction> s_instructions = getInstructions();
+ map<string, dev::solidity::Instruction> const& s_instructions = instructions();
VariableDeclaration varDecl = createWithLocation<VariableDeclaration>();
expectToken(Token::Let);
varDecl.name = m_scanner->currentLiteral();
diff --git a/libsolidity/inlineasm/AsmParser.h b/libsolidity/inlineasm/AsmParser.h
index 764c53f6..643548dd 100644
--- a/libsolidity/inlineasm/AsmParser.h
+++ b/libsolidity/inlineasm/AsmParser.h
@@ -64,7 +64,7 @@ protected:
Statement parseStatement();
/// Parses a functional expression that has to push exactly one stack element
Statement parseExpression();
- std::map<std::string, dev::solidity::Instruction> getInstructions();
+ std::map<std::string, dev::solidity::Instruction> const& instructions();
Statement parseElementaryOperation(bool _onlySinglePusher = false);
VariableDeclaration parseVariableDeclaration();
FunctionalInstruction parseFunctionalInstruction(Statement&& _instruction);