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.
52 lines
756 B
52 lines
756 B
10 years ago
|
#pragma once
|
||
|
|
||
10 years ago
|
#include "Utils.h"
|
||
10 years ago
|
|
||
|
|
||
|
namespace dev
|
||
|
{
|
||
|
namespace eth
|
||
|
{
|
||
|
namespace jit
|
||
|
{
|
||
10 years ago
|
|
||
10 years ago
|
struct RuntimeData
|
||
|
{
|
||
|
enum Index
|
||
|
{
|
||
|
Gas,
|
||
|
Address,
|
||
|
Caller,
|
||
|
Origin,
|
||
|
CallValue,
|
||
|
CallDataSize,
|
||
|
GasPrice,
|
||
|
CoinBase,
|
||
|
TimeStamp,
|
||
|
Number,
|
||
|
Difficulty,
|
||
|
GasLimit,
|
||
|
CodeSize,
|
||
|
|
||
|
_size,
|
||
|
|
||
|
ReturnDataOffset = CallValue, // Reuse 2 fields for return data reference
|
||
10 years ago
|
ReturnDataSize = CallDataSize,
|
||
|
SuicideDestAddress = Address, ///< Suicide balance destination address
|
||
10 years ago
|
};
|
||
|
|
||
10 years ago
|
i256 elems[_size] = {};
|
||
|
byte const* callData = nullptr;
|
||
|
byte const* code = nullptr;
|
||
|
|
||
|
void set(Index _index, u256 _value) { elems[_index] = eth2llvm(_value); }
|
||
10 years ago
|
u256 get(Index _index) { return llvm2eth(elems[_index]); }
|
||
10 years ago
|
};
|
||
|
|
||
10 years ago
|
/// VM Environment (ExtVM) opaque type
|
||
|
struct Env;
|
||
|
|
||
10 years ago
|
}
|
||
|
}
|
||
|
}
|