Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade EVMC to version 7.0.0 #204

Merged
merged 1 commit into from
Nov 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion evmc
2 changes: 1 addition & 1 deletion lib/evmone/analysis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ struct execution_state
const uint8_t* code = nullptr;
size_t code_size = 0;

evmc::HostContext host{nullptr};
evmc::HostContext host;

evmc_revision rev = {};

Expand Down
6 changes: 3 additions & 3 deletions lib/evmone/execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

namespace evmone
{
evmc_result execute(evmc_vm* /*unused*/, evmc_host_context* ctx, evmc_revision rev,
const evmc_message* msg, const uint8_t* code, size_t code_size) noexcept
evmc_result execute(evmc_vm* /*unused*/, const evmc_host_interface* host, evmc_host_context* ctx,
evmc_revision rev, const evmc_message* msg, const uint8_t* code, size_t code_size) noexcept
{
auto analysis = analyze(rev, code, code_size);

Expand All @@ -18,7 +18,7 @@ evmc_result execute(evmc_vm* /*unused*/, evmc_host_context* ctx, evmc_revision r
state->msg = msg;
state->code = code;
state->code_size = code_size;
state->host = evmc::HostContext{ctx};
state->host = evmc::HostContext{*host, ctx};
state->gas_left = msg->gas;
state->rev = rev;

Expand Down
4 changes: 2 additions & 2 deletions lib/evmone/execution.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

namespace evmone
{
evmc_result execute(evmc_vm* vm, evmc_host_context* ctx, evmc_revision rev, const evmc_message* msg,
const uint8_t* code, size_t code_size) noexcept;
evmc_result execute(evmc_vm* vm, const evmc_host_interface* host, evmc_host_context* ctx,
evmc_revision rev, const evmc_message* msg, const uint8_t* code, size_t code_size) noexcept;
} // namespace evmone
3 changes: 1 addition & 2 deletions test/bench/bench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ inline evmc::result execute(bytes_view code, bytes_view input) noexcept
msg.gas = gas_limit;
msg.input_data = input.data();
msg.input_size = input.size();
auto null_ctx = evmc_host_context{};
return vm.execute(null_ctx, EVMC_CONSTANTINOPLE, msg, code.data(), code.size());
return vm.execute(EVMC_CONSTANTINOPLE, msg, code.data(), code.size());
}

void execute(State& state, bytes_view code, bytes_view input) noexcept
Expand Down