initial recleaning of this mess, preparing for merge of JIT proper

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%4074
This commit is contained in:
David Anderson
2006-09-20 01:59:56 +00:00
parent 302636d5e0
commit 45aa735928
9 changed files with 795 additions and 421 deletions
+14 -2
View File
@@ -74,7 +74,11 @@ namespace SourcePawn
virtual void BaseFree(void *memory) =0;
};
class ICompilation;
class ICompilation
{
public:
virtual ~ICompilation() { };
};
class IVirtualMachine
{
@@ -107,9 +111,17 @@ namespace SourcePawn
* Note: This will free the ICompilation pointer.
*
* @param co Compilation pointer.
* @param err Filled with error code on exit.
* @return New plugin context.
*/
virtual IPluginContext *CompileToContext(ICompilation *co) =0;
virtual IPluginContext *CompileToContext(ICompilation *co, int *err) =0;
/**
* Aborts a compilation and frees the ICompilation pointer.
*
* @param co Compilation pointer.
*/
virtual void AbortCompilation(ICompilation *co) =0;
/**
* Frees any internal variable usage on a context.
+14
View File
@@ -0,0 +1,14 @@
#ifndef _INCLUDE_SOURCEPAWN_VM_BASE_H_
#define _INCLUDE_SOURCEPAWN_VM_BASE_H_
#include <sp_vm_api.h>
#if defined WIN32
#define EXPORT_LINK extern "C" __declspec(dllexport)
#else if defined __GNUC__
#define EXPORT_LINK extern "C" __attribute__((visibility("default")))
#endif
typedef SourcePawn::IVirtualMachine *(*SP_GETVM_FUNC)(SourcePawn::ISourcePawnEngine *);
#endif //_INCLUDE_SOURCEPAWN_VM_BASE_H_
+1
View File
@@ -20,6 +20,7 @@ typedef int32_t cell_t;
#define SP_ERR_NATIVE_PENDING 8 /* A script tried to exec an unbound native */
#define SP_ERR_STACKERR 9 /* Stack/Heap collision */
#define SP_ERR_NOTDEBUGGING 10 /* Debug mode was not on or debug section not found */
#define SP_ERR_INVALID_INSTRUCTION 11 /* Invalid instruction was encountered */
/**********************************************
*** The following structures are reference structures.