Lines Matching refs:ce

616 		zend_class_entry *ce;  in accel_copy_permanent_strings()  local
618 ce = (zend_class_entry*)Z_PTR(p->val); in accel_copy_permanent_strings()
624 if (ce->name) { in accel_copy_permanent_strings()
625 ce->name = new_interned_string(ce->name); in accel_copy_permanent_strings()
628 ZEND_HASH_FOREACH_BUCKET(&ce->properties_info, q) { in accel_copy_permanent_strings()
642 ZEND_HASH_FOREACH_BUCKET(&ce->function_table, q) { in accel_copy_permanent_strings()
651 ZEND_HASH_FOREACH_BUCKET(&ce->constants_table, q) { in accel_copy_permanent_strings()
3294 zend_class_entry *ce = Z_PTR_P(zv); local
3295 if (ce->type == ZEND_INTERNAL_CLASS) {
3382 zend_class_entry *ce = Z_PTR(p->val); local
3384 if (EXPECTED(ce->type == ZEND_USER_CLASS)) {
3385 if (ce->info.user.filename != filename) {
3386 filename = ce->info.user.filename;
3444 zend_class_entry *ce, *p; local
3448 ce = (zend_class_entry*)Z_PTR(b1->val);
3449 if (ce->parent && (ce->ce_flags & ZEND_ACC_LINKED)) {
3450 p = ce->parent;
3464 if (ce->num_interfaces && (ce->ce_flags & ZEND_ACC_LINKED)) {
3466 for (i = 0; i < ce->num_interfaces; i++) {
3467 p = ce->interfaces[i];
3486 static void get_unresolved_initializer(zend_class_entry *ce, const char **kind, const char **name) { argument
3494 ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->constants_table, key, c) {
3500 ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->properties_info, key, prop) {
3503 val = &ce->default_static_members_table[prop->offset];
3505 val = &ce->default_properties_table[OBJ_PROP_TO_NUM(prop->offset)];
3514 static zend_bool preload_needed_types_known(zend_class_entry *ce);
3515 static void get_unlinked_dependency(zend_class_entry *ce, const char **kind, const char **name) { argument
3520 if (ce->parent_name) {
3521 zend_string *key = zend_string_tolower(ce->parent_name);
3526 *name = ZSTR_VAL(ce->parent_name);
3531 *name = ZSTR_VAL(ce->parent_name);
3536 *name = ZSTR_VAL(ce->parent_name);
3541 if (ce->num_interfaces) {
3543 for (i = 0; i < ce->num_interfaces; i++) {
3544 p = zend_hash_find_ptr(EG(class_table), ce->interface_names[i].lc_name);
3547 *name = ZSTR_VAL(ce->interface_names[i].name);
3553 if (ce->num_traits) {
3555 for (i = 0; i < ce->num_traits; i++) {
3556 p = zend_hash_find_ptr(EG(class_table), ce->trait_names[i].lc_name);
3559 *name = ZSTR_VAL(ce->trait_names[i].name);
3565 if (!preload_needed_types_known(ce)) {
3571 static zend_bool preload_try_resolve_constants(zend_class_entry *ce) argument
3582 ZEND_HASH_FOREACH_PTR(&ce->constants_table, c) {
3585 if (EXPECTED(zval_update_constant_ex(val, c->ce) == SUCCESS)) {
3592 if (ce->default_properties_count) {
3594 for (i = 0; i < ce->default_properties_count; i++) {
3595 val = &ce->default_properties_table[i];
3597 zend_property_info *prop = ce->properties_info_table[i];
3598 if (UNEXPECTED(zval_update_constant_ex(val, prop->ce) != SUCCESS)) {
3604 if (ce->default_static_members_count) {
3605 …uint32_t count = ce->parent ? ce->default_static_members_count - ce->parent->default_static_member…
3607 val = ce->default_static_members_table + ce->default_static_members_count - 1;
3610 if (UNEXPECTED(zval_update_constant_ex(val, ce) != SUCCESS)) {
3627 zend_class_entry *ce = zend_hash_find_ptr(EG(class_table), lcname); local
3629 if (!ce) {
3632 if (ce == self_ce) {
3634 return ce;
3636 if (!(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) {
3639 if (!(ce->ce_flags & ZEND_ACC_PROPERTY_TYPES_RESOLVED)) {
3642 return ce;
3645 static zend_bool preload_try_resolve_property_types(zend_class_entry *ce) argument
3648 if (ce->ce_flags & ZEND_ACC_HAS_TYPE_HINTS) {
3650 ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop) {
3655 preload_fetch_resolved_ce(ZEND_TYPE_NAME(*single_type), ce);
3669 static zend_bool preload_is_class_type_known(zend_class_entry *ce, zend_string *name) { argument
3672 zend_string_equals_ci(name, ce->name)) {
3682 static zend_bool preload_is_type_known(zend_class_entry *ce, zend_type *type) { argument
3686 if (!preload_is_class_type_known(ce, ZEND_TYPE_NAME(*single_type))) {
3694 static zend_bool preload_is_method_maybe_override(zend_class_entry *ce, zend_string *lcname) { argument
3696 if (ce->trait_aliases || ce->trait_precedences) {
3700 if (ce->parent_name) {
3701 zend_string *key = zend_string_tolower(ce->parent_name);
3709 if (ce->num_interfaces) {
3711 for (i = 0; i < ce->num_interfaces; i++) {
3712 zend_class_entry *p = zend_hash_find_ptr(EG(class_table), ce->interface_names[i].lc_name);
3719 if (ce->num_traits) {
3721 for (i = 0; i < ce->num_traits; i++) {
3722 zend_class_entry *p = zend_hash_find_ptr(EG(class_table), ce->trait_names[i].lc_name);
3732 static zend_bool preload_needed_types_known(zend_class_entry *ce) { argument
3735 ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->function_table, lcname, fptr) {
3738 if (!preload_is_type_known(ce, &fptr->common.arg_info[-1].type) &&
3739 preload_is_method_maybe_override(ce, lcname)) {
3744 if (!preload_is_type_known(ce, &fptr->common.arg_info[i].type) &&
3745 preload_is_method_maybe_override(ce, lcname)) {
3757 zend_class_entry *ce, *parent, *p; local
3769 ce = Z_PTR_P(zv);
3770 if (ce->type == ZEND_INTERNAL_CLASS) {
3773 if ((ce->ce_flags & (ZEND_ACC_TOP_LEVEL|ZEND_ACC_ANON_CLASS))
3774 && !(ce->ce_flags & ZEND_ACC_LINKED)) {
3776 if (!(ce->ce_flags & ZEND_ACC_ANON_CLASS)) {
3777 key = zend_string_tolower(ce->name);
3787 if (ce->parent_name) {
3788 key = zend_string_tolower(ce->parent_name);
3800 if (ce->num_interfaces) {
3802 for (i = 0; i < ce->num_interfaces; i++) {
3803 p = zend_hash_find_ptr(EG(class_table), ce->interface_names[i].lc_name);
3816 if (ce->num_traits) {
3818 for (i = 0; i < ce->num_traits; i++) {
3819 p = zend_hash_find_ptr(EG(class_table), ce->trait_names[i].lc_name);
3832 if (!preload_needed_types_known(ce)) {
3837 zend_string *key = zend_string_tolower(ce->name);
3845 CG(compiled_filename) = ce->info.user.filename;
3846 if (ce->parent_name
3847 && !ce->num_interfaces
3848 && !ce->num_traits
3850 || parent->info.user.filename == ce->info.user.filename)) {
3852 CG(zend_lineno) = ce->info.user.line_end;
3854 CG(zend_lineno) = ce->info.user.line_start;
3856 if (zend_do_link_class(ce, NULL) == FAILURE) {
3865 if (ce->ce_flags & ZEND_ACC_LINKED) {
3866 if (!(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) {
3867 if ((ce->ce_flags & ZEND_ACC_TRAIT) /* don't update traits */
3868 || preload_try_resolve_constants(ce)) {
3869 ce->ce_flags |= ZEND_ACC_CONSTANTS_UPDATED;
3874 if (!(ce->ce_flags & ZEND_ACC_PROPERTY_TYPES_RESOLVED)) {
3875 if ((ce->ce_flags & ZEND_ACC_TRAIT) /* don't update traits */
3876 || preload_try_resolve_property_types(ce)) {
3877 ce->ce_flags |= ZEND_ACC_PROPERTY_TYPES_RESOLVED;
3889 ce = Z_PTR_P(zv);
3890 if (ce->type == ZEND_INTERNAL_CLASS) {
3893 if (!(ce->ce_flags & ZEND_ACC_LINKED)) {
3894 zend_string *key = zend_string_tolower(ce->name);
3895 if (!(ce->ce_flags & ZEND_ACC_ANON_CLASS)
3898 E_WARNING, ZSTR_VAL(ce->info.user.filename), ce->info.user.line_start,
3899 "Can't preload already declared class %s", ZSTR_VAL(ce->name));
3902 get_unlinked_dependency(ce, &kind, &name);
3904 E_WARNING, ZSTR_VAL(ce->info.user.filename), ce->info.user.line_start,
3906 ZSTR_VAL(ce->name), kind, name);
3909 } else if (!(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) {
3911 get_unresolved_initializer(ce, &kind, &name);
3913 E_WARNING, ZSTR_VAL(ce->info.user.filename), ce->info.user.line_start,
3915 ZSTR_VAL(ce->name), kind, name);
3916 } else if (!(ce->ce_flags & ZEND_ACC_PROPERTY_TYPES_RESOLVED)) {
3918 E_WARNING, ZSTR_VAL(ce->info.user.filename), ce->info.user.line_start,
3920 ZSTR_VAL(ce->name));
3924 ce->ce_flags &= ~ZEND_ACC_PRELOADED;
3925 ZEND_HASH_FOREACH_PTR(&ce->function_table, function) {
3927 && function->common.scope == ce) {
3931 script = zend_hash_find_ptr(preload_scripts, ce->info.user.filename);
3969 static inline int preload_update_class_constants(zend_class_entry *ce) { argument
3974 result = zend_update_class_constants(ce);
3982 zend_class_entry *ce; local
3984 ce = prop->ce;
3986 ce = prop->ce->parent;
3988 ce = zend_lookup_class(name);
3990 if (ce) {
3991 return ce;
3996 ZSTR_VAL(name), ZSTR_VAL(prop->ce->name), zend_get_unmangled_property_name(prop->name));
3997 return ce;
4004 zend_class_entry *ce; local
4010 ZEND_HASH_REVERSE_FOREACH_PTR(EG(class_table), ce) {
4011 if (ce->type == ZEND_INTERNAL_CLASS || _idx == checked_classes_idx) {
4015 if (!(ce->ce_flags & ZEND_ACC_LINKED)) {
4021 if (!(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) {
4022 if (preload_update_class_constants(ce) == FAILURE) {
4025 ZSTR_VAL(ce->name));
4027 ZEND_ASSERT(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED);
4030 if (!(ce->ce_flags & ZEND_ACC_PROPERTY_TYPES_RESOLVED)) {
4031 if (ce->ce_flags & ZEND_ACC_HAS_TYPE_HINTS) {
4033 ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop) {
4037 zend_class_entry *ce = preload_load_prop_type( local
4039 ZEND_TYPE_SET_CE(*single_type, ce);
4044 ce->ce_flags |= ZEND_ACC_PROPERTY_TYPES_RESOLVED;
4146 static void preload_register_trait_methods(zend_class_entry *ce) { argument
4148 ZEND_HASH_FOREACH_PTR(&ce->function_table, op_array) {
4156 static void preload_fix_trait_methods(zend_class_entry *ce) argument
4160 ZEND_HASH_FOREACH_PTR(&ce->function_table, op_array) {
4182 zend_class_entry *ce; local
4187 ZEND_HASH_FOREACH_PTR(&script->script.class_table, ce) {
4188 if (ce->ce_flags & ZEND_ACC_TRAIT) {
4189 preload_register_trait_methods(ce);
4194 ZEND_HASH_FOREACH_PTR(&tmp_script->script.class_table, ce) {
4195 if (ce->ce_flags & ZEND_ACC_TRAIT) {
4196 preload_register_trait_methods(ce);
4205 ZEND_HASH_FOREACH_PTR(&script->script.class_table, ce) {
4206 preload_fix_trait_methods(ce);
4210 ZEND_HASH_FOREACH_PTR(&script->script.class_table, ce) {
4211 preload_fix_trait_methods(ce);
4522 zend_class_entry *ce; local
4570 zend_class_entry *ce = Z_PTR_P(zv); local
4571 if (ce->type == ZEND_INTERNAL_CLASS) {
4574 ZEND_ASSERT(ce->ce_flags & ZEND_ACC_PRELOADED);
4575 if (ce->default_static_members_count) {
4576 zend_cleanup_internal_class_data(ce);
4577 if (ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED) {
4580 for (i = 0; i < ce->default_static_members_count; i++) {
4581 if (Z_TYPE(ce->default_static_members_table[i]) == IS_CONSTANT_AST) {
4582 ce->ce_flags &= ~ZEND_ACC_CONSTANTS_UPDATED;
4588 if (ce->ce_flags & ZEND_HAS_STATIC_IN_METHODS) {
4591 ZEND_HASH_FOREACH_PTR(&ce->function_table, op_array) {
4717 ZEND_HASH_FOREACH_PTR(&script->script.class_table, ce) {
4718 ZEND_HASH_FOREACH_PTR(&ce->function_table, op_array) {