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.
49 lines
634 B
49 lines
634 B
|
|
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#include <libevm/ExtVMFace.h>
|
|
|
|
#include "Utils.h"
|
|
|
|
|
|
#ifdef _MSC_VER
|
|
#define EXPORT __declspec(dllexport)
|
|
#else
|
|
#define EXPORT
|
|
#endif
|
|
|
|
namespace dev
|
|
{
|
|
namespace eth
|
|
{
|
|
namespace jit
|
|
{
|
|
|
|
using StackImpl = std::vector<i256>;
|
|
using MemoryImpl = bytes;
|
|
|
|
class Runtime
|
|
{
|
|
public:
|
|
Runtime(u256 _gas, ExtVMFace& _ext);
|
|
~Runtime();
|
|
|
|
Runtime(const Runtime&) = delete;
|
|
void operator=(const Runtime&) = delete;
|
|
|
|
static StackImpl& getStack();
|
|
static MemoryImpl& getMemory();
|
|
static ExtVMFace& getExt();
|
|
static u256 getGas();
|
|
|
|
private:
|
|
StackImpl m_stack;
|
|
MemoryImpl m_memory;
|
|
ExtVMFace& m_ext;
|
|
};
|
|
|
|
}
|
|
}
|
|
}
|
|
|