Skip to content

Commit 4130a1e

Browse files
committed
Bump ce_flags size
1 parent 2508138 commit 4130a1e

File tree

7 files changed

+12
-10
lines changed

7 files changed

+12
-10
lines changed

Zend/Optimizer/escape_analysis.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ static bool is_allocation_def(zend_op_array *op_array, zend_ssa *ssa, int def, i
160160
/* objects with destructors should escape */
161161
zend_class_entry *ce = zend_optimizer_get_class_entry_from_op1(
162162
script, op_array, opline);
163-
uint32_t forbidden_flags =
163+
zend_ce_flags forbidden_flags =
164164
/* These flags will always cause an exception */
165165
ZEND_ACC_IMPLICIT_ABSTRACT_CLASS | ZEND_ACC_EXPLICIT_ABSTRACT_CLASS
166166
| ZEND_ACC_INTERFACE | ZEND_ACC_TRAIT;

Zend/zend.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,12 @@ typedef struct _zend_trait_alias {
112112
uint32_t modifiers;
113113
} zend_trait_alias;
114114

115+
typedef uint64_t zend_ce_flags;
116+
115117
typedef struct _zend_class_mutable_data {
116118
zval *default_properties_table;
117119
HashTable *constants_table;
118-
uint32_t ce_flags;
120+
zend_ce_flags ce_flags;
119121
HashTable *backed_enum_table;
120122
} zend_class_mutable_data;
121123

@@ -152,8 +154,8 @@ struct _zend_class_entry {
152154
zend_class_entry *parent;
153155
zend_string *parent_name;
154156
};
157+
zend_ce_flags ce_flags;
155158
int refcount;
156-
uint32_t ce_flags;
157159

158160
int default_properties_count;
159161
int default_static_members_count;

Zend/zend_API.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,7 @@ ZEND_API zend_result zend_update_class_constants(zend_class_entry *class_type) /
14951495
zval *static_members_table = NULL;
14961496
zend_class_constant *c;
14971497
zval *val;
1498-
uint32_t ce_flags;
1498+
zend_ce_flags ce_flags;
14991499

15001500
ce_flags = class_type->ce_flags;
15011501

Zend/zend_ast.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ typedef struct _zend_ast_decl {
207207
zend_ast_attr attr; /* Unused - for structure compatibility */
208208
uint32_t start_lineno;
209209
uint32_t end_lineno;
210-
uint32_t flags;
210+
uint64_t flags;
211211
zend_string *doc_comment;
212212
zend_string *name;
213213
zend_ast *child[5];

Zend/zend_builtin_functions.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ flf_clean:;
10021002
Z_FLF_PARAM_FREE_STR(2, property_tmp)
10031003
}
10041004

1005-
static inline void _class_exists_impl(zval *return_value, zend_string *name, bool autoload, int flags, int skip_flags) /* {{{ */
1005+
static inline void _class_exists_impl(zval *return_value, zend_string *name, bool autoload, zend_ce_flags flags, zend_ce_flags skip_flags) /* {{{ */
10061006
{
10071007
zend_string *lcname;
10081008
zend_class_entry *ce;
@@ -1037,7 +1037,7 @@ static inline void _class_exists_impl(zval *return_value, zend_string *name, boo
10371037
}
10381038
/* {{{ */
10391039

1040-
static inline void class_exists_impl(INTERNAL_FUNCTION_PARAMETERS, int flags, int skip_flags) /* {{{ */
1040+
static inline void class_exists_impl(INTERNAL_FUNCTION_PARAMETERS, zend_ce_flags flags, zend_ce_flags skip_flags) /* {{{ */
10411041
{
10421042
zend_string *name;
10431043
bool autoload = true;

Zend/zend_inheritance.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3011,7 +3011,7 @@ ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string
30113011
zend_class_entry **traits_and_interfaces = NULL;
30123012
zend_class_entry *proto = NULL;
30133013
zend_class_entry *orig_linking_class;
3014-
uint32_t is_cacheable = ce->ce_flags & ZEND_ACC_IMMUTABLE;
3014+
zend_ce_flags is_cacheable = ce->ce_flags & ZEND_ACC_IMMUTABLE;
30153015
uint32_t i, j;
30163016
zval *zv;
30173017
ALLOCA_FLAG(use_heap)
@@ -3355,7 +3355,7 @@ ZEND_API zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_
33553355
return ce;
33563356
}
33573357

3358-
uint32_t is_cacheable = ce->ce_flags & ZEND_ACC_IMMUTABLE;
3358+
zend_ce_flags is_cacheable = ce->ce_flags & ZEND_ACC_IMMUTABLE;
33593359
UPDATE_IS_CACHEABLE(parent_ce);
33603360
if (is_cacheable) {
33613361
if (zend_inheritance_cache_get && zend_inheritance_cache_add) {

ext/opcache/ZendAccelerator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3916,7 +3916,7 @@ static void preload_link(void)
39163916
* prevent freeing of interface names. */
39173917
void *checkpoint = zend_arena_checkpoint(CG(arena));
39183918
zend_class_entry *orig_ce = ce;
3919-
uint32_t temporary_flags = ZEND_ACC_FILE_CACHED|ZEND_ACC_CACHED;
3919+
zend_ce_flags temporary_flags = ZEND_ACC_FILE_CACHED|ZEND_ACC_CACHED;
39203920
ce->ce_flags |= temporary_flags;
39213921
if (ce->parent_name) {
39223922
zend_string_addref(ce->parent_name);

0 commit comments

Comments
 (0)