Skip to content

Commit

Permalink
baseline: Implement SELFDESTRUCT, mark default case unreachable
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Nov 11, 2020
1 parent bc8b7ea commit 31116dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/evmone/baseline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "execution_state.hpp"
#include "instructions.hpp"
#include <evmc/instructions.h>
#include <cassert>
#include <memory>

namespace evmone
Expand Down Expand Up @@ -707,6 +708,12 @@ evmc_result baseline_execute(evmc_vm* /*vm*/, const evmc_host_interface* host,
case OP_INVALID:
state->status = EVMC_INVALID_INSTRUCTION;
goto exit;
case OP_SELFDESTRUCT:
state->status = selfdestruct(*state);
goto exit;
default:
assert(false);
INTX_UNREACHABLE;
}

++pc;
Expand Down

0 comments on commit 31116dd

Please sign in to comment.