Lines Matching refs:common

68 			new_function->common.fn_flags |= ZEND_ACC_ARENA_ALLOCATED;  in zend_duplicate_function()
70 if (EXPECTED(new_function->common.function_name)) { in zend_duplicate_function()
71 zend_string_addref(new_function->common.function_name); in zend_duplicate_function()
143 …if (ce->parent->constructor && UNEXPECTED(ce->parent->constructor->common.fn_flags & ZEND_ACC_FINA… in do_inherit_parent_constructor()
145 ZSTR_VAL(ce->parent->name), ZSTR_VAL(ce->parent->constructor->common.function_name), in do_inherit_parent_constructor()
146 ZSTR_VAL(ce->name), ZSTR_VAL(ce->constructor->common.function_name)); in do_inherit_parent_constructor()
202 if (!strcasecmp(class_name, "parent") && proto->common.scope) { in zend_do_perform_type_hint_check()
203 fe_class_name = zend_string_copy(proto->common.scope->name); in zend_do_perform_type_hint_check()
204 } else if (!strcasecmp(class_name, "self") && fe->common.scope) { in zend_do_perform_type_hint_check()
205 fe_class_name = zend_string_copy(fe->common.scope->name); in zend_do_perform_type_hint_check()
219 if (!strcasecmp(class_name, "parent") && proto->common.scope && proto->common.scope->parent) { in zend_do_perform_type_hint_check()
220 proto_class_name = zend_string_copy(proto->common.scope->parent->name); in zend_do_perform_type_hint_check()
221 } else if (!strcasecmp(class_name, "self") && proto->common.scope) { in zend_do_perform_type_hint_check()
222 proto_class_name = zend_string_copy(proto->common.scope->name); in zend_do_perform_type_hint_check()
230 if (fe->common.type != ZEND_USER_FUNCTION) { in zend_do_perform_type_hint_check()
272 if (!proto || (!proto->common.arg_info && proto->common.type != ZEND_USER_FUNCTION)) { in zend_do_perform_implementation_check()
279 if ((fe->common.fn_flags & ZEND_ACC_CTOR) in zend_do_perform_implementation_check()
280 && ((proto->common.scope->ce_flags & ZEND_ACC_INTERFACE) == 0 in zend_do_perform_implementation_check()
281 && (proto->common.fn_flags & ZEND_ACC_ABSTRACT) == 0)) { in zend_do_perform_implementation_check()
286 if (proto->common.fn_flags & ZEND_ACC_PRIVATE) { in zend_do_perform_implementation_check()
291 if (proto->common.required_num_args < fe->common.required_num_args in zend_do_perform_implementation_check()
292 || proto->common.num_args > fe->common.num_args) { in zend_do_perform_implementation_check()
297 if ((proto->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) in zend_do_perform_implementation_check()
298 && !(fe->common.fn_flags & ZEND_ACC_RETURN_REFERENCE)) { in zend_do_perform_implementation_check()
302 if ((proto->common.fn_flags & ZEND_ACC_VARIADIC) in zend_do_perform_implementation_check()
303 && !(fe->common.fn_flags & ZEND_ACC_VARIADIC)) { in zend_do_perform_implementation_check()
311 num_args = proto->common.num_args; in zend_do_perform_implementation_check()
312 if (proto->common.fn_flags & ZEND_ACC_VARIADIC) { in zend_do_perform_implementation_check()
314 if (fe->common.num_args >= proto->common.num_args) { in zend_do_perform_implementation_check()
315 num_args = fe->common.num_args; in zend_do_perform_implementation_check()
316 if (fe->common.fn_flags & ZEND_ACC_VARIADIC) { in zend_do_perform_implementation_check()
323 zend_arg_info *fe_arg_info = &fe->common.arg_info[i]; in zend_do_perform_implementation_check()
326 if (i < proto->common.num_args) { in zend_do_perform_implementation_check()
327 proto_arg_info = &proto->common.arg_info[i]; in zend_do_perform_implementation_check()
329 proto_arg_info = &proto->common.arg_info[proto->common.num_args]; in zend_do_perform_implementation_check()
359 if (proto->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) { in zend_do_perform_implementation_check()
361 if (!(fe->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE)) { in zend_do_perform_implementation_check()
365 …if (!zend_do_perform_type_hint_check(fe, fe->common.arg_info - 1, proto, proto->common.arg_info - … in zend_do_perform_implementation_check()
366 switch (proto->common.arg_info[-1].type_hint) { in zend_do_perform_implementation_check()
368 if (!zend_iterable_compatibility_check(fe->common.arg_info - 1)) { in zend_do_perform_implementation_check()
378 if (fe->common.arg_info[-1].allow_null && !proto->common.arg_info[-1].allow_null) { in zend_do_perform_implementation_check()
405 if (!strcasecmp(class_name, "self") && fptr->common.scope) { in zend_append_type_hint()
406 class_name = ZSTR_VAL(fptr->common.scope->name); in zend_append_type_hint()
407 class_name_len = ZSTR_LEN(fptr->common.scope->name); in zend_append_type_hint()
408 …} else if (!strcasecmp(class_name, "parent") && fptr->common.scope && fptr->common.scope->parent) { in zend_append_type_hint()
409 class_name = ZSTR_VAL(fptr->common.scope->parent->name); in zend_append_type_hint()
410 class_name_len = ZSTR_LEN(fptr->common.scope->parent->name); in zend_append_type_hint()
441 if (fptr->common.scope) { in zend_get_function_declaration()
443 …smart_str_appendl(&str, ZSTR_VAL(fptr->common.scope->name), strlen(ZSTR_VAL(fptr->common.scope->na… in zend_get_function_declaration()
447 smart_str_append(&str, fptr->common.function_name); in zend_get_function_declaration()
450 if (fptr->common.arg_info) { in zend_get_function_declaration()
452 zend_arg_info *arg_info = fptr->common.arg_info; in zend_get_function_declaration()
454 required = fptr->common.required_num_args; in zend_get_function_declaration()
455 num_args = fptr->common.num_args; in zend_get_function_declaration()
456 if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) { in zend_get_function_declaration()
544 if (fptr->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) { in zend_get_function_declaration()
546 zend_append_type_hint(&str, fptr, fptr->common.arg_info - 1, 1); in zend_get_function_declaration()
557 uint32_t parent_flags = parent->common.fn_flags; in do_inheritance_check_on_method()
559 if ((parent->common.scope->ce_flags & ZEND_ACC_INTERFACE) == 0 in do_inheritance_check_on_method()
560 && parent->common.fn_flags & ZEND_ACC_ABSTRACT in do_inheritance_check_on_method()
561 …&& parent->common.scope != (child->common.prototype ? child->common.prototype->common.scope : chil… in do_inheritance_check_on_method()
562 && child->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_IMPLEMENTED_ABSTRACT)) { in do_inheritance_check_on_method()
564 ZSTR_VAL(parent->common.scope->name), in do_inheritance_check_on_method()
565 ZSTR_VAL(child->common.function_name), in do_inheritance_check_on_method()
566 …child->common.prototype ? ZSTR_VAL(child->common.prototype->common.scope->name) : ZSTR_VAL(child-> in do_inheritance_check_on_method()
570 …verride final method %s::%s()", ZEND_FN_SCOPE_NAME(parent), ZSTR_VAL(child->common.function_name)); in do_inheritance_check_on_method()
573 child_flags = child->common.fn_flags; in do_inheritance_check_on_method()
577 if (child->common.fn_flags & ZEND_ACC_STATIC) { in do_inheritance_check_on_method()
578 …s::%s() static in class %s", ZEND_FN_SCOPE_NAME(parent), ZSTR_VAL(child->common.function_name), ZE… in do_inheritance_check_on_method()
580 …s() non static in class %s", ZEND_FN_SCOPE_NAME(parent), ZSTR_VAL(child->common.function_name), ZE… in do_inheritance_check_on_method()
586 …:%s() abstract in class %s", ZEND_FN_SCOPE_NAME(parent), ZSTR_VAL(child->common.function_name), ZE… in do_inheritance_check_on_method()
591 …st be %s (as in class %s)%s", ZEND_FN_SCOPE_NAME(child), ZSTR_VAL(child->common.function_name), ze… in do_inheritance_check_on_method()
596 child->common.fn_flags |= ZEND_ACC_CHANGED; in do_inheritance_check_on_method()
599 child->common.fn_flags |= ZEND_ACC_CHANGED; in do_inheritance_check_on_method()
603 child->common.prototype = NULL; in do_inheritance_check_on_method()
605 child->common.fn_flags |= ZEND_ACC_IMPLEMENTED_ABSTRACT; in do_inheritance_check_on_method()
606 child->common.prototype = parent; in do_inheritance_check_on_method()
607 …} else if (!(parent->common.fn_flags & ZEND_ACC_CTOR) || (parent->common.prototype && (parent->com… in do_inheritance_check_on_method()
609 child->common.prototype = parent->common.prototype ? parent->common.prototype : parent; in do_inheritance_check_on_method()
612 if (child->common.prototype && ( in do_inheritance_check_on_method()
613 child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT in do_inheritance_check_on_method()
615 parent = child->common.prototype; in do_inheritance_check_on_method()
623 if (child->common.prototype && ( in do_inheritance_check_on_method()
624 child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT in do_inheritance_check_on_method()
628 } else if ((parent->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) && in do_inheritance_check_on_method()
629 (!(child->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || in do_inheritance_check_on_method()
630 …!zend_do_perform_type_hint_check(child, child->common.arg_info - 1, parent, parent->common.arg_inf… in do_inheritance_check_on_method()
631 (child->common.arg_info[-1].allow_null && !parent->common.arg_info[-1].allow_null))) { in do_inheritance_check_on_method()
651 zend_function *orig_prototype = func->common.prototype; in do_inherit_method()
654 if (func->common.prototype != orig_prototype && in do_inherit_method()
656 func->common.scope != ce && in do_inherit_method()
662 func->common.prototype = orig_prototype; in do_inherit_method()
667 if (parent->common.fn_flags & (ZEND_ACC_ABSTRACT)) { in do_inherit_method()
1102 uint32_t fn_flags = fn->common.scope->ce_flags; in zend_traits_method_compatibility_check()
1103 uint32_t other_flags = other_fn->common.scope->ce_flags; in zend_traits_method_compatibility_check()
1106 …&& ((other_fn->common.scope->ce_flags & ZEND_ACC_INTERFACE) || zend_do_perform_implementation_chec… in zend_traits_method_compatibility_check()
1115 ce->clone = fe; fe->common.fn_flags |= ZEND_ACC_CLONE; in zend_add_magic_methods()
1120 ce->constructor = fe; fe->common.fn_flags |= ZEND_ACC_CTOR; in zend_add_magic_methods()
1122 ce->destructor = fe; fe->common.fn_flags |= ZEND_ACC_DTOR; in zend_add_magic_methods()
1151 fe->common.fn_flags |= ZEND_ACC_CTOR; in zend_add_magic_methods()
1164 if (existing_fn->common.scope == ce) { in zend_add_trait_method()
1169 if (existing_fn->common.fn_flags & ZEND_ACC_ABSTRACT) { in zend_add_trait_method()
1176 } else if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) { in zend_add_trait_method()
1192 } else if (existing_fn->common.fn_flags & ZEND_ACC_ABSTRACT && in zend_add_trait_method()
1193 (existing_fn->common.scope->ce_flags & ZEND_ACC_INTERFACE) == 0) { in zend_add_trait_method()
1200 } else if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) { in zend_add_trait_method()
1208 } else if (UNEXPECTED(existing_fn->common.scope->ce_flags & ZEND_ACC_TRAIT)) { in zend_add_trait_method()
1215 ZSTR_VAL(fn->common.scope->name), ZSTR_VAL(fn->common.function_name), in zend_add_trait_method()
1217 ZSTR_VAL(existing_fn->common.scope->name), ZSTR_VAL(existing_fn->common.function_name)); in zend_add_trait_method()
1223 fn->common.prototype = NULL; in zend_add_trait_method()
1231 new_fn->common.fn_flags |= ZEND_ACC_ARENA_ALLOCATED; in zend_add_trait_method()
1243 if ((fn->common.scope->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) { in zend_fixup_trait_method()
1245 fn->common.scope = ce; in zend_fixup_trait_method()
1247 if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) { in zend_fixup_trait_method()
1270 && (!alias->trait_method->ce || fn->common.scope == alias->trait_method->ce) in zend_traits_copy_functions()
1277 …fn_copy.common.fn_flags = alias->modifiers | (fn->common.fn_flags ^ (fn->common.fn_flags & ZEND_AC… in zend_traits_copy_functions()
1286 alias->trait_method->ce = fn->common.scope; in zend_traits_copy_functions()
1306 && (!alias->trait_method->ce || fn->common.scope == alias->trait_method->ce) in zend_traits_copy_functions()
1310 …fn_copy.common.fn_flags = alias->modifiers | (fn->common.fn_flags ^ (fn->common.fn_flags & ZEND_AC… in zend_traits_copy_functions()
1314 alias->trait_method->ce = fn->common.scope; in zend_traits_copy_functions()
1322 zend_add_trait_method(ce, ZSTR_VAL(fn->common.function_name), fnname, &fn_copy, overriden); in zend_traits_copy_functions()
1729 constructor_name = ce->constructor->common.function_name; in zend_has_deprecated_constructor()