While list is backpatching
This commit is contained in:
@ -57,6 +57,12 @@ int S_Size(Stack *s){
|
||||
}
|
||||
return s->size;
|
||||
}
|
||||
|
||||
void emit_backpatch(Stack * s, int l){
|
||||
for (Instruction * i = S_Pop(s); i; i = S_Pop(s)){
|
||||
i->label = l;
|
||||
}
|
||||
}
|
||||
//_______________________________________________________________________
|
||||
|
||||
char * temp = NULL;
|
||||
@ -72,6 +78,7 @@ void emit_push_all(Stack * s){
|
||||
for (Instruction * i = S_Pop(s); i; i = S_Pop(s)){
|
||||
current->next = i;
|
||||
i->prev = current;
|
||||
i->index = current->index + 1;
|
||||
current = i;
|
||||
current->next = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user