-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexecution.cpp
34 lines (31 loc) · 1.36 KB
/
execution.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// evmone: Fast Ethereum Virtual Machine implementation
// Copyright 2019-2020 The evmone Authors.
// SPDX-License-Identifier: Apache-2.0
#include "instructions.hpp"
#include "execution.hpp"
#include "analysis.hpp"
#include <memory>
evmc_result execute(AdvancedExecutionState& state, const AdvancedCodeAnalysis& analysis) noexcept {
// state.analysis = &analysis; // Allow accessing the analysis by instructions.
//
// const auto* instr = &state.analysis->instrs[0]; // Start with the first instruction.
// while (instr != nullptr)
// instr = instr->fn(instr, state);
//
// const auto gas_left =
// (state.status == EVMC_SUCCESS || state.status == EVMC_REVERT) ? state.gas_left : 0;
//
// return evmc::make_result(
// state.status, gas_left, &state.memory[state.output_offset], state.output_size);
evmc_result result;
return result;
}
// this function is re-implemented, so gonna deprecate this implementation
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 {
// const auto analysis = analyze(rev, code, code_size);
// auto state = std::make_unique<AdvancedExecutionState>(*msg, rev, *host, ctx, code, code_size);
// return execute(*state, analysis);
evmc_result result;
return result;
}