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:
@@ -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.
|
||||
|
||||
@@ -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_
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user