summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-10-30 14:53:53 +0300
committerDmitry Stogov <dmitry@zend.com>2015-10-30 14:53:53 +0300
commit3e89c883bbfc1c67ff356b547046f2d7f7325058 (patch)
treea070492a537903fe13566fd728a0d45166e9d37e /ext
parent880965b95e25a9dfe976aa6bf905c408796c7a64 (diff)
downloadphp-git-3e89c883bbfc1c67ff356b547046f2d7f7325058.tar.gz
Changed ZEND_CLONE->extended_value meaning to relative offset (previously it was absolute opline number)
Diffstat (limited to 'ext')
-rw-r--r--ext/opcache/Optimizer/zend_optimizer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c
index f37b5f7241..b4bc971286 100644
--- a/ext/opcache/Optimizer/zend_optimizer.c
+++ b/ext/opcache/Optimizer/zend_optimizer.c
@@ -516,6 +516,10 @@ static void zend_accel_optimize(zend_op_array *op_array,
case ZEND_DECLARE_ANON_INHERITED_CLASS:
ZEND_PASS_TWO_UNDO_JMP_TARGET(op_array, opline, ZEND_OP1(opline));
break;
+ case ZEND_CATCH:
+ /* relative offset into absolute index */
+ opline->extended_value = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value);
+ break;
case ZEND_JMPZNZ:
/* relative offset into absolute index */
opline->extended_value = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value);
@@ -560,6 +564,10 @@ static void zend_accel_optimize(zend_op_array *op_array,
case ZEND_DECLARE_ANON_INHERITED_CLASS:
ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, ZEND_OP1(opline));
break;
+ case ZEND_CATCH:
+ /* absolute index to relative offset */
+ opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, opline->extended_value);
+ break;
case ZEND_JMPZNZ:
/* absolute index to relative offset */
opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, opline->extended_value);