com php-src: Objects with constructors escape: ext/opcache/Opti mizer/escape_analysis.c
| From: | Dmitry Stogov | Date: | Fri, 01 Sep 2017 07:31:43 +0000 |
| Subject: | com php-src: Objects with constructors escape: ext/opcache/Opti mizer/escape_analysis.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-99223@lists.php.net to get a copy of this message | ||
Commit: 2c61e5dc38261544f3f9405836700cae08ebe6e4
Author: Dmitry Stogov <dmitry@zend.com> Fri, 1 Sep 2017 10:31:43 +0300
Parents: 4cb06b9327775b2b981df28cb79b2ea19fe6f354
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2c61e5dc38261544f3f9405836700cae08ebe6e4
Log:
Objects with constructors escape
Changed paths:
M ext/opcache/Optimizer/escape_analysis.c
Diff:
diff --git a/ext/opcache/Optimizer/escape_analysis.c b/ext/opcache/Optimizer/escape_analysis.c
index d0fe52b..db2923b 100644
--- a/ext/opcache/Optimizer/escape_analysis.c
+++ b/ext/opcache/Optimizer/escape_analysis.c
@@ -177,7 +177,7 @@ static int is_allocation_def(zend_op_array *op_array, zend_ssa *ssa, int def, in
/* objects with destructors should escape */
if (opline->op1_type == IS_CONST) {
zend_class_entry *ce = get_class_entry(script, Z_STR_P(CRT_CONSTANT_EX(op_array,
opline->op1, ssa->rt_constants)+1));
- if (ce && !ce->create_object &&
+ if (ce && !ce->create_object && !ce->constructor &&
!ce->destructor && !ce->__get && !ce->__set &&
!(ce->ce_flags & ZEND_ACC_INHERITED)) {
return 1;