@@ -3006,36 +3006,20 @@ static zend_always_inline int _zend_update_type_info(
3006
3006
{
3007
3007
/* Typehinting */
3008
3008
zend_func_info * func_info ;
3009
- zend_arg_info * arg_info = NULL ;
3010
- if (op_array -> arg_info && opline -> op1 .num <= op_array -> num_args ) {
3011
- arg_info = & op_array -> arg_info [opline -> op1 .num - 1 ];
3012
- }
3009
+ zend_arg_info * arg_info = & op_array -> arg_info [opline -> op1 .num - 1 ];
3013
3010
3014
3011
ce = NULL ;
3015
- if (arg_info ) {
3016
- tmp = zend_fetch_arg_info_type (script , arg_info , & ce );
3017
- if (ZEND_ARG_SEND_MODE (arg_info )) {
3018
- tmp |= MAY_BE_REF ;
3019
- }
3020
- } else {
3021
- tmp = MAY_BE_REF |MAY_BE_RC1 |MAY_BE_RCN |MAY_BE_ANY |MAY_BE_ARRAY_KEY_ANY |MAY_BE_ARRAY_OF_ANY |MAY_BE_ARRAY_OF_REF ;
3012
+ tmp = zend_fetch_arg_info_type (script , arg_info , & ce );
3013
+ if (ZEND_ARG_SEND_MODE (arg_info )) {
3014
+ tmp |= MAY_BE_REF ;
3022
3015
}
3016
+
3023
3017
func_info = ZEND_FUNC_INFO (op_array );
3024
3018
if (func_info && (int )opline -> op1 .num - 1 < func_info -> num_args ) {
3025
3019
tmp = (tmp & (MAY_BE_RC1 |MAY_BE_RCN |MAY_BE_REF )) |
3026
3020
(tmp & func_info -> arg_info [opline -> op1 .num - 1 ].info .type );
3027
3021
}
3028
- #if 0
3029
- /* We won't receive unused arguments */
3030
- if (ssa_vars [ssa_op -> result_def ].use_chain < 0 &&
3031
- ssa_vars [ssa_op -> result_def ].phi_use_chain == NULL &&
3032
- op_array -> arg_info &&
3033
- opline -> op1 .num <= op_array -> num_args &&
3034
- op_array -> arg_info [opline -> op1 .num - 1 ].class_name == NULL &&
3035
- !op_array -> arg_info [opline -> op1 .num - 1 ].type_hint ) {
3036
- tmp = MAY_BE_UNDEF |MAY_BE_RCN ;
3037
- }
3038
- #endif
3022
+
3039
3023
UPDATE_SSA_TYPE (tmp , ssa_op -> result_def );
3040
3024
if (func_info &&
3041
3025
(int )opline -> op1 .num - 1 < func_info -> num_args &&
0 commit comments