implemented annies and meyers stuff

This commit is contained in:
Scarlett
2025-04-25 23:09:46 -04:00
parent 74dc4f568f
commit 747a48b211
4 changed files with 199 additions and 176 deletions

View File

@ -100,7 +100,7 @@ void emit_as_file(FILE* out_file, Instruction* i);
void emit_label(int label);
void emit_jump(int label);
void emit_conditional_jump(Op condition, int label, ...);
void emit_function_start(int name);
void emit_function_start(TNodeOrConst * name);
void emit_parameter(TNodeOrConst* param);
void emit_function_call(TableNode* result, int param_count, TNodeOrConst* name);
void emit_return(TNodeOrConst* value);
@ -111,7 +111,7 @@ void emit_deref_left();
void emit_field_access(char* result, char* record, char* field);
void emit_array_access(Op op, TableNode* result, TNodeOrConst* array, TNodeOrConst* index);
void emit_bounds_check(TNodeOrConst* index, TNodeOrConst* arr);
char* label_gen();
int label_gen();
TableNode* getTN(TNodeOrConst* tnc);
int getConst(TNodeOrConst* tnc);