X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=pr_comp.h;h=d1643b628e15be619dc3b02115222b0e4c2852ce;hb=fb48fac82baa01bb51650ff8b5db207a54abdbfd;hp=5fd9f0485149fa29ddf1dab704c9abc59fa3c21d;hpb=f9d8bc7ea04ff91fcbd90fe50a299b37724b349b;p=xonotic%2Fdarkplaces.git diff --git a/pr_comp.h b/pr_comp.h index 5fd9f048..d1643b62 100644 --- a/pr_comp.h +++ b/pr_comp.h @@ -42,7 +42,7 @@ typedef enum etype_e {ev_void, ev_string, ev_float, ev_vector, ev_entity, ev_fie #define RESERVED_OFS 28 -enum opcode_e +typedef enum opcode_e { OP_DONE, OP_MUL_F, @@ -119,7 +119,8 @@ enum opcode_e OP_BITAND, OP_BITOR -}; +} +opcode_t; typedef struct statement_s @@ -153,7 +154,7 @@ typedef struct dfunction_s int s_file; // source file defined in int numparms; - qbyte parm_size[MAX_PARMS]; + unsigned char parm_size[MAX_PARMS]; } dfunction_t; @@ -163,18 +164,34 @@ typedef struct mfunction_s int parm_start; int locals; // total ints of parms + locals - int profile; // runtime - int builtinsprofile; // cost of builtin functions called by this function - int callcount; // times the functions has been called since the last profile call + // these are doubles so that they can count up to 54bits or so rather than 32bit + double tprofile; // realtime in this function + double tbprofile; // realtime in builtins called by this function (NOTE: builtins also have a tprofile!) + double profile; // runtime + double builtinsprofile; // cost of builtin functions called by this function + double callcount; // times the functions has been called since the last profile call + double totaltime; // total execution time of this function DIRECTLY FROM THE ENGINE + double tprofile_total; // runtime (NOTE: tbprofile_total makes no real sense, so not accumulating that) + double profile_total; // runtime + double builtinsprofile_total; // cost of builtin functions called by this function + int recursion; int s_name; int s_file; // source file defined in int numparms; - qbyte parm_size[MAX_PARMS]; + unsigned char parm_size[MAX_PARMS]; } mfunction_t; +typedef struct mstatement_s +{ + opcode_t op; + int operand[3]; // always a global or -1 for unused + int jumpabsolute; // only used by IF, IFNOT, GOTO +} +mstatement_t; + #define PROG_VERSION 6 typedef struct dprograms_s