From e70b59b9256f8782bf45efcd3fb9dbd76d4efc0f Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 19 Nov 2012 11:02:31 +0900 Subject: [PATCH] Don't null the def pointer when freeing a temp. It makes debugging more difficult. --- tools/qfcc/source/emit.c | 4 +--- tools/qfcc/source/statements.c | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/qfcc/source/emit.c b/tools/qfcc/source/emit.c index 27da9cd2e..8d69ba3f0 100644 --- a/tools/qfcc/source/emit.c +++ b/tools/qfcc/source/emit.c @@ -178,10 +178,8 @@ use_tempop (operand_t *op, expr_t *expr) op = op->o.alias; if (!op || op->op_type != op_temp) return; - if (--op->o.tempop.users == 0) { + if (--op->o.tempop.users == 0) free_temp_def (op->o.tempop.def); - op->o.tempop.def = 0; - } if (op->o.tempop.users <= -1) bug (expr, "temp users went negative: %s", operand_string (op)); } diff --git a/tools/qfcc/source/statements.c b/tools/qfcc/source/statements.c index 623b37bed..65d76f983 100644 --- a/tools/qfcc/source/statements.c +++ b/tools/qfcc/source/statements.c @@ -184,6 +184,8 @@ print_operand (operand_t *op) break; case op_temp: printf ("tmp (%s) %p", pr_type_name[op->type], op); + if (op->o.tempop.def) + printf (" %s", op->o.tempop.def->name); break; case op_pointer: printf ("ptr (%s)[%d]",