aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/Instruction.cpp
diff options
context:
space:
mode:
authorValentin Wüstholz <wuestholz@gmail.com>2017-01-23 03:49:12 +0800
committerchriseth <c@ethdev.com>2017-01-26 23:39:07 +0800
commit9bcbd93ac59a19320fd56e27c58a6283f2450666 (patch)
treecf102bce6745c1e771dcacbd83a6e850a09c0054 /libevmasm/Instruction.cpp
parent102fd7ee5daeb7d7a7bb1254cf0ce71a23ad1220 (diff)
downloaddexon-solidity-9bcbd93ac59a19320fd56e27c58a6283f2450666.tar
dexon-solidity-9bcbd93ac59a19320fd56e27c58a6283f2450666.tar.gz
dexon-solidity-9bcbd93ac59a19320fd56e27c58a6283f2450666.tar.bz2
dexon-solidity-9bcbd93ac59a19320fd56e27c58a6283f2450666.tar.lz
dexon-solidity-9bcbd93ac59a19320fd56e27c58a6283f2450666.tar.xz
dexon-solidity-9bcbd93ac59a19320fd56e27c58a6283f2450666.tar.zst
dexon-solidity-9bcbd93ac59a19320fd56e27c58a6283f2450666.zip
Change translation of implicit throws (issue #1589).
This adds a new invalid instruction that is used for encoding implicit throws that are emitted by the compiler. This makes it possible to distinguish such runtime errors from user-provided, explicit throws.
Diffstat (limited to 'libevmasm/Instruction.cpp')
-rw-r--r--libevmasm/Instruction.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libevmasm/Instruction.cpp b/libevmasm/Instruction.cpp
index 17445c59..ea5b5a10 100644
--- a/libevmasm/Instruction.cpp
+++ b/libevmasm/Instruction.cpp
@@ -154,6 +154,7 @@ const std::map<std::string, Instruction> dev::solidity::c_instructions =
{ "LOG2", Instruction::LOG2 },
{ "LOG3", Instruction::LOG3 },
{ "LOG4", Instruction::LOG4 },
+ { "INVALID", Instruction::INVALID },
{ "CREATE", Instruction::CREATE },
{ "CALL", Instruction::CALL },
{ "CALLCODE", Instruction::CALLCODE },
@@ -288,6 +289,7 @@ static const std::map<Instruction, InstructionInfo> c_instructionInfo =
{ Instruction::LOG2, { "LOG2", 0, 4, 0, true, Tier::Special } },
{ Instruction::LOG3, { "LOG3", 0, 5, 0, true, Tier::Special } },
{ Instruction::LOG4, { "LOG4", 0, 6, 0, true, Tier::Special } },
+ { Instruction::INVALID, { "INVALID", 0, 0, 0, true, Tier::Zero } },
{ Instruction::CREATE, { "CREATE", 0, 3, 1, true, Tier::Special } },
{ Instruction::CALL, { "CALL", 0, 7, 1, true, Tier::Special } },
{ Instruction::CALLCODE, { "CALLCODE", 0, 7, 1, true, Tier::Special } },