From 5668f23b503f4d39b0acdb32fd52a9a7e3ecf321 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 11 Jul 2008 06:51:21 +0000 Subject: [PATCH] fixed a compat regression, forgot msvc does funky things with overloaded virtual calls --HG-- branch : refac-jit extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/refac-jit%402399 --- public/sourcepawn/sp_vm_api.h | 6 +++--- sourcepawn/jit/sp_vm_basecontext.cpp | 2 +- sourcepawn/jit/sp_vm_basecontext.h | 2 +- sourcepawn/jit/sp_vm_function.cpp | 12 ++++++------ sourcepawn/jit/sp_vm_function.h | 4 ++-- sourcepawn/jit/x86/jit_x86.cpp | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/public/sourcepawn/sp_vm_api.h b/public/sourcepawn/sp_vm_api.h index 809dc0ed..6de6f6ee 100644 --- a/public/sourcepawn/sp_vm_api.h +++ b/public/sourcepawn/sp_vm_api.h @@ -240,7 +240,7 @@ namespace SourcePawn * @param result Pointer to store return value in. * @return Error code, if any. */ - virtual int Execute(IPluginContext *ctx, cell_t *result) =0; + virtual int Execute2(IPluginContext *ctx, cell_t *result) =0; /** * @brief Executes the function with the given parameter array. @@ -256,7 +256,7 @@ namespace SourcePawn * @param result Pointer to store result of function on return. * @return SourcePawn error code (if any). */ - virtual int CallFunction(IPluginContext *ctx, + virtual int CallFunction2(IPluginContext *ctx, const cell_t *params, unsigned int num_params, cell_t *result) =0; @@ -833,7 +833,7 @@ namespace SourcePawn * @param result Optional pointer to store the result on success. * @return Error code. */ - virtual int Execute(IPluginFunction *function, + virtual int Execute2(IPluginFunction *function, const cell_t *params, unsigned int num_params, cell_t *result) =0; diff --git a/sourcepawn/jit/sp_vm_basecontext.cpp b/sourcepawn/jit/sp_vm_basecontext.cpp index 32b3c3ae..5ac58d41 100644 --- a/sourcepawn/jit/sp_vm_basecontext.cpp +++ b/sourcepawn/jit/sp_vm_basecontext.cpp @@ -511,7 +511,7 @@ bool BaseContext::IsInExec() return m_InExec; } -int BaseContext::Execute(IPluginFunction *function, const cell_t *params, unsigned int num_params, cell_t *result) +int BaseContext::Execute2(IPluginFunction *function, const cell_t *params, unsigned int num_params, cell_t *result) { int ir; int serial; diff --git a/sourcepawn/jit/sp_vm_basecontext.h b/sourcepawn/jit/sp_vm_basecontext.h index 38a3e67e..b92b33df 100644 --- a/sourcepawn/jit/sp_vm_basecontext.h +++ b/sourcepawn/jit/sp_vm_basecontext.h @@ -86,7 +86,7 @@ public: //IPluginContext cell_t *GetNullRef(SP_NULL_TYPE type); int LocalToStringNULL(cell_t local_addr, char **addr); int BindNativeToIndex(uint32_t index, SPVM_NATIVE_FUNC native); - int Execute(IPluginFunction *function, const cell_t *params, unsigned int num_params, cell_t *result); + int Execute2(IPluginFunction *function, const cell_t *params, unsigned int num_params, cell_t *result); IPluginRuntime *GetRuntime(); int GetLastNativeError(); cell_t *GetLocalParams(); diff --git a/sourcepawn/jit/sp_vm_function.cpp b/sourcepawn/jit/sp_vm_function.cpp index aea522e4..6a52ea02 100644 --- a/sourcepawn/jit/sp_vm_function.cpp +++ b/sourcepawn/jit/sp_vm_function.cpp @@ -55,12 +55,12 @@ bool CFunction::IsRunnable() int CFunction::CallFunction(const cell_t *params, unsigned int num_params, cell_t *result) { - return CallFunction(m_pRuntime->GetDefaultContext(), params, num_params, result); + return CallFunction2(m_pRuntime->GetDefaultContext(), params, num_params, result); } -int CFunction::CallFunction(IPluginContext *pContext, const cell_t *params, unsigned int num_params, cell_t *result) +int CFunction::CallFunction2(IPluginContext *pContext, const cell_t *params, unsigned int num_params, cell_t *result) { - return pContext->Execute(this, params, num_params, result); + return pContext->Execute2(this, params, num_params, result); } IPluginContext *CFunction::GetParentContext() @@ -170,10 +170,10 @@ void CFunction::Cancel() int CFunction::Execute(cell_t *result) { - return Execute(m_pRuntime->GetDefaultContext(), result); + return Execute2(m_pRuntime->GetDefaultContext(), result); } -int CFunction::Execute(IPluginContext *ctx, cell_t *result) +int CFunction::Execute2(IPluginContext *ctx, cell_t *result) { int err = SP_ERROR_NONE; @@ -283,7 +283,7 @@ int CFunction::Execute(IPluginContext *ctx, cell_t *result) /* Make the call if we can */ if (err == SP_ERROR_NONE) { - if ((err = CallFunction(ctx, temp_params, numparams, result)) != SP_ERROR_NONE) + if ((err = CallFunction2(ctx, temp_params, numparams, result)) != SP_ERROR_NONE) { docopies = false; } diff --git a/sourcepawn/jit/sp_vm_function.h b/sourcepawn/jit/sp_vm_function.h index d9fe8f6c..c9f9c610 100644 --- a/sourcepawn/jit/sp_vm_function.h +++ b/sourcepawn/jit/sp_vm_function.h @@ -79,8 +79,8 @@ public: void Invalidate(); bool IsRunnable(); funcid_t GetFunctionID(); - int Execute(IPluginContext *ctx, cell_t *result); - int CallFunction(IPluginContext *ctx, + int Execute2(IPluginContext *ctx, cell_t *result); + int CallFunction2(IPluginContext *ctx, const cell_t *params, unsigned int num_params, cell_t *result); diff --git a/sourcepawn/jit/x86/jit_x86.cpp b/sourcepawn/jit/x86/jit_x86.cpp index 0c283cf1..f8bb89ee 100644 --- a/sourcepawn/jit/x86/jit_x86.cpp +++ b/sourcepawn/jit/x86/jit_x86.cpp @@ -38,7 +38,7 @@ #include "../jit_version.h" #include "../sp_vm_engine.h" #include "../engine2.h" -#include "BaseRuntime.h" +#include "../BaseRuntime.h" #include "../sp_vm_basecontext.h" #if defined USE_UNGEN_OPCODES