Skip to content

Commit

Permalink
Convert CONCAT into FAST_CONCAT for non-object operands
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Jul 19, 2017
1 parent 95a1f77 commit 3185f86
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ext/opcache/Optimizer/dfa_pass.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,11 @@ void zend_dfa_optimize_op_array(zend_op_array *op_array, zend_optimizer_ctx *ctx
ZVAL_DOUBLE(&tmp, zval_get_double(zv));
opline->op2.constant = zend_optimizer_add_literal(op_array, &tmp);
}
} else if (opline->opcode == ZEND_CONCAT) {
if (!(OP1_INFO() & MAY_BE_OBJECT)
&& !(OP2_INFO() & MAY_BE_OBJECT)) {
opline->opcode = ZEND_FAST_CONCAT;
}
}
}

Expand Down

0 comments on commit 3185f86

Please sign in to comment.