mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +00:00
Remove terminate() function
This commit is contained in:
parent
5db00adf56
commit
86553cda81
4 changed files with 4 additions and 33 deletions
|
|
@ -11,29 +11,12 @@ namespace eth
|
|||
{
|
||||
namespace jit
|
||||
{
|
||||
namespace
|
||||
{
|
||||
jmp_buf_ref g_currJmpBuf;
|
||||
}
|
||||
|
||||
jmp_buf_ref Runtime::getCurrJmpBuf()
|
||||
{
|
||||
return g_currJmpBuf;
|
||||
}
|
||||
|
||||
Runtime::Runtime(RuntimeData* _data, Env* _env) :
|
||||
m_data(*_data),
|
||||
m_env(*_env),
|
||||
m_currJmpBuf(m_jmpBuf),
|
||||
m_prevJmpBuf(g_currJmpBuf)
|
||||
{
|
||||
g_currJmpBuf = m_jmpBuf;
|
||||
}
|
||||
|
||||
Runtime::~Runtime()
|
||||
{
|
||||
g_currJmpBuf = m_prevJmpBuf;
|
||||
}
|
||||
m_currJmpBuf(m_jmpBuf)
|
||||
{}
|
||||
|
||||
bytes Runtime::getReturnData() const // FIXME: Reconsider returning by copy
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ class Runtime
|
|||
{
|
||||
public:
|
||||
Runtime(RuntimeData* _data, Env* _env);
|
||||
~Runtime();
|
||||
|
||||
Runtime(const Runtime&) = delete;
|
||||
void operator=(const Runtime&) = delete;
|
||||
|
|
@ -43,7 +42,6 @@ public:
|
|||
|
||||
bytes getReturnData() const;
|
||||
jmp_buf_ref getJmpBuf() { return m_jmpBuf; }
|
||||
static jmp_buf_ref getCurrJmpBuf();
|
||||
|
||||
private:
|
||||
RuntimeData& m_data; ///< Pointer to data. Expected by compiled contract.
|
||||
|
|
@ -51,7 +49,6 @@ private:
|
|||
jmp_buf_ref m_currJmpBuf; ///< Pointer to jump buffer. Expected by compiled contract.
|
||||
byte* m_memoryData = nullptr;
|
||||
i256 m_memorySize = {};
|
||||
jmp_buf_ref m_prevJmpBuf;
|
||||
std::jmp_buf m_jmpBuf;
|
||||
StackImpl m_stack;
|
||||
MemoryImpl m_memory;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
#include <csetjmp>
|
||||
#include <llvm/ADT/APInt.h>
|
||||
#include "Utils.h"
|
||||
#include "Instruction.h"
|
||||
#include "Runtime.h"
|
||||
|
||||
namespace dev
|
||||
{
|
||||
|
|
@ -55,12 +54,6 @@ llvm::APInt readPushData(bytes::const_iterator& _curr, bytes::const_iterator _en
|
|||
return value;
|
||||
}
|
||||
|
||||
void terminate(ReturnCode _returnCode)
|
||||
{
|
||||
auto jmpBuf = Runtime::getCurrJmpBuf();
|
||||
std::longjmp(jmpBuf, static_cast<int>(_returnCode));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ struct JIT: public NoteChannel { static const char* name() { return "JIT"; } };
|
|||
u256 llvm2eth(i256);
|
||||
i256 eth2llvm(u256);
|
||||
|
||||
void terminate(ReturnCode _returnCode);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue