parrotcode: compilers/imcc/parser_util.c | |
Contents | Compilers |
compilers/imcc/parser_util.c
ParserUtil - Parser support functions.
PARROT_CAN_RETURN_NULL Instruction *iNEW(PARROT_INTERP, NOTNULL(IMC_Unit *unit), NOTNULL(SymReg *r0), NOTNULL(char *type), NULLOK(SymReg *init), int emit)
* P = new type, [init]
* PASM like:
* new P, .SomeThing
* is done in the lexer, this is a mess
* best would be to have a flag in core.ops, where a PMC type is expected
void op_fullname(NOTNULL(char *dest), NOTNULL(const char *name), NOTNULL(SymReg *args[]), int narg, int keyvec)
set I0, 5 -> set_i_ic
set I0, I1 -> set_i_i
PARROT_WARN_UNUSED_RESULT int check_op(PARROT_INTERP, NOTNULL(char *fullname), NOTNULL(const char *name), NOTNULL(SymReg *r[]), int narg, int keyvec)
PARROT_WARN_UNUSED_RESULT PARROT_CAN_RETURN_NULL static Instruction *maybe_builtin(PARROT_INTERP, NOTNULL(const char *name), NOTNULL(SymReg **r), int n)
PARROT_WARN_UNUSED_RESULT int is_op(PARROT_INTERP, NOTNULL(const char *name))
PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL static const char *to_infix(PARROT_INTERP, NOTNULL(const char *name), NOTNULL(SymReg **r), NOTNULL(int *n), int mmd_op)
PARROT_WARN_UNUSED_RESULT static int is_infix(NOTNULL(const char *name), int n, NOTNULL(SymReg **r))
PARROT_WARN_UNUSED_RESULT static Instruction *var_arg_ins(PARROT_INTERP, NOTNULL(IMC_Unit *unit), NOTNULL(const char *name), NOTNULL(SymReg **r), int n, int emit)
PARROT_CAN_RETURN_NULL Instruction *INS(PARROT_INTERP, NOTNULL(IMC_Unit *unit), NOTNULL(const char *name), NULLOK(const char *fmt), NOTNULL(SymReg **r), int n, int keyvec, int emit)
PARROT_API int do_yylex_init(PARROT_INTERP, NOTNULL(yyscan_t *yyscanner))
PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL PMC *imcc_compile(PARROT_INTERP, NOTNULL(const char *s), int pasm_file, NOTNULL(STRING **error_message))
PMC *imcc_compile_pasm(PARROT_INTERP, NOTNULL(const char *s))
* Note: This function is provided for backward compatibility. This
* function can go away in future.
PMC *imcc_compile_pir(PARROT_INTERP, NOTNULL(const char *s))
* Note: This function is provided for backward compatibility. This
* function can go away in future.
PMC *IMCC_compile_pir_s(PARROT_INTERP, NOTNULL(const char *s), NOTNULL(STRING **error_message))
PMC *IMCC_compile_pasm_s(PARROT_INTERP, NOTNULL(const char *s), NOTNULL(STRING **error_message))
PMC *imcc_compile_pasm_ex(PARROT_INTERP, NOTNULL(const char *s))
PMC *imcc_compile_pir_ex(PARROT_INTERP, NOTNULL(const char *s))
PARROT_CANNOT_RETURN_NULL static void *imcc_compile_file(PARROT_INTERP, NOTNULL(const char *fullname), NOTNULL(STRING **error_message))
PARROT_CANNOT_RETURN_NULL void *IMCC_compile_file(PARROT_INTERP, NOTNULL(const char *s))
* Note: This function is provided for backward compatibility. This
* function can go away in future.
PARROT_CANNOT_RETURN_NULL void *IMCC_compile_file_s(PARROT_INTERP, NOTNULL(const char *s), NOTNULL(STRING **error_message))
void register_compilers(PARROT_INTERP)
PARROT_WARN_UNUSED_RESULT static int change_op(PARROT_INTERP, NOTNULL(IMC_Unit *unit), NOTNULL(SymReg **r), int num, int emit)
PARROT_WARN_UNUSED_RESULT int try_find_op(PARROT_INTERP, IMC_Unit *unit, NOTNULL(const char *name), SymReg ** r, int n, int keyvec, int emit)
add_n_i_n => add_n_n_i
div_n_ic_n => div_n_nc_n
div_n_i_n => set_n_i ; div_n_n_n
ge_n_ic_ic => ge_n_nc_ic
acos_n_i => acos_n_n
PARROT_WARN_UNUSED_RESULT PARROT_CAN_RETURN_NULL static const char *try_rev_cmp(NOTNULL(const char *name), NOTNULL(SymReg **r))
Instruction *multi_keyed(PARROT_INTERP, NOTNULL(IMC_Unit *unit), NOTNULL(char *name), NOTNULL(SymReg **r), int nr, int keyvec, int emit)
int imcc_fprintf(PARROT_INTERP, NOTNULL(FILE *fd), NOTNULL(const char *fmt), ...)
int imcc_vfprintf(PARROT_INTERP, NOTNULL(FILE *fd), NOTNULL(const char *format), va_list ap)
PARROT_MALLOC PARROT_WARN_UNUSED_RESULT char *str_dup(NOTNULL(const char *old))
PARROT_API void imcc_init(PARROT_INTERP)
PARROT_API void imcc_destroy(PARROT_INTERP)
|