languages/cola/gen.c
Intermediate code generation routines.
void gen_ast(AST *ast)
- RT#48200: Not yet documented!!!
void gen_namespace_decl(AST *p)
- RT#48200: Not yet documented!!!
void gen_class_decl(AST *p)
- RT#48200: Not yet documented!!!
void gen_class_body(AST *p)
- RT#48200: Not yet documented!!!
void gen_constant_decl(AST *p)
- RT#48200: Not yet documented!!!
void gen_field_decl(AST *p)
- RT#48200: Not yet documented!!!
void gen_block(AST *p)
- RT#48200: Not yet documented!!!
void gen_statement(AST *p)
- RT#48200: Not yet documented!!!
void gen_var_decl(AST *p)
- RT#48200: Not yet documented!!!
void gen_param_list(Symbol *paramlist)
- RT#48200: Not yet documented!!!
void gen_method_decl(AST *p)
- RT#48200: Not yet documented!!!
void gen_assign(AST *ast)
- RT#48200: Not yet documented!!!
void gen_expr(AST *p, Symbol *lval, Type *type)
- If lval is passed,
expressions use that as the target,
otherwise they create a temporary.
void gen_arg_list_expr(AST *p)
- RT#48200: Not yet documented!!!
void gen_arg_list(AST *p)
- Generate arguments in reverse order on stack.
void gen_method_call(AST *p)
- RT#48200: Not yet documented!!!
void gen_if(AST *p)
- RT#48200: Not yet documented!!!
void gen_while(AST *p)
- RT#48200: Not yet documented!!!
void gen_for(AST *p)
- RT#48200: Not yet documented!!!
void gen_boolean(AST *p, const char *true_label, const char *false_label, int invert)
- boolean->arg1 points to the actual expression,
boolean just converts to true/false The invert arg is for generating the branches depending on if we are generating a simple logical or compound for lazy evaluation.
void coerce_operands(Type ** t1, Type ** t2)
- RT#48200: Not yet documented!!!
char *op_name(int operator)
- RT#48200: Not yet documented!!!
int op_inverse(int operator)
- RT#48200: Not yet documented!!!
char *new_itemp()
- RT#48200: Not yet documented!!!
char *new_ntemp()
- RT#48200: Not yet documented!!!
char *new_stemp()
- RT#48200: Not yet documented!!!
char *new_ptemp()
- RT#48200: Not yet documented!!!
Symbol *new_temp(Type *type)
- Create a temporary rval
void reset_temps()
- RT#48200: Not yet documented!!!
char *get_label()
- RT#48200: Not yet documented!!!
char *make_label()
- RT#48200: Not yet documented!!!
void emit_op_expr(Symbol *r, Symbol *a1, char *op, Symbol *a2)
- RT#48200: Not yet documented!!!
void emit_unary_expr(Symbol *res, Symbol *arg1, char *op)
- RT#48200: Not yet documented!!!