sourcepawn/jit/jit_function.cpp
changeset 4013 6201c1180e0e
parent 2226 d10b38524be3
     1.1 --- a/sourcepawn/jit/jit_function.cpp	Wed Aug 14 17:18:02 2013 -0400
     1.2 +++ b/sourcepawn/jit/jit_function.cpp	Wed Aug 14 23:54:25 2013 -0700
     1.3 @@ -1,23 +1,31 @@
     1.4 +// vim: set ts=8 ts=2 sw=2 tw=99 et:
     1.5  #include "jit_function.h"
     1.6  #include "sp_vm_engine.h"
     1.7  #include "jit_x86.h"
     1.8  
     1.9 -JitFunction::JitFunction(void *entry_addr, cell_t pcode_offs)
    1.10 -: m_pEntryAddr(entry_addr), m_PcodeOffs(pcode_offs)
    1.11 +JitFunction::JitFunction(void *entry_addr, cell_t pcode_offs, LoopEdge *edges, uint32_t nedges)
    1.12 +  : m_pEntryAddr(entry_addr),
    1.13 +    m_PcodeOffs(pcode_offs),
    1.14 +    edges_(edges),
    1.15 +    nedges_(nedges)
    1.16  {
    1.17  }
    1.18  
    1.19  JitFunction::~JitFunction()
    1.20  {
    1.21 -	g_Jit.FreeCode(m_pEntryAddr);
    1.22 +  delete [] edges_;
    1.23 +  g_Jit.FreeCode(m_pEntryAddr);
    1.24  }
    1.25  
    1.26 -void *JitFunction::GetEntryAddress()
    1.27 +void *
    1.28 +JitFunction::GetEntryAddress() const
    1.29  {
    1.30 -	return m_pEntryAddr;
    1.31 +  return m_pEntryAddr;
    1.32  }
    1.33  
    1.34 -cell_t JitFunction::GetPCodeAddress()
    1.35 +cell_t
    1.36 +JitFunction::GetPCodeAddress() const
    1.37  {
    1.38 -	return m_PcodeOffs;
    1.39 +  return m_PcodeOffs;
    1.40  }
    1.41 +