Branch: Tag:

2000-07-28

2000-07-28 17:16:56 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

JUMBOPATCH: dynamic loading now works on Win* !!!! (somewhat experimental :)

Rev: src/.cvsignore:1.24
Rev: src/Makefile.in:1.198
Rev: src/aclocal.m4:1.17
Rev: src/array.c:1.79
Rev: src/array.h:1.22
Rev: src/backend.c:1.53
Rev: src/backend.h:1.9
Rev: src/bignum.c:1.17
Rev: src/bignum.h:1.14
Rev: src/builtin_functions.c:1.293
Rev: src/builtin_functions.h:1.14
Rev: src/callback.c:1.20
Rev: src/configure.in:1.387
Rev: src/constants.c:1.22
Rev: src/dynamic_buffer.c:1.10
Rev: src/dynamic_load.c:1.41
Rev: src/error.c:1.56
Rev: src/error.h:1.46
Rev: src/fd_control.c:1.32
Rev: src/fdlib.c:1.37
Rev: src/fdlib.h:1.34
Rev: src/fsort.c:1.13
Rev: src/fsort_template.h:1.7
Rev: src/gc.c:1.110
Rev: src/gc.h:1.57
Rev: src/global.h:1.44
Rev: src/interpret.c:1.158
Rev: src/interpret.h:1.52
Rev: src/main.c:1.94
Rev: src/mapping.c:1.94
Rev: src/mapping.h:1.28
Rev: src/module_magic.h:1.1
Rev: src/module_support.c:1.34
Rev: src/module_support.h:1.7
Rev: src/multiset.c:1.26
Rev: src/object.c:1.137
Rev: src/object.h:1.50
Rev: src/opcodes.c:1.78
Rev: src/operators.c:1.93
Rev: src/operators.h:1.8
Rev: src/pike_macros.h:1.17
Rev: src/pike_memory.c:1.71
Rev: src/pike_memory.h:1.14
Rev: src/pike_types.c:1.132
Rev: src/port.c:1.28
Rev: src/precompile.sh.in:1.2
Rev: src/program.c:1.252
Rev: src/program.h:1.97
Rev: src/signal_handler.c:1.173
Rev: src/stralloc.c:1.85
Rev: src/stralloc.h:1.42
Rev: src/stuff.c:1.11
Rev: src/svalue.c:1.85
Rev: src/svalue.h:1.62
Rev: src/testsuite.in:1.316
Rev: src/threads.c:1.133
Rev: src/threads.h:1.99

5:   \*/   /**/   #include "global.h" - RCSID("$Id: program.c,v 1.251 2000/07/18 05:48:20 mast Exp $"); + RCSID("$Id: program.c,v 1.252 2000/07/28 17:16:55 hubbe Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"
876:    debug_malloc_touch(Pike_compiler->fake_object->storage);   }    - void debug_start_new_program(PROGRAM_LINE_ARGS) + PMOD_EXPORT void debug_start_new_program(PROGRAM_LINE_ARGS)   {    CDFPRINTF((stderr,    "th(%ld) start_new_program(): threads_disabled:%d, compilation_depth:%d\n",
894:   }       - void really_free_program(struct program *p) + PMOD_EXPORT void really_free_program(struct program *p)   {    unsigned INT16 e;   
1372:   /*    * Finish this program, returning the newly built program    */ - struct program *debug_end_program(void) + PMOD_EXPORT struct program *debug_end_program(void)   {    return end_first_pass(1);   }
1382:    * Allocate needed for this program in the object structure.    * An offset to the data is returned.    */ - size_t low_add_storage(size_t size, size_t alignment, int modulo_orig) + PMOD_EXPORT size_t low_add_storage(size_t size, size_t alignment, int modulo_orig)   {    long offset;    int modulo;
1446:    * set a callback used to initialize clones of this program    * the init function is called at clone time    */ - void set_init_callback(void (*init)(struct object *)) + PMOD_EXPORT void set_init_callback(void (*init)(struct object *))   {    Pike_compiler->new_program->init=init;   }
1455:    * set a callback used to de-initialize clones of this program    * the exit function is called at destruct    */ - void set_exit_callback(void (*exit)(struct object *)) + PMOD_EXPORT void set_exit_callback(void (*exit)(struct object *))   {    Pike_compiler->new_program->exit=exit;   }
1472:    * during a gc pass. The gc assumes that the references are enumerated    * in the same order in that case.    */ - void set_gc_recurse_callback(void (*m)(struct object *)) + PMOD_EXPORT void set_gc_recurse_callback(void (*m)(struct object *))   {    Pike_compiler->new_program->gc_recurse_func=m;   }
1488:    * to ensure this; it's zero when called the first time for its    * argument.    */ - void set_gc_check_callback(void (*m)(struct object *)) + PMOD_EXPORT void set_gc_check_callback(void (*m)(struct object *))   {    Pike_compiler->new_program->gc_check_func=m;   }
1823:    }   }    - void do_inherit(struct svalue *s, + PMOD_EXPORT void do_inherit(struct svalue *s,    INT32 flags,    struct pike_string *name)   {
1998:    return n;   }    - int map_variable(char *name, + PMOD_EXPORT int map_variable(char *name,    char *type,    INT32 flags,    size_t offset,
2020:    return ret;   }    - int quick_map_variable(char *name, + PMOD_EXPORT int quick_map_variable(char *name,    int name_length,    size_t offset,    char *type,
2161:    return n;   }    - int simple_add_variable(char *name, + PMOD_EXPORT int simple_add_variable(char *name,    char *type,    INT32 flags)   {
2176:    return ret;   }    - int add_constant(struct pike_string *name, + PMOD_EXPORT int add_constant(struct pike_string *name,    struct svalue *c,    INT32 flags)   {
2314:    return n;   }    - int simple_add_constant(char *name, + PMOD_EXPORT int simple_add_constant(char *name,    struct svalue *c,    INT32 flags)   {
2326:    return ret;   }    - int add_integer_constant(char *name, + PMOD_EXPORT int add_integer_constant(char *name,    INT32 i,    INT32 flags)   {
2337:    return simple_add_constant(name, &tmp, flags);   }    - int quick_add_integer_constant(char *name, + PMOD_EXPORT int quick_add_integer_constant(char *name,    int name_length,    INT32 i,    INT32 flags)
2355:    return ret;   }    - int add_float_constant(char *name, + PMOD_EXPORT int add_float_constant(char *name,    double f,    INT32 flags)   {
2366:    return simple_add_constant(name, &tmp, flags);   }    - int add_string_constant(char *name, + PMOD_EXPORT int add_string_constant(char *name,    char *str,    INT32 flags)   {
2380:    return ret;   }    - int add_program_constant(char *name, + PMOD_EXPORT int add_program_constant(char *name,    struct program *p,    INT32 flags)   {
2393:    return ret;   }    - int add_object_constant(char *name, + PMOD_EXPORT int add_object_constant(char *name,    struct object *o,    INT32 flags)   {
2406:    return ret;   }    - 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)   {    struct svalue s;    struct pike_string *n;
2421:   }       - int debug_end_class(char *name, int namelen, INT32 flags) + PMOD_EXPORT int debug_end_class(char *name, int namelen, INT32 flags)   {    INT32 ret;    struct svalue tmp;
2798:    return low_find_shared_string_identifier(name,prog);   }    - int find_identifier(char *name,struct program *prog) + PMOD_EXPORT int find_identifier(char *name,struct program *prog)   {    struct pike_string *n;    if(!prog) {
3079:    * program, and line will be initialized to the line    * in that file.    */ - char *get_line(unsigned char *pc,struct program *prog,INT32 *linep) + PMOD_EXPORT char *get_line(unsigned char *pc,struct program *prog,INT32 *linep)   {    static char *file, *cnt;    static INT32 off,line,pid;
3318:    return p;   }    - int pike_add_function(char *name,void (*cfun)(INT32),char *type,INT16 flags) + PMOD_EXPORT int pike_add_function(char *name,void (*cfun)(INT32),char *type,INT16 flags)   {    int ret;    struct pike_string *name_tmp,*type_tmp;
3347:    return ret;   }    - int quick_add_function(char *name, + PMOD_EXPORT int quick_add_function(char *name,    int name_length,    void (*cfun)(INT32),    char *type,
3892:    return offset;   }    - char *get_storage(struct object *o, struct program *p) + PMOD_EXPORT char *get_storage(struct object *o, struct program *p)   {    int offset;   
3917:    return f->u.program;   }    - struct program *program_from_function(struct svalue *f) + PMOD_EXPORT struct program *program_from_function(struct svalue *f)   {    struct identifier *id;    if(f->type != T_FUNCTION) return 0;
3926:    return low_program_from_function(f->u.object->prog, f->subtype);   }    - struct program *program_from_svalue(struct svalue *s) + PMOD_EXPORT struct program *program_from_svalue(struct svalue *s)   {    switch(s->type)    {
4070:   static struct implements_cache_s implements_cache[IMPLEMENTS_CACHE_SIZE];      /* returns 1 if a implements b, but faster */ - int implements(struct program *a, struct program *b) + PMOD_EXPORT int implements(struct program *a, struct program *b)   {    unsigned long hval;    if(!a || !b) return -1;
4137:   /* Returns 1 if a is compatible with b    * ie it's possible to write a hypothetical c that implements both.    */ - int is_compatible(struct program *a, struct program *b) + PMOD_EXPORT int is_compatible(struct program *a, struct program *b)   {    unsigned long hval;    unsigned long rhval;
4238:    return 1;   }    - void *parent_storage(int depth) + PMOD_EXPORT void *parent_storage(int depth)   {    struct inherit *inherit;    struct program *p;