e021fe | 2008-04-14 | Henrik Grubbström (Grubba) | |
#ifndef PIKE_COMPILER_H
#define PIKE_COMPILER_H
#include "lex.h"
#include "program.h"
struct compilation
{
struct Supporter supporter;
struct pike_string *prog;
struct object *handler;
struct object *compat_handler;
int major, minor;
struct program *target;
struct object *placeholder;
struct program *p;
struct lex lex;
int compilation_inherit;
int save_depth;
int saved_threads_disabled;
dynamic_buffer used_modules_save;
INT32 num_used_modules_save;
struct mapping *resolve_cache_save;
struct svalue default_module;
};
#ifdef PIKE_DEBUG
#define CHECK_COMPILER() do { \
if (!Pike_fp || !compilation_program || \
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)
#define CE_REPORT_FUN_NUM 0
#define CE_PIKE_COMPILER_FUN_NUM 1
#define CE_COMPILE_FUN_NUM 2
#endif /* !PIKE_COMPILER_H */
|