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.144 2001/09/10 20:47:35 hubbe Exp $ +  * $Id: program.h,v 1.145 2001/10/05 01:30:14 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:338:      #define free_program(p) do{ struct program *_=(p); debug_malloc_touch(_); if(!sub_ref(_)) really_free_program(_); }while(0)         extern struct object *error_handler;   extern struct object *compat_handler;      extern struct program *first_program;   extern struct program *pike_trampoline_program;   extern struct program *gc_internal_program; + extern struct program *placeholder_program; + extern struct object *placeholder_object;      extern int compilation_depth;      /* Flags for identifier finding... */   #define SEE_STATIC 1   #define SEE_PRIVATE 2         #define COMPILER_IN_CATCH 1   
pike.git/src/program.h:373:   void optimize_program(struct program *p);   int program_function_index_compare(const void *a,const void *b);   struct pike_string *find_program_name(struct program *p, INT32 *line);   void fixate_program(void);   struct program *low_allocate_program(void);   void low_start_new_program(struct program *p,    struct pike_string *name,    int flags,    int *idp);   PMOD_EXPORT void debug_start_new_program(PROGRAM_LINE_ARGS); - PMOD_EXPORT void really_free_program(struct program *p); +    void dump_program_desc(struct program *p);   int sizeof_variable(int run_time_type);   void check_program(struct program *p);   struct program *end_first_pass(int finish);   PMOD_EXPORT struct program *debug_end_program(void);   PMOD_EXPORT size_t low_add_storage(size_t size, size_t alignment,    ptrdiff_t modulo_orig);   PMOD_EXPORT void set_init_callback(void (*init)(struct object *));   PMOD_EXPORT void set_exit_callback(void (*exit)(struct object *));   PMOD_EXPORT void set_gc_recurse_callback(void (*m)(struct object *));   PMOD_EXPORT void set_gc_check_callback(void (*m)(struct object *));   void pike_set_prog_event_callback(void (*cb)(int)); - void pike_set_prog_optimize_callback(struct node_s *(*opt)(struct node_s *)); + void pike_set_prog_optimize_callback(node *(*opt)(node *));   int low_reference_inherited_identifier(struct program_state *q,    int e,    struct pike_string *name,    int flags);   int find_inherit(struct program *p, struct pike_string *name);   node *reference_inherited_identifier(struct pike_string *super_name,    struct pike_string *function_name);   void rename_last_inherit(struct pike_string *n);   void low_inherit(struct program *p,    struct object *parent,
pike.git/src/program.h:460:    INT32 flags);   PMOD_EXPORT int add_string_constant(char *name,    char *str,    INT32 flags);   PMOD_EXPORT int add_program_constant(char *name,    struct program *p,    INT32 flags);   PMOD_EXPORT int add_object_constant(char *name,    struct object *o,    INT32 flags); - PMOD_EXPORT int add_function_constant(char *name, void (*cfun)(INT32), -  char * type, INT16 flags); + PMOD_EXPORT int add_function_constant(char *name, void (*cfun)(INT32), char * type, INT16 flags);   PMOD_EXPORT int debug_end_class(char *name, ptrdiff_t namelen, INT32 flags);   INT32 define_function(struct pike_string *name,    struct pike_type *type,    unsigned INT8 flags,    unsigned INT8 function_flags,    union idptr *func,    unsigned INT16 opt_flags);   int really_low_find_shared_string_identifier(struct pike_string *name,    struct program *prog,    int flags);
pike.git/src/program.h:491:   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,    struct svalue *ind);   int get_small_number(char **q);   void start_line_numbering(void);   void store_linenumber(INT32 current_line, struct pike_string *current_file); - char *debug_get_program_line(struct program *prog, -  INT32 *linep); +    PMOD_EXPORT struct pike_string *get_program_line(struct program *prog,    INT32 *linep); - PMOD_EXPORT struct pike_string *get_line(PIKE_OPCODE_T *pc, -  struct program *prog, + char *debug_get_program_line(struct program *prog,    INT32 *linep); -  + PMOD_EXPORT struct pike_string *get_line(PIKE_OPCODE_T *pc, +  struct program *prog, INT32 *linep);   void my_yyerror(char *fmt,...) ATTRIBUTE((format(printf,1,2)));   void yy_describe_exception(struct svalue *thrown); - struct program *compile(struct pike_string *prog, -  struct object *handler, -  int major, -  int minor, -  struct program *target, -  struct object *placeholder); + struct compilation; + void run_pass2(struct compilation *c); + struct program *compile(struct pike_string *aprog, +  struct object *ahandler, +  int amajor, int aminor, +  struct program *atarget, +  struct object *aplaceholder); + int report_compiler_dependency(struct program *p);   PMOD_EXPORT int pike_add_function2(char *name, void (*cfun)(INT32),    char *type, unsigned INT8 flags,    unsigned INT16 opt_flags);   PMOD_EXPORT int quick_add_function(char *name,    int name_length,    void (*cfun)(INT32),    char *type,    int type_length,    unsigned INT8 flags,    unsigned INT16 opt_flags);   void check_all_programs(void); -  + void placeholder_index(INT32 args);   void init_program(void);   void cleanup_program(void);   void gc_mark_program_as_referenced(struct program *p);   void real_gc_cycle_check_program(struct program *p, int weak);   unsigned gc_touch_all_programs(void);   void gc_check_all_programs(void);   void gc_mark_all_programs(void);   void gc_cycle_check_all_programs(void);   void gc_zap_ext_weak_refs_in_programs(void);   void gc_free_all_unreferenced_programs(void); - void count_memory_in_programs(INT32 *num_, INT32 *size_); +    void push_compiler_frame(int lexical_scope); -  + void low_pop_local_variables(int level);   void pop_local_variables(int level);   void pop_compiler_frame(void);   ptrdiff_t low_get_storage(struct program *o, struct program *p);   PMOD_EXPORT char *get_storage(struct object *o, struct program *p);   struct program *low_program_from_function(struct program *p,    INT32 i);   PMOD_EXPORT struct program *program_from_function(const struct svalue *f);   PMOD_EXPORT struct program *program_from_svalue(const struct svalue *s);   struct find_child_cache_s;   int find_child(struct program *parent, struct program *child);   void yywarning(char *fmt, ...) ATTRIBUTE((format(printf,1,2)));   struct implements_cache_s;   PMOD_EXPORT int implements(struct program *a, struct program *b);   PMOD_EXPORT int is_compatible(struct program *a, struct program *b);   int yyexplain_not_implements(struct program *a, struct program *b, int flags);   PMOD_EXPORT void *parent_storage(int depth);   PMOD_EXPORT void change_compiler_compatibility(int major, int minor);   void make_program_executable(struct program *p);   /* Prototypes end here */    -  + void really_free_program(struct program *); + void count_memory_in_programs(INT32*,INT32*); +    #ifndef PIKE_USE_MACHINE_CODE   #define make_program_executable(X)   #endif      #define ADD_FUNCTION(NAME, FUNC, TYPE, FLAGS) \    quick_add_function(NAME, CONSTANT_STRLEN(NAME), FUNC, TYPE,\    CONSTANT_STRLEN(TYPE), FLAGS, \    OPT_SIDE_EFFECT|OPT_EXTERNAL_DEPEND)      #define ADD_PROTOTYPE(NAME, TYPE, FLAGS) \