pike.git / src / pike_compiler.h

version» Context lines:

pike.git/src/pike_compiler.h:3:   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information.   */      #ifndef PIKE_COMPILER_H   #define PIKE_COMPILER_H      #include "lex.h"   #include "program.h"    + extern struct program *reporter_program;   extern struct program *compilation_env_program;   extern struct program *compilation_program;   extern struct object *compilation_environment;      typedef int supporter_callback (void *, int);      struct Supporter   {   #ifdef PIKE_DEBUG    int magic;
pike.git/src/pike_compiler.h:84:    Pike_fp->context->prog != compilation_program) { \    Pike_fatal("Invalid compilation context!\n"); \    } \    } while(0)   #else   #define CHECK_COMPILER()   #endif   #define THIS_COMPILATION ((struct compilation *)(Pike_fp->current_storage))   #define MAYBE_THIS_COMPILATION ((Pike_fp && compilation_program && (Pike_fp->context->prog == compilation_program))?THIS_COMPILATION:NULL)    - /* Flags. */ - #define COMPILER_BUSY 1 /* The compiler is busy compiling. */ - #define COMPILER_DONE 2 /* The compiler is finished compiling. */ + /* Complier passes */ + #define COMPILER_PASS_NONE 0 + #define COMPILER_PASS_FIRST 1 + #define COMPILER_PASS_EXTRA 2 + #define COMPILER_PASS_LAST 3    -  + /* Flags for struct compilation. */ + #define COMPILER_BUSY 1 /* The compiler is busy. */ + #define COMPILER_DONE 2 /* The compiler is finished. */ + #define COMPILER_NEED_EXTRA_PASS 4 /* Run an extra pass. */ +    /* CompilerEnvironment function numbers. */   #define CE_REPORT_FUN_NUM 0   #define CE_COMPILE_FUN_NUM 1   #define CE_RESOLV_FUN_NUM 2   #define CE_PIKE_COMPILER_FUN_NUM 3   #define CE_GET_COMPILATION_HANDLER_FUN_NUM 4   #define CE_GET_DEFAULT_MODULE_FUN_NUM 5   #define CE_HANDLE_INHERIT_FUN_NUM 6 -  + #define CE_HANDLE_IMPORT_FUN_NUM 7      /* PikeCompiler function numbers. */   #define PC_REPORT_FUN_NUM 0   #define PC_COMPILE_FUN_NUM 1   #define PC_RESOLV_FUN_NUM 2   #define PC_CREATE_FUN_NUM 3   #define PC_GET_COMPILATION_HANDLER_FUN_NUM 4   #define PC_GET_DEFAULT_MODULE_FUN_NUM 5   #define PC_CHANGE_COMPILER_COMPATIBILITY_FUN_NUM 6   #define PC_HANDLE_INHERIT_FUN_NUM 7 - #define PC_POP_TYPE_ATTRIBUTE_FUN_NUM 8 - #define PC_PUSH_TYPE_ATTRIBUTE_FUN_NUM 9 - #define PC_APPLY_TYPE_ATTRIBUTE_FUN_NUM 10 - #define PC_APPLY_ATTRIBUTE_CONSTANT_FUN_NUM 11 + #define PC_HANDLE_IMPORT_FUN_NUM 8 + #define PC_POP_TYPE_ATTRIBUTE_FUN_NUM 9 + #define PC_PUSH_TYPE_ATTRIBUTE_FUN_NUM 10 + #define PC_APPLY_TYPE_ATTRIBUTE_FUN_NUM 11 + #define PC_APPLY_ATTRIBUTE_CONSTANT_FUN_NUM 12      extern struct program *null_program;   extern struct program *placeholder_program;   extern struct object *placeholder_object;      /* Prototypes begin here */   PMOD_EXPORT void lock_pike_compiler(void);   PMOD_EXPORT void unlock_pike_compiler(void);   void verify_supporters(void);   void init_supporter(struct Supporter *s,
pike.git/src/pike_compiler.h:153:   void yytype_report(int severity_level,    struct pike_string *expect_file, INT_TYPE expect_line,    struct pike_type *expected_t,    struct pike_string *got_file, INT_TYPE got_line,    struct pike_type *got_t,    INT32 args, const char *fmt, ...);   void yytype_error(const char *msg, struct pike_type *expected_t,    struct pike_type *got_t, unsigned int flags);   struct pike_string *format_exception_for_error_msg (struct svalue *thrown);   void handle_compile_exception (const char *yyerror_fmt, ...); - struct program *compile(struct pike_string *aprog, -  struct object *ahandler, -  int amajor, int aminor, -  struct program *atarget, -  struct object *aplaceholder); +    void push_compiler_frame(int lexical_scope);   node *low_pop_local_variables(int level, node *block);   node *pop_local_variables(int level, node *block);   void pop_compiler_frame(void);   PMOD_EXPORT void change_compiler_compatibility(int major, int minor);   void init_pike_compiler(void);   void cleanup_pike_compiler(void);   /* Prototypes end here */      #endif /* !PIKE_COMPILER_H */