Lines Matching refs:parent_ce

271 		zend_class_entry *parent_ce;  in unlinked_instanceof()  local
273 parent_ce = ce1->parent; in unlinked_instanceof()
275 parent_ce = zend_lookup_class_ex(ce1->parent_name, NULL, in unlinked_instanceof()
281 if (parent_ce && unlinked_instanceof(parent_ce, ce2)) { in unlinked_instanceof()
1118 ZEND_API void zend_do_inheritance_ex(zend_class_entry *ce, zend_class_entry *parent_ce, zend_bool c… in zend_do_inheritance_ex() argument
1126 if (UNEXPECTED(!(parent_ce->ce_flags & ZEND_ACC_INTERFACE))) { in zend_do_inheritance_ex()
1127 …OR, "Interface %s may not inherit from class (%s)", ZSTR_VAL(ce->name), ZSTR_VAL(parent_ce->name)); in zend_do_inheritance_ex()
1129 } else if (UNEXPECTED(parent_ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_TRAIT|ZEND_ACC_FINAL))) { in zend_do_inheritance_ex()
1131 if (parent_ce->ce_flags & ZEND_ACC_INTERFACE) { in zend_do_inheritance_ex()
1132 …_ERROR, "Class %s cannot extend from interface %s", ZSTR_VAL(ce->name), ZSTR_VAL(parent_ce->name)); in zend_do_inheritance_ex()
1133 } else if (parent_ce->ce_flags & ZEND_ACC_TRAIT) { in zend_do_inheritance_ex()
1134 …PILE_ERROR, "Class %s cannot extend from trait %s", ZSTR_VAL(ce->name), ZSTR_VAL(parent_ce->name)); in zend_do_inheritance_ex()
1138 if (parent_ce->ce_flags & ZEND_ACC_FINAL) { in zend_do_inheritance_ex()
1139 …, "Class %s may not inherit from final class (%s)", ZSTR_VAL(ce->name), ZSTR_VAL(parent_ce->name)); in zend_do_inheritance_ex()
1146 ce->parent = parent_ce; in zend_do_inheritance_ex()
1150 if (parent_ce->num_interfaces) { in zend_do_inheritance_ex()
1152 zend_do_inherit_interfaces(ce, parent_ce); in zend_do_inheritance_ex()
1156 for (i = 0; i < parent_ce->num_interfaces; i++) { in zend_do_inheritance_ex()
1157 do_implement_interface(ce, parent_ce->interfaces[i]); in zend_do_inheritance_ex()
1163 if (parent_ce->default_properties_count) { in zend_do_inheritance_ex()
1167 …zval *table = pemalloc(sizeof(zval) * (ce->default_properties_count + parent_ce->default_propertie… in zend_do_inheritance_ex()
1169 end = table + parent_ce->default_properties_count; in zend_do_inheritance_ex()
1180 …end = pemalloc(sizeof(zval) * parent_ce->default_properties_count, ce->type == ZEND_INTERNAL_CLASS… in zend_do_inheritance_ex()
1181 dst = end + parent_ce->default_properties_count; in zend_do_inheritance_ex()
1184 src = parent_ce->default_properties_table + parent_ce->default_properties_count; in zend_do_inheritance_ex()
1185 if (UNEXPECTED(parent_ce->type != ce->type)) { in zend_do_inheritance_ex()
1207 ce->default_properties_count += parent_ce->default_properties_count; in zend_do_inheritance_ex()
1210 if (parent_ce->default_static_members_count) { in zend_do_inheritance_ex()
1214 …zval *table = pemalloc(sizeof(zval) * (ce->default_static_members_count + parent_ce->default_stati… in zend_do_inheritance_ex()
1216 end = table + parent_ce->default_static_members_count; in zend_do_inheritance_ex()
1227 …end = pemalloc(sizeof(zval) * parent_ce->default_static_members_count, ce->type == ZEND_INTERNAL_C… in zend_do_inheritance_ex()
1228 dst = end + parent_ce->default_static_members_count; in zend_do_inheritance_ex()
1231 if (UNEXPECTED(parent_ce->type != ce->type)) { in zend_do_inheritance_ex()
1233 if (CE_STATIC_MEMBERS(parent_ce) == NULL) { in zend_do_inheritance_ex()
1234 zend_class_init_statics(parent_ce); in zend_do_inheritance_ex()
1236 if (UNEXPECTED(zend_update_class_constants(parent_ce) != SUCCESS)) { in zend_do_inheritance_ex()
1239 src = CE_STATIC_MEMBERS(parent_ce) + parent_ce->default_static_members_count; in zend_do_inheritance_ex()
1250 if (CE_STATIC_MEMBERS(parent_ce) == NULL) { in zend_do_inheritance_ex()
1251 ZEND_ASSERT(parent_ce->ce_flags & (ZEND_ACC_IMMUTABLE|ZEND_ACC_PRELOADED)); in zend_do_inheritance_ex()
1252 zend_class_init_statics(parent_ce); in zend_do_inheritance_ex()
1254 src = CE_STATIC_MEMBERS(parent_ce) + parent_ce->default_static_members_count; in zend_do_inheritance_ex()
1268 src = parent_ce->default_static_members_table + parent_ce->default_static_members_count; in zend_do_inheritance_ex()
1279 ce->default_static_members_count += parent_ce->default_static_members_count; in zend_do_inheritance_ex()
1294 property_info->offset += parent_ce->default_static_members_count; in zend_do_inheritance_ex()
1296 property_info->offset += parent_ce->default_properties_count * sizeof(zval); in zend_do_inheritance_ex()
1301 if (zend_hash_num_elements(&parent_ce->properties_info)) { in zend_do_inheritance_ex()
1304 zend_hash_num_elements(&parent_ce->properties_info), 0); in zend_do_inheritance_ex()
1306 ZEND_HASH_FOREACH_STR_KEY_PTR(&parent_ce->properties_info, key, property_info) { in zend_do_inheritance_ex()
1311 if (zend_hash_num_elements(&parent_ce->constants_table)) { in zend_do_inheritance_ex()
1316 zend_hash_num_elements(&parent_ce->constants_table), 0); in zend_do_inheritance_ex()
1318 ZEND_HASH_FOREACH_STR_KEY_PTR(&parent_ce->constants_table, key, c) { in zend_do_inheritance_ex()
1323 if (zend_hash_num_elements(&parent_ce->function_table)) { in zend_do_inheritance_ex()
1326 zend_hash_num_elements(&parent_ce->function_table), 0); in zend_do_inheritance_ex()
1329 ZEND_HASH_FOREACH_STR_KEY_PTR(&parent_ce->function_table, key, func) { in zend_do_inheritance_ex()
1333 ZEND_HASH_FOREACH_STR_KEY_PTR(&parent_ce->function_table, key, func) { in zend_do_inheritance_ex()
1346 …ce->ce_flags |= parent_ce->ce_flags & (ZEND_HAS_STATIC_IN_METHODS | ZEND_ACC_HAS_TYPE_HINTS | ZEND… in zend_do_inheritance_ex()
2536 static inheritance_status zend_can_early_bind(zend_class_entry *ce, zend_class_entry *parent_ce) /*… in zend_can_early_bind() argument
2543 ZEND_HASH_FOREACH_STR_KEY_PTR(&parent_ce->function_table, key, parent_func) { in zend_can_early_bind()
2560 ZEND_HASH_FOREACH_STR_KEY_PTR(&parent_ce->properties_info, key, parent_info) { in zend_can_early_bind()
2586 zend_bool zend_try_early_bind(zend_class_entry *ce, zend_class_entry *parent_ce, zend_string *lcnam… in zend_try_early_bind() argument
2588 inheritance_status status = zend_can_early_bind(ce, parent_ce); in zend_try_early_bind()
2601 zend_do_inheritance_ex(ce, parent_ce, status == INHERITANCE_SUCCESS); in zend_try_early_bind()