pike.git / src / program.h

version» Context lines:

pike.git/src/program.h:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: program.h,v 1.229 2007/05/26 19:14:59 mast Exp $ + || $Id: program.h,v 1.230 2007/09/24 19:18:25 grubba Exp $   */      #ifndef PROGRAM_H   #define PROGRAM_H      #include <stdarg.h>   #include "global.h"   #include "pike_macros.h"   #include "pike_error.h"   #include "svalue.h"
pike.git/src/program.h:209:    * inherit that corresponds to the identifier.    *    * 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.    */    ptrdiff_t offset;   };      #define IDENTIFIER_VARIABLE 0 - #define IDENTIFIER_PIKE_FUNCTION 1 + #define IDENTIFIER_CONSTANT 1   #define IDENTIFIER_C_FUNCTION 2 - #define IDENTIFIER_FUNCTION 3 - #define IDENTIFIER_CONSTANT 4 - #define IDENTIFIER_TYPE_MASK 7 + #define IDENTIFIER_PIKE_FUNCTION 3 + #define IDENTIFIER_FUNCTION 2 + #define IDENTIFIER_TYPE_MASK 3    -  + #define IDENTIFIER_EXTERN 4 /* Identifier actually in a surrounding scope. */ +    #define IDENTIFIER_VARARGS 8 /* Used for functions only. */   #define IDENTIFIER_NO_THIS_REF 8 /* Used for variables only: Don't count refs to self. */   #define IDENTIFIER_HAS_BODY 16 /* Function has a body (set already in pass 1). */   #define IDENTIFIER_SCOPED 32 /* This is used for local functions only */   #define IDENTIFIER_SCOPE_USED 64 /* contains scoped local functions */   #define IDENTIFIER_ALIAS 128 /* This identifier is an alias. */      #define IDENTIFIER_IS_FUNCTION(X) ((X) & IDENTIFIER_FUNCTION) - #define IDENTIFIER_IS_PIKE_FUNCTION(X) ((X) & IDENTIFIER_PIKE_FUNCTION) - #define IDENTIFIER_IS_C_FUNCTION(X) ((X) & IDENTIFIER_C_FUNCTION) - #define IDENTIFIER_IS_CONSTANT(X) ((X) & IDENTIFIER_CONSTANT) + #define IDENTIFIER_IS_PIKE_FUNCTION(X) (((X) & IDENTIFIER_TYPE_MASK) == IDENTIFIER_PIKE_FUNCTION) + #define IDENTIFIER_IS_C_FUNCTION(X) (((X) & IDENTIFIER_TYPE_MASK) == IDENTIFIER_C_FUNCTION) + #define IDENTIFIER_IS_CONSTANT(X) (((X) & IDENTIFIER_TYPE_MASK) == IDENTIFIER_CONSTANT)   #define IDENTIFIER_IS_VARIABLE(X) (!((X) & IDENTIFIER_TYPE_MASK)) -  + #define IDENTIFIER_IS_SCOPED(X) ((X) & IDENTIFIER_SCOPED)   #define IDENTIFIER_IS_ALIAS(X) ((X) & IDENTIFIER_ALIAS)      #define IDENTIFIER_MASK 255      /*    * Every constant, class, function and variable    * gets exactly one of these.    */   struct identifier   {
pike.git/src/program.h:584:    INT16 lfuns[NUM_LFUNS];      #ifdef WITH_FACETS    /* Facet related stuff */    INT16 facet_class; /* PROGRAM_IS_X_CLASS (X=FACET/PRODUCT) */    INT32 facet_index; /* Index to the facet this facet class belongs to */    struct object *facet_group;   #endif   };    - #if 0 + #if PIKE_DEBUG   static INLINE int CHECK_IDREF_RANGE (int x, const struct program *p)   {    if (x < 0 || x >= p->num_identifier_references)    debug_fatal ("Identifier reference index %d out of range 0..%d\n", x,    p->num_identifier_references - 1);    return x;   }   #else   #define CHECK_IDREF_RANGE(X, P) (X)   #endif
pike.git/src/program.h:824:   struct ff_hash;   int find_shared_string_identifier(struct pike_string *name,    struct program *prog);   PMOD_EXPORT int find_identifier(const char *name,struct program *prog);   int store_prog_string(struct pike_string *str);   int store_constant(struct svalue *foo,    int equal,    struct pike_string *constant_name);   struct array *program_indices(struct program *p);   struct array *program_values(struct program *p); - void program_index_no_free(struct svalue *to, struct program *p, + int program_index_no_free(struct svalue *to, struct svalue *what,    struct svalue *ind);   int get_small_number(char **q);   void ext_store_program_line (struct program *prog, INT32 line, struct pike_string *file);   void start_line_numbering(void);   void store_linenumber(INT32 current_line, struct pike_string *current_file);   PMOD_EXPORT struct pike_string *low_get_program_line(struct program *prog,    INT32 *linep);   PMOD_EXPORT struct pike_string *get_program_line(struct program *prog,    INT32 *linep);   PMOD_EXPORT char *low_get_program_line_plain (struct program *prog, INT32 *linep,