You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

40 lines
662 B

#pragma once
#include <memory>
#include "RuntimeData.h"
#include "ExecStats.h"
namespace dev
{
namespace eth
{
namespace jit
{
class ExecutionEngine
{
public:
ExecutionEngine() = default;
ExecutionEngine(ExecutionEngine const&) = delete;
void operator=(ExecutionEngine) = delete;
EXPORT ReturnCode run(RuntimeData* _data, Env* _env);
void collectStats();
std::unique_ptr<ExecStats> getStats();
/// Reference to returned data (RETURN opcode used)
bytes_ref returnData;
private:
/// After execution, if RETURN used, memory is moved there
/// to allow client copy the returned data
bytes m_memory;
std::unique_ptr<ExecStats> m_stats;
};
}
}
}