sourcemod/sourcepawn/jit/jit_function.cpp
David Anderson 3ac43497b9 Implement a watchdog timer for scripts that take too long to execute (bug 5837, r=fyren).
--HG--
extra : rebase_source : ffacb38457eca581660ce8f15c444ad828b7fedd
2013-08-14 23:54:25 -07:00

32 lines
569 B
C++

// vim: set ts=8 ts=2 sw=2 tw=99 et:
#include "jit_function.h"
#include "sp_vm_engine.h"
#include "jit_x86.h"
JitFunction::JitFunction(void *entry_addr, cell_t pcode_offs, LoopEdge *edges, uint32_t nedges)
: m_pEntryAddr(entry_addr),
m_PcodeOffs(pcode_offs),
edges_(edges),
nedges_(nedges)
{
}
JitFunction::~JitFunction()
{
delete [] edges_;
g_Jit.FreeCode(m_pEntryAddr);
}
void *
JitFunction::GetEntryAddress() const
{
return m_pEntryAddr;
}
cell_t
JitFunction::GetPCodeAddress() const
{
return m_PcodeOffs;
}