1 /* 2 * Copyright (C) 2011, Parrot Foundation. 3 */ 4 5 #ifndef PARROT_IMCC_EMBED_H_GUARD 6 #define PARROT_IMCC_EMBED_H_GUARD 7 8 /* Forward Declarations. IMCC will define these things internally. 9 libparrot and other embedders and extenders should treat these 10 as being opaque */ 11 #ifndef IMCC_IMC_H_HAVE_TYPEDEFS 12 typedef struct IMC_Unit IMC_Unit; 13 struct _imc_info_t; 14 typedef struct _imc_info_t imc_info_t; 15 #endif 16 17 #include "imcc/yyscanner.h" 18 19 /* HEADERIZER BEGIN: compilers/imcc/main.c */ 20 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ 21 22 PARROT_EXPORT 23 PARROT_CANNOT_RETURN_NULL 24 PMC * imcc_compile_file( 25 ARGMOD(imc_info_t *imcc), 26 ARGIN(STRING *fullname), 27 int is_pasm) 28 __attribute__nonnull__(1) 29 __attribute__nonnull__(2) 30 FUNC_MODIFIES(*imcc); 31 32 PARROT_EXPORT 33 INTVAL imcc_last_error_code(ARGIN(imc_info_t *imcc)) 34 __attribute__nonnull__(1); 35 36 PARROT_EXPORT 37 PARROT_CAN_RETURN_NULL 38 STRING* imcc_last_error_message(ARGIN(imc_info_t *imcc)) 39 __attribute__nonnull__(1); 40 41 PARROT_EXPORT 42 PARROT_CANNOT_RETURN_NULL 43 imc_info_t * imcc_new(PARROT_INTERP) 44 __attribute__nonnull__(1); 45 46 PARROT_EXPORT 47 void imcc_preprocess( 48 ARGMOD(imc_info_t *imcc), 49 ARGIN(STRING * const sourcefile)) 50 __attribute__nonnull__(1) 51 __attribute__nonnull__(2) 52 FUNC_MODIFIES(*imcc); 53 54 PARROT_EXPORT 55 void imcc_reset(ARGMOD(imc_info_t *imcc)) 56 __attribute__nonnull__(1) 57 FUNC_MODIFIES(*imcc); 58 59 PARROT_EXPORT 60 void imcc_set_debug_mode( 61 ARGMOD(imc_info_t *imcc), 62 INTVAL dflags, 63 INTVAL yflags) 64 __attribute__nonnull__(1) 65 FUNC_MODIFIES(*imcc); 66 67 PARROT_EXPORT 68 void imcc_set_optimization_level( 69 ARGMOD(imc_info_t *imcc), 70 ARGIN(const char *opts)) 71 __attribute__nonnull__(1) 72 __attribute__nonnull__(2) 73 FUNC_MODIFIES(*imcc); 74 75 PARROT_EXPORT 76 void imcc_set_verbosity(ARGMOD(imc_info_t *imcc), INTVAL verbose) 77 __attribute__nonnull__(1) 78 FUNC_MODIFIES(*imcc); 79 80 PARROT_IGNORABLE_RESULT 81 PARROT_CANNOT_RETURN_NULL 82 imc_info_t * exit_reentrant_compile( 83 ARGIN(imc_info_t *imcc), 84 ARGMOD_NULLOK(struct _imc_info_t *new_info)) 85 __attribute__nonnull__(1) 86 FUNC_MODIFIES(*new_info); 87 88 PARROT_CANNOT_RETURN_NULL 89 PMC * imcc_compile_string( 90 ARGMOD(imc_info_t *imcc), 91 ARGIN(STRING *source), 92 int is_pasm) 93 __attribute__nonnull__(1) 94 __attribute__nonnull__(2) 95 FUNC_MODIFIES(*imcc); 96 97 void imcc_destroy(ARGFREE(imc_info_t * imcc)); 98 #define ASSERT_ARGS_imcc_compile_file __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ 99 PARROT_ASSERT_ARG(imcc) \ 100 , PARROT_ASSERT_ARG(fullname)) 101 #define ASSERT_ARGS_imcc_last_error_code __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ 102 PARROT_ASSERT_ARG(imcc)) 103 #define ASSERT_ARGS_imcc_last_error_message __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ 104 PARROT_ASSERT_ARG(imcc)) 105 #define ASSERT_ARGS_imcc_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ 106 PARROT_ASSERT_ARG(interp)) 107 #define ASSERT_ARGS_imcc_preprocess __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ 108 PARROT_ASSERT_ARG(imcc) \ 109 , PARROT_ASSERT_ARG(sourcefile)) 110 #define ASSERT_ARGS_imcc_reset __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ 111 PARROT_ASSERT_ARG(imcc)) 112 #define ASSERT_ARGS_imcc_set_debug_mode __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ 113 PARROT_ASSERT_ARG(imcc)) 114 #define ASSERT_ARGS_imcc_set_optimization_level __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ 115 PARROT_ASSERT_ARG(imcc) \ 116 , PARROT_ASSERT_ARG(opts)) 117 #define ASSERT_ARGS_imcc_set_verbosity __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ 118 PARROT_ASSERT_ARG(imcc)) 119 #define ASSERT_ARGS_exit_reentrant_compile __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ 120 PARROT_ASSERT_ARG(imcc)) 121 #define ASSERT_ARGS_imcc_compile_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ 122 PARROT_ASSERT_ARG(imcc) \ 123 , PARROT_ASSERT_ARG(source)) 124 #define ASSERT_ARGS_imcc_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) 125 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ 126 /* HEADERIZER END: compilers/imcc/main.c */ 127 128 #endif /* PARROT_IMCC_EMBED_H_GUARD */ 129 130 /* 131 * Local variables: 132 * c-file-style: "parrot" 133 * End: 134 * vim: expandtab shiftwidth=4 cinoptions='\:2=2' : 135 */ 136