Lines Matching refs:ce

65 		zend_class_entry *ce = zobj->ce;  in rebuild_object_properties()  local
68 zobj->properties = zend_new_array(ce->default_properties_count); in rebuild_object_properties()
69 if (ce->default_properties_count) { in rebuild_object_properties()
71 ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop_info) { in rebuild_object_properties()
84 while (ce->parent && ce->parent->default_properties_count) { in rebuild_object_properties()
85 ce = ce->parent; in rebuild_object_properties()
86 ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop_info) { in rebuild_object_properties()
87 if (prop_info->ce == ce && in rebuild_object_properties()
134 *n = zobj->ce->default_properties_count; in zend_std_get_gc()
143 zend_class_entry *ce = object->ce; in zend_std_get_debug_info() local
147 if (!ce->__debugInfo) { in zend_std_get_debug_info()
152 zend_call_known_instance_method_with_0_params(ce->__debugInfo, object, &retval); in zend_std_get_debug_info()
182 zend_call_known_instance_method_with_1_params(zobj->ce->__get, zobj, retval, &member); in zend_std_call_getter()
191 zend_call_known_instance_method(zobj->ce->__set, zobj, NULL, 2, args); in zend_std_call_setter()
199 zend_call_known_instance_method_with_1_params(zobj->ce->__unset, zobj, NULL, &member); in zend_std_call_unsetter()
207 zend_call_known_instance_method_with_1_params(zobj->ce->__isset, zobj, retval, &member); in zend_std_call_issetter()
226 static zend_never_inline int is_protected_compatible_scope(zend_class_entry *ce, zend_class_entry *… in is_protected_compatible_scope() argument
229 (is_derived_class(ce, scope) || is_derived_class(scope, ce)); in is_protected_compatible_scope()
233 …end_get_parent_private_property(zend_class_entry *scope, zend_class_entry *ce, zend_string *member… in zend_get_parent_private_property() argument
238 if (scope != ce && scope && is_derived_class(ce, scope)) { in zend_get_parent_private_property()
243 && prop_info->ce == scope) { in zend_get_parent_private_property()
252 …d_bad_property_access(zend_property_info *property_info, zend_class_entry *ce, zend_string *member… in zend_bad_property_access() argument
254 … property %s::$%s", zend_visibility_string(property_info->flags), ZSTR_VAL(ce->name), ZSTR_VAL(mem… in zend_bad_property_access()
265 zend_class_entry *ce, zend_string *member) { in zend_forbidden_dynamic_property() argument
267 ZSTR_VAL(ce->name), ZSTR_VAL(member)); in zend_forbidden_dynamic_property()
270 static zend_always_inline uintptr_t zend_get_property_offset(zend_class_entry *ce, zend_string *mem… in zend_get_property_offset() argument
278 if (cache_slot && EXPECTED(ce == CACHED_PTR_EX(cache_slot))) { in zend_get_property_offset()
283 if (UNEXPECTED(zend_hash_num_elements(&ce->properties_info) == 0) in zend_get_property_offset()
284 || UNEXPECTED((zv = zend_hash_find(&ce->properties_info, member)) == NULL)) { in zend_get_property_offset()
293 CACHE_POLYMORPHIC_PTR_EX(cache_slot, ce, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); in zend_get_property_offset()
309 if (property_info->ce != scope) { in zend_get_property_offset()
311 zend_property_info *p = zend_get_parent_private_property(scope, ce, member); in zend_get_property_offset()
326 if (property_info->ce != ce) { in zend_get_property_offset()
332 zend_bad_property_access(property_info, ce, member); in zend_get_property_offset()
338 if (UNEXPECTED(!is_protected_compatible_scope(property_info->ce, scope))) { in zend_get_property_offset()
348 …zend_error(E_NOTICE, "Accessing static property %s::$%s as non static", ZSTR_VAL(ce->name), ZSTR_V… in zend_get_property_offset()
360 CACHE_POLYMORPHIC_PTR_EX(cache_slot, ce, (void*)(uintptr_t)offset); in zend_get_property_offset()
367 static ZEND_COLD void zend_wrong_offset(zend_class_entry *ce, zend_string *member) /* {{{ */ in zend_wrong_offset() argument
372 zend_get_property_offset(ce, member, 0, NULL, &dummy); in zend_wrong_offset()
376 ZEND_API zend_property_info *zend_get_property_info(zend_class_entry *ce, zend_string *member, int … in zend_get_property_info() argument
383 if (UNEXPECTED(zend_hash_num_elements(&ce->properties_info) == 0) in zend_get_property_info()
384 || EXPECTED((zv = zend_hash_find(&ce->properties_info, member)) == NULL)) { in zend_get_property_info()
404 if (property_info->ce != scope) { in zend_get_property_info()
406 zend_property_info *p = zend_get_parent_private_property(scope, ce, member); in zend_get_property_info()
417 if (property_info->ce != ce) { in zend_get_property_info()
423 zend_bad_property_access(property_info, ce, member); in zend_get_property_info()
429 if (UNEXPECTED(!is_protected_compatible_scope(property_info->ce, scope))) { in zend_get_property_info()
439 …zend_error(E_NOTICE, "Accessing static property %s::$%s as non static", ZSTR_VAL(ce->name), ZSTR_V… in zend_get_property_info()
461 property_info = zend_get_property_info(zobj->ce, member, 1); in zend_check_property_access()
480 property_info = zend_get_property_info(zobj->ce, prop_info_name, 1); in zend_check_property_access()
506 ZEND_ASSERT(zobj->ce->ce_flags & ZEND_ACC_USE_GUARDS); in zend_get_property_guard()
507 zv = zobj->properties_table + zobj->ce->default_properties_count; in zend_get_property_guard()
561 …property_offset = zend_get_property_offset(zobj->ce, name, (type == BP_VAR_IS) || (zobj->ce->__get… in zend_std_read_property()
606 if ((type == BP_VAR_IS) && zobj->ce->__isset) { in zend_std_read_property()
629 if (zobj->ce->__get && !((*guard) & IN_GET)) { in zend_std_read_property()
633 } else if (zobj->ce->__get && !((*guard) & IN_GET)) { in zend_std_read_property()
636 } else if (zobj->ce->__get) { in zend_std_read_property()
653 …modification of overloaded property %s::$%s has no effect", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(nam… in zend_std_read_property()
661 …zend_verify_prop_assignable_by_ref(prop_info, retval, (zobj->ce->__get->common.fn_flags & ZEND_ACC… in zend_std_read_property()
668 zend_get_property_offset(zobj->ce, name, 0, NULL, &prop_info); in zend_std_read_property()
679 ZSTR_VAL(prop_info->ce->name), in zend_std_read_property()
682 zend_error(E_WARNING, "Undefined property: %s::$%s", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); in zend_std_read_property()
708 …property_offset = zend_get_property_offset(zobj->ce, name, (zobj->ce->__set != NULL), cache_slot, … in zend_std_write_property()
753 if (zobj->ce->__set) { in zend_std_write_property()
767 zend_wrong_offset(zobj->ce, name); in zend_std_write_property()
792 if (UNEXPECTED(zobj->ce->ce_flags & ZEND_ACC_NO_DYNAMIC_PROPERTIES)) { in zend_std_write_property()
793 zend_forbidden_dynamic_property(zobj->ce, name); in zend_std_write_property()
811 static ZEND_COLD zend_never_inline void zend_bad_array_access(zend_class_entry *ce) /* {{{ */ in zend_bad_array_access() argument
813 zend_throw_error(NULL, "Cannot use object of type %s as array", ZSTR_VAL(ce->name)); in zend_bad_array_access()
819 zend_class_entry *ce = object->ce; in zend_std_read_dimension() local
822 if (EXPECTED(zend_class_implements_interface(ce, zend_ce_arrayaccess) != 0)) { in zend_std_read_dimension()
832 zend_call_method_with_1_params(object, ce, NULL, "offsetexists", rv, &tmp_offset); in zend_std_read_dimension()
847 zend_call_method_with_1_params(object, ce, NULL, "offsetget", rv, &tmp_offset); in zend_std_read_dimension()
854 …zend_throw_error(NULL, "Undefined offset for object of type %s used as array", ZSTR_VAL(ce->name)); in zend_std_read_dimension()
860 zend_bad_array_access(ce); in zend_std_read_dimension()
868 zend_class_entry *ce = object->ce; in zend_std_write_dimension() local
871 if (EXPECTED(zend_class_implements_interface(ce, zend_ce_arrayaccess) != 0)) { in zend_std_write_dimension()
878 zend_call_method_with_2_params(object, ce, NULL, "offsetset", NULL, &tmp_offset, value); in zend_std_write_dimension()
882 zend_bad_array_access(ce); in zend_std_write_dimension()
889 zend_class_entry *ce = object->ce; in zend_std_has_dimension() local
893 if (EXPECTED(zend_class_implements_interface(ce, zend_ce_arrayaccess) != 0)) { in zend_std_has_dimension()
896 zend_call_method_with_1_params(object, ce, NULL, "offsetexists", &retval, &tmp_offset); in zend_std_has_dimension()
900 zend_call_method_with_1_params(object, ce, NULL, "offsetget", &retval, &tmp_offset); in zend_std_has_dimension()
907 zend_bad_array_access(ce); in zend_std_has_dimension()
924 …property_offset = zend_get_property_offset(zobj->ce, name, (zobj->ce->__get != NULL), cache_slot, … in zend_std_get_property_ptr_ptr()
929 if (EXPECTED(!zobj->ce->__get) || in zend_std_get_property_ptr_ptr()
936 ZSTR_VAL(prop_info->ce->name), in zend_std_get_property_ptr_ptr()
941 … zend_error(E_WARNING, "Undefined property: %s::$%s", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); in zend_std_get_property_ptr_ptr()
961 if (EXPECTED(!zobj->ce->__get) || in zend_std_get_property_ptr_ptr()
963 if (UNEXPECTED(zobj->ce->ce_flags & ZEND_ACC_NO_DYNAMIC_PROPERTIES)) { in zend_std_get_property_ptr_ptr()
964 zend_forbidden_dynamic_property(zobj->ce, name); in zend_std_get_property_ptr_ptr()
974 zend_error(E_WARNING, "Undefined property: %s::$%s", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); in zend_std_get_property_ptr_ptr()
977 } else if (zobj->ce->__get == NULL) { in zend_std_get_property_ptr_ptr()
990 …property_offset = zend_get_property_offset(zobj->ce, name, (zobj->ce->__unset != NULL), cache_slot… in zend_std_unset_property()
1032 if (zobj->ce->__unset) { in zend_std_unset_property()
1041 zend_wrong_offset(zobj->ce, name); in zend_std_unset_property()
1053 zend_class_entry *ce = object->ce; in zend_std_unset_dimension() local
1056 if (zend_class_implements_interface(ce, zend_ce_arrayaccess)) { in zend_std_unset_dimension()
1059 zend_call_method_with_1_params(object, ce, NULL, "offsetunset", NULL, &tmp_offset); in zend_std_unset_dimension()
1063 zend_bad_array_access(ce); in zend_std_unset_dimension()
1068 …*zend_get_parent_private_method(zend_class_entry *scope, zend_class_entry *ce, zend_string *functi… in zend_get_parent_private_method() argument
1073 if (scope != ce && scope && is_derived_class(ce, scope)) { in zend_get_parent_private_method()
1089 ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope) /* {{{ */ in zend_check_protected() argument
1091 zend_class_entry *fbc_scope = ce; in zend_check_protected()
1107 if (scope==ce) { in zend_check_protected()
1116 ZEND_API zend_function *zend_get_call_trampoline_func(zend_class_entry *ce, zend_string *method_nam… in zend_get_call_trampoline_func() argument
1120 zend_function *fbc = is_static ? ce->__callstatic : ce->__call; in zend_get_call_trampoline_func()
1169 static zend_always_inline zend_function *zend_get_user_call_function(zend_class_entry *ce, zend_str… in zend_get_user_call_function() argument
1171 return zend_get_call_trampoline_func(ce, method_name, 0); in zend_get_user_call_function()
1211 if (UNEXPECTED((func = zend_hash_find(&zobj->ce->function_table, lc_method_name)) == NULL)) { in zend_std_get_method()
1215 if (zobj->ce->__call) { in zend_std_get_method()
1216 return zend_get_user_call_function(zobj->ce, method_name); in zend_std_get_method()
1230 zend_function *updated_fbc = zend_get_parent_private_method(scope, zobj->ce, lc_method_name); in zend_std_get_method()
1241 if (zobj->ce->__call) { in zend_std_get_method()
1242 fbc = zend_get_user_call_function(zobj->ce, method_name); in zend_std_get_method()
1263 static zend_always_inline zend_function *zend_get_user_callstatic_function(zend_class_entry *ce, ze… in zend_get_user_callstatic_function() argument
1265 return zend_get_call_trampoline_func(ce, method_name, 1); in zend_get_user_callstatic_function()
1269 ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string *function_name… in zend_std_get_static_method() argument
1283 zval *func = zend_hash_find(&ce->function_table, lc_function_name); in zend_std_get_static_method()
1286 } else if (ce->constructor in zend_std_get_static_method()
1287 && ZSTR_LEN(lc_function_name) == ZSTR_LEN(ce->name) in zend_std_get_static_method()
1288 …&& zend_binary_strncasecmp(ZSTR_VAL(lc_function_name), ZSTR_LEN(lc_function_name), ZSTR_VAL(ce->na… in zend_std_get_static_method()
1292 && (ZSTR_VAL(ce->constructor->common.function_name)[0] != '_' in zend_std_get_static_method()
1293 || ZSTR_VAL(ce->constructor->common.function_name)[1] != '_')) { in zend_std_get_static_method()
1294 fbc = ce->constructor; in zend_std_get_static_method()
1299 if (ce->__call && in zend_std_get_static_method()
1301 instanceof_function(object->ce, ce)) { in zend_std_get_static_method()
1305 ZEND_ASSERT(object->ce->__call); in zend_std_get_static_method()
1306 return zend_get_user_call_function(object->ce, function_name); in zend_std_get_static_method()
1307 } else if (ce->__callstatic) { in zend_std_get_static_method()
1308 return zend_get_user_callstatic_function(ce, function_name); in zend_std_get_static_method()
1327 if (ce->__callstatic) { in zend_std_get_static_method()
1328 fbc = zend_get_user_callstatic_function(ce, function_name); in zend_std_get_static_method()
1374 ZEND_API zval *zend_std_get_static_property_with_info(zend_class_entry *ce, zend_string *property_n… in zend_std_get_static_property_with_info() argument
1378 zend_property_info *property_info = zend_hash_find_ptr(&ce->properties_info, property_name); in zend_std_get_static_property_with_info()
1391 if (property_info->ce != scope) { in zend_std_get_static_property_with_info()
1393 || UNEXPECTED(!is_protected_compatible_scope(property_info->ce, scope))) { in zend_std_get_static_property_with_info()
1395 zend_bad_property_access(property_info, ce, property_name); in zend_std_get_static_property_with_info()
1406 if (UNEXPECTED(!(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED))) { in zend_std_get_static_property_with_info()
1407 if (UNEXPECTED(zend_update_class_constants(ce)) != SUCCESS) { in zend_std_get_static_property_with_info()
1413 if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) { in zend_std_get_static_property_with_info()
1414 if (ce->type == ZEND_INTERNAL_CLASS || (ce->ce_flags & (ZEND_ACC_IMMUTABLE|ZEND_ACC_PRELOADED))) { in zend_std_get_static_property_with_info()
1415 zend_class_init_statics(ce); in zend_std_get_static_property_with_info()
1419 …zend_throw_error(NULL, "Access to undeclared static property %s::$%s", ZSTR_VAL(ce->name), ZSTR_VA… in zend_std_get_static_property_with_info()
1425 ret = CE_STATIC_MEMBERS(ce) + property_info->offset; in zend_std_get_static_property_with_info()
1431 ZSTR_VAL(property_info->ce->name), in zend_std_get_static_property_with_info()
1440 ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, int t… in zend_std_get_static_property() argument
1443 return zend_std_get_static_property_with_info(ce, property_name, type, &prop_info); in zend_std_get_static_property()
1446 ZEND_API ZEND_COLD zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *prop… in zend_std_unset_static_property() argument
1448 …zend_throw_error(NULL, "Attempt to unset static property %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(pr… in zend_std_unset_static_property()
1468 zend_function *constructor = zobj->ce->constructor; in zend_std_get_constructor()
1551 if (zobj1->ce != zobj2->ce) { in zend_std_compare_objects()
1557 if (!zobj1->ce->default_properties_count) { in zend_std_compare_objects()
1571 ZEND_HASH_FOREACH_PTR(&zobj1->ce->properties_info, info) { in zend_std_compare_objects()
1627 property_offset = zend_get_property_offset(zobj->ce, name, 1, cache_slot, &prop_info); in zend_std_has_property()
1684 if ((has_set_exists != ZEND_PROPERTY_EXISTS) && zobj->ce->__isset) { in zend_std_has_property()
1700 if (EXPECTED(!EG(exception)) && zobj->ce->__get && !((*guard) & IN_GET)) { in zend_std_has_property()
1723 return zend_string_copy(zobj->ce->name); in zend_std_get_class_name()
1731 zend_class_entry *ce = readobj->ce; in zend_std_cast_object_tostring() local
1732 if (ce->__tostring) { in zend_std_cast_object_tostring()
1735 zend_call_known_instance_method_with_0_params(ce->__tostring, readobj, &retval); in zend_std_cast_object_tostring()
1743 … zend_throw_error(NULL, "Method %s::__toString() must return a string value", ZSTR_VAL(ce->name)); in zend_std_cast_object_tostring()
1760 zend_class_entry *ce = obj->ce; in zend_std_get_closure() local
1762 …if ((func = zend_hash_find_ex(&ce->function_table, ZSTR_KNOWN(ZEND_STR_MAGIC_INVOKE), 1)) == NULL)… in zend_std_get_closure()
1767 *ce_ptr = ce; in zend_std_get_closure()