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.
61 lines
964 B
61 lines
964 B
#pragma once
|
|
|
|
#include <memory>
|
|
#include "Common.h"
|
|
|
|
|
|
namespace dev
|
|
{
|
|
namespace evmjit
|
|
{
|
|
class ExecutionContext;
|
|
}
|
|
namespace eth
|
|
{
|
|
namespace jit
|
|
{
|
|
using namespace evmjit; // FIXME
|
|
|
|
enum class ExecState
|
|
{
|
|
Started,
|
|
CacheLoad,
|
|
CacheWrite,
|
|
Compilation,
|
|
Optimization,
|
|
CodeGen,
|
|
Execution,
|
|
Return,
|
|
Finished
|
|
};
|
|
|
|
class ExecutionEngineListener
|
|
{
|
|
public:
|
|
ExecutionEngineListener() = default;
|
|
ExecutionEngineListener(ExecutionEngineListener const&) = delete;
|
|
ExecutionEngineListener& operator=(ExecutionEngineListener) = delete;
|
|
virtual ~ExecutionEngineListener() {}
|
|
|
|
virtual void executionStarted() {}
|
|
virtual void executionEnded() {}
|
|
|
|
virtual void stateChanged(ExecState) {}
|
|
};
|
|
|
|
class ExecutionEngine
|
|
{
|
|
public:
|
|
ExecutionEngine(ExecutionEngine const&) = delete;
|
|
ExecutionEngine& operator=(ExecutionEngine const&) = delete;
|
|
|
|
EXPORT static ReturnCode run(ExecutionContext& _context);
|
|
|
|
private:
|
|
ExecutionEngine();
|
|
static ExecutionEngine& get();
|
|
};
|
|
|
|
}
|
|
}
|
|
}
|
|
|