Branch: Tag:

2001-10-05

2001-10-05 01:30:14 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

much improved handling of cross-dependencies

Rev: lib/master.pike.in:1.170
Rev: src/builtin_functions.c:1.408
Rev: src/compilation.h:1.25
Rev: src/encode.c:1.130
Rev: src/global.h:1.65
Rev: src/interpret.c:1.250
Rev: src/interpret_functions.h:1.97
Rev: src/las.c:1.271
Rev: src/object.c:1.186
Rev: src/pike_types.c:1.182
Rev: src/program.c:1.381
Rev: src/program.h:1.145
Rev: src/threads.c:1.169

5:   \*/      /* -  * $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
345:   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;   
380:    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);
393:   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,
467:   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,
498:   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);
524:    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);
534:   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);
556:   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