Browse Source

Remove global Runtime pointer

cl-refactor
Paweł Bylica 10 years ago
parent
commit
65eaa13c17
  1. 9
      libevmjit/Runtime.cpp
  2. 1
      libevmjit/Runtime.h

9
libevmjit/Runtime.cpp

@ -57,13 +57,9 @@ llvm::Twine getName(RuntimeData::Index _index)
}
}
static Runtime* g_runtime; // FIXME: Remove
Runtime::Runtime(u256 _gas, ExtVMFace& _ext, jmp_buf _jmpBuf):
m_ext(_ext)
{
assert(!g_runtime);
g_runtime = this;
set(RuntimeData::Gas, _gas);
set(RuntimeData::Address, fromAddress(_ext.myAddress));
set(RuntimeData::Caller, fromAddress(_ext.caller));
@ -83,11 +79,6 @@ Runtime::Runtime(u256 _gas, ExtVMFace& _ext, jmp_buf _jmpBuf):
m_data.jmpBuf = _jmpBuf;
}
Runtime::~Runtime()
{
g_runtime = nullptr;
}
void Runtime::set(RuntimeData::Index _index, u256 _value)
{
m_data.elems[_index] = eth2llvm(_value);

1
libevmjit/Runtime.h

@ -63,7 +63,6 @@ class Runtime
{
public:
Runtime(u256 _gas, ExtVMFace& _ext, jmp_buf _jmpBuf);
~Runtime();
Runtime(const Runtime&) = delete;
void operator=(const Runtime&) = delete;

Loading…
Cancel
Save