aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGav Wood <i@gavwood.com>2014-08-27 04:27:45 +0800
committerGav Wood <i@gavwood.com>2014-08-27 04:27:45 +0800
commit00caaf53d28976ed276d9d2fe7a54c07ba92b002 (patch)
tree693fab3cc491ba38496a0c4cd56eb6de915ce1d4
parent74f198c0438a2674103c8e1ce24a0feedef278dc (diff)
downloaddexon-solidity-00caaf53d28976ed276d9d2fe7a54c07ba92b002.tar.gz
dexon-solidity-00caaf53d28976ed276d9d2fe7a54c07ba92b002.tar.zst
dexon-solidity-00caaf53d28976ed276d9d2fe7a54c07ba92b002.zip
Better interface for instrInfo.
-rw-r--r--Assembly.cpp6
-rw-r--r--CodeFragment.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/Assembly.cpp b/Assembly.cpp
index 491d3812..f397ec37 100644
--- a/Assembly.cpp
+++ b/Assembly.cpp
@@ -31,7 +31,7 @@ int AssemblyItem::deposit() const
switch (m_type)
{
case Operation:
- return c_instructionInfo.at((Instruction)(byte)m_data).ret - c_instructionInfo.at((Instruction)(byte)m_data).args;
+ return instructionInfo((Instruction)(byte)m_data).ret - instructionInfo((Instruction)(byte)m_data).args;
case Push: case PushString: case PushTag: case PushData: case PushSub: case PushSubSize:
return 1;
case Tag:
@@ -116,7 +116,7 @@ ostream& eth::operator<<(ostream& _out, AssemblyItemsConstRef _i)
switch (i.type())
{
case Operation:
- _out << " " << c_instructionInfo.at((Instruction)(byte)i.data()).name;
+ _out << " " << instructionInfo((Instruction)(byte)i.data()).name;
break;
case Push:
_out << " PUSH" << i.data();
@@ -153,7 +153,7 @@ ostream& Assembly::streamOut(ostream& _out, string const& _prefix) const
switch (i.m_type)
{
case Operation:
- _out << _prefix << " " << c_instructionInfo.at((Instruction)(byte)i.m_data).name << endl;
+ _out << _prefix << " " << instructionInfo((Instruction)(byte)i.m_data).name << endl;
break;
case Push:
_out << _prefix << " PUSH " << i.m_data << endl;
diff --git a/CodeFragment.cpp b/CodeFragment.cpp
index a9128e29..07d17fbe 100644
--- a/CodeFragment.cpp
+++ b/CodeFragment.cpp
@@ -369,7 +369,7 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s)
else if (c_instructions.count(us))
{
auto it = c_instructions.find(us);
- int ea = c_instructionInfo.at(it->second).args;
+ int ea = instructionInfo(it->second).args;
if (ea >= 0)
requireSize(ea);
else