Remove global Runtime pointer

This commit is contained in:
Paweł Bylica 2014-10-29 10:30:00 +01:00
parent 4684c6f363
commit 65eaa13c17
2 changed files with 0 additions and 10 deletions

View file

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

View file

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