I merged IR-Linting to Dev
This commit is contained in:
@ -22,11 +22,12 @@ typedef struct __Node {
|
||||
|
||||
typedef struct Stack {
|
||||
__Node * n;
|
||||
int w;
|
||||
int size;
|
||||
} Stack;
|
||||
Stack * S_Init();
|
||||
void S_Free(Stack *s);
|
||||
void S_Push(Stack * s, void *v);
|
||||
void S_Push(Stack * s, void *v, int i);
|
||||
void * S_Pop(Stack *s);
|
||||
void * S_Peek(Stack *s);
|
||||
bool S_IsEmpty(Stack *s);
|
||||
@ -108,13 +109,13 @@ typedef struct TFList {
|
||||
TFList * next;
|
||||
} TFList;
|
||||
|
||||
TFList * make_list(Instruction * i);
|
||||
// TFList * make_list(Instruction * i);
|
||||
// - makelist(i) function to create instruction lists
|
||||
void merge(TFList * l1, TFList * l2);
|
||||
// void merge(TFList * l1, TFList * l2);
|
||||
// - merge(p1,p2) function to concatenate lists
|
||||
void backpatch(TFList * l, int label);
|
||||
// void backpatch(TFList * l, int label);
|
||||
// - backpatch(p,i) function to fill in jump targets
|
||||
void bp_temp(int n);
|
||||
// void bp_temp(int n);
|
||||
|
||||
|
||||
extern Instruction * begin;
|
||||
@ -143,6 +144,9 @@ void emit_release(TableNode * pointer);
|
||||
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);
|
||||
void emit_goto(int i);
|
||||
void emit_detach();
|
||||
void emit_push_all(Stack * s);
|
||||
|
||||
|
||||
int getLabel(Instruction * i);
|
||||
@ -160,3 +164,5 @@ int get_index(Instruction * i);
|
||||
void set_label(Instruction * i, int label);
|
||||
bool isConst(TNodeOrConst * tnc);
|
||||
int label_gen();
|
||||
void backpatch(Stack *s, int l);
|
||||
void emit_backpatch(Stack *s, int l);
|
||||
|
Reference in New Issue
Block a user