1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 03:32:20 +02:00

Merge branch 'PHP-7.4'

* PHP-7.4:
  Don't inline static call to instance method
This commit is contained in:
Nikita Popov
2020-06-29 09:53:09 +02:00

View File

@@ -107,6 +107,12 @@ static void zend_try_inline_call(zend_op_array *op_array, zend_op *fcall, zend_o
uint32_t i, num_args = func->op_array.num_args;
num_args += (func->op_array.fn_flags & ZEND_ACC_VARIADIC) != 0;
if (fcall->opcode == ZEND_INIT_STATIC_METHOD_CALL
&& !(func->op_array.fn_flags & ZEND_ACC_STATIC)) {
/* Don't inline static call to instance method. */
return;
}
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 object context ???