1.1 --- a/sourcepawn/include/sp_vm_api.h Wed Nov 08 08:04:57 2006 +0000
1.2 +++ b/sourcepawn/include/sp_vm_api.h Wed Nov 08 08:41:18 2006 +0000
1.3 @@ -8,6 +8,9 @@
1.4 {
1.5 class IVirtualMachine;
1.6
1.7 + /**
1.8 + * @brief Interface to managing a debug context at runtime.
1.9 + */
1.10 class IPluginDebugInfo
1.11 {
1.12 public:
1.13 @@ -36,6 +39,9 @@
1.14 virtual int LookupLine(ucell_t addr, uint32_t *line) =0;
1.15 };
1.16
1.17 + /**
1.18 + * @brief Interface to managing a context at runtime.
1.19 + */
1.20 class IPluginContext
1.21 {
1.22 public:
1.23 @@ -260,7 +266,6 @@
1.24 /**
1.25 * Binds a list of native names and their function pointers to a context.
1.26 * If num is 0, the list is read until an entry with a NULL name is reached.
1.27 - * All natives are assigned a status of SP_NATIVE_OKAY by default.
1.28 * If overwrite is non-zero, already registered natives will be overwritten.
1.29 *
1.30 * @param natives Array of natives.
1.31 @@ -272,29 +277,31 @@
1.32 /**
1.33 * Binds a single native. Overwrites any existing bind.
1.34 * If the context does not contain the native that will be binded the function will return
1.35 - * with a SP_ERROR_OT_FOUND error.
1.36 + * with a SP_ERROR_NOT_FOUND error.
1.37 *
1.38 * @param native Pointer to native.
1.39 - * @param status Status value to set (should be SP_NATIVE_OKAY).
1.40 */
1.41 - virtual int BindNative(sp_nativeinfo_t *native, uint32_t status) =0;
1.42 + virtual int BindNative(sp_nativeinfo_t *native) =0;
1.43
1.44 /**
1.45 - * Binds a single native to any non-registered or pending native.
1.46 - * Status is automatically set to pending.
1.47 + * Binds a single native to any non-registered native.
1.48 *
1.49 * @param native Native to bind.
1.50 */
1.51 virtual int BindNativeToAny(SPVM_NATIVE_FUNC native) =0;
1.52
1.53 /**
1.54 - * Executes a public function.
1.55 + * Executes a function ID located in this context.
1.56 + *
1.57 + * @param funcid Function id to execute.
1.58 + * @param result Pointer to store the return value (required).
1.59 + * @return Error code (if any) from the VM.
1.60 */
1.61 - virtual int Execute(uint32_t public_func, cell_t *result) =0;
1.62 + virtual int Execute(uint32_t funcid, cell_t *result) =0;
1.63 };
1.64
1.65 /**
1.66 - * Contains helper functions used by VMs and the host app
1.67 + * @brief Contains helper functions used by VMs and the host app
1.68 */
1.69 class ISourcePawnEngine
1.70 {
1.71 @@ -379,6 +386,9 @@
1.72 virtual ~ICompilation() { };
1.73 };
1.74
1.75 + /**
1.76 + * @brief Outlines the interface a Virtual Machine (JIT) must expose
1.77 + */
1.78 class IVirtualMachine
1.79 {
1.80 public: