1.1 --- a/sourcepawn/jit/BaseRuntime.h Sun Aug 10 05:39:25 2008 +0000
1.2 +++ b/sourcepawn/jit/BaseRuntime.h Fri Aug 15 05:22:26 2008 +0000
1.3 @@ -6,6 +6,7 @@
1.4 #include "sp_vm_function.h"
1.5
1.6 class BaseContext;
1.7 +class JitFunction;
1.8
1.9 class DebugInfo : public IPluginDebugInfo
1.10 {
1.11 @@ -23,9 +24,10 @@
1.12 class BaseRuntime : public SourcePawn::IPluginRuntime
1.13 {
1.14 public:
1.15 - BaseRuntime(sp_plugin_t *pl);
1.16 + BaseRuntime();
1.17 ~BaseRuntime();
1.18 public:
1.19 + virtual int CreateFromMemory(sp_file_hdr_t *hdr, uint8_t *base);
1.20 virtual bool IsDebugging();
1.21 virtual IPluginDebugInfo *GetDebugInfo();
1.22 virtual int FindNativeByName(const char *name, uint32_t *index);
1.23 @@ -45,16 +47,23 @@
1.24 virtual void SetPauseState(bool paused);
1.25 virtual bool IsPaused();
1.26 virtual size_t GetMemUsage();
1.27 + JitFunction *GetJittedFunction(uint32_t idx);
1.28 + uint32_t AddJittedFunction(JitFunction *fn);
1.29 public:
1.30 BaseContext *GetBaseContext();
1.31 private:
1.32 - void ClearCompile();
1.33 - void RefreshFunctionCache();
1.34 + sp_plugin_t m_plugin;
1.35 + unsigned int m_NumFuncs;
1.36 + unsigned int m_MaxFuncs;
1.37 + JitFunction **m_FuncCache;
1.38 public:
1.39 DebugInfo m_Debug;
1.40 sp_plugin_t *m_pPlugin;
1.41 BaseContext *m_pCtx;
1.42 CFunction **m_PubFuncs;
1.43 + JitFunction **m_PubJitFuncs;
1.44 + ICompilation *m_pCo;
1.45 + unsigned int m_CompSerial;
1.46 };
1.47
1.48 #endif //_INCLUDE_SOURCEPAWN_JIT_RUNTIME_H_