emission for func dec

This commit is contained in:
Meyer Simon
2025-05-05 20:18:23 -04:00
parent 0446b0ae6b
commit 0114e1d65f
3 changed files with 16 additions and 0 deletions

View File

@ -44,6 +44,7 @@ typedef struct TNodeOrConst TNodeOrConst;
typedef enum { // these are from page 364
E_LABEL = 10000, // this is not in the book
E_FUNC_START,
E_FUNC_DEC,
E_ADD, // 1 from the list
E_SUB, // 1
E_MUL, // 1
@ -138,6 +139,7 @@ void emit_conditional_jump(Op condition, int label, ...);
void emit_function_start(TableNode *name);
void emit_parameter(TNodeOrConst *param);
void emit_function_call(TableNode *result, int param_count, TNodeOrConst *name);
void emit_function_dec(TableNode * name);
void emit_return(TNodeOrConst *value);
void emit_reserve(TableNode *result, TNodeOrConst *size);
void emit_release(TableNode *pointer);