Lines Matching refs:parent_ce
307 zend_class_entry *parent_ce; in unlinked_instanceof() local
309 parent_ce = ce1->parent; in unlinked_instanceof()
311 parent_ce = zend_lookup_class_ex(ce1->parent_name, NULL, in unlinked_instanceof()
317 if (parent_ce && unlinked_instanceof(parent_ce, ce2)) { in unlinked_instanceof()
1479 ZEND_API void zend_do_inheritance_ex(zend_class_entry *ce, zend_class_entry *parent_ce, bool checke… in zend_do_inheritance_ex() argument
1487 if (UNEXPECTED(!(parent_ce->ce_flags & ZEND_ACC_INTERFACE))) { in zend_do_inheritance_ex()
1488 …MPILE_ERROR, "Interface %s cannot extend class %s", ZSTR_VAL(ce->name), ZSTR_VAL(parent_ce->name)); in zend_do_inheritance_ex()
1490 } else if (UNEXPECTED(parent_ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_TRAIT|ZEND_ACC_FINAL))) { in zend_do_inheritance_ex()
1492 if (parent_ce->ce_flags & ZEND_ACC_FINAL) { in zend_do_inheritance_ex()
1493 …ILE_ERROR, "Class %s cannot extend final class %s", ZSTR_VAL(ce->name), ZSTR_VAL(parent_ce->name)); in zend_do_inheritance_ex()
1497 if ((parent_ce->ce_flags & ZEND_ACC_INTERFACE) || (parent_ce->ce_flags & ZEND_ACC_TRAIT)) { in zend_do_inheritance_ex()
1499 …ZSTR_VAL(ce->name), parent_ce->ce_flags & ZEND_ACC_INTERFACE ? "interface" : "trait", ZSTR_VAL(par… in zend_do_inheritance_ex()
1504 …if (UNEXPECTED((ce->ce_flags & ZEND_ACC_READONLY_CLASS) != (parent_ce->ce_flags & ZEND_ACC_READONL… in zend_do_inheritance_ex()
1507 …parent_ce->ce_flags & ZEND_ACC_READONLY_CLASS ? "readonly" : "non-readonly", ZSTR_VAL(parent_ce->n… in zend_do_inheritance_ex()
1514 ce->parent = parent_ce; in zend_do_inheritance_ex()
1515 ce->default_object_handlers = parent_ce->default_object_handlers; in zend_do_inheritance_ex()
1519 if (parent_ce->default_properties_count) { in zend_do_inheritance_ex()
1523 …zval *table = pemalloc(sizeof(zval) * (ce->default_properties_count + parent_ce->default_propertie… in zend_do_inheritance_ex()
1525 end = table + parent_ce->default_properties_count; in zend_do_inheritance_ex()
1536 …end = pemalloc(sizeof(zval) * parent_ce->default_properties_count, ce->type == ZEND_INTERNAL_CLASS… in zend_do_inheritance_ex()
1537 dst = end + parent_ce->default_properties_count; in zend_do_inheritance_ex()
1540 src = parent_ce->default_properties_table + parent_ce->default_properties_count; in zend_do_inheritance_ex()
1541 if (UNEXPECTED(parent_ce->type != ce->type)) { in zend_do_inheritance_ex()
1565 ce->default_properties_count += parent_ce->default_properties_count; in zend_do_inheritance_ex()
1568 if (parent_ce->default_static_members_count) { in zend_do_inheritance_ex()
1572 …zval *table = pemalloc(sizeof(zval) * (ce->default_static_members_count + parent_ce->default_stati… in zend_do_inheritance_ex()
1574 end = table + parent_ce->default_static_members_count; in zend_do_inheritance_ex()
1585 …end = pemalloc(sizeof(zval) * parent_ce->default_static_members_count, ce->type == ZEND_INTERNAL_C… in zend_do_inheritance_ex()
1586 dst = end + parent_ce->default_static_members_count; in zend_do_inheritance_ex()
1589 src = parent_ce->default_static_members_table + parent_ce->default_static_members_count; in zend_do_inheritance_ex()
1603 ce->default_static_members_count += parent_ce->default_static_members_count; in zend_do_inheritance_ex()
1615 property_info->offset += parent_ce->default_static_members_count; in zend_do_inheritance_ex()
1617 property_info->offset += parent_ce->default_properties_count * sizeof(zval); in zend_do_inheritance_ex()
1622 if (zend_hash_num_elements(&parent_ce->properties_info)) { in zend_do_inheritance_ex()
1625 zend_hash_num_elements(&parent_ce->properties_info), 0); in zend_do_inheritance_ex()
1627 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&parent_ce->properties_info, key, property_info) { in zend_do_inheritance_ex()
1632 if (zend_hash_num_elements(&parent_ce->constants_table)) { in zend_do_inheritance_ex()
1637 zend_hash_num_elements(&parent_ce->constants_table), 0); in zend_do_inheritance_ex()
1639 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&parent_ce->constants_table, key, c) { in zend_do_inheritance_ex()
1644 if (zend_hash_num_elements(&parent_ce->function_table)) { in zend_do_inheritance_ex()
1647 zend_hash_num_elements(&parent_ce->function_table), 0); in zend_do_inheritance_ex()
1657 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&parent_ce->function_table, key, func) { in zend_do_inheritance_ex()
1665 if (parent_ce->num_interfaces) { in zend_do_inheritance_ex()
1666 zend_do_inherit_interfaces(ce, parent_ce); in zend_do_inheritance_ex()
1673 …ce->ce_flags |= parent_ce->ce_flags & (ZEND_HAS_STATIC_IN_METHODS | ZEND_ACC_HAS_TYPE_HINTS | ZEND… in zend_do_inheritance_ex()
3268 static inheritance_status zend_can_early_bind(zend_class_entry *ce, zend_class_entry *parent_ce) /*… in zend_can_early_bind() argument
3276 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&parent_ce->function_table, key, parent_func) { in zend_can_early_bind()
3294 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&parent_ce->properties_info, key, parent_info) { in zend_can_early_bind()
3313 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&parent_ce->constants_table, key, parent_const) { in zend_can_early_bind()
3358 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
3374 UPDATE_IS_CACHEABLE(parent_ce); in zend_try_early_bind()
3377 zend_class_entry *ret = zend_inheritance_cache_get(ce, parent_ce, NULL); in zend_try_early_bind()
3393 status = zend_can_early_bind(ce, parent_ce); in zend_try_early_bind()
3419 zend_do_inheritance_ex(ce, parent_ce, status == INHERITANCE_SUCCESS); in zend_try_early_bind()
3420 if (parent_ce && parent_ce->num_interfaces) { in zend_try_early_bind()
3421 zend_do_inherit_interfaces(ce, parent_ce); in zend_try_early_bind()
3445 new_ce = zend_inheritance_cache_add(ce, proto, parent_ce, NULL, ht); in zend_try_early_bind()