Lines Matching refs:fptr

126 	zend_function *fptr;  member
185 static zend_function *_copy_function(zend_function *fptr) /* {{{ */ in _copy_function() argument
187 if (fptr in _copy_function()
188 && (fptr->internal_function.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) in _copy_function()
192 memcpy(copy_fptr, fptr, sizeof(zend_function)); in _copy_function()
193 …copy_fptr->internal_function.function_name = zend_string_copy(fptr->internal_function.function_nam… in _copy_function()
197 return fptr; in _copy_function()
202 static void _free_function(zend_function *fptr) /* {{{ */ in _free_function() argument
204 if (fptr in _free_function()
205 && (fptr->internal_function.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) in _free_function()
207 zend_string_release_ex(fptr->internal_function.function_name, 0); in _free_function()
208 zend_free_trampoline(fptr); in _free_function()
223 _free_function(reference->fptr); in reflection_free_objects_storage()
288 static void _function_string(smart_str *str, zend_function *fptr, zend_class_entry *scope, char* in…
592 static void _parameter_string(smart_str *str, zend_function *fptr, struct _zend_arg_info *arg_info,… in _parameter_string() argument
620 (fptr->type == ZEND_INTERNAL_FUNCTION && in _parameter_string()
621 !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) ? in _parameter_string()
627 if (fptr->type == ZEND_USER_FUNCTION && !required) { in _parameter_string()
628 zend_op *precv = _get_recv_op((zend_op_array*)fptr, offset); in _parameter_string()
634 if (UNEXPECTED(zval_update_constant_ex(&zv, fptr->common.scope) == FAILURE)) { in _parameter_string()
667 static void _function_parameter_string(smart_str *str, zend_function *fptr, char* indent) in _function_parameter_string() argument
669 struct _zend_arg_info *arg_info = fptr->common.arg_info; in _function_parameter_string()
670 uint32_t i, num_args, num_required = fptr->common.required_num_args; in _function_parameter_string()
676 num_args = fptr->common.num_args; in _function_parameter_string()
677 if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) { in _function_parameter_string()
684 _parameter_string(str, fptr, arg_info, i, i < num_required, indent); in _function_parameter_string()
693 static void _function_closure_string(smart_str *str, zend_function *fptr, char* indent) in _function_closure_string() argument
699 if (fptr->type != ZEND_USER_FUNCTION || !fptr->op_array.static_variables) { in _function_closure_string()
703 static_variables = ZEND_MAP_PTR_GET(fptr->op_array.static_variables_ptr); in _function_closure_string()
721 static void _function_string(smart_str *str, zend_function *fptr, zend_class_entry *scope, char* in… in _function_string() argument
731 if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.doc_comment) { in _function_string()
732 smart_str_append_printf(str, "%s%s\n", indent, ZSTR_VAL(fptr->op_array.doc_comment)); in _function_string()
736 …smart_str_append_printf(str, fptr->common.fn_flags & ZEND_ACC_CLOSURE ? "Closure [ " : (fptr->comm… in _function_string()
737 smart_str_append_printf(str, (fptr->type == ZEND_USER_FUNCTION) ? "<user" : "<internal"); in _function_string()
738 if (fptr->common.fn_flags & ZEND_ACC_DEPRECATED) { in _function_string()
741 if (fptr->type == ZEND_INTERNAL_FUNCTION && ((zend_internal_function*)fptr)->module) { in _function_string()
742 smart_str_append_printf(str, ":%s", ((zend_internal_function*)fptr)->module->name); in _function_string()
745 if (scope && fptr->common.scope) { in _function_string()
746 if (fptr->common.scope != scope) { in _function_string()
747 smart_str_append_printf(str, ", inherits %s", ZSTR_VAL(fptr->common.scope->name)); in _function_string()
748 } else if (fptr->common.scope->parent) { in _function_string()
749 lc_name = zend_string_tolower(fptr->common.function_name); in _function_string()
750 …if ((overwrites = zend_hash_find_ptr(&fptr->common.scope->parent->function_table, lc_name)) != NUL… in _function_string()
751 if (fptr->common.scope != overwrites->common.scope) { in _function_string()
758 if (fptr->common.prototype && fptr->common.prototype->common.scope) { in _function_string()
759 …smart_str_append_printf(str, ", prototype %s", ZSTR_VAL(fptr->common.prototype->common.scope->name… in _function_string()
761 if (fptr->common.fn_flags & ZEND_ACC_CTOR) { in _function_string()
764 if (fptr->common.fn_flags & ZEND_ACC_DTOR) { in _function_string()
769 if (fptr->common.fn_flags & ZEND_ACC_ABSTRACT) { in _function_string()
772 if (fptr->common.fn_flags & ZEND_ACC_FINAL) { in _function_string()
775 if (fptr->common.fn_flags & ZEND_ACC_STATIC) { in _function_string()
779 if (fptr->common.scope) { in _function_string()
781 switch (fptr->common.fn_flags & ZEND_ACC_PPP_MASK) { in _function_string()
800 if (fptr->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) { in _function_string()
803 smart_str_append_printf(str, "%s ] {\n", ZSTR_VAL(fptr->common.function_name)); in _function_string()
805 if (fptr->type == ZEND_USER_FUNCTION) { in _function_string()
807 ZSTR_VAL(fptr->op_array.filename), in _function_string()
808 fptr->op_array.line_start, in _function_string()
809 fptr->op_array.line_end); in _function_string()
813 if (fptr->common.fn_flags & ZEND_ACC_CLOSURE) { in _function_string()
814 _function_closure_string(str, fptr, ZSTR_VAL(param_indent.s)); in _function_string()
816 _function_parameter_string(str, fptr, ZSTR_VAL(param_indent.s)); in _function_string()
818 if (fptr->op_array.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) { in _function_string()
820 if (ZEND_TYPE_IS_CLASS(fptr->common.arg_info[-1].type)) { in _function_string()
822 ZSTR_VAL(ZEND_TYPE_NAME(fptr->common.arg_info[-1].type))); in _function_string()
823 if (ZEND_TYPE_ALLOW_NULL(fptr->common.arg_info[-1].type)) { in _function_string()
826 } else if (ZEND_TYPE_IS_CODE(fptr->common.arg_info[-1].type)) { in _function_string()
827 …smart_str_append_printf(str, "%s ", zend_get_type_by_const(ZEND_TYPE_CODE(fptr->common.arg_info[-1… in _function_string()
828 if (ZEND_TYPE_ALLOW_NULL(fptr->common.arg_info[-1].type)) { in _function_string()
1007 zend_function *fptr; in _extension_string() local
1010 ZEND_HASH_FOREACH_PTR(CG(function_table), fptr) { in _extension_string()
1011 if (fptr->common.type==ZEND_INTERNAL_FUNCTION in _extension_string()
1012 && fptr->internal_function.module == module) { in _extension_string()
1017 _function_string(str, fptr, NULL, " "); in _extension_string()
1123 static void reflection_parameter_factory(zend_function *fptr, zval *closure_object, struct _zend_ar… in reflection_parameter_factory() argument
1135 reference->fptr = fptr; in reflection_parameter_factory()
1138 intern->ce = fptr->common.scope; in reflection_parameter_factory()
1146 if (fptr->type == ZEND_INTERNAL_FUNCTION && in reflection_parameter_factory()
1147 !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) { in reflection_parameter_factory()
1396 if (param->fptr->type != ZEND_USER_FUNCTION) { in _reflection_param_get_default_param()
1414 precv = _get_recv_op((zend_op_array*)param->fptr, param->offset); in _reflection_param_get_default_precv()
1502 zend_function *fptr; in ZEND_METHOD() local
1509 fptr = (zend_function*)zend_get_closure_method_def(closure); in ZEND_METHOD()
1522 fptr = zend_fetch_function(lcname); in ZEND_METHOD()
1526 fptr = zend_fetch_function(lcname); in ZEND_METHOD()
1530 if (fptr == NULL) { in ZEND_METHOD()
1542 ZVAL_STR_COPY(reflection_prop_name(object), fptr->common.function_name); in ZEND_METHOD()
1543 intern->ptr = fptr; in ZEND_METHOD()
1559 zend_function *fptr; in ZEND_METHOD() local
1565 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1566 _function_string(&str, fptr, intern->ce, ""); in ZEND_METHOD()
1587 zend_function *fptr; in ZEND_METHOD() local
1592 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1593 RETURN_BOOL(fptr->common.fn_flags & ZEND_ACC_CLOSURE); in ZEND_METHOD()
1643 zend_function *fptr; in ZEND_METHOD() local
1648 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1655 zend_create_fake_closure(return_value, fptr, NULL, NULL, NULL); in ZEND_METHOD()
1665 zend_function *fptr; in ZEND_METHOD() local
1670 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1671 RETURN_BOOL(fptr->type == ZEND_INTERNAL_FUNCTION); in ZEND_METHOD()
1680 zend_function *fptr; in ZEND_METHOD() local
1685 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1686 RETURN_BOOL(fptr->type == ZEND_USER_FUNCTION); in ZEND_METHOD()
1695 zend_function *fptr; in ZEND_METHOD() local
1697 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1698 …RETURN_BOOL(fptr->type == ZEND_INTERNAL_FUNCTION && fptr->internal_function.handler == zif_display… in ZEND_METHOD()
1707 zend_function *fptr; in ZEND_METHOD() local
1712 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1713 if (fptr->type == ZEND_USER_FUNCTION) { in ZEND_METHOD()
1714 RETURN_STR_COPY(fptr->op_array.filename); in ZEND_METHOD()
1725 zend_function *fptr; in ZEND_METHOD() local
1730 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1731 if (fptr->type == ZEND_USER_FUNCTION) { in ZEND_METHOD()
1732 RETURN_LONG(fptr->op_array.line_start); in ZEND_METHOD()
1743 zend_function *fptr; in ZEND_METHOD() local
1748 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1749 if (fptr->type == ZEND_USER_FUNCTION) { in ZEND_METHOD()
1750 RETURN_LONG(fptr->op_array.line_end); in ZEND_METHOD()
1761 zend_function *fptr; in ZEND_METHOD() local
1766 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1767 if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.doc_comment) { in ZEND_METHOD()
1768 RETURN_STR_COPY(fptr->op_array.doc_comment); in ZEND_METHOD()
1779 zend_function *fptr; in ZEND_METHOD() local
1785 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1788 if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.static_variables != NULL) { in ZEND_METHOD()
1792 ht = ZEND_MAP_PTR_GET(fptr->op_array.static_variables_ptr); in ZEND_METHOD()
1794 ZEND_ASSERT(fptr->op_array.fn_flags & ZEND_ACC_IMMUTABLE); in ZEND_METHOD()
1795 ht = zend_array_dup(fptr->op_array.static_variables); in ZEND_METHOD()
1796 ZEND_MAP_PTR_SET(fptr->op_array.static_variables_ptr, ht); in ZEND_METHOD()
1799 if (UNEXPECTED(zval_update_constant_ex(val, fptr->common.scope) != SUCCESS)) { in ZEND_METHOD()
1820 zend_function *fptr; in ZEND_METHOD() local
1822 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1836 fcc.function_handler = fptr; in ZEND_METHOD()
1849 "Invocation of function %s() failed", ZSTR_VAL(fptr->common.function_name)); in ZEND_METHOD()
1873 zend_function *fptr; in ZEND_METHOD() local
1876 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1899 fcc.function_handler = fptr; in ZEND_METHOD()
1917 "Invocation of function %s() failed", ZSTR_VAL(fptr->common.function_name)); in ZEND_METHOD()
1935 zend_function *fptr; in ZEND_METHOD() local
1937 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1939 RETURN_BOOL((fptr->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0); in ZEND_METHOD()
1948 zend_function *fptr; in ZEND_METHOD() local
1951 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1953 num_args = fptr->common.num_args; in ZEND_METHOD()
1954 if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) { in ZEND_METHOD()
1967 zend_function *fptr; in ZEND_METHOD() local
1969 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1971 RETURN_LONG(fptr->common.required_num_args); in ZEND_METHOD()
1980 zend_function *fptr; in ZEND_METHOD() local
1984 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1986 arg_info= fptr->common.arg_info; in ZEND_METHOD()
1987 num_args = fptr->common.num_args; in ZEND_METHOD()
1988 if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) { in ZEND_METHOD()
2001 _copy_function(fptr), in ZEND_METHOD()
2005 i < fptr->common.required_num_args, in ZEND_METHOD()
2020 zend_function *fptr; in ZEND_METHOD() local
2023 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
2025 if (fptr->type != ZEND_INTERNAL_FUNCTION) { in ZEND_METHOD()
2029 internal = (zend_internal_function *)fptr; in ZEND_METHOD()
2043 zend_function *fptr; in ZEND_METHOD() local
2046 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
2048 if (fptr->type != ZEND_INTERNAL_FUNCTION) { in ZEND_METHOD()
2052 internal = (zend_internal_function *)fptr; in ZEND_METHOD()
2248 zend_function *fptr; in ZEND_METHOD() local
2267 fptr = zend_hash_find_ptr(EG(function_table), lcname); in ZEND_METHOD()
2269 if (!fptr) { in ZEND_METHOD()
2274 ce = fptr->common.scope; in ZEND_METHOD()
2313 && (fptr = zend_get_closure_invoke_method(Z_OBJ_P(classref))) != NULL) in ZEND_METHOD()
2317 } else if ((fptr = zend_hash_find_ptr(&ce->function_table, lcname)) == NULL) { in ZEND_METHOD()
2333 fptr = (zend_function *)zend_get_closure_method_def(reference); in ZEND_METHOD()
2336 …} else if ((fptr = zend_hash_find_ptr(&ce->function_table, ZSTR_KNOWN(ZEND_STR_MAGIC_INVOKE))) == … in ZEND_METHOD()
2350 arg_info = fptr->common.arg_info; in ZEND_METHOD()
2351 num_args = fptr->common.num_args; in ZEND_METHOD()
2352 if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) { in ZEND_METHOD()
2369 if (fptr->type == ZEND_INTERNAL_FUNCTION && in ZEND_METHOD()
2370 !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) { in ZEND_METHOD()
2399 ref->required = (uint32_t)position < fptr->common.required_num_args; in ZEND_METHOD()
2400 ref->fptr = fptr; in ZEND_METHOD()
2411 if (fptr->type == ZEND_INTERNAL_FUNCTION && in ZEND_METHOD()
2412 !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) { in ZEND_METHOD()
2423 if (fptr->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) { in ZEND_METHOD()
2424 if (fptr->type != ZEND_OVERLOADED_FUNCTION) { in ZEND_METHOD()
2425 zend_string_release_ex(fptr->common.function_name, 0); in ZEND_METHOD()
2427 zend_free_trampoline(fptr); in ZEND_METHOD()
2447 _parameter_string(&str, param->fptr, param->arg_info, param->offset, param->required, ""); in ZEND_METHOD()
2476 if (!param->fptr->common.scope) { in ZEND_METHOD()
2477 …reflection_function_factory(_copy_function(param->fptr), Z_ISUNDEF(intern->obj)? NULL : &intern->o… in ZEND_METHOD()
2479 …reflection_method_factory(param->fptr->common.scope, _copy_function(param->fptr), Z_ISUNDEF(intern… in ZEND_METHOD()
2496 if (param->fptr->common.scope) { in ZEND_METHOD()
2497 zend_reflection_class_factory(param->fptr->common.scope, return_value); in ZEND_METHOD()
2532 ce = param->fptr->common.scope; in ZEND_METHOD()
2539 ce = param->fptr->common.scope; in ZEND_METHOD()
2725 if (param->fptr->type != ZEND_USER_FUNCTION) in ZEND_METHOD()
2730 precv = _get_recv_op((zend_op_array*)param->fptr, param->offset); in ZEND_METHOD()
2761 zval_update_constant_ex(return_value, param->fptr->common.scope); in ZEND_METHOD()
3354 zend_function *fptr; in ZEND_METHOD() local
3360 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
3362 RETVAL_BOOL(fptr->op_array.fn_flags & ZEND_ACC_HAS_RETURN_TYPE); in ZEND_METHOD()
3371 zend_function *fptr; in ZEND_METHOD() local
3377 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
3379 if (!(fptr->op_array.fn_flags & ZEND_ACC_HAS_RETURN_TYPE)) { in ZEND_METHOD()
3383 reflection_type_factory(fptr->common.arg_info[-1].type, return_value); in ZEND_METHOD()
5807 zend_function *fptr; in ZEND_METHOD() local
5815 ZEND_HASH_FOREACH_PTR(CG(function_table), fptr) { in ZEND_METHOD()
5816 if (fptr->common.type==ZEND_INTERNAL_FUNCTION in ZEND_METHOD()
5817 && fptr->internal_function.module == module) { in ZEND_METHOD()
5818 reflection_function_factory(fptr, NULL, &function); in ZEND_METHOD()
5819 zend_hash_update(Z_ARRVAL_P(return_value), fptr->common.function_name, &function); in ZEND_METHOD()