Skip to content
Snippets Groups Projects
Select Git revision
  • 41c915e4dc7ecdba99474a7d129859558e4e3ba0
  • master default protected
  • 9.0
  • 8.0
  • 7.8
  • 7.6
  • 7.4
  • 7.2
  • 7.0
  • 0.6
  • rosuav/latex-markdown-renderer
  • rxnpatch/rxnpatch
  • marcus/gobject-introspection
  • rxnpatch/8.0
  • rosuav/pre-listening-ports
  • nt-tools
  • rosuav/async-annotations
  • rosuav/pgsql-ssl
  • rxnpatch/rxnpatch-broken/2023-10-06T094250
  • grubba/fdlib
  • grubba/wip/sakura/8.0
  • v8.0.2000
  • v8.0.1998
  • v8.0.1996
  • v8.0.1994
  • v8.0.1992
  • v8.0.1990
  • v8.0.1988
  • v8.0.1986
  • rxnpatch/clusters/8.0/2025-04-29T124414
  • rxnpatch/2025-04-29T124414
  • v8.0.1984
  • v8.0.1982
  • v8.0.1980
  • v8.0.1978
  • v8.0.1976
  • v8.0.1974
  • v8.0.1972
  • v8.0.1970
  • v8.0.1968
  • v8.0.1966
41 results

pike_compiler.h

Blame
  • pike_compiler.h 2.14 KiB
    /*
    || 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: pike_compiler.h,v 1.4 2008/04/18 19:56:01 grubba Exp $
    */
    
    #ifndef PIKE_COMPILER_H
    #define PIKE_COMPILER_H
    
    #include "lex.h"
    #include "program.h"
    
    struct compilation
    {
      struct Supporter supporter;
      struct pike_string *prog;		/* String to compile. */
      struct object *handler;		/* error_handler */
      struct object *compat_handler;	/* compat_handler */
      int major, minor;			/* compat version */
      struct program *target;		/* Program being compiled. */
      struct object *placeholder;
      int flags;
      
      struct program *p;			/* Compiled program or NULL. */
      struct lex lex;
      int compilation_inherit;		/* Inherit in supporter->self containing
    					 * compilation_program. */
      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)
    
    /* Flags. */
    #define COMPILER_BUSY	1	/* The compiler is busy compiling. */
    #define COMPILER_DONE	2	/* The is finished compiling. */
    
    /* Report levels */
    #define REPORT_INFO	0	/* FYI. */
    #define REPORT_WARNING	1	/* Compiler warning. */
    #define REPORT_ERROR	2	/* Compilation error. */
    #define REPORT_FATAL	3	/* Unrecoverable error. */
    
    /* 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
    
    /* PikeCompiler function numbers. */
    #define PC_REPORT_FUN_NUM		0
    #define PC_COMPILE_FUN_NUM		1
    #define PC_RESOLV_FUN_NUM		2
    
    #endif	/* !PIKE_COMPILER_H */