com php-src: Remove special handling of zero-arg funcs in func_info: ext/opcache/Optimizer/zend_func_info.c
| From: | Nikita Popov | Date: | Mon, 27 May 2019 15:16:56 +0000 |
| Subject: | com php-src: Remove special handling of zero-arg funcs in func_info: ext/opcache/Optimizer/zend_func_info.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106347@lists.php.net to get a copy of this message | ||
Commit: a1284b4241ddfe30ee31058c2d44acf03df7aafc
Author: Nikita Popov <nikita.ppv@gmail.com> Mon, 27 May 2019 17:16:56 +0200
Parents: 45c663a9d3fef93f1c8107f08622d36a54be5807
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a1284b4241ddfe30ee31058c2d44acf03df7aafc
Log:
Remove special handling of zero-arg funcs in func_info
In PHP 8 we always throw on zpp failure, so we can always return the
type for the valid argument case only. We'll want to also adjust the
return type listings based on that (and drop MAY_BE_NULL/MAY_BE_FALSE
where possible).
Changed paths:
M ext/opcache/Optimizer/zend_func_info.c
Diff:
diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c
index beb99fc..21cab6b 100644
--- a/ext/opcache/Optimizer/zend_func_info.c
+++ b/ext/opcache/Optimizer/zend_func_info.c
@@ -1620,15 +1620,6 @@ uint32_t zend_get_func_info(const zend_call_info *call_info, const zend_ssa
*ssa
ret = MAY_BE_NULL;
} else if (info->info_func) {
ret = info->info_func(call_info, ssa);
- } else if (/*callee_func->common.arg_info && */
- callee_func->common.num_args == 0 &&
- callee_func->common.required_num_args == 0 &&
- !(callee_func->common.fn_flags & ZEND_ACC_VARIADIC)) {
- if (call_info->num_args == 0) {
- ret = info->info;
- } else {
- ret = FUNC_MAY_WARN | MAY_BE_NULL;
- }
} else {
ret = info->info;
}