From: Wolfgang (Blub) Bumiller Date: Thu, 23 Aug 2012 20:07:32 +0000 (+0200) Subject: slight change to ir_value_dump_life; fixing ir_value_life_merge_into: TODO test this... X-Git-Tag: 0.1-rc1~57 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5e4b8846d1838c6c0244646b2a3f81c94a647b13;p=xonotic%2Fgmqcc.git slight change to ir_value_dump_life; fixing ir_value_life_merge_into: TODO test this seperately, all cases --- diff --git a/ir.c b/ir.c index cb97b29..d2e1e0f 100644 --- a/ir.c +++ b/ir.c @@ -919,7 +919,7 @@ bool ir_value_life_merge_into(ir_value *self, const ir_value *other) } if (life->start < entry->start && - life->end >= entry->start) + life->end+1 >= entry->start) { /* starts earlier and overlaps */ entry->start = life->start; @@ -3109,10 +3109,10 @@ void ir_value_dump(ir_value* v, int (*oprintf)(const char*, ...)) } } -void ir_value_dump_life(ir_value *self, int (*oprintf)(const char*,...)) +void ir_value_dump_life(const ir_value *self, int (*oprintf)(const char*,...)) { size_t i; - oprintf("Life of %s:\n", self->name); + oprintf("Life of %12s:", self->name); for (i = 0; i < self->life_count; ++i) { oprintf(" + [%i, %i]\n", self->life[i].start, self->life[i].end); diff --git a/ir.h b/ir.h index dd48a8a..e044d75 100644 --- a/ir.h +++ b/ir.h @@ -111,7 +111,7 @@ bool ir_value_lives(ir_value*, size_t); bool ir_values_overlap(const ir_value*, const ir_value*); void ir_value_dump(ir_value*, int (*oprintf)(const char*,...)); -void ir_value_dump_life(ir_value *self, int (*oprintf)(const char*,...)); +void ir_value_dump_life(const ir_value *self, int (*oprintf)(const char*,...)); /* A vector of IR values */ typedef struct {