Branch: Tag:


2008-04-14 10:14:41 by Henrik Grubbström (Grubba) <>

Pike compiler mega patch.
Added predef::CompilerEnvironment, which is a wrapper for struct compilation.
Moved the definition of struct compilation to the new header file "pike_compiler.h".
The compilation struct is now contained in the current context in the current_object during compilation.
The global variable lex is no more, it has moved into the compilation struct.
Added enter_compiler() and exit_compiler().
predef::compile() is now shorthand for predef::CompilerContext()->compile().

Rev: src/builtin_functions.c:1.652
Rev: src/compilation.h:1.35
Rev: src/docode.c:1.197
Rev: src/docode.h:1.20
Rev: src/dynamic_load.c:1.90
Rev: src/encode.c:1.263
Rev: src/language.yacc:1.411
Rev: src/las.c:1.406
Rev: src/lex.c:1.121
Rev: src/lex.h:1.36
Rev: src/lexer.h:1.66
Rev: src/module.c:1.52
Rev: src/object.c:1.284
Rev: src/operators.c:1.230
Rev: src/pike_compiler.h:1.1
Rev: src/pike_types.c:1.321
Rev: src/program.c:1.660
Rev: src/program.h:1.237

2:   || 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.236 2007/12/28 13:38:16 nilsson Exp $ + || $Id: program.h,v 1.237 2008/04/14 10:14:41 grubba Exp $   */      #ifndef PROGRAM_H
659:   BLOCK_ALLOC_FILL_PAGES(program, n/a);       - extern struct object *error_handler; - extern struct object *compat_handler; -  +    extern struct program *first_program;   extern struct program *null_program; -  + extern struct program *compilation_program;   extern struct program *pike_trampoline_program;   extern struct program *gc_internal_program;   extern struct program *placeholder_program;
695:    struct Supporter *depends_on;    struct Supporter *dependants;    struct Supporter *next_dependant; +  struct object *self;    supporter_callback *fun;    void *data;    struct program *prog;   };    -  -  +    /* Prototypes begin here */   PMOD_EXPORT void do_free_program (struct program *p);   void ins_int(INT32 i, void (*func)(char tmp));
887:   int report_compiler_dependency(struct program *p);   struct compilation;   void run_pass2(struct compilation *c); + void enter_compiler(struct pike_string *filename, int linenumber); + void exit_compiler(void);   struct program *compile(struct pike_string *aprog,    struct object *ahandler,    int amajor, int aminor,