Lines Matching refs:class_type

1406 static zend_class_mutable_data *zend_allocate_mutable_data(zend_class_entry *class_type) /* {{{ */  in zend_allocate_mutable_data()  argument
1410 ZEND_ASSERT(ZEND_MAP_PTR(class_type->mutable_data) != NULL); in zend_allocate_mutable_data()
1411 ZEND_ASSERT(ZEND_MAP_PTR_GET_IMM(class_type->mutable_data) == NULL); in zend_allocate_mutable_data()
1415 mutable_data->ce_flags = class_type->ce_flags; in zend_allocate_mutable_data()
1416 ZEND_MAP_PTR_SET_IMM(class_type->mutable_data, mutable_data); in zend_allocate_mutable_data()
1422 ZEND_API HashTable *zend_separate_class_constants_table(zend_class_entry *class_type) /* {{{ */ in zend_separate_class_constants_table() argument
1430 …zend_hash_init(constants_table, zend_hash_num_elements(&class_type->constants_table), NULL, NULL, … in zend_separate_class_constants_table()
1431 zend_hash_extend(constants_table, zend_hash_num_elements(&class_type->constants_table), 0); in zend_separate_class_constants_table()
1433 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&class_type->constants_table, key, c) { in zend_separate_class_constants_table()
1434 if (c->ce == class_type) { in zend_separate_class_constants_table()
1450 ZEND_ASSERT(ZEND_MAP_PTR(class_type->mutable_data) != NULL); in zend_separate_class_constants_table()
1452 mutable_data = ZEND_MAP_PTR_GET_IMM(class_type->mutable_data); in zend_separate_class_constants_table()
1454 mutable_data = zend_allocate_mutable_data(class_type); in zend_separate_class_constants_table()
1511 ZEND_API zend_result zend_update_class_constants(zend_class_entry *class_type) /* {{{ */ in zend_update_class_constants() argument
1520 ce_flags = class_type->ce_flags; in zend_update_class_constants()
1526 bool uses_mutable_data = ZEND_MAP_PTR(class_type->mutable_data) != NULL; in zend_update_class_constants()
1528 mutable_data = ZEND_MAP_PTR_GET_IMM(class_type->mutable_data); in zend_update_class_constants()
1535 mutable_data = zend_allocate_mutable_data(class_type); in zend_update_class_constants()
1539 if (class_type->parent) { in zend_update_class_constants()
1540 if (UNEXPECTED(zend_update_class_constants(class_type->parent) != SUCCESS)) { in zend_update_class_constants()
1551 constants_table = zend_separate_class_constants_table(class_type); in zend_update_class_constants()
1554 constants_table = &class_type->constants_table; in zend_update_class_constants()
1561 if (c->ce != class_type) { in zend_update_class_constants()
1576 if (class_type->default_static_members_count) { in zend_update_class_constants()
1577 static_members_table = CE_STATIC_MEMBERS(class_type); in zend_update_class_constants()
1579 zend_class_init_statics(class_type); in zend_update_class_constants()
1580 static_members_table = CE_STATIC_MEMBERS(class_type); in zend_update_class_constants()
1584 default_properties_table = class_type->default_properties_table; in zend_update_class_constants()
1590 …default_properties_table = zend_arena_alloc(&CG(arena), sizeof(zval) * class_type->default_propert… in zend_update_class_constants()
1591 src = class_type->default_properties_table; in zend_update_class_constants()
1593 end = dst + class_type->default_properties_count; in zend_update_class_constants()
1608 for (uint32_t i = 0; i < class_type->default_properties_count; i++) { in zend_update_class_constants()
1610 prop_info = class_type->properties_info_table[i]; in zend_update_class_constants()
1617 if (class_type->default_static_members_count) { in zend_update_class_constants()
1618 ZEND_HASH_MAP_FOREACH_PTR(&class_type->properties_info, prop_info) { in zend_update_class_constants()
1630 …if (class_type->type == ZEND_USER_CLASS && class_type->ce_flags & ZEND_ACC_ENUM && class_type->enu… in zend_update_class_constants()
1631 if (zend_enum_build_backed_enum_table(class_type) == FAILURE) { in zend_update_class_constants()
1643 class_type->ce_flags = ce_flags; in zend_update_class_constants()
1650 …ys_inline void _object_properties_init(zend_object *object, zend_class_entry *class_type) /* {{{ */ in _object_properties_init() argument
1652 if (class_type->default_properties_count) { in _object_properties_init()
1653 zval *src = CE_DEFAULT_PROPERTIES_TABLE(class_type); in _object_properties_init()
1655 zval *end = src + class_type->default_properties_count; in _object_properties_init()
1657 if (UNEXPECTED(class_type->type == ZEND_INTERNAL_CLASS)) { in _object_properties_init()
1677 ZEND_API void object_properties_init(zend_object *object, zend_class_entry *class_type) /* {{{ */ in object_properties_init() argument
1680 _object_properties_init(object, class_type); in object_properties_init()
1796 …e zend_result _object_and_properties_init(zval *arg, zend_class_entry *class_type, HashTable *prop… in _object_and_properties_init() argument
1798 …if (UNEXPECTED(class_type->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_TRAIT|ZEND_ACC_IMPLICIT_ABSTRAC… in _object_and_properties_init()
1799 if (class_type->ce_flags & ZEND_ACC_INTERFACE) { in _object_and_properties_init()
1800 zend_throw_error(NULL, "Cannot instantiate interface %s", ZSTR_VAL(class_type->name)); in _object_and_properties_init()
1801 } else if (class_type->ce_flags & ZEND_ACC_TRAIT) { in _object_and_properties_init()
1802 zend_throw_error(NULL, "Cannot instantiate trait %s", ZSTR_VAL(class_type->name)); in _object_and_properties_init()
1803 } else if (class_type->ce_flags & ZEND_ACC_ENUM) { in _object_and_properties_init()
1804 zend_throw_error(NULL, "Cannot instantiate enum %s", ZSTR_VAL(class_type->name)); in _object_and_properties_init()
1806 zend_throw_error(NULL, "Cannot instantiate abstract class %s", ZSTR_VAL(class_type->name)); in _object_and_properties_init()
1813 if (UNEXPECTED(!(class_type->ce_flags & ZEND_ACC_CONSTANTS_UPDATED))) { in _object_and_properties_init()
1814 if (UNEXPECTED(zend_update_class_constants(class_type) != SUCCESS)) { in _object_and_properties_init()
1821 if (class_type->create_object == NULL) { in _object_and_properties_init()
1822 zend_object *obj = zend_objects_new(class_type); in _object_and_properties_init()
1828 _object_properties_init(obj, class_type); in _object_and_properties_init()
1831 ZVAL_OBJ(arg, class_type->create_object(class_type)); in _object_and_properties_init()
1837 ZEND_API zend_result object_and_properties_init(zval *arg, zend_class_entry *class_type, HashTable … in object_and_properties_init() argument
1839 return _object_and_properties_init(arg, class_type, properties); in object_and_properties_init()
1843 ZEND_API zend_result object_init_ex(zval *arg, zend_class_entry *class_type) /* {{{ */ in object_init_ex() argument
1845 return _object_and_properties_init(arg, class_type, NULL); in object_init_ex()
3585 static ZEND_COLD zend_object *display_disabled_class(zend_class_entry *class_type) /* {{{ */ in display_disabled_class() argument
3589 intern = zend_objects_new(class_type); in display_disabled_class()
3592 if (EXPECTED(class_type->default_properties_count != 0)) { in display_disabled_class()
3594 zval *end = p + class_type->default_properties_count; in display_disabled_class()
3601 zend_error(E_WARNING, "%s() has been disabled for security reasons", ZSTR_VAL(class_type->name)); in display_disabled_class()