Lines Matching refs:parent_ce
322 zend_class_entry *parent_ce; in unlinked_instanceof() local
324 parent_ce = ce1->parent; in unlinked_instanceof()
326 parent_ce = zend_lookup_class_ex(ce1->parent_name, NULL, in unlinked_instanceof()
332 if (parent_ce && unlinked_instanceof(parent_ce, ce2)) { in unlinked_instanceof()
1749 ZEND_API void zend_do_inheritance_ex(zend_class_entry *ce, zend_class_entry *parent_ce, bool checke… in zend_do_inheritance_ex() argument
1757 if (UNEXPECTED(!(parent_ce->ce_flags & ZEND_ACC_INTERFACE))) { in zend_do_inheritance_ex()
1758 …MPILE_ERROR, "Interface %s cannot extend class %s", ZSTR_VAL(ce->name), ZSTR_VAL(parent_ce->name)); in zend_do_inheritance_ex()
1760 …} else if (UNEXPECTED(parent_ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_TRAIT|ZEND_ACC_FINAL|ZEND… in zend_do_inheritance_ex()
1763 if (parent_ce->ce_flags & ZEND_ACC_ENUM) { in zend_do_inheritance_ex()
1764 …(E_COMPILE_ERROR, "Class %s cannot extend enum %s", ZSTR_VAL(ce->name), ZSTR_VAL(parent_ce->name)); in zend_do_inheritance_ex()
1767 if (parent_ce->ce_flags & ZEND_ACC_FINAL) { in zend_do_inheritance_ex()
1768 …ILE_ERROR, "Class %s cannot extend final class %s", ZSTR_VAL(ce->name), ZSTR_VAL(parent_ce->name)); in zend_do_inheritance_ex()
1772 if ((parent_ce->ce_flags & ZEND_ACC_INTERFACE) || (parent_ce->ce_flags & ZEND_ACC_TRAIT)) { in zend_do_inheritance_ex()
1774 …ZSTR_VAL(ce->name), parent_ce->ce_flags & ZEND_ACC_INTERFACE ? "interface" : "trait", ZSTR_VAL(par… in zend_do_inheritance_ex()
1779 …if (UNEXPECTED((ce->ce_flags & ZEND_ACC_READONLY_CLASS) != (parent_ce->ce_flags & ZEND_ACC_READONL… in zend_do_inheritance_ex()
1782 …parent_ce->ce_flags & ZEND_ACC_READONLY_CLASS ? "readonly" : "non-readonly", ZSTR_VAL(parent_ce->n… in zend_do_inheritance_ex()
1789 ce->parent = parent_ce; in zend_do_inheritance_ex()
1790 ce->default_object_handlers = parent_ce->default_object_handlers; in zend_do_inheritance_ex()
1794 if (parent_ce->default_properties_count) { in zend_do_inheritance_ex()
1798 …zval *table = pemalloc(sizeof(zval) * (ce->default_properties_count + parent_ce->default_propertie… in zend_do_inheritance_ex()
1800 end = table + parent_ce->default_properties_count; in zend_do_inheritance_ex()
1811 …end = pemalloc(sizeof(zval) * parent_ce->default_properties_count, ce->type == ZEND_INTERNAL_CLASS… in zend_do_inheritance_ex()
1812 dst = end + parent_ce->default_properties_count; in zend_do_inheritance_ex()
1815 src = parent_ce->default_properties_table + parent_ce->default_properties_count; in zend_do_inheritance_ex()
1816 if (UNEXPECTED(parent_ce->type != ce->type)) { in zend_do_inheritance_ex()
1843 ce->default_properties_count += parent_ce->default_properties_count; in zend_do_inheritance_ex()
1846 if (parent_ce->default_static_members_count) { in zend_do_inheritance_ex()
1850 …zval *table = pemalloc(sizeof(zval) * (ce->default_static_members_count + parent_ce->default_stati… in zend_do_inheritance_ex()
1852 end = table + parent_ce->default_static_members_count; in zend_do_inheritance_ex()
1863 …end = pemalloc(sizeof(zval) * parent_ce->default_static_members_count, ce->type == ZEND_INTERNAL_C… in zend_do_inheritance_ex()
1864 dst = end + parent_ce->default_static_members_count; in zend_do_inheritance_ex()
1867 src = parent_ce->default_static_members_table + parent_ce->default_static_members_count; in zend_do_inheritance_ex()
1881 ce->default_static_members_count += parent_ce->default_static_members_count; in zend_do_inheritance_ex()
1893 property_info->offset += parent_ce->default_static_members_count; in zend_do_inheritance_ex()
1895 property_info->offset += parent_ce->default_properties_count * sizeof(zval); in zend_do_inheritance_ex()
1900 if (zend_hash_num_elements(&parent_ce->properties_info)) { in zend_do_inheritance_ex()
1903 zend_hash_num_elements(&parent_ce->properties_info), 0); in zend_do_inheritance_ex()
1905 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&parent_ce->properties_info, key, property_info) { in zend_do_inheritance_ex()
1918 if (zend_hash_num_elements(&parent_ce->constants_table)) { in zend_do_inheritance_ex()
1923 zend_hash_num_elements(&parent_ce->constants_table), 0); in zend_do_inheritance_ex()
1925 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&parent_ce->constants_table, key, c) { in zend_do_inheritance_ex()
1930 if (zend_hash_num_elements(&parent_ce->function_table)) { in zend_do_inheritance_ex()
1933 zend_hash_num_elements(&parent_ce->function_table), 0); in zend_do_inheritance_ex()
1943 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&parent_ce->function_table, key, func) { in zend_do_inheritance_ex()
1951 if (parent_ce->num_interfaces) { in zend_do_inheritance_ex()
1952 zend_do_inherit_interfaces(ce, parent_ce); in zend_do_inheritance_ex()
1959 …ce->ce_flags |= parent_ce->ce_flags & (ZEND_HAS_STATIC_IN_METHODS | ZEND_ACC_HAS_TYPE_HINTS | ZEND… in zend_do_inheritance_ex()
3706 static inheritance_status zend_can_early_bind(zend_class_entry *ce, zend_class_entry *parent_ce) /*… in zend_can_early_bind() argument
3714 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&parent_ce->function_table, key, parent_func) { in zend_can_early_bind()
3732 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&parent_ce->properties_info, key, parent_info) { in zend_can_early_bind()
3750 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&parent_ce->constants_table, key, parent_const) { in zend_can_early_bind()
3797 ZEND_API zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_entry *parent_ce, z… in zend_try_early_bind() argument
3813 UPDATE_IS_CACHEABLE(parent_ce); in zend_try_early_bind()
3816 zend_class_entry *ret = zend_inheritance_cache_get(ce, parent_ce, NULL); in zend_try_early_bind()
3832 status = zend_can_early_bind(ce, parent_ce); in zend_try_early_bind()
3858 zend_do_inheritance_ex(ce, parent_ce, status == INHERITANCE_SUCCESS); in zend_try_early_bind()
3859 if (parent_ce && parent_ce->num_interfaces) { in zend_try_early_bind()
3860 zend_do_inherit_interfaces(ce, parent_ce); in zend_try_early_bind()
3884 new_ce = zend_inheritance_cache_add(ce, proto, parent_ce, NULL, ht); in zend_try_early_bind()