Skip to content

Commit 560bb04

Browse files
committed
Consolidate internal inheritance with user inheritance
1 parent 1c1fde3 commit 560bb04

File tree

105 files changed

+1094
-204
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+1094
-204
lines changed

Zend/zend_API.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4505,12 +4505,6 @@ ZEND_API zend_property_info *zend_declare_typed_property(zend_class_entry *ce, z
45054505
ce->default_properties_count++;
45064506
ce->default_properties_table = perealloc(ce->default_properties_table, sizeof(zval) * ce->default_properties_count, ce->type == ZEND_INTERNAL_CLASS);
45074507

4508-
/* For user classes this is handled during linking */
4509-
if (ce->type == ZEND_INTERNAL_CLASS) {
4510-
ce->properties_info_table = perealloc(ce->properties_info_table, sizeof(zend_property_info *) * ce->default_properties_count, 1);
4511-
ce->properties_info_table[ce->default_properties_count - 1] = property_info;
4512-
}
4513-
45144508
zval *property_default_ptr = &ce->default_properties_table[OBJ_PROP_TO_NUM(property_info->offset)];
45154509
ZVAL_COPY_VALUE(property_default_ptr, property);
45164510
Z_PROP_FLAG_P(property_default_ptr) = Z_ISUNDEF_P(property) ? IS_PROP_UNINIT : 0;

Zend/zend_API.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2585,6 +2585,10 @@ static zend_always_inline bool zend_parse_arg_obj_or_str(
25852585
return zend_parse_arg_str(arg, destination_string, allow_null, arg_num);
25862586
}
25872587

2588+
/* Used in arginfo.h files, copied from zend_inheritance.h to avoid its inclusion. */
2589+
void zend_build_properties_info_table(zend_class_entry *ce);
2590+
ZEND_API void zend_do_inheritance_ex(zend_class_entry *ce, zend_class_entry *parent_ce, bool checked);
2591+
25882592
END_EXTERN_C()
25892593

25902594
#endif /* ZEND_API_H */

Zend/zend_attributes_arginfo.h

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Zend/zend_builtin_functions_arginfo.h

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Zend/zend_closures_arginfo.h

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Zend/zend_enum_arginfo.h

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Zend/zend_exceptions_arginfo.h

Lines changed: 48 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Zend/zend_fibers_arginfo.h

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Zend/zend_generators_arginfo.h

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)