Browse Source

Improve Stack code formatting

cl-refactor
Paweł Bylica 10 years ago
parent
commit
fa6d4c63dc
  1. 8
      libevmjit/Stack.cpp
  2. 2
      libevmjit/Stack.h

8
libevmjit/Stack.cpp

@ -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)

2
libevmjit/Stack.h

@ -15,9 +15,7 @@ class RuntimeManager;
class Stack : public CompilerHelper
{
public:
Stack(llvm::IRBuilder<>& builder, RuntimeManager& runtimeManager);
virtual ~Stack();
llvm::Value* get(size_t _index);
void set(size_t _index, llvm::Value* _value);

Loading…
Cancel
Save