mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-18 18:01:13 +00:00
Fix some missed branch/goto expression changes.
This commit is contained in:
parent
c5ecc170b6
commit
b5e7e666e9
2 changed files with 5 additions and 2 deletions
|
@ -1014,6 +1014,8 @@ backpatch (ex_list_t *list, expr_t *label)
|
||||||
|
|
||||||
if (!list)
|
if (!list)
|
||||||
return;
|
return;
|
||||||
|
if (!label || label->type != ex_label)
|
||||||
|
internal_error (label, "not a label");
|
||||||
|
|
||||||
for (i = 0; i < list->size; i++) {
|
for (i = 0; i < list->size; i++) {
|
||||||
e = list->e[i];
|
e = list->e[i];
|
||||||
|
@ -1025,6 +1027,7 @@ backpatch (ex_list_t *list, expr_t *label)
|
||||||
else {
|
else {
|
||||||
internal_error (e, 0);
|
internal_error (e, 0);
|
||||||
}
|
}
|
||||||
|
label->e.label.used++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -293,7 +293,7 @@ build_switch (expr_t *sw, case_node_t *tree, int op, expr_t *sw_val,
|
||||||
append_expr (sw, branch);
|
append_expr (sw, branch);
|
||||||
|
|
||||||
if (tree->left) {
|
if (tree->left) {
|
||||||
branch = new_binary_expr (IFA, temp, high_label);
|
branch = branch_expr (IFA, temp, high_label);
|
||||||
append_expr (sw, branch);
|
append_expr (sw, branch);
|
||||||
|
|
||||||
build_switch (sw, tree->left, op, sw_val, temp, default_label);
|
build_switch (sw, tree->left, op, sw_val, temp, default_label);
|
||||||
|
@ -321,7 +321,7 @@ build_switch (expr_t *sw, case_node_t *tree, int op, expr_t *sw_val,
|
||||||
table = new_symbol_expr (sym);
|
table = new_symbol_expr (sym);
|
||||||
|
|
||||||
if (tree->left) {
|
if (tree->left) {
|
||||||
branch = new_binary_expr (IFB, temp, low_label);
|
branch = branch_expr (IFB, temp, low_label);
|
||||||
append_expr (sw, branch);
|
append_expr (sw, branch);
|
||||||
}
|
}
|
||||||
//FIXME unsigned int
|
//FIXME unsigned int
|
||||||
|
|
Loading…
Reference in a new issue