pike.git / src / program.h

version» Context lines:

pike.git/src/program.h:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/      /* -  * $Id: program.h,v 1.58 1999/09/16 20:30:36 hubbe Exp $ +  * $Id: program.h,v 1.59 1999/09/18 09:21:28 hubbe Exp $    */   #ifndef PROGRAM_H   #define PROGRAM_H      #include <stdarg.h>   #include "global.h"   #include "pike_types.h"   #include "pike_macros.h"   #include "svalue.h"   #include "time_stuff.h"
pike.git/src/program.h:131:    unsigned INT16 identifier_flags; /* IDENTIFIER_??? */    unsigned INT16 run_time_type;   #ifdef PROFILING    unsigned INT32 num_calls;    unsigned INT32 total_time;    unsigned INT32 self_time;   #endif /* PROFILING */    union idptr func;   };    + struct program_constant + { +  struct svalue sval; +  struct pike_string *name; + }; +    /*    * in the bytecode, a function starts with:    * char num_args    * char num_locals    * char code[]    */      #define ID_STATIC 0x01   #define ID_PRIVATE 0x02   #define ID_NOMASK 0x04
pike.git/src/program.h:167:    INT16 inherit_level; /* really needed? */    INT16 identifier_level;    INT16 parent_identifier;    INT16 parent_offset;    INT32 storage_offset;    struct object *parent;    struct program *prog;    struct pike_string *name;   };    + struct pike_trampoline + { +  struct pike_frame *frame; +  INT32 func; + }; +  +    /* program parts have been realloced into one block */   #define PROGRAM_OPTIMIZED 1      /* program has gone through pass 1 of compiler, prototypes etc. will    * not change from now on    */   #define PROGRAM_FIXED 2      /* Program is done and can be cloned */   #define PROGRAM_FINISHED 4
pike.git/src/program.h:248:   #define ID_FROM_PTR(P,X) (PROG_FROM_PTR(P,X)->identifiers+(X)->identifier_offset)   #define INHERIT_FROM_INT(P,X) INHERIT_FROM_PTR(P,(P)->identifier_references+(X))   #define PROG_FROM_INT(P,X) PROG_FROM_PTR(P,(P)->identifier_references+(X))   #define ID_FROM_INT(P,X) ID_FROM_PTR(P,(P)->identifier_references+(X))      #define FIND_LFUN(P,N) ( dmalloc_touch(struct program *,(P))->flags & PROGRAM_FIXED?((P)->lfuns[(N)]):find_identifier(lfun_names[(N)],(P)) )      #define free_program(p) do{ struct program *_=(p); debug_malloc_touch(_); if(!--_->refs) really_free_program(_); }while(0)       - struct pike_trampoline - { -  struct pike_frame *frame; -  INT32 func; - }; -  -  +    extern struct object *fake_object;   extern struct program *new_program;   extern struct program *first_program;   extern int compiler_pass;   extern long local_class_counter;   extern int catch_level;   extern INT32 num_used_modules;   extern struct program *pike_trampoline_program;      /* Flags for identifier finding... */
pike.git/src/program.h:384:   int really_low_find_shared_string_identifier(struct pike_string *name,    struct program *prog,    int see_static);   int low_find_shared_string_identifier(struct pike_string *name,    struct program *prog);   struct ff_hash;   int find_shared_string_identifier(struct pike_string *name,    struct program *prog);   int find_identifier(char *name,struct program *prog);   int store_prog_string(struct pike_string *str); - int store_constant(struct svalue *foo, int equal); + int store_constant(struct svalue *foo, int equal, struct pike_string *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,    struct svalue *ind);   void start_line_numbering(void);   void store_linenumber(INT32 current_line, struct pike_string *current_file);   char *get_line(unsigned char *pc,struct program *prog,INT32 *linep);   void my_yyerror(char *fmt,...) ATTRIBUTE((format(printf,1,2)));   struct program *compile(struct pike_string *prog);   int add_function(char *name,void (*cfun)(INT32),char *type,INT16 flags);