- moved the type infomation entirely out of VMValue.
For the varargs functions that used the Type field to validate their parameters, now a hidden additional argument is passed which contains a byte array with the type info for the current call's arguments. Since this is static per call location it can be better prepared once when the code is being compiled instead of being put in a runtime created array for each invocation. Everything else uses the per-function instance of the same data. The only thing that still needed the type field with a VMValue is the defaults array, so this uses a different struct type now to store its data.
This commit is contained in:
parent
a981737855
commit
a9ec819557
18 changed files with 265 additions and 164 deletions
|
|
@ -62,7 +62,6 @@
|
|||
#include "g_levellocals.h"
|
||||
#include "vm.h"
|
||||
|
||||
FString FStringFormat(VM_ARGS); // extern from thingdef_data.cpp
|
||||
|
||||
#include "gi.h"
|
||||
|
||||
|
|
@ -1294,7 +1293,9 @@ DEFINE_ACTION_FUNCTION(_Console, HideConsole)
|
|||
DEFINE_ACTION_FUNCTION(_Console, Printf)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
FString s = FStringFormat(param, numparam, ret, numret);
|
||||
PARAM_VA_POINTER(va_reginfo) // Get the hidden type information array
|
||||
|
||||
FString s = FStringFormat(VM_ARGS_NAMES);
|
||||
Printf("%s\n", s.GetChars());
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue