@@ -6560,7 +6560,7 @@ static void zend_is_type_list_redundant_by_single_type(zend_type_list *type_list
6560
6560
}
6561
6561
}
6562
6562
6563
- static zend_type zend_compile_typename (zend_ast * ast , bool force_allow_null );
6563
+ static zend_type zend_compile_typename (zend_ast * ast );
6564
6564
6565
6565
static zend_type zend_compile_typename_ex (
6566
6566
zend_ast * ast , bool force_allow_null , bool * forced_allow_null ) /* {{{ */
@@ -6601,7 +6601,7 @@ static zend_type zend_compile_typename_ex(
6601
6601
/* Mark type as list type */
6602
6602
ZEND_TYPE_SET_LIST (type , type_list );
6603
6603
6604
- single_type = zend_compile_typename (type_ast , false );
6604
+ single_type = zend_compile_typename (type_ast );
6605
6605
ZEND_ASSERT (ZEND_TYPE_IS_INTERSECTION (single_type ));
6606
6606
6607
6607
type_list -> types [type_list -> num_types ++ ] = single_type ;
@@ -6788,10 +6788,10 @@ static zend_type zend_compile_typename_ex(
6788
6788
}
6789
6789
/* }}} */
6790
6790
6791
- static zend_type zend_compile_typename (zend_ast * ast , bool force_allow_null )
6791
+ static zend_type zend_compile_typename (zend_ast * ast )
6792
6792
{
6793
6793
bool forced_allow_null ;
6794
- return zend_compile_typename_ex (ast , force_allow_null , & forced_allow_null );
6794
+ return zend_compile_typename_ex (ast , false , & forced_allow_null );
6795
6795
}
6796
6796
6797
6797
/* May convert value from int to float. */
@@ -6937,8 +6937,7 @@ static void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32
6937
6937
arg_infos = safe_emalloc (sizeof (zend_arg_info ), list -> children + 1 , 0 );
6938
6938
arg_infos -> name = NULL ;
6939
6939
if (return_type_ast ) {
6940
- arg_infos -> type = zend_compile_typename (
6941
- return_type_ast , /* force_allow_null */ 0 );
6940
+ arg_infos -> type = zend_compile_typename (return_type_ast );
6942
6941
ZEND_TYPE_FULL_MASK (arg_infos -> type ) |= _ZEND_ARG_INFO_FLAGS (
6943
6942
(op_array -> fn_flags & ZEND_ACC_RETURN_REFERENCE ) != 0 , /* is_variadic */ 0 , /* is_tentative */ 0 );
6944
6943
} else {
@@ -7141,7 +7140,7 @@ static void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32
7141
7140
/* Recompile the type, as it has different memory management requirements. */
7142
7141
zend_type type = ZEND_TYPE_INIT_NONE (0 );
7143
7142
if (type_ast ) {
7144
- type = zend_compile_typename (type_ast , /* force_allow_null */ 0 );
7143
+ type = zend_compile_typename (type_ast );
7145
7144
}
7146
7145
7147
7146
/* Don't give the property an explicit default value. For typed properties this means
@@ -7715,7 +7714,7 @@ static void zend_compile_prop_decl(zend_ast *ast, zend_ast *type_ast, uint32_t f
7715
7714
zend_type type = ZEND_TYPE_INIT_NONE (0 );
7716
7715
7717
7716
if (type_ast ) {
7718
- type = zend_compile_typename (type_ast , /* force_allow_null */ 0 );
7717
+ type = zend_compile_typename (type_ast );
7719
7718
7720
7719
if (ZEND_TYPE_FULL_MASK (type ) & (MAY_BE_VOID |MAY_BE_NEVER |MAY_BE_CALLABLE )) {
7721
7720
zend_string * str = zend_type_to_string (type );
@@ -7830,7 +7829,7 @@ static void zend_compile_class_const_decl(zend_ast *ast, uint32_t flags, zend_as
7830
7829
zend_type type = ZEND_TYPE_INIT_NONE (0 );
7831
7830
7832
7831
if (type_ast ) {
7833
- type = zend_compile_typename (type_ast , /* force_allow_null */ 0 );
7832
+ type = zend_compile_typename (type_ast );
7834
7833
7835
7834
uint32_t type_mask = ZEND_TYPE_PURE_MASK (type );
7836
7835
@@ -8023,7 +8022,7 @@ static zend_string *zend_generate_anon_class_name(zend_ast_decl *decl)
8023
8022
static void zend_compile_enum_backing_type (zend_class_entry * ce , zend_ast * enum_backing_type_ast )
8024
8023
{
8025
8024
ZEND_ASSERT (ce -> ce_flags & ZEND_ACC_ENUM );
8026
- zend_type type = zend_compile_typename (enum_backing_type_ast , 0 );
8025
+ zend_type type = zend_compile_typename (enum_backing_type_ast );
8027
8026
uint32_t type_mask = ZEND_TYPE_PURE_MASK (type );
8028
8027
if (ZEND_TYPE_IS_COMPLEX (type ) || (type_mask != MAY_BE_LONG && type_mask != MAY_BE_STRING )) {
8029
8028
zend_string * type_string = zend_type_to_string (type );
0 commit comments