e021fe | 2008-04-14 | Henrik Grubbström (Grubba) | |
#ifndef PIKE_COMPILER_H
#define PIKE_COMPILER_H
#include "lex.h"
#include "program.h"
|
89124a | 2018-06-26 | Henrik Grubbström (Grubba) | | extern struct program *reporter_program;
|
dd4007 | 2017-02-02 | Henrik Grubbström (Grubba) | | extern struct program *compilation_env_program;
extern struct program *compilation_program;
extern struct object *compilation_environment;
|
95d73d | 2018-11-22 | Henrik Grubbström (Grubba) | | extern struct program *Annotation_program;
extern struct object *Inherited_annotation;
|
dd4007 | 2017-02-02 | Henrik Grubbström (Grubba) | |
typedef int supporter_callback (void *, int);
struct Supporter
{
#ifdef PIKE_DEBUG
int magic;
#endif
struct Supporter *previous;
struct Supporter *depends_on;
struct Supporter *dependants, *next_dependant;
struct object *self;
supporter_callback *fun;
void *data;
struct program *prog;
};
|
e021fe | 2008-04-14 | Henrik Grubbström (Grubba) | | struct compilation
{
struct Supporter supporter;
struct pike_string *prog;
struct object *handler;
struct object *compat_handler;
|
e048d5 | 2008-04-25 | Henrik Grubbström (Grubba) | | int major, minor;
|
e021fe | 2008-04-14 | Henrik Grubbström (Grubba) | | struct program *target;
struct object *placeholder;
|
41c915 | 2008-04-18 | Henrik Grubbström (Grubba) | | int flags;
|
13670c | 2015-05-25 | Martin Nilsson | |
|
e021fe | 2008-04-14 | Henrik Grubbström (Grubba) | | struct program *p;
struct lex lex;
int compilation_inherit;
|
5b84a5 | 2008-04-26 | Henrik Grubbström (Grubba) | |
|
885388 | 2008-04-26 | Henrik Grubbström (Grubba) | | struct svalue default_module;
|
2d10fb | 2016-12-29 | Arne Goedeke | | struct byte_buffer used_modules; |
5b84a5 | 2008-04-26 | Henrik Grubbström (Grubba) | | * modules. */
INT32 num_used_modules;
|
885388 | 2008-04-26 | Henrik Grubbström (Grubba) | | int compilation_depth;
|
9d8034 | 2013-08-14 | Marcus Comstedt | | #ifdef PIKE_THREADS
|
8b5b3a | 2014-04-28 | Henrik Grubbström (Grubba) | | int saved_lock_depth;
|
9d8034 | 2013-08-14 | Marcus Comstedt | | #endif
|
518b04 | 2011-11-20 | Henrik Grubbström (Grubba) | | struct mapping *resolve_cache;
|
e021fe | 2008-04-14 | Henrik Grubbström (Grubba) | | };
#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)
|
bdfe4e | 2017-12-11 | Henrik Grubbström (Grubba) | |
#define COMPILER_PASS_NONE 0
#define COMPILER_PASS_FIRST 1
|
4dab7a | 2017-12-19 | Henrik Grubbström (Grubba) | | #define COMPILER_PASS_EXTRA 2
#define COMPILER_PASS_LAST 3
|
bdfe4e | 2017-12-11 | Henrik Grubbström (Grubba) | |
|
4dab7a | 2017-12-19 | Henrik Grubbström (Grubba) | |
#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. */
|
41c915 | 2008-04-18 | Henrik Grubbström (Grubba) | |
|
17799f | 2008-04-24 | Henrik Grubbström (Grubba) | | #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
|
1f91c0 | 2008-05-02 | Henrik Grubbström (Grubba) | | #define CE_HANDLE_INHERIT_FUN_NUM 6
|
b06622 | 2018-07-10 | Henrik Grubbström (Grubba) | | #define CE_HANDLE_IMPORT_FUN_NUM 7
|
41c915 | 2008-04-18 | Henrik Grubbström (Grubba) | |
|
17799f | 2008-04-24 | Henrik Grubbström (Grubba) | | #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
|
1f91c0 | 2008-05-02 | Henrik Grubbström (Grubba) | | #define PC_HANDLE_INHERIT_FUN_NUM 7
|
b06622 | 2018-07-10 | Henrik Grubbström (Grubba) | | #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
|
e021fe | 2008-04-14 | Henrik Grubbström (Grubba) | |
|
142073 | 2017-02-08 | Henrik Grubbström (Grubba) | | extern struct program *null_program;
extern struct program *placeholder_program;
extern struct object *placeholder_object;
|
dd4007 | 2017-02-02 | Henrik Grubbström (Grubba) | |
PMOD_EXPORT void lock_pike_compiler(void);
PMOD_EXPORT void unlock_pike_compiler(void);
void verify_supporters(void);
void init_supporter(struct Supporter *s,
supporter_callback *fun,
void *data);
int unlink_current_supporter(struct Supporter *c);
int call_dependants(struct Supporter *s, int finish);
int report_compiler_dependency(struct program *p);
struct compilation;
void run_pass2(struct compilation *c);
PMOD_EXPORT void enter_compiler(struct pike_string *filename,
INT_TYPE linenumber);
PMOD_EXPORT void exit_compiler(void);
|
f36a62 | 2017-02-09 | Henrik Grubbström (Grubba) | | PMOD_EXPORT void va_yyreport(int severity_level,
struct pike_string *file, INT_TYPE line,
struct pike_string *system, INT32 args,
const char *fmt, va_list vargs);
PMOD_EXPORT void low_yyreport(int severity_level,
struct pike_string *file, INT_TYPE line,
struct pike_string *system,
INT32 args, const char *fmt, ...);
PMOD_EXPORT void yyreport(int severity_level, struct pike_string *system,
INT32 args, const char *fmt, ...);
PMOD_EXPORT void yywarning(char *fmt, ...);
PMOD_EXPORT void my_yyerror(const char *fmt,...);
PMOD_EXPORT void yyerror(const char *s);
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, ...);
|
2f07ac | 2017-02-04 | Henrik Grubbström (Grubba) | | 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);
|
4878fa | 2018-11-07 | Henrik Grubbström (Grubba) | | void low_init_pike_compiler(void);
|
dd4007 | 2017-02-02 | Henrik Grubbström (Grubba) | | void init_pike_compiler(void);
void cleanup_pike_compiler(void);
|
4878fa | 2018-11-07 | Henrik Grubbström (Grubba) | | void low_cleanup_pike_compiler(void);
|
dd4007 | 2017-02-02 | Henrik Grubbström (Grubba) | |
|
e021fe | 2008-04-14 | Henrik Grubbström (Grubba) | | #endif /* !PIKE_COMPILER_H */
|