mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Use low_level_type instead of extract_type.
extract_type doesn't understand enums (by design?). qwaq's types.r now compiles.
This commit is contained in:
parent
f2cc82469a
commit
d1252813ce
3 changed files with 10 additions and 5 deletions
|
@ -50,6 +50,7 @@
|
|||
#include "statements.h"
|
||||
#include "strpool.h"
|
||||
#include "symtab.h"
|
||||
#include "type.h"
|
||||
|
||||
static daglabel_t *free_labels;
|
||||
static dagnode_t *free_nodes;
|
||||
|
@ -546,7 +547,9 @@ dag_gencode (dag_t *dag, sblock_t *block, dagnode_t *dagnode)
|
|||
operands[2] = temp_operand (get_type (dagnode->label->expr));
|
||||
} else {
|
||||
daglabel_t *var = dag->labels[var_iter->member];
|
||||
etype_t type = extract_type (dagnode->label->expr);
|
||||
etype_t type;
|
||||
|
||||
type = low_level_type (get_type (dagnode->label->expr));
|
||||
operands[2] = fix_op_type (var->op, type);
|
||||
var_iter = set_next (var_iter);
|
||||
}
|
||||
|
|
|
@ -184,8 +184,9 @@ print_block (dstring_t *dstr, expr_t *e, int level, int id)
|
|||
dasprintf (dstr, "%*se_%p -> e_%p;\n", indent, "", e,
|
||||
e->e.block.result);
|
||||
}
|
||||
dasprintf (dstr, "%*se_%p -> e_%p [style=dashed];\n", indent, "", e,
|
||||
e->e.block.head);
|
||||
if (e->e.block.head)
|
||||
dasprintf (dstr, "%*se_%p -> e_%p [style=dashed];\n", indent, "", e,
|
||||
e->e.block.head);
|
||||
//dasprintf (dstr, "%*ssubgraph cluster_%p {\n", indent, "", e);
|
||||
for (se = e->e.block.head; se; se = se->next) {
|
||||
_print_expr (dstr, se, level + 1, id);
|
||||
|
@ -272,7 +273,8 @@ print_uexpr (dstring_t *dstr, expr_t *e, int level, int id)
|
|||
dstring_copystr (typestr, "\\n");
|
||||
print_type_str (typestr, e->e.expr.type);
|
||||
}
|
||||
dasprintf (dstr, "%*se_%p -> e_%p;\n", indent, "", e, e->e.expr.e1);
|
||||
if (e->e.expr.op != 'r' || e->e.expr.e1)
|
||||
dasprintf (dstr, "%*se_%p -> e_%p;\n", indent, "", e, e->e.expr.e1);
|
||||
dasprintf (dstr, "%*se_%p [label=\"%s%s\\n%d\"];\n", indent, "", e,
|
||||
get_op_string (e->e.expr.op), typestr->str, e->line);
|
||||
dstring_delete (typestr);
|
||||
|
|
|
@ -1418,7 +1418,7 @@ make_statements (expr_t *e)
|
|||
{
|
||||
sblock_t *sblock = new_sblock ();
|
||||
//sblock_t *s;
|
||||
// print_expr (e);
|
||||
//dump_dot ("expr", e, dump_dot_expr);
|
||||
statement_slist (sblock, e);
|
||||
if (options.block_dot.initial)
|
||||
dump_dot ("initial", sblock, dump_dot_sblock);
|
||||
|
|
Loading…
Reference in a new issue