Lines Matching refs:fptr

117 	zend_function *fptr;  member
123 zend_function *fptr; member
173 static zend_function *_copy_function(zend_function *fptr) /* {{{ */ in _copy_function() argument
175 if (fptr in _copy_function()
176 && (fptr->internal_function.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) in _copy_function()
180 memcpy(copy_fptr, fptr, sizeof(zend_function)); in _copy_function()
181 …copy_fptr->internal_function.function_name = zend_string_copy(fptr->internal_function.function_nam… in _copy_function()
185 return fptr; in _copy_function()
190 static void _free_function(zend_function *fptr) /* {{{ */ in _free_function() argument
192 if (fptr in _free_function()
193 && (fptr->internal_function.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) in _free_function()
195 zend_string_release_ex(fptr->internal_function.function_name, 0); in _free_function()
196 zend_free_trampoline(fptr); in _free_function()
212 _free_function(reference->fptr); in reflection_free_objects_storage()
217 _free_function(typ_reference->fptr); in reflection_free_objects_storage()
268 static void _function_string(smart_str *str, zend_function *fptr, zend_class_entry *scope, char* in…
577 static void _parameter_string(smart_str *str, zend_function *fptr, struct _zend_arg_info *arg_info,… in _parameter_string() argument
605 (fptr->type == ZEND_INTERNAL_FUNCTION && in _parameter_string()
606 !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) ? in _parameter_string()
612 if (fptr->type == ZEND_USER_FUNCTION && !required) { in _parameter_string()
613 zend_op *precv = _get_recv_op((zend_op_array*)fptr, offset); in _parameter_string()
619 if (UNEXPECTED(zval_update_constant_ex(&zv, fptr->common.scope) == FAILURE)) { in _parameter_string()
652 static void _function_parameter_string(smart_str *str, zend_function *fptr, char* indent) in _function_parameter_string() argument
654 struct _zend_arg_info *arg_info = fptr->common.arg_info; in _function_parameter_string()
655 uint32_t i, num_args, num_required = fptr->common.required_num_args; in _function_parameter_string()
661 num_args = fptr->common.num_args; in _function_parameter_string()
662 if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) { in _function_parameter_string()
669 _parameter_string(str, fptr, arg_info, i, i < num_required, indent); in _function_parameter_string()
678 static void _function_closure_string(smart_str *str, zend_function *fptr, char* indent) in _function_closure_string() argument
684 if (fptr->type != ZEND_USER_FUNCTION || !fptr->op_array.static_variables) { in _function_closure_string()
688 static_variables = fptr->op_array.static_variables; in _function_closure_string()
706 static void _function_string(smart_str *str, zend_function *fptr, zend_class_entry *scope, char* in… in _function_string() argument
716 if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.doc_comment) { in _function_string()
717 smart_str_append_printf(str, "%s%s\n", indent, ZSTR_VAL(fptr->op_array.doc_comment)); in _function_string()
721 …smart_str_append_printf(str, fptr->common.fn_flags & ZEND_ACC_CLOSURE ? "Closure [ " : (fptr->comm… in _function_string()
722 smart_str_append_printf(str, (fptr->type == ZEND_USER_FUNCTION) ? "<user" : "<internal"); in _function_string()
723 if (fptr->common.fn_flags & ZEND_ACC_DEPRECATED) { in _function_string()
726 if (fptr->type == ZEND_INTERNAL_FUNCTION && ((zend_internal_function*)fptr)->module) { in _function_string()
727 smart_str_append_printf(str, ":%s", ((zend_internal_function*)fptr)->module->name); in _function_string()
730 if (scope && fptr->common.scope) { in _function_string()
731 if (fptr->common.scope != scope) { in _function_string()
732 smart_str_append_printf(str, ", inherits %s", ZSTR_VAL(fptr->common.scope->name)); in _function_string()
733 } else if (fptr->common.scope->parent) { in _function_string()
734 lc_name = zend_string_tolower(fptr->common.function_name); in _function_string()
735 …if ((overwrites = zend_hash_find_ptr(&fptr->common.scope->parent->function_table, lc_name)) != NUL… in _function_string()
736 if (fptr->common.scope != overwrites->common.scope) { in _function_string()
743 if (fptr->common.prototype && fptr->common.prototype->common.scope) { in _function_string()
744 …smart_str_append_printf(str, ", prototype %s", ZSTR_VAL(fptr->common.prototype->common.scope->name… in _function_string()
746 if (fptr->common.fn_flags & ZEND_ACC_CTOR) { in _function_string()
749 if (fptr->common.fn_flags & ZEND_ACC_DTOR) { in _function_string()
754 if (fptr->common.fn_flags & ZEND_ACC_ABSTRACT) { in _function_string()
757 if (fptr->common.fn_flags & ZEND_ACC_FINAL) { in _function_string()
760 if (fptr->common.fn_flags & ZEND_ACC_STATIC) { in _function_string()
764 if (fptr->common.scope) { in _function_string()
766 switch (fptr->common.fn_flags & ZEND_ACC_PPP_MASK) { in _function_string()
785 if (fptr->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) { in _function_string()
788 smart_str_append_printf(str, "%s ] {\n", ZSTR_VAL(fptr->common.function_name)); in _function_string()
790 if (fptr->type == ZEND_USER_FUNCTION) { in _function_string()
792 ZSTR_VAL(fptr->op_array.filename), in _function_string()
793 fptr->op_array.line_start, in _function_string()
794 fptr->op_array.line_end); in _function_string()
798 if (fptr->common.fn_flags & ZEND_ACC_CLOSURE) { in _function_string()
799 _function_closure_string(str, fptr, ZSTR_VAL(param_indent.s)); in _function_string()
801 _function_parameter_string(str, fptr, ZSTR_VAL(param_indent.s)); in _function_string()
803 if (fptr->op_array.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) { in _function_string()
805 if (ZEND_TYPE_IS_CLASS(fptr->common.arg_info[-1].type)) { in _function_string()
807 ZSTR_VAL(ZEND_TYPE_NAME(fptr->common.arg_info[-1].type))); in _function_string()
808 if (ZEND_TYPE_ALLOW_NULL(fptr->common.arg_info[-1].type)) { in _function_string()
811 } else if (ZEND_TYPE_IS_CODE(fptr->common.arg_info[-1].type)) { in _function_string()
812 …smart_str_append_printf(str, "%s ", zend_get_type_by_const(ZEND_TYPE_CODE(fptr->common.arg_info[-1… in _function_string()
813 if (ZEND_TYPE_ALLOW_NULL(fptr->common.arg_info[-1].type)) { in _function_string()
1010 zend_function *fptr; in _extension_string() local
1013 ZEND_HASH_FOREACH_PTR(CG(function_table), fptr) { in _extension_string()
1014 if (fptr->common.type==ZEND_INTERNAL_FUNCTION in _extension_string()
1015 && fptr->internal_function.module == module) { in _extension_string()
1020 _function_string(str, fptr, NULL, " "); in _extension_string()
1126 static void reflection_parameter_factory(zend_function *fptr, zval *closure_object, struct _zend_ar… in reflection_parameter_factory() argument
1133 if (fptr->type == ZEND_INTERNAL_FUNCTION && in reflection_parameter_factory()
1134 !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) { in reflection_parameter_factory()
1148 reference->fptr = fptr; in reflection_parameter_factory()
1151 intern->ce = fptr->common.scope; in reflection_parameter_factory()
1161 static void reflection_type_factory(zend_function *fptr, zval *closure_object, struct _zend_arg_inf… in reflection_type_factory() argument
1170 reference->fptr = fptr; in reflection_type_factory()
1173 intern->ce = fptr->common.scope; in reflection_type_factory()
1402 if (param->fptr->type != ZEND_USER_FUNCTION) { in _reflection_param_get_default_param()
1420 precv = _get_recv_op((zend_op_array*)param->fptr, param->offset); in _reflection_param_get_default_precv()
1535 zend_function *fptr; in ZEND_METHOD() local
1542 fptr = (zend_function*)zend_get_closure_method_def(closure); in ZEND_METHOD()
1555 fptr = zend_fetch_function(lcname); in ZEND_METHOD()
1559 fptr = zend_fetch_function(lcname); in ZEND_METHOD()
1563 if (fptr == NULL) { in ZEND_METHOD()
1570 ZVAL_STR_COPY(&name, fptr->common.function_name); in ZEND_METHOD()
1572 intern->ptr = fptr; in ZEND_METHOD()
1588 zend_function *fptr; in ZEND_METHOD() local
1594 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1595 _function_string(&str, fptr, intern->ce, ""); in ZEND_METHOD()
1616 zend_function *fptr; in ZEND_METHOD() local
1621 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1622 RETURN_BOOL(fptr->common.fn_flags & ZEND_ACC_CLOSURE); in ZEND_METHOD()
1671 zend_function *fptr; in ZEND_METHOD() local
1676 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1682 zend_create_fake_closure(return_value, fptr, NULL, NULL, NULL); in ZEND_METHOD()
1692 zend_function *fptr; in ZEND_METHOD() local
1697 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1698 RETURN_BOOL(fptr->type == ZEND_INTERNAL_FUNCTION); in ZEND_METHOD()
1707 zend_function *fptr; in ZEND_METHOD() local
1712 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1713 RETURN_BOOL(fptr->type == ZEND_USER_FUNCTION); in ZEND_METHOD()
1722 zend_function *fptr; in ZEND_METHOD() local
1724 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1725 …RETURN_BOOL(fptr->type == ZEND_INTERNAL_FUNCTION && fptr->internal_function.handler == zif_display… in ZEND_METHOD()
1734 zend_function *fptr; in ZEND_METHOD() local
1739 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1740 if (fptr->type == ZEND_USER_FUNCTION) { in ZEND_METHOD()
1741 RETURN_STR_COPY(fptr->op_array.filename); in ZEND_METHOD()
1752 zend_function *fptr; in ZEND_METHOD() local
1757 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1758 if (fptr->type == ZEND_USER_FUNCTION) { in ZEND_METHOD()
1759 RETURN_LONG(fptr->op_array.line_start); in ZEND_METHOD()
1770 zend_function *fptr; in ZEND_METHOD() local
1775 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1776 if (fptr->type == ZEND_USER_FUNCTION) { in ZEND_METHOD()
1777 RETURN_LONG(fptr->op_array.line_end); in ZEND_METHOD()
1788 zend_function *fptr; in ZEND_METHOD() local
1793 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1794 if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.doc_comment) { in ZEND_METHOD()
1795 RETURN_STR_COPY(fptr->op_array.doc_comment); in ZEND_METHOD()
1806 zend_function *fptr; in ZEND_METHOD() local
1812 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1815 if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.static_variables != NULL) { in ZEND_METHOD()
1817 if (GC_REFCOUNT(fptr->op_array.static_variables) > 1) { in ZEND_METHOD()
1818 if (!(GC_FLAGS(fptr->op_array.static_variables) & IS_ARRAY_IMMUTABLE)) { in ZEND_METHOD()
1819 GC_DELREF(fptr->op_array.static_variables); in ZEND_METHOD()
1821 fptr->op_array.static_variables = zend_array_dup(fptr->op_array.static_variables); in ZEND_METHOD()
1823 ZEND_HASH_FOREACH_VAL(fptr->op_array.static_variables, val) { in ZEND_METHOD()
1824 if (UNEXPECTED(zval_update_constant_ex(val, fptr->common.scope) != SUCCESS)) { in ZEND_METHOD()
1828 zend_hash_copy(Z_ARRVAL_P(return_value), fptr->op_array.static_variables, zval_add_ref); in ZEND_METHOD()
1845 zend_function *fptr; in ZEND_METHOD() local
1847 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1861 fcc.function_handler = fptr; in ZEND_METHOD()
1874 "Invocation of function %s() failed", ZSTR_VAL(fptr->common.function_name)); in ZEND_METHOD()
1898 zend_function *fptr; in ZEND_METHOD() local
1901 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1924 fcc.function_handler = fptr; in ZEND_METHOD()
1942 "Invocation of function %s() failed", ZSTR_VAL(fptr->common.function_name)); in ZEND_METHOD()
1960 zend_function *fptr; in ZEND_METHOD() local
1962 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1964 RETURN_BOOL((fptr->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0); in ZEND_METHOD()
1973 zend_function *fptr; in ZEND_METHOD() local
1976 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1978 num_args = fptr->common.num_args; in ZEND_METHOD()
1979 if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) { in ZEND_METHOD()
1992 zend_function *fptr; in ZEND_METHOD() local
1994 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1996 RETURN_LONG(fptr->common.required_num_args); in ZEND_METHOD()
2005 zend_function *fptr; in ZEND_METHOD() local
2009 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
2011 arg_info= fptr->common.arg_info; in ZEND_METHOD()
2012 num_args = fptr->common.num_args; in ZEND_METHOD()
2013 if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) { in ZEND_METHOD()
2027 _copy_function(fptr), in ZEND_METHOD()
2031 i < fptr->common.required_num_args, in ZEND_METHOD()
2046 zend_function *fptr; in ZEND_METHOD() local
2049 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
2051 if (fptr->type != ZEND_INTERNAL_FUNCTION) { in ZEND_METHOD()
2055 internal = (zend_internal_function *)fptr; in ZEND_METHOD()
2069 zend_function *fptr; in ZEND_METHOD() local
2072 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
2074 if (fptr->type != ZEND_INTERNAL_FUNCTION) { in ZEND_METHOD()
2078 internal = (zend_internal_function *)fptr; in ZEND_METHOD()
2268 zend_function *fptr; in ZEND_METHOD() local
2290 if ((fptr = zend_hash_str_find_ptr(EG(function_table), lcname, lcname_len)) == NULL) { in ZEND_METHOD()
2298 ce = fptr->common.scope; in ZEND_METHOD()
2331 && (fptr = zend_get_closure_invoke_method(Z_OBJ_P(classref))) != NULL) in ZEND_METHOD()
2335 } else if ((fptr = zend_hash_str_find_ptr(&ce->function_table, lcname, lcname_len)) == NULL) { in ZEND_METHOD()
2349 fptr = (zend_function *)zend_get_closure_method_def(reference); in ZEND_METHOD()
2352 …} else if ((fptr = zend_hash_str_find_ptr(&ce->function_table, ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_… in ZEND_METHOD()
2366 arg_info = fptr->common.arg_info; in ZEND_METHOD()
2367 num_args = fptr->common.num_args; in ZEND_METHOD()
2368 if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) { in ZEND_METHOD()
2374 if (fptr->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) { in ZEND_METHOD()
2375 if (fptr->type != ZEND_OVERLOADED_FUNCTION) { in ZEND_METHOD()
2376 zend_string_release_ex(fptr->common.function_name, 0); in ZEND_METHOD()
2378 zend_free_trampoline(fptr); in ZEND_METHOD()
2391 if (fptr->type == ZEND_INTERNAL_FUNCTION && in ZEND_METHOD()
2392 !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) { in ZEND_METHOD()
2413 if (fptr->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) { in ZEND_METHOD()
2414 if (fptr->type != ZEND_OVERLOADED_FUNCTION) { in ZEND_METHOD()
2415 zend_string_release_ex(fptr->common.function_name, 0); in ZEND_METHOD()
2417 zend_free_trampoline(fptr); in ZEND_METHOD()
2428 if (fptr->type == ZEND_INTERNAL_FUNCTION && in ZEND_METHOD()
2429 !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) { in ZEND_METHOD()
2442 ref->required = position < fptr->common.required_num_args; in ZEND_METHOD()
2443 ref->fptr = fptr; in ZEND_METHOD()
2466 _parameter_string(&str, param->fptr, param->arg_info, param->offset, param->required, ""); in ZEND_METHOD()
2495 if (!param->fptr->common.scope) { in ZEND_METHOD()
2496 …reflection_function_factory(_copy_function(param->fptr), Z_ISUNDEF(intern->obj)? NULL : &intern->o… in ZEND_METHOD()
2498 …reflection_method_factory(param->fptr->common.scope, _copy_function(param->fptr), Z_ISUNDEF(intern… in ZEND_METHOD()
2515 if (param->fptr->common.scope) { in ZEND_METHOD()
2516 zend_reflection_class_factory(param->fptr->common.scope, return_value); in ZEND_METHOD()
2551 ce = param->fptr->common.scope; in ZEND_METHOD()
2558 ce = param->fptr->common.scope; in ZEND_METHOD()
2614 …reflection_type_factory(_copy_function(param->fptr), Z_ISUNDEF(intern->obj)? NULL : &intern->obj, … in ZEND_METHOD()
2744 if (param->fptr->type != ZEND_USER_FUNCTION) in ZEND_METHOD()
2749 precv = _get_recv_op((zend_op_array*)param->fptr, param->offset); in ZEND_METHOD()
2780 zval_update_constant_ex(return_value, param->fptr->common.scope); in ZEND_METHOD()
3372 zend_function *fptr; in ZEND_METHOD() local
3378 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
3380 RETVAL_BOOL(fptr->op_array.fn_flags & ZEND_ACC_HAS_RETURN_TYPE); in ZEND_METHOD()
3389 zend_function *fptr; in ZEND_METHOD() local
3395 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
3397 if (!(fptr->op_array.fn_flags & ZEND_ACC_HAS_RETURN_TYPE)) { in ZEND_METHOD()
3401 …reflection_type_factory(_copy_function(fptr), Z_ISUNDEF(intern->obj)? NULL : &intern->obj, &fptr->… in ZEND_METHOD()
5704 zend_function *fptr; in ZEND_METHOD() local
5712 ZEND_HASH_FOREACH_PTR(CG(function_table), fptr) { in ZEND_METHOD()
5713 if (fptr->common.type==ZEND_INTERNAL_FUNCTION in ZEND_METHOD()
5714 && fptr->internal_function.module == module) { in ZEND_METHOD()
5715 reflection_function_factory(fptr, NULL, &function); in ZEND_METHOD()
5716 zend_hash_update(Z_ARRVAL_P(return_value), fptr->common.function_name, &function); in ZEND_METHOD()