Alien-LibJIT

 view release on metacpan or  search on metacpan

libjit/dpas/dpas-internal.h  view on Meta::CPAN

/*
 * Flag that indicates that functions should be dumped as they are compiled.
 */
extern int dpas_dump_functions;

/*
 * Information about a parameter list (also used for record fields).
 */
typedef struct
{
	char		  **names;
	jit_type_t	   *types;
	int				len;
	jit_abi_t		abi;

} dpas_params;

/*
 * Flag that is set when an error is encountered.
 */
extern int dpas_error_reported;

/*
 * Function that is called when the system runs out of memory.
 */
void dpas_out_of_memory(void);

/*
 * Process an "import" clause within a program.
 */
void dpas_import(const char *name);

/*
 * Load the contents of a source file.
 */
void dpas_load_file(char *filename, FILE *file);

/*
 * Report an error on the current line.
 */
void dpas_error(const char *format, ...);

/*
 * Report a warning on the current line.
 */
void dpas_warning(const char *format, ...);

/*
 * Report an error on a specific line.
 */
void dpas_error_on_line(const char *filename, long linenum,
                        const char *format, ...);

/*
 * Get the JIT context that we are using to compile functions.
 */
jit_context_t dpas_current_context(void);

/*
 * Get the current function that is being compiled.  Returns NULL
 * if we are currently at the global level.
 */
jit_function_t dpas_current_function(void);

/*
 * Create a new function and push it onto the context stack.
 * The function is initialized to read parameters that are
 * compatible with the supplied signature.
 */
jit_function_t dpas_new_function(jit_type_t signature);

/*
 * Pop out of the current function.
 */
void dpas_pop_function(void);

/*
 * Determine if the current function is nested.
 */
int dpas_function_is_nested(void);

/*
 * Determine if a name corresponds to a builtin function,
 * and get its builtin identifier.  Returns zero if not a builtin.
 */
int dpas_is_builtin(const char *name);

/*
 * Expand a builtin function reference.
 */
dpas_semvalue dpas_expand_builtin
	(int identifier, dpas_semvalue *args, int num_args);

/*
 * Add the current function to the execution list.  Used for
 * "main" functions within each compiled module.
 */
void dpas_add_main_function(jit_function_t func);

/*
 * Run the "main" functions in the order in which they were compiled.
 * Returns zero on an exception.
 */
int dpas_run_main_functions(void);

#ifdef	__cplusplus
};
#endif

#endif	/* _DPAS_INTERNAL_H */



( run in 0.779 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )