sourcepawn/jit/engine2.h
author David Anderson <dvander@alliedmods.net>
Sun Oct 26 23:50:54 2008 -0500 (2008-10-26)
changeset 2377 6ee3bbd6fbdf
parent 2226 d10b38524be3
child 2545 9cb1a1fefc2c
permissions -rw-r--r--
Fixed leaking relocation table memory in JIT.
     1 #ifndef _INCLUDE_SOURCEPAWN_ENGINE_2_H_
     2 #define _INCLUDE_SOURCEPAWN_ENGINE_2_H_
     3 
     4 #include <sp_vm_api.h>
     5 
     6 namespace SourcePawn
     7 {
     8 	/** 
     9 	 * @brief Outlines the interface a Virtual Machine (JIT) must expose
    10 	 */
    11 	class SourcePawnEngine2 : public ISourcePawnEngine2
    12 	{
    13 	public:
    14 		SourcePawnEngine2();
    15 	public:
    16 		unsigned int GetAPIVersion();
    17 		const char *GetEngineName();
    18 		const char *GetVersionString();
    19 		IPluginRuntime *LoadPlugin(ICompilation *co, const char *file, int *err);
    20 		SPVM_NATIVE_FUNC CreateFakeNative(SPVM_FAKENATIVE_FUNC callback, void *pData);
    21 		void DestroyFakeNative(SPVM_NATIVE_FUNC func);
    22 		IDebugListener *SetDebugListener(IDebugListener *listener);
    23 		void SetProfiler(IProfiler *profiler);
    24 		ICompilation *StartCompilation();
    25 		const char *GetErrorString(int err);
    26 		bool Initialize();
    27 		void Shutdown();
    28 	public:
    29 		IProfiler *GetProfiler();
    30 	private:
    31 		IProfiler *m_Profiler;
    32 	};
    33 }
    34 
    35 extern SourcePawn::SourcePawnEngine2 g_engine2;
    36 
    37 #endif //_INCLUDE_SOURCEPAWN_ENGINE_2_H_