com php-src: Disable inlining for $this->foo(), because $this may be not in object context: ext/opcache/Optimizer/optimize_func_calls .c
ext/opcache/tests/wrong_inlining_002.phpt
| From: | Dmitry Stogov | Date: | Thu, 30 Jun 2016 18:05:48 +0000 |
| Subject: | com php-src: Disable inlining for $this->foo(), because $this may be not in object context: ext/opcache/Optimizer/optimize_func_calls .c ext/opcache/tests/wrong_inlining_002.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-92721@lists.php.net to get a copy of this message | ||
Commit: 3a452426693aed93d5392cb68aff7eacd73989e3
Author: Dmitry Stogov <dmitry@zend.com> Thu, 30 Jun 2016 21:05:48 +0300
Parents: c3667a5eed098cc106351ec032306a149509dfa3
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3a452426693aed93d5392cb68aff7eacd73989e3
Log:
Disable inlining for $this->foo(), because $this may be not in object context
Changed paths:
M ext/opcache/Optimizer/optimize_func_calls.c
M ext/opcache/tests/wrong_inlining_002.phpt
Diff:
diff --git a/ext/opcache/Optimizer/optimize_func_calls.c
b/ext/opcache/Optimizer/optimize_func_calls.c
index 0d5e4d7..f4565b0 100644
--- a/ext/opcache/Optimizer/optimize_func_calls.c
+++ b/ext/opcache/Optimizer/optimize_func_calls.c
@@ -100,7 +100,7 @@ static void zend_try_inline_call(zend_op_array *op_array, zend_op *fcall, zend_o
if (fcall->opcode == ZEND_INIT_METHOD_CALL && fcall->op1_type == IS_UNUSED) {
/* TODO: we can't inlne methods, because $this may be used
- * not in class context ???
+ * not in object context ???
*/
return;
}
diff --git a/ext/opcache/tests/wrong_inlining_002.phpt b/ext/opcache/tests/wrong_inlining_002.phpt
index e132f98..4e71a96 100644
--- a/ext/opcache/tests/wrong_inlining_002.phpt
+++ b/ext/opcache/tests/wrong_inlining_002.phpt
@@ -1,5 +1,5 @@
--TEST--
-Pass result of inlined function by reference
+$this not in object context
--INI--
opcache.enable=1
opcache.enable_cli=1