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()
188 if (!strcasecmp(class_name, "parent") && proto->common.scope) { in zend_do_perform_type_hint_check()
189 fe_class_name = zend_string_copy(proto->common.scope->name); in zend_do_perform_type_hint_check()
190 } else if (!strcasecmp(class_name, "self") && fe->common.scope) { in zend_do_perform_type_hint_check()
191 fe_class_name = zend_string_copy(fe->common.scope->name); in zend_do_perform_type_hint_check()
205 if (!strcasecmp(class_name, "parent") && proto->common.scope && proto->common.scope->parent) { in zend_do_perform_type_hint_check()
206 proto_class_name = zend_string_copy(proto->common.scope->parent->name); in zend_do_perform_type_hint_check()
207 } else if (!strcasecmp(class_name, "self") && proto->common.scope) { in zend_do_perform_type_hint_check()
208 proto_class_name = zend_string_copy(proto->common.scope->name); in zend_do_perform_type_hint_check()
216 if (fe->common.type != ZEND_USER_FUNCTION) { in zend_do_perform_type_hint_check()
258 if (!proto || (!proto->common.arg_info && proto->common.type != ZEND_USER_FUNCTION)) { in zend_do_perform_implementation_check()
265 if ((fe->common.fn_flags & ZEND_ACC_CTOR) in zend_do_perform_implementation_check()
266 && ((proto->common.scope->ce_flags & ZEND_ACC_INTERFACE) == 0 in zend_do_perform_implementation_check()
267 && (proto->common.fn_flags & ZEND_ACC_ABSTRACT) == 0)) { in zend_do_perform_implementation_check()
272 if (proto->common.fn_flags & ZEND_ACC_PRIVATE) { in zend_do_perform_implementation_check()
277 if (proto->common.required_num_args < fe->common.required_num_args in zend_do_perform_implementation_check()
278 || proto->common.num_args > fe->common.num_args) { in zend_do_perform_implementation_check()
283 if ((proto->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) in zend_do_perform_implementation_check()
284 && !(fe->common.fn_flags & ZEND_ACC_RETURN_REFERENCE)) { in zend_do_perform_implementation_check()
288 if ((proto->common.fn_flags & ZEND_ACC_VARIADIC) in zend_do_perform_implementation_check()
289 && !(fe->common.fn_flags & ZEND_ACC_VARIADIC)) { in zend_do_perform_implementation_check()
297 num_args = proto->common.num_args; in zend_do_perform_implementation_check()
298 if (proto->common.fn_flags & ZEND_ACC_VARIADIC) { in zend_do_perform_implementation_check()
300 if (fe->common.num_args >= proto->common.num_args) { in zend_do_perform_implementation_check()
301 num_args = fe->common.num_args; in zend_do_perform_implementation_check()
302 if (fe->common.fn_flags & ZEND_ACC_VARIADIC) { in zend_do_perform_implementation_check()
309 zend_arg_info *fe_arg_info = &fe->common.arg_info[i]; in zend_do_perform_implementation_check()
312 if (i < proto->common.num_args) { in zend_do_perform_implementation_check()
313 proto_arg_info = &proto->common.arg_info[i]; in zend_do_perform_implementation_check()
315 proto_arg_info = &proto->common.arg_info[proto->common.num_args]; in zend_do_perform_implementation_check()
338 if (proto->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) { in zend_do_perform_implementation_check()
340 if (!(fe->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE)) { in zend_do_perform_implementation_check()
344 …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 if (!strcasecmp(class_name, "self") && fptr->common.scope) { in zend_append_type_hint()
367 class_name = ZSTR_VAL(fptr->common.scope->name); in zend_append_type_hint()
368 class_name_len = ZSTR_LEN(fptr->common.scope->name); in zend_append_type_hint()
369 …} else if (!strcasecmp(class_name, "parent") && fptr->common.scope && fptr->common.scope->parent) { in zend_append_type_hint()
370 class_name = ZSTR_VAL(fptr->common.scope->parent->name); in zend_append_type_hint()
371 class_name_len = ZSTR_LEN(fptr->common.scope->parent->name); in zend_append_type_hint()
402 if (fptr->common.scope) { in zend_get_function_declaration()
404 …smart_str_appendl(&str, ZSTR_VAL(fptr->common.scope->name), strlen(ZSTR_VAL(fptr->common.scope->na… in zend_get_function_declaration()
408 smart_str_append(&str, fptr->common.function_name); in zend_get_function_declaration()
411 if (fptr->common.arg_info) { in zend_get_function_declaration()
413 zend_arg_info *arg_info = fptr->common.arg_info; in zend_get_function_declaration()
415 required = fptr->common.required_num_args; in zend_get_function_declaration()
416 num_args = fptr->common.num_args; in zend_get_function_declaration()
417 if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) { in zend_get_function_declaration()
507 if (fptr->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) { in zend_get_function_declaration()
509 zend_append_type_hint(&str, fptr, fptr->common.arg_info - 1, 1); in zend_get_function_declaration()
520 uint32_t parent_flags = parent->common.fn_flags; in do_inheritance_check_on_method()
522 if ((parent->common.scope->ce_flags & ZEND_ACC_INTERFACE) == 0 in do_inheritance_check_on_method()
523 && parent->common.fn_flags & ZEND_ACC_ABSTRACT in do_inheritance_check_on_method()
524 …&& parent->common.scope != (child->common.prototype ? child->common.prototype->common.scope : chil… in do_inheritance_check_on_method()
525 && child->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_IMPLEMENTED_ABSTRACT)) { in do_inheritance_check_on_method()
527 ZSTR_VAL(parent->common.scope->name), in do_inheritance_check_on_method()
528 ZSTR_VAL(child->common.function_name), in do_inheritance_check_on_method()
529 …child->common.prototype ? ZSTR_VAL(child->common.prototype->common.scope->name) : ZSTR_VAL(child-> in do_inheritance_check_on_method()
533 …verride final method %s::%s()", ZEND_FN_SCOPE_NAME(parent), ZSTR_VAL(child->common.function_name)); in do_inheritance_check_on_method()
536 child_flags = child->common.fn_flags; in do_inheritance_check_on_method()
540 if (child->common.fn_flags & ZEND_ACC_STATIC) { in do_inheritance_check_on_method()
541 …s::%s() static in class %s", ZEND_FN_SCOPE_NAME(parent), ZSTR_VAL(child->common.function_name), ZE… in do_inheritance_check_on_method()
543 …s() non static in class %s", ZEND_FN_SCOPE_NAME(parent), ZSTR_VAL(child->common.function_name), ZE… in do_inheritance_check_on_method()
549 …:%s() abstract in class %s", ZEND_FN_SCOPE_NAME(parent), ZSTR_VAL(child->common.function_name), ZE… in do_inheritance_check_on_method()
553 child->common.fn_flags |= ZEND_ACC_CHANGED; in do_inheritance_check_on_method()
558 …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()
561 child->common.fn_flags |= ZEND_ACC_CHANGED; in do_inheritance_check_on_method()
566 child->common.prototype = NULL; in do_inheritance_check_on_method()
568 child->common.fn_flags |= ZEND_ACC_IMPLEMENTED_ABSTRACT; in do_inheritance_check_on_method()
569 child->common.prototype = parent; in do_inheritance_check_on_method()
570 …} else if (!(parent->common.fn_flags & ZEND_ACC_CTOR) || (parent->common.prototype && (parent->com… in do_inheritance_check_on_method()
572 child->common.prototype = parent->common.prototype ? parent->common.prototype : parent; in do_inheritance_check_on_method()
575 if (child->common.prototype && ( in do_inheritance_check_on_method()
576 child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT in do_inheritance_check_on_method()
578 parent = child->common.prototype; in do_inheritance_check_on_method()
586 if (child->common.prototype && ( in do_inheritance_check_on_method()
587 child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT in do_inheritance_check_on_method()
591 } else if ((parent->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) && in do_inheritance_check_on_method()
592 (!(child->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || in do_inheritance_check_on_method()
593 …!zend_do_perform_type_hint_check(child, child->common.arg_info - 1, parent, parent->common.arg_inf… in do_inheritance_check_on_method()
613 zend_function *orig_prototype = func->common.prototype; in do_inherit_method()
616 if (func->common.prototype != orig_prototype && in do_inherit_method()
618 func->common.scope != ce && in do_inherit_method()
624 func->common.prototype = orig_prototype; in do_inherit_method()
629 if (parent->common.fn_flags & (ZEND_ACC_ABSTRACT)) { in do_inherit_method()
1055 uint32_t fn_flags = fn->common.scope->ce_flags; in zend_traits_method_compatibility_check()
1056 uint32_t other_flags = other_fn->common.scope->ce_flags; in zend_traits_method_compatibility_check()
1059 …&& ((other_fn->common.scope->ce_flags & ZEND_ACC_INTERFACE) || zend_do_perform_implementation_chec… in zend_traits_method_compatibility_check()
1068 ce->clone = fe; fe->common.fn_flags |= ZEND_ACC_CLONE; in zend_add_magic_methods()
1073 ce->constructor = fe; fe->common.fn_flags |= ZEND_ACC_CTOR; in zend_add_magic_methods()
1075 ce->destructor = fe; fe->common.fn_flags |= ZEND_ACC_DTOR; in zend_add_magic_methods()
1104 fe->common.fn_flags |= ZEND_ACC_CTOR; in zend_add_magic_methods()
1117 if (existing_fn->common.scope == ce) { in zend_add_trait_method()
1122 if (existing_fn->common.fn_flags & ZEND_ACC_ABSTRACT) { in zend_add_trait_method()
1129 } else if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) { in zend_add_trait_method()
1145 } else if (existing_fn->common.fn_flags & ZEND_ACC_ABSTRACT && in zend_add_trait_method()
1146 (existing_fn->common.scope->ce_flags & ZEND_ACC_INTERFACE) == 0) { in zend_add_trait_method()
1153 } else if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) { in zend_add_trait_method()
1161 } else if (UNEXPECTED(existing_fn->common.scope->ce_flags & ZEND_ACC_TRAIT)) { in zend_add_trait_method()
1168 ZSTR_VAL(fn->common.scope->name), ZSTR_VAL(fn->common.function_name), in zend_add_trait_method()
1170 ZSTR_VAL(existing_fn->common.scope->name), ZSTR_VAL(existing_fn->common.function_name)); in zend_add_trait_method()
1176 fn->common.prototype = NULL; in zend_add_trait_method()
1183 new_fn->common.fn_flags |= ZEND_ACC_ARENA_ALLOCATED; in zend_add_trait_method()
1191 if ((fn->common.scope->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) { in zend_fixup_trait_method()
1193 fn->common.scope = ce; in zend_fixup_trait_method()
1195 if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) { in zend_fixup_trait_method()
1218 && (!alias->trait_method->ce || fn->common.scope == alias->trait_method->ce) in zend_traits_copy_functions()
1225 …fn_copy.common.fn_flags = alias->modifiers | (fn->common.fn_flags ^ (fn->common.fn_flags & ZEND_AC… in zend_traits_copy_functions()
1234 alias->trait_method->ce = fn->common.scope; in zend_traits_copy_functions()
1254 && (!alias->trait_method->ce || fn->common.scope == alias->trait_method->ce) in zend_traits_copy_functions()
1258 …fn_copy.common.fn_flags = alias->modifiers | (fn->common.fn_flags ^ (fn->common.fn_flags & ZEND_AC… in zend_traits_copy_functions()
1262 alias->trait_method->ce = fn->common.scope; in zend_traits_copy_functions()
1270 zend_add_trait_method(ce, ZSTR_VAL(fn->common.function_name), fnname, &fn_copy, overriden); in zend_traits_copy_functions()
1677 constructor_name = ce->constructor->common.function_name; in zend_has_deprecated_constructor()