#define PRVM_FE_CHAIN 4
#define PRVM_OP_STATE 1
-#define PRVM_MAX_STACK_DEPTH 256
-#define PRVM_LOCALSTACK_SIZE 2048
+#define PRVM_MAX_STACK_DEPTH 1024
+#define PRVM_LOCALSTACK_SIZE 16384
+
+#define PRVM_MAX_OPENFILES 256
+#define PRVM_MAX_OPENSEARCHES 128
typedef void (*prvm_builtin_t) (void);
int *statement_linenums; // NULL if not available
+ double *statement_profile; // only incremented if prvm_statementprofiling is on
+
union {
float *generic;
globalvars_t *server;
//============================================================================
// until this point everything also exists (with the pr_ prefix) in the old vm
+ qfile_t *openfiles[PRVM_MAX_OPENFILES];
+ fssearch_t *opensearches[PRVM_MAX_OPENSEARCHES];
+
// copies of some vars that were former read from sv
int num_edicts;
// number of edicts for which space has been (should be) allocated
// number of reserved edicts (allocated from 1)
int reserved_edicts; // [INIT]
-
prvm_edict_t *edicts;
void *edictsfields;
void *edictprivate;
void _PRVM_Free (void *buffer, const char *filename, int fileline);
void _PRVM_FreeAll (const char *filename, int fileline);
+void PRVM_Profile (int maxfunctions, int mininstructions);
void PRVM_Profile_f (void);
+void PRVM_PrintFunction_f (void);
void PRVM_PrintState(void);
void PRVM_CrashAll (void);
void PRVM_ED_Free (prvm_edict_t *ed);
void PRVM_ED_ClearEdict (prvm_edict_t *e);
+void PRVM_PrintFunctionStatements (const char *name);
void PRVM_ED_Print(prvm_edict_t *ed);
void PRVM_ED_Write (qfile_t *f, prvm_edict_t *ed);
const char *PRVM_ED_ParseEdict (const char *data, prvm_edict_t *ent);
#define PRVM_End prog = 0
#endif
-
//#define PRVM_SAFENAME
#ifndef PRVM_SAFENAME
# define PRVM_NAME (prog->name)
int PRVM_GetProgNr(void);
+void VM_Warning(const char *fmt, ...);
// TODO: fill in the params
//void PRVM_Create();