mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-30 12:40:42 +00:00
slightly better code, but the temp isn't getting ref-counted correctly
This commit is contained in:
parent
68fb0a1147
commit
3874d78697
1 changed files with 3 additions and 2 deletions
|
@ -237,7 +237,6 @@ build_switch (expr_t *sw, case_node_t *tree, int op, expr_t *sw_val,
|
||||||
branch->line = sw_val->line;
|
branch->line = sw_val->line;
|
||||||
branch->file = sw_val->file;
|
branch->file = sw_val->file;
|
||||||
append_expr (sw, branch);
|
append_expr (sw, branch);
|
||||||
temp->e.temp.users--;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,7 +276,9 @@ build_switch (expr_t *sw, case_node_t *tree, int op, expr_t *sw_val,
|
||||||
if (tree->right)
|
if (tree->right)
|
||||||
append_expr (sw, high_label);
|
append_expr (sw, high_label);
|
||||||
}
|
}
|
||||||
build_switch (sw, tree->right, op, sw_val, temp, default_label);
|
if (tree->right || !tree->left) {
|
||||||
|
build_switch (sw, tree->right, op, sw_val, temp, default_label);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
expr_t *utemp = new_temp_def_expr (&type_uinteger);
|
expr_t *utemp = new_temp_def_expr (&type_uinteger);
|
||||||
int low = tree->low->e.integer_val;
|
int low = tree->low->e.integer_val;
|
||||||
|
|
Loading…
Reference in a new issue