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