diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-03-18 15:40:48 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-03-19 10:49:15 +0100 |
commit | 2d0e2733c8a0010df9f45693d536531a7a725bdf (patch) | |
tree | 715b953768f04d3240c57b14bd8d9c5218af4ada /Zend/Optimizer/zend_inference.h | |
parent | 6689bedd1796380f882fdecc6dcf8da1ff885c2b (diff) | |
download | php-git-2d0e2733c8a0010df9f45693d536531a7a725bdf.tar.gz |
Support prototypes in call graph
Even if we don't know the exact method being called, include it
in the call graph with the is_prototype flag. In particular, we
can still make use of return types from prototype methods, as
PHP 8 makes LSP violations a hard error.
Most other places are adjusted to skip calls with !is_prototype.
Maybe some of them would be fine, but ignoring them is conservative.
Diffstat (limited to 'Zend/Optimizer/zend_inference.h')
-rw-r--r-- | Zend/Optimizer/zend_inference.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Zend/Optimizer/zend_inference.h b/Zend/Optimizer/zend_inference.h index 8390946012..35af4d8823 100644 --- a/Zend/Optimizer/zend_inference.h +++ b/Zend/Optimizer/zend_inference.h @@ -269,6 +269,9 @@ ZEND_API uint32_t zend_fetch_arg_info_type( const zend_script *script, zend_arg_info *arg_info, zend_class_entry **pce); ZEND_API void zend_init_func_return_info( const zend_op_array *op_array, const zend_script *script, zend_ssa_var_info *ret); +uint32_t zend_get_return_info_from_signature_only( + const zend_function *func, const zend_script *script, + zend_class_entry **ce, bool *ce_is_instanceof); void zend_func_return_info(const zend_op_array *op_array, const zend_script *script, int recursive, |