pike.git / src / program.h

version» Context lines:

pike.git/src/program.h:191:    * Max program dimensions:    * 2^16 functions + global variables    * 2^16 inherits    * 2^16 arguments to pike functions    * 2^32 efuns    * 2^8 local variables (and arguments)    */      union idptr   { +  /* For variables: Offset of the variable in the storage pointed to +  * by inherit.storage_offset in the struct inherit that corresponds +  * to the identifier. See LOW_GET_GLOBAL and GET_GLOBAL. The stored +  * variable may be either a normal or a short svalue, depending on +  * identifier.run_time_type. (IDENTIFIER_VARIABLE) +  * +  * For pike functions: Offset to the start of the function in +  * program.program in the program pointed to by prog in the struct +  * inherit that corresponds to the identifier. Or -1 if a prototype. +  * (IDENTIFIER_PIKE_FUNCTION) +  */ +  ptrdiff_t offset; +     /* External symbol reference. (IDENTIFIER_EXTERN)    *    * Note that this bit MUST be checked to be zero    * before looking at the other four cases!    */    struct {    unsigned short depth; /* Scope count. */    unsigned short id; /* Reference number. */    } ext_ref;   
pike.git/src/program.h:221:    /* Getter/setter reference pair. (IDENTIFIER_VARIABLE && PIKE_T_GET_SET)    */    struct {    INT16 getter; /* Reference to getter. */    INT16 setter; /* Reference to setter. */    } gs_info;       /* C function pointer. (IDENTIFIER_C_FUNCTION) */    void (*c_fun)(INT32);    -  /* For variables: Offset of the variable in the storage pointed to -  * by inherit.storage_offset in the struct inherit that corresponds -  * to the identifier. See LOW_GET_GLOBAL and GET_GLOBAL. The stored -  * variable may be either a normal or a short svalue, depending on -  * identifier.run_time_type. (IDENTIFIER_VARIABLE) -  * -  * For pike functions: Offset to the start of the function in -  * program.program in the program pointed to by prog in the struct -  * inherit that corresponds to the identifier. Or -1 if a prototype. -  * (IDENTIFIER_PIKE_FUNCTION) -  */ -  ptrdiff_t offset; +  /* Direct svalue pointer. Only used in the reference vtable cache. */ +  struct svalue *sval;   };      #define IDENTIFIER_VARIABLE 0   #define IDENTIFIER_CONSTANT 1   #define IDENTIFIER_C_FUNCTION 2   #define IDENTIFIER_PIKE_FUNCTION 3   #define IDENTIFIER_FUNCTION 2   #define IDENTIFIER_TYPE_MASK 3      #define IDENTIFIER_ALIAS 4 /* Identifier is an alias for another
pike.git/src/program.h:350:    * INHERIT_FROM_INT. */    unsigned INT16 inherit_offset;       /* Offset of the struct identifier in program.identifiers in the    * program pointed to by the struct inherit through inherit_offset    * above. See ID_FROM_PTR and ID_FROM_INT. */    unsigned INT16 identifier_offset;       /* ID_* flags - protected, private etc.. */    unsigned INT16 id_flags; +  +  /* V-table cache information from this point on. */ +  +  /* Run-time type for the value field if initialized. +  * PIKE_T_UNKNOWN indicates uninitialized. +  */ +  INT16 run_time_type; +  +  /* Cached value of the lookup. +  */ +  union idptr func;   };      /* Magic value used as identifier reference integer to refer to this. */   #define IDREF_MAGIC_THIS -1      /* Magic values in inherit.parent_offset; see below. */   #define OBJECT_PARENT -18   #define INHERIT_PARENT -17      /*