possible bug fix
This commit is contained in:
parent
0fe010f4f0
commit
3cbcebae56
@ -313,11 +313,21 @@ int CForwardMngr::registerSPForward(const char *funcName, AMX *amx, int numParam
|
|||||||
int retVal = (m_SPForwards.size() << 1) | 1;
|
int retVal = (m_SPForwards.size() << 1) | 1;
|
||||||
CSPForward *pForward;
|
CSPForward *pForward;
|
||||||
if (m_FreeSPForwards.size())
|
if (m_FreeSPForwards.size())
|
||||||
|
{
|
||||||
|
if (m_SPForwards.size())
|
||||||
{
|
{
|
||||||
retVal = m_FreeSPForwards.back();
|
retVal = m_FreeSPForwards.back();
|
||||||
m_FreeSPForwards.pop_back();
|
m_FreeSPForwards.pop_back();
|
||||||
pForward = m_SPForwards[retVal>>1]; // >>1 because unregisterSPForward pushes the id which contains the sp flag
|
pForward = m_SPForwards[retVal>>1]; // >>1 because unregisterSPForward pushes the id which contains the sp flag
|
||||||
pForward->Set(funcName, amx, numParams, paramTypes);
|
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
|
else
|
||||||
{
|
{
|
||||||
|
BIN
amxmodx/JIT/jits-lineop.o
Executable file
BIN
amxmodx/JIT/jits-lineop.o
Executable file
Binary file not shown.
@ -108,7 +108,7 @@
|
|||||||
;
|
;
|
||||||
; GWMV: to generate LINE opcode, %define ALLOWOPLINE
|
; 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.
|
; If this is set to 1 the JIT generates relocatable code for case tables, too.
|
||||||
|
Binary file not shown.
@ -14,6 +14,7 @@
|
|||||||
# clean - clean the specifications above
|
# clean - clean the specifications above
|
||||||
# asm - for ASM implementation
|
# asm - for ASM implementation
|
||||||
# !! TODO - add memory mananger support
|
# !! TODO - add memory mananger support
|
||||||
|
# lineop - for JIT only, uses slow version
|
||||||
|
|
||||||
$PROJECT = "amxmodx_mm";
|
$PROJECT = "amxmodx_mm";
|
||||||
$sdk = "../hlsdk/SourceCode";
|
$sdk = "../hlsdk/SourceCode";
|
||||||
@ -69,6 +70,8 @@ while ($cmd = shift)
|
|||||||
}
|
}
|
||||||
} elsif ($cmd =~ /clean/) {
|
} elsif ($cmd =~ /clean/) {
|
||||||
$OPTIONS{"clean"} = 1;
|
$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{"jit"})
|
||||||
{
|
{
|
||||||
|
if ($OPTIONS{"lineop"}) {
|
||||||
|
push(@LINK, "JIT/jits-lineop.o");
|
||||||
|
} else {
|
||||||
push(@LINK, "JIT/jits.o");
|
push(@LINK, "JIT/jits.o");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($OPTIONS{"asm"})
|
if ($OPTIONS{"asm"})
|
||||||
|
Loading…
Reference in New Issue
Block a user