--HG-- rename : public/amtl/ke_allocator_policies.h => public/amtl/am-allocator-policies.h rename : public/amtl/ke_inline_list.h => public/amtl/am-inline-list.h rename : public/amtl/ke_thread_posix.h => public/amtl/am-thread-posix.h rename : public/amtl/ke_thread_utils.h => public/amtl/am-thread-utils.h rename : public/amtl/ke_thread_windows.h => public/amtl/am-thread-windows.h rename : public/amtl/ke_utility.h => public/amtl/am-utility.h rename : public/amtl/ke_vector.h => public/amtl/am-vector.h
		
			
				
	
	
		
			39 lines
		
	
	
		
			787 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			787 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| // vim: set ts=8 sts=2 sw=2 tw=99 et:
 | |
| #ifndef _INCLUDE_SOURCEPAWN_JIT2_FUNCTION_H_
 | |
| #define _INCLUDE_SOURCEPAWN_JIT2_FUNCTION_H_
 | |
| 
 | |
| #include <sp_vm_types.h>
 | |
| #include <am-vector.h>
 | |
| 
 | |
| struct LoopEdge
 | |
| {
 | |
|   uint32_t offset;
 | |
|   int32_t disp32;
 | |
| };
 | |
| 
 | |
| class JitFunction
 | |
| {
 | |
|  public:
 | |
|   JitFunction(void *entry_addr, cell_t pcode_offs, LoopEdge *edges, uint32_t nedges);
 | |
|   ~JitFunction();
 | |
| 
 | |
|  public:
 | |
|   void *GetEntryAddress() const;
 | |
|   cell_t GetPCodeAddress() const;
 | |
|   uint32_t NumLoopEdges() const {
 | |
|     return nedges_;
 | |
|   }
 | |
|   const LoopEdge &GetLoopEdge(size_t i) const {
 | |
|     assert(i < nedges_);
 | |
|     return edges_[i];
 | |
|   }
 | |
| 
 | |
|  private:
 | |
|   void *m_pEntryAddr;
 | |
|   cell_t m_PcodeOffs;
 | |
|   LoopEdge *edges_;
 | |
|   uint32_t nedges_;
 | |
| };
 | |
| 
 | |
| #endif //_INCLUDE_SOURCEPAWN_JIT2_FUNCTION_H_
 |