mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
Temp expressions now use operands instead of defs.
This commit is contained in:
parent
2998e578fb
commit
4a24393d8d
3 changed files with 8 additions and 5 deletions
|
@ -85,7 +85,7 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
struct expr_s *expr;
|
||||
struct def_s *def; ///< The def for the temporary variable, if
|
||||
struct operand_s *op; ///< The operand for the temporary variable, if
|
||||
///< allocated
|
||||
struct type_s *type; ///< The type of the temporary variable.
|
||||
int users; ///< Reference count. Source of much hair loss.
|
||||
|
|
|
@ -354,8 +354,8 @@ free_tempdefs (void)
|
|||
d->name);
|
||||
}
|
||||
size = type_size (d->type) - 1;
|
||||
if (d->expr)
|
||||
d->expr->e.temp.def = 0;
|
||||
//if (d->expr)
|
||||
// d->expr->e.temp.def = 0;
|
||||
|
||||
if (!d->freed) {
|
||||
d->next = free_temps[size];
|
||||
|
|
|
@ -379,8 +379,11 @@ expr_symbol (sblock_t *sblock, expr_t *e, operand_t **op)
|
|||
static sblock_t *
|
||||
expr_temp (sblock_t *sblock, expr_t *e, operand_t **op)
|
||||
{
|
||||
*op = new_operand (op_temp);
|
||||
(*op)->type = e->e.temp.type->type;
|
||||
if (!e->e.temp.op) {
|
||||
e->e.temp.op = new_operand (op_temp);
|
||||
e->e.temp.op->type = e->e.temp.type->type;
|
||||
}
|
||||
*op = e->e.temp.op;
|
||||
return sblock;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue