- backend update from GZDoom.

This commit is contained in:
Christoph Oelckers 2020-10-24 17:30:47 +02:00
parent 8b03abcd00
commit c82d9d2908
28 changed files with 178 additions and 53 deletions

View file

@ -284,6 +284,13 @@ static bool CanJit(VMScriptFunction *func)
int VMScriptFunction::FirstScriptCall(VMFunction *func, VMValue *params, int numparams, VMReturn *ret, int numret)
{
// [Player701] Check that we aren't trying to call an abstract function.
// This shouldn't happen normally, but if it does, let's catch this explicitly
// rather than let GZDoom crash.
if (func->VarFlags & VARF_Abstract)
{
ThrowAbortException(X_OTHER, "attempt to call abstract function %s.", func->PrintableName.GetChars());
}
#ifdef HAVE_VM_JIT
if (vm_jit && CanJit(static_cast<VMScriptFunction*>(func)))
{
@ -654,7 +661,11 @@ CVMAbortException::CVMAbortException(EVMAbortException reason, const char *morei
}
if (moreinfo != nullptr)
{
AppendMessage(" ");
// [Player701] avoid double space
if (reason != X_OTHER)
{
AppendMessage(" ");
}
size_t len = strlen(m_Message);
myvsnprintf(m_Message + len, MAX_ERRORTEXT - len, moreinfo, ap);
}