possible bug fix

This commit is contained in:
David Anderson 2004-09-07 02:16:05 +00:00
parent 0fe010f4f0
commit 3cbcebae56
5 changed files with 23 additions and 6 deletions

View File

@ -313,11 +313,21 @@ int CForwardMngr::registerSPForward(const char *funcName, AMX *amx, int numParam
int retVal = (m_SPForwards.size() << 1) | 1;
CSPForward *pForward;
if (m_FreeSPForwards.size())
{
if (m_SPForwards.size())
{
retVal = m_FreeSPForwards.back();
m_FreeSPForwards.pop_back();
pForward = m_SPForwards[retVal>>1]; // >>1 because unregisterSPForward pushes the id which contains the sp flag
pForward->Set(funcName, amx, numParams, paramTypes);
} else {
m_SPForwards.clear();
pForward = new CSPForward();
if (!pForward)
return -1;
pForward->Set(funcName, amx, numParams, paramTypes);
m_SPForwards.push_back(pForward);
}
}
else
{

BIN
amxmodx/JIT/jits-lineop.o Executable file

Binary file not shown.

View File

@ -108,7 +108,7 @@
;
; GWMV: to generate LINE opcode, %define ALLOWOPLINE
;
%define ALLOWOPLINE
%undef ALLOWOPLINE
;
; If this is set to 1 the JIT generates relocatable code for case tables, too.

Binary file not shown.

View File

@ -14,6 +14,7 @@
# clean - clean the specifications above
# asm - for ASM implementation
# !! TODO - add memory mananger support
# lineop - for JIT only, uses slow version
$PROJECT = "amxmodx_mm";
$sdk = "../hlsdk/SourceCode";
@ -69,6 +70,8 @@ while ($cmd = shift)
}
} elsif ($cmd =~ /clean/) {
$OPTIONS{"clean"} = 1;
} elsif ($cmd =~ /lineop/) {
$OPTIONS{"lineop"} = 1;
}
}
@ -175,7 +178,11 @@ for ($i=0; $i<=$#C_SOURCE_FILES; $i++)
}
if ($OPTIONS{"jit"})
{
if ($OPTIONS{"lineop"}) {
push(@LINK, "JIT/jits-lineop.o");
} else {
push(@LINK, "JIT/jits.o");
}
}
if ($OPTIONS{"asm"})