Skip to content

Commit

Permalink
Add line numbers to Optimizer debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
rlerdorf committed Oct 6, 2017
1 parent d0146c2 commit ec3ea30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/opcache/Optimizer/zend_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,9 @@ static void zend_dump_op(const zend_op_array *op_array, const zend_basic_block *
}

if (!b) {
len = fprintf(stderr, "L%u:", (uint32_t)(opline - op_array->opcodes));
len = fprintf(stderr, "L%u (%u):", (uint32_t)(opline - op_array->opcodes), opline->lineno);
}
fprintf(stderr, "%*c", 8-len, ' ');
fprintf(stderr, "%*c", 12-len, ' ');

if (!ssa || !ssa->ops || ssa->ops[opline - op_array->opcodes].result_use < 0) {
if (opline->result_type & (IS_CV|IS_VAR|IS_TMP_VAR)) {
Expand Down

0 comments on commit ec3ea30

Please sign in to comment.