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()
138 *n = zobj->ce->default_properties_count; in zend_std_get_gc()
147 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_get_debug_info() local
151 if (!ce->__debugInfo) { in zend_std_get_debug_info()
156 zend_call_method_with_0_params(object, ce, &ce->__debugInfo, ZEND_DEBUGINFO_FUNC_NAME, &retval); in zend_std_get_debug_info()
184 zend_class_entry *ce = zobj->ce; in zend_std_call_getter() local
208 fcic.function_handler = ce->__get; in zend_std_call_getter()
209 fcic.called_scope = ce; in zend_std_call_getter()
220 zend_class_entry *ce = zobj->ce; in zend_std_call_setter() local
245 fcic.function_handler = ce->__set; in zend_std_call_setter()
246 fcic.called_scope = ce; in zend_std_call_setter()
258 zend_class_entry *ce = zobj->ce; in zend_std_call_unsetter() local
281 fcic.function_handler = ce->__unset; in zend_std_call_unsetter()
282 fcic.called_scope = ce; in zend_std_call_unsetter()
294 zend_class_entry *ce = zobj->ce; in zend_std_call_issetter() local
318 fcic.function_handler = ce->__isset; in zend_std_call_issetter()
319 fcic.called_scope = ce; in zend_std_call_issetter()
343 static zend_never_inline int is_protected_compatible_scope(zend_class_entry *ce, zend_class_entry *… in is_protected_compatible_scope() argument
346 (is_derived_class(ce, scope) || is_derived_class(scope, ce)); in is_protected_compatible_scope()
350 …end_get_parent_private_property(zend_class_entry *scope, zend_class_entry *ce, zend_string *member… in zend_get_parent_private_property() argument
355 if (scope != ce && scope && is_derived_class(ce, scope)) { in zend_get_parent_private_property()
360 && prop_info->ce == scope) { in zend_get_parent_private_property()
369 …d_bad_property_access(zend_property_info *property_info, zend_class_entry *ce, zend_string *member… in zend_bad_property_access() argument
371 … property %s::$%s", zend_visibility_string(property_info->flags), ZSTR_VAL(ce->name), ZSTR_VAL(mem… in zend_bad_property_access()
381 static zend_always_inline uintptr_t zend_get_property_offset(zend_class_entry *ce, zend_string *mem… in zend_get_property_offset() argument
389 if (cache_slot && EXPECTED(ce == CACHED_PTR_EX(cache_slot))) { in zend_get_property_offset()
394 if (UNEXPECTED(zend_hash_num_elements(&ce->properties_info) == 0) in zend_get_property_offset()
395 || UNEXPECTED((zv = zend_hash_find(&ce->properties_info, member)) == NULL)) { in zend_get_property_offset()
404 CACHE_POLYMORPHIC_PTR_EX(cache_slot, ce, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); in zend_get_property_offset()
420 if (property_info->ce != scope) { in zend_get_property_offset()
422 zend_property_info *p = zend_get_parent_private_property(scope, ce, member); in zend_get_property_offset()
437 if (property_info->ce != ce) { in zend_get_property_offset()
443 zend_bad_property_access(property_info, ce, member); in zend_get_property_offset()
449 if (UNEXPECTED(!is_protected_compatible_scope(property_info->ce, scope))) { in zend_get_property_offset()
459 …zend_error(E_NOTICE, "Accessing static property %s::$%s as non static", ZSTR_VAL(ce->name), ZSTR_V… in zend_get_property_offset()
471 CACHE_POLYMORPHIC_PTR_EX(cache_slot, ce, (void*)(uintptr_t)offset); in zend_get_property_offset()
478 static ZEND_COLD void zend_wrong_offset(zend_class_entry *ce, zend_string *member) /* {{{ */ in zend_wrong_offset() argument
483 zend_get_property_offset(ce, member, 0, NULL, &dummy); in zend_wrong_offset()
487 ZEND_API zend_property_info *zend_get_property_info(zend_class_entry *ce, zend_string *member, int … in zend_get_property_info() argument
494 if (UNEXPECTED(zend_hash_num_elements(&ce->properties_info) == 0) in zend_get_property_info()
495 || EXPECTED((zv = zend_hash_find(&ce->properties_info, member)) == NULL)) { in zend_get_property_info()
515 if (property_info->ce != scope) { in zend_get_property_info()
517 zend_property_info *p = zend_get_parent_private_property(scope, ce, member); in zend_get_property_info()
528 if (property_info->ce != ce) { in zend_get_property_info()
534 zend_bad_property_access(property_info, ce, member); in zend_get_property_info()
540 if (UNEXPECTED(!is_protected_compatible_scope(property_info->ce, scope))) { in zend_get_property_info()
550 …zend_error(E_NOTICE, "Accessing static property %s::$%s as non static", ZSTR_VAL(ce->name), ZSTR_V… in zend_get_property_info()
572 property_info = zend_get_property_info(zobj->ce, member, 1); in zend_check_property_access()
591 property_info = zend_get_property_info(zobj->ce, prop_info_name, 1); in zend_check_property_access()
617 ZEND_ASSERT(zobj->ce->ce_flags & ZEND_ACC_USE_GUARDS); in zend_get_property_guard()
618 zv = zobj->properties_table + zobj->ce->default_properties_count; in zend_get_property_guard()
679 …property_offset = zend_get_property_offset(zobj->ce, name, (type == BP_VAR_IS) || (zobj->ce->__get… in zend_std_read_property()
724 if ((type == BP_VAR_IS) && zobj->ce->__isset) { in zend_std_read_property()
747 if (zobj->ce->__get && !((*guard) & IN_GET)) { in zend_std_read_property()
751 } else if (zobj->ce->__get && !((*guard) & IN_GET)) { in zend_std_read_property()
754 } else if (zobj->ce->__get) { in zend_std_read_property()
771 …modification of overloaded property %s::$%s has no effect", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(nam… in zend_std_read_property()
779 …zend_verify_prop_assignable_by_ref(prop_info, retval, (zobj->ce->__get->common.fn_flags & ZEND_ACC… in zend_std_read_property()
786 zend_get_property_offset(zobj->ce, name, 0, NULL, &prop_info); in zend_std_read_property()
797 ZSTR_VAL(prop_info->ce->name), in zend_std_read_property()
800 zend_error(E_NOTICE,"Undefined property: %s::$%s", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); in zend_std_read_property()
834 …property_offset = zend_get_property_offset(zobj->ce, name, (zobj->ce->__set != NULL), cache_slot, … in zend_std_write_property()
880 if (zobj->ce->__set) { in zend_std_write_property()
894 zend_wrong_offset(zobj->ce, name); in zend_std_write_property()
932 static ZEND_COLD zend_never_inline void zend_bad_array_access(zend_class_entry *ce) /* {{{ */ in zend_bad_array_access() argument
934 zend_throw_error(NULL, "Cannot use object of type %s as array", ZSTR_VAL(ce->name)); in zend_bad_array_access()
940 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_read_dimension() local
943 if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1) != 0)) { in zend_std_read_dimension()
954 zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetexists", rv, &tmp_offset); in zend_std_read_dimension()
969 zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetget", rv, &tmp_offset); in zend_std_read_dimension()
976 …zend_throw_error(NULL, "Undefined offset for object of type %s used as array", ZSTR_VAL(ce->name)); in zend_std_read_dimension()
982 zend_bad_array_access(ce); in zend_std_read_dimension()
990 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_write_dimension() local
993 if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1) != 0)) { in zend_std_write_dimension()
1001 zend_call_method_with_2_params(&tmp_object, ce, NULL, "offsetset", NULL, &tmp_offset, value); in zend_std_write_dimension()
1005 zend_bad_array_access(ce); in zend_std_write_dimension()
1012 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_has_dimension() local
1016 if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1) != 0)) { in zend_std_has_dimension()
1020 zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetexists", &retval, &tmp_offset); in zend_std_has_dimension()
1024 zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetget", &retval, &tmp_offset); in zend_std_has_dimension()
1031 zend_bad_array_access(ce); in zend_std_has_dimension()
1056 …property_offset = zend_get_property_offset(zobj->ce, name, (zobj->ce->__get != NULL), cache_slot, … in zend_std_get_property_ptr_ptr()
1061 if (EXPECTED(!zobj->ce->__get) || in zend_std_get_property_ptr_ptr()
1068 ZSTR_VAL(prop_info->ce->name), in zend_std_get_property_ptr_ptr()
1073 zend_error(E_NOTICE, "Undefined property: %s::$%s", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); in zend_std_get_property_ptr_ptr()
1094 if (EXPECTED(!zobj->ce->__get) || in zend_std_get_property_ptr_ptr()
1103 zend_error(E_NOTICE, "Undefined property: %s::$%s", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); in zend_std_get_property_ptr_ptr()
1106 } else if (zobj->ce->__get == NULL) { in zend_std_get_property_ptr_ptr()
1128 …property_offset = zend_get_property_offset(zobj->ce, name, (zobj->ce->__unset != NULL), cache_slot… in zend_std_unset_property()
1170 if (zobj->ce->__unset) { in zend_std_unset_property()
1179 zend_wrong_offset(zobj->ce, name); in zend_std_unset_property()
1194 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_unset_dimension() local
1197 if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1)) { in zend_std_unset_dimension()
1201 zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetunset", NULL, &tmp_offset); in zend_std_unset_dimension()
1205 zend_bad_array_access(ce); in zend_std_unset_dimension()
1210 …*zend_get_parent_private_method(zend_class_entry *scope, zend_class_entry *ce, zend_string *functi… in zend_get_parent_private_method() argument
1215 if (scope != ce && scope && is_derived_class(ce, scope)) { in zend_get_parent_private_method()
1231 ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope) /* {{{ */ in zend_check_protected() argument
1233 zend_class_entry *fbc_scope = ce; in zend_check_protected()
1249 if (scope==ce) { in zend_check_protected()
1258 ZEND_API zend_function *zend_get_call_trampoline_func(zend_class_entry *ce, zend_string *method_nam… in zend_get_call_trampoline_func() argument
1262 zend_function *fbc = is_static ? ce->__callstatic : ce->__call; in zend_get_call_trampoline_func()
1310 static zend_always_inline zend_function *zend_get_user_call_function(zend_class_entry *ce, zend_str… in zend_get_user_call_function() argument
1312 return zend_get_call_trampoline_func(ce, method_name, 0); in zend_get_user_call_function()
1341 if (UNEXPECTED((func = zend_hash_find(&zobj->ce->function_table, lc_method_name)) == NULL)) { in zend_std_get_method()
1345 if (zobj->ce->__call) { in zend_std_get_method()
1346 return zend_get_user_call_function(zobj->ce, method_name); in zend_std_get_method()
1360 zend_function *updated_fbc = zend_get_parent_private_method(scope, zobj->ce, lc_method_name); in zend_std_get_method()
1371 if (zobj->ce->__call) { in zend_std_get_method()
1372 fbc = zend_get_user_call_function(zobj->ce, method_name); in zend_std_get_method()
1389 static zend_always_inline zend_function *zend_get_user_callstatic_function(zend_class_entry *ce, ze… in zend_get_user_callstatic_function() argument
1391 return zend_get_call_trampoline_func(ce, method_name, 1); in zend_get_user_callstatic_function()
1395 ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string *function_name… in zend_std_get_static_method() argument
1409 zval *func = zend_hash_find(&ce->function_table, lc_function_name); in zend_std_get_static_method()
1412 } else if (ce->constructor in zend_std_get_static_method()
1413 && ZSTR_LEN(lc_function_name) == ZSTR_LEN(ce->name) in zend_std_get_static_method()
1414 …&& zend_binary_strncasecmp(ZSTR_VAL(lc_function_name), ZSTR_LEN(lc_function_name), ZSTR_VAL(ce->na… in zend_std_get_static_method()
1418 && (ZSTR_VAL(ce->constructor->common.function_name)[0] != '_' in zend_std_get_static_method()
1419 || ZSTR_VAL(ce->constructor->common.function_name)[1] != '_')) { in zend_std_get_static_method()
1420 fbc = ce->constructor; in zend_std_get_static_method()
1425 if (ce->__call && in zend_std_get_static_method()
1427 instanceof_function(object->ce, ce)) { in zend_std_get_static_method()
1431 zend_class_entry *call_ce = object->ce; in zend_std_get_static_method()
1437 } else if (ce->__callstatic) { in zend_std_get_static_method()
1438 return zend_get_user_callstatic_function(ce, function_name); in zend_std_get_static_method()
1457 if (ce->__callstatic) { in zend_std_get_static_method()
1458 fbc = zend_get_user_callstatic_function(ce, function_name); in zend_std_get_static_method()
1499 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
1503 zend_property_info *property_info = zend_hash_find_ptr(&ce->properties_info, property_name); in zend_std_get_static_property_with_info()
1516 if (property_info->ce != scope) { in zend_std_get_static_property_with_info()
1518 || UNEXPECTED(!is_protected_compatible_scope(property_info->ce, scope))) { in zend_std_get_static_property_with_info()
1520 zend_bad_property_access(property_info, ce, property_name); in zend_std_get_static_property_with_info()
1531 if (UNEXPECTED(!(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED))) { in zend_std_get_static_property_with_info()
1532 if (UNEXPECTED(zend_update_class_constants(ce)) != SUCCESS) { in zend_std_get_static_property_with_info()
1538 if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) { in zend_std_get_static_property_with_info()
1539 if (ce->type == ZEND_INTERNAL_CLASS || (ce->ce_flags & (ZEND_ACC_IMMUTABLE|ZEND_ACC_PRELOADED))) { in zend_std_get_static_property_with_info()
1540 zend_class_init_statics(ce); in zend_std_get_static_property_with_info()
1544 …zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_V… in zend_std_get_static_property_with_info()
1550 ret = CE_STATIC_MEMBERS(ce) + property_info->offset; in zend_std_get_static_property_with_info()
1556 ZSTR_VAL(property_info->ce->name), in zend_std_get_static_property_with_info()
1565 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
1568 return zend_std_get_static_property_with_info(ce, property_name, type, &prop_info); in zend_std_get_static_property()
1571 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
1573 …zend_throw_error(NULL, "Attempt to unset static property %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(pr… in zend_std_unset_static_property()
1590 zend_function *constructor = zobj->ce->constructor; in zend_std_get_constructor()
1624 if (zobj1->ce != zobj2->ce) { in zend_std_compare_objects()
1630 if (!zobj1->ce->default_properties_count) { in zend_std_compare_objects()
1644 ZEND_HASH_FOREACH_PTR(&zobj1->ce->properties_info, info) { in zend_std_compare_objects()
1705 property_offset = zend_get_property_offset(zobj->ce, name, 1, cache_slot, &prop_info); in zend_std_has_property()
1762 if ((has_set_exists != ZEND_PROPERTY_EXISTS) && zobj->ce->__isset) { in zend_std_has_property()
1778 if (EXPECTED(!EG(exception)) && zobj->ce->__get && !((*guard) & IN_GET)) { in zend_std_has_property()
1801 return zend_string_copy(zobj->ce->name); in zend_std_get_class_name()
1808 zend_class_entry *ce; in zend_std_cast_object_tostring() local
1812 ce = Z_OBJCE_P(readobj); in zend_std_cast_object_tostring()
1813 if (ce->__tostring) { in zend_std_cast_object_tostring()
1816 zend_call_method_with_0_params(readobj, ce, &ce->__tostring, "__tostring", &retval); in zend_std_cast_object_tostring()
1824 … zend_throw_error(NULL, "Method %s::__toString() must return a string value", ZSTR_VAL(ce->name)); in zend_std_cast_object_tostring()
1832 ce = Z_OBJCE_P(readobj); in zend_std_cast_object_tostring()
1833 zend_error(E_NOTICE, "Object of class %s could not be converted to int", ZSTR_VAL(ce->name)); in zend_std_cast_object_tostring()
1837 ce = Z_OBJCE_P(readobj); in zend_std_cast_object_tostring()
1838 zend_error(E_NOTICE, "Object of class %s could not be converted to float", ZSTR_VAL(ce->name)); in zend_std_cast_object_tostring()
1842 ce = Z_OBJCE_P(readobj); in zend_std_cast_object_tostring()
1843 zend_error(E_NOTICE, "Object of class %s could not be converted to number", ZSTR_VAL(ce->name)); in zend_std_cast_object_tostring()
1857 zend_class_entry *ce = Z_OBJCE_P(obj); in zend_std_get_closure() local
1859 …if ((func = zend_hash_find_ex(&ce->function_table, ZSTR_KNOWN(ZEND_STR_MAGIC_INVOKE), 1)) == NULL)… in zend_std_get_closure()
1864 *ce_ptr = ce; in zend_std_get_closure()