|
|
@ -14,8 +14,8 @@ namespace eth |
|
|
|
namespace jit |
|
|
|
{ |
|
|
|
|
|
|
|
Stack::Stack(llvm::IRBuilder<>& _builder, RuntimeManager& _runtimeManager) |
|
|
|
: CompilerHelper(_builder), |
|
|
|
Stack::Stack(llvm::IRBuilder<>& _builder, RuntimeManager& _runtimeManager): |
|
|
|
CompilerHelper(_builder), |
|
|
|
m_runtimeManager(_runtimeManager) |
|
|
|
{ |
|
|
|
m_arg = m_builder.CreateAlloca(Type::i256, nullptr, "stack.arg"); |
|
|
@ -36,9 +36,6 @@ Stack::Stack(llvm::IRBuilder<>& _builder, RuntimeManager& _runtimeManager) |
|
|
|
m_set = Function::Create(FunctionType::get(Type::Void, getSetArgTypes, false), Linkage::ExternalLinkage, "stack_set", module); |
|
|
|
} |
|
|
|
|
|
|
|
Stack::~Stack() |
|
|
|
{} |
|
|
|
|
|
|
|
llvm::Value* Stack::get(size_t _index) |
|
|
|
{ |
|
|
|
m_builder.CreateCall3(m_get, m_runtimeManager.getRuntimePtr(), llvm::ConstantInt::get(Type::Size, _index, false), m_arg); |
|
|
@ -71,7 +68,6 @@ size_t Stack::maxStackSize = 0; |
|
|
|
|
|
|
|
extern "C" |
|
|
|
{ |
|
|
|
|
|
|
|
using namespace dev::eth::jit; |
|
|
|
|
|
|
|
EXPORT void stack_pop(Runtime* _rt, uint64_t _count) |
|
|
|