Skip to content

Commit fa67864

Browse files
committed
Use MIN/MAX when dumping RANGE[]
It's very common that one of the bounds is LONG_MIN or LONG_MAX. Dump them as MIN/MAX instead of the int representation in that case, as it makes the dump less noisy.
1 parent c0d1dbc commit fa67864

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/opcache/Optimizer/zend_dump.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,15 @@ static void zend_dump_range(const zend_ssa_range *r)
154154
fprintf(stderr, " RANGE[");
155155
if (r->underflow) {
156156
fprintf(stderr, "--..");
157+
} else if (r->min == ZEND_LONG_MIN) {
158+
fprintf(stderr, "MIN..");
157159
} else {
158160
fprintf(stderr, ZEND_LONG_FMT "..", r->min);
159161
}
160162
if (r->overflow) {
161163
fprintf(stderr, "++]");
164+
} else if (r->max == ZEND_LONG_MAX) {
165+
fprintf(stderr, "MAX]");
162166
} else {
163167
fprintf(stderr, ZEND_LONG_FMT "]", r->max);
164168
}

0 commit comments

Comments
 (0)