Lines Matching refs:fptr

142 	zend_function *fptr;  member
200 static zend_function *_copy_function(zend_function *fptr) /* {{{ */ in _copy_function() argument
202 if (fptr in _copy_function()
203 && (fptr->internal_function.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) in _copy_function()
207 memcpy(copy_fptr, fptr, sizeof(zend_function)); in _copy_function()
208 …copy_fptr->internal_function.function_name = zend_string_copy(fptr->internal_function.function_nam… in _copy_function()
212 return fptr; in _copy_function()
217 static void _free_function(zend_function *fptr) /* {{{ */ in _free_function() argument
219 if (fptr in _free_function()
220 && (fptr->internal_function.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) in _free_function()
222 zend_string_release_ex(fptr->internal_function.function_name, 0); in _free_function()
223 zend_free_trampoline(fptr); in _free_function()
236 _free_function(reference->fptr); in reflection_free_parameter_reference()
305 static void _function_string(smart_str *str, zend_function *fptr, zend_class_entry *scope, const ch…
693 static inline bool has_internal_arg_info(const zend_function *fptr) { in has_internal_arg_info() argument
694 return fptr->type == ZEND_INTERNAL_FUNCTION in has_internal_arg_info()
695 && !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO); in has_internal_arg_info()
699 static void _parameter_string(smart_str *str, zend_function *fptr, struct _zend_arg_info *arg_info,… in _parameter_string() argument
719 smart_str_append_printf(str, "$%s", has_internal_arg_info(fptr) in _parameter_string()
723 if (fptr->type == ZEND_INTERNAL_FUNCTION) { in _parameter_string()
727 if (has_internal_arg_info(fptr) in _parameter_string()
734 zval *default_value = get_default_from_recv((zend_op_array*)fptr, offset); in _parameter_string()
748 static void _function_parameter_string(smart_str *str, zend_function *fptr, char* indent) in _function_parameter_string() argument
750 struct _zend_arg_info *arg_info = fptr->common.arg_info; in _function_parameter_string()
751 uint32_t i, num_args, num_required = fptr->common.required_num_args; in _function_parameter_string()
757 num_args = fptr->common.num_args; in _function_parameter_string()
758 if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) { in _function_parameter_string()
765 _parameter_string(str, fptr, arg_info, i, i < num_required, indent); in _function_parameter_string()
774 static void _function_closure_string(smart_str *str, const zend_function *fptr, const char* indent) in _function_closure_string() argument
780 if (fptr->type != ZEND_USER_FUNCTION || !fptr->op_array.static_variables) { in _function_closure_string()
784 static_variables = ZEND_MAP_PTR_GET(fptr->op_array.static_variables_ptr); in _function_closure_string()
802 static void _function_string(smart_str *str, zend_function *fptr, zend_class_entry *scope, const ch… in _function_string() argument
812 if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.doc_comment) { in _function_string()
813 smart_str_append_printf(str, "%s%s\n", indent, ZSTR_VAL(fptr->op_array.doc_comment)); in _function_string()
814 } else if (fptr->type == ZEND_INTERNAL_FUNCTION && fptr->internal_function.doc_comment) { in _function_string()
815 smart_str_append_printf(str, "%s%s\n", indent, ZSTR_VAL(fptr->internal_function.doc_comment)); in _function_string()
819 …smart_str_append_printf(str, fptr->common.fn_flags & ZEND_ACC_CLOSURE ? "Closure [ " : (fptr->comm… in _function_string()
820 smart_str_append_printf(str, (fptr->type == ZEND_USER_FUNCTION) ? "<user" : "<internal"); in _function_string()
821 if (fptr->common.fn_flags & ZEND_ACC_DEPRECATED) { in _function_string()
824 if (fptr->type == ZEND_INTERNAL_FUNCTION && ((zend_internal_function*)fptr)->module) { in _function_string()
825 smart_str_append_printf(str, ":%s", ((zend_internal_function*)fptr)->module->name); in _function_string()
828 if (scope && fptr->common.scope) { in _function_string()
829 if (fptr->common.scope != scope) { in _function_string()
830 smart_str_append_printf(str, ", inherits %s", ZSTR_VAL(fptr->common.scope->name)); in _function_string()
831 } else if (fptr->common.scope->parent) { in _function_string()
832 lc_name = zend_string_tolower(fptr->common.function_name); in _function_string()
833 …if ((overwrites = zend_hash_find_ptr(&fptr->common.scope->parent->function_table, lc_name)) != NUL… in _function_string()
834 …if (fptr->common.scope != overwrites->common.scope && !(overwrites->common.fn_flags & ZEND_ACC_PRI… in _function_string()
841 if (fptr->common.prototype && fptr->common.prototype->common.scope) { in _function_string()
842 …smart_str_append_printf(str, ", prototype %s", ZSTR_VAL(fptr->common.prototype->common.scope->name… in _function_string()
844 if (fptr->common.fn_flags & ZEND_ACC_CTOR) { in _function_string()
849 if (fptr->common.fn_flags & ZEND_ACC_ABSTRACT) { in _function_string()
852 if (fptr->common.fn_flags & ZEND_ACC_FINAL) { in _function_string()
855 if (fptr->common.fn_flags & ZEND_ACC_STATIC) { in _function_string()
859 if (fptr->common.scope) { in _function_string()
861 switch (fptr->common.fn_flags & ZEND_ACC_PPP_MASK) { in _function_string()
880 if (fptr->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) { in _function_string()
883 smart_str_append_printf(str, "%s ] {\n", ZSTR_VAL(fptr->common.function_name)); in _function_string()
885 if (fptr->type == ZEND_USER_FUNCTION) { in _function_string()
887 ZSTR_VAL(fptr->op_array.filename), in _function_string()
888 fptr->op_array.line_start, in _function_string()
889 fptr->op_array.line_end); in _function_string()
893 if (fptr->common.fn_flags & ZEND_ACC_CLOSURE) { in _function_string()
894 _function_closure_string(str, fptr, ZSTR_VAL(param_indent.s)); in _function_string()
896 _function_parameter_string(str, fptr, ZSTR_VAL(param_indent.s)); in _function_string()
898 if ((fptr->op_array.fn_flags & ZEND_ACC_HAS_RETURN_TYPE)) { in _function_string()
899 …smart_str_append_printf(str, " %s- %s [ ", indent, ZEND_ARG_TYPE_IS_TENTATIVE(&fptr->common.arg_i… in _function_string()
900 if (ZEND_TYPE_IS_SET(fptr->common.arg_info[-1].type)) { in _function_string()
901 zend_string *type_str = zend_type_to_string(fptr->common.arg_info[-1].type); in _function_string()
1116 zend_function *fptr; in _extension_string() local
1119 ZEND_HASH_MAP_FOREACH_PTR(CG(function_table), fptr) { in _extension_string()
1120 if (fptr->common.type==ZEND_INTERNAL_FUNCTION in _extension_string()
1121 && fptr->internal_function.module == module) { in _extension_string()
1126 _function_string(str, fptr, NULL, " "); in _extension_string()
1353 static void reflection_parameter_factory(zend_function *fptr, zval *closure_object, struct _zend_ar… in reflection_parameter_factory() argument
1365 reference->fptr = fptr; in reflection_parameter_factory()
1368 intern->ce = fptr->common.scope; in reflection_parameter_factory()
1374 if (has_internal_arg_info(fptr)) { in reflection_parameter_factory()
1558 if (param->fptr->type == ZEND_INTERNAL_FUNCTION) { in get_parameter_default()
1559 if (param->fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO) { in get_parameter_default()
1566 zval *default_value = get_default_from_recv((zend_op_array *) param->fptr, param->offset); in get_parameter_default()
1634 zend_function *fptr; in ZEND_METHOD() local
1645 fptr = (zend_function*)zend_get_closure_method_def(closure_obj); in ZEND_METHOD()
1652 fptr = zend_fetch_function(lcname); in ZEND_METHOD()
1656 fptr = zend_fetch_function(lcname); in ZEND_METHOD()
1660 if (fptr == NULL) { in ZEND_METHOD()
1672 ZVAL_STR_COPY(reflection_prop_name(object), fptr->common.function_name); in ZEND_METHOD()
1673 intern->ptr = fptr; in ZEND_METHOD()
1688 zend_function *fptr; in ZEND_METHOD() local
1692 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1693 _function_string(&str, fptr, intern->ce, ""); in ZEND_METHOD()
1702 zend_function *fptr; in ZEND_METHOD() local
1706 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1707 RETURN_STR_COPY(fptr->common.function_name); in ZEND_METHOD()
1715 zend_function *fptr; in ZEND_METHOD() local
1719 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1720 RETURN_BOOL(fptr->common.fn_flags & ZEND_ACC_CLOSURE); in ZEND_METHOD()
1833 zend_function *fptr; in ZEND_METHOD() local
1836 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1842 zend_create_fake_closure(return_value, fptr, NULL, NULL, NULL); in ZEND_METHOD()
1851 zend_function *fptr; in ZEND_METHOD() local
1854 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1855 RETURN_BOOL(fptr->type == ZEND_INTERNAL_FUNCTION); in ZEND_METHOD()
1863 zend_function *fptr; in ZEND_METHOD() local
1866 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1867 RETURN_BOOL(fptr->type == ZEND_USER_FUNCTION); in ZEND_METHOD()
1875 zend_function *fptr; in ZEND_METHOD() local
1879 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1880 …RETURN_BOOL((fptr->common.fn_flags & (ZEND_ACC_CLOSURE | ZEND_ACC_FAKE_CLOSURE)) == ZEND_ACC_CLOSU… in ZEND_METHOD()
1898 zend_function *fptr; in ZEND_METHOD() local
1901 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1902 if (fptr->type == ZEND_USER_FUNCTION) { in ZEND_METHOD()
1903 RETURN_STR_COPY(fptr->op_array.filename); in ZEND_METHOD()
1913 zend_function *fptr; in ZEND_METHOD() local
1916 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1917 if (fptr->type == ZEND_USER_FUNCTION) { in ZEND_METHOD()
1918 RETURN_LONG(fptr->op_array.line_start); in ZEND_METHOD()
1928 zend_function *fptr; in ZEND_METHOD() local
1931 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1932 if (fptr->type == ZEND_USER_FUNCTION) { in ZEND_METHOD()
1933 RETURN_LONG(fptr->op_array.line_end); in ZEND_METHOD()
1943 zend_function *fptr; in ZEND_METHOD() local
1947 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1949 if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.doc_comment) { in ZEND_METHOD()
1950 RETURN_STR_COPY(fptr->op_array.doc_comment); in ZEND_METHOD()
1953 if (fptr->type == ZEND_INTERNAL_FUNCTION && ((zend_internal_function *) fptr)->doc_comment) { in ZEND_METHOD()
1954 RETURN_STR_COPY(((zend_internal_function *) fptr)->doc_comment); in ZEND_METHOD()
1965 zend_function *fptr; in ZEND_METHOD() local
1968 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1970 …if (fptr->common.scope && (fptr->common.fn_flags & (ZEND_ACC_CLOSURE|ZEND_ACC_FAKE_CLOSURE)) != ZE… in ZEND_METHOD()
1977 fptr->common.attributes, 0, fptr->common.scope, target, in ZEND_METHOD()
1978 fptr->type == ZEND_USER_FUNCTION ? fptr->op_array.filename : NULL); in ZEND_METHOD()
1986 zend_function *fptr; in ZEND_METHOD() local
1989 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
1992 if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.static_variables != NULL) { in ZEND_METHOD()
1996 ht = ZEND_MAP_PTR_GET(fptr->op_array.static_variables_ptr); in ZEND_METHOD()
1998 ht = zend_array_dup(fptr->op_array.static_variables); in ZEND_METHOD()
1999 ZEND_MAP_PTR_SET(fptr->op_array.static_variables_ptr, ht); in ZEND_METHOD()
2017 zend_function *fptr; in ZEND_METHOD() local
2023 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
2025 fcc.function_handler = fptr; in ZEND_METHOD()
2038 "Invocation of function %s() failed", ZSTR_VAL(fptr->common.function_name)); in ZEND_METHOD()
2055 zend_function *fptr; in ZEND_METHOD() local
2062 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
2064 fcc.function_handler = fptr; in ZEND_METHOD()
2077 "Invocation of function %s() failed", ZSTR_VAL(fptr->common.function_name)); in ZEND_METHOD()
2092 zend_function *fptr; in ZEND_METHOD() local
2096 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
2098 RETURN_BOOL((fptr->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0); in ZEND_METHOD()
2106 zend_function *fptr; in ZEND_METHOD() local
2111 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
2113 num_args = fptr->common.num_args; in ZEND_METHOD()
2114 if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) { in ZEND_METHOD()
2126 zend_function *fptr; in ZEND_METHOD() local
2130 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
2132 RETURN_LONG(fptr->common.required_num_args); in ZEND_METHOD()
2140 zend_function *fptr; in ZEND_METHOD() local
2146 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
2148 arg_info= fptr->common.arg_info; in ZEND_METHOD()
2149 num_args = fptr->common.num_args; in ZEND_METHOD()
2150 if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) { in ZEND_METHOD()
2163 _copy_function(fptr), in ZEND_METHOD()
2167 i < fptr->common.required_num_args, in ZEND_METHOD()
2181 zend_function *fptr; in ZEND_METHOD() local
2186 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
2188 if (fptr->type != ZEND_INTERNAL_FUNCTION) { in ZEND_METHOD()
2192 internal = (zend_internal_function *)fptr; in ZEND_METHOD()
2205 zend_function *fptr; in ZEND_METHOD() local
2210 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
2212 if (fptr->type != ZEND_INTERNAL_FUNCTION) { in ZEND_METHOD()
2216 internal = (zend_internal_function *)fptr; in ZEND_METHOD()
2392 zend_function *fptr; in ZEND_METHOD() local
2411 fptr = zend_hash_find_ptr(EG(function_table), lcname); in ZEND_METHOD()
2413 if (!fptr) { in ZEND_METHOD()
2418 ce = fptr->common.scope; in ZEND_METHOD()
2457 && (fptr = zend_get_closure_invoke_method(Z_OBJ_P(classref))) != NULL) in ZEND_METHOD()
2461 } else if ((fptr = zend_hash_find_ptr(&ce->function_table, lcname)) == NULL) { in ZEND_METHOD()
2477 fptr = (zend_function *)zend_get_closure_method_def(Z_OBJ_P(reference)); in ZEND_METHOD()
2480 …} else if ((fptr = zend_hash_find_ptr(&ce->function_table, ZSTR_KNOWN(ZEND_STR_MAGIC_INVOKE))) == … in ZEND_METHOD()
2494 arg_info = fptr->common.arg_info; in ZEND_METHOD()
2495 num_args = fptr->common.num_args; in ZEND_METHOD()
2496 if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) { in ZEND_METHOD()
2503 if (has_internal_arg_info(fptr)) { in ZEND_METHOD()
2544 ref->required = (uint32_t)position < fptr->common.required_num_args; in ZEND_METHOD()
2545 ref->fptr = fptr; in ZEND_METHOD()
2559 if (has_internal_arg_info(fptr)) { in ZEND_METHOD()
2567 if (fptr->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) { in ZEND_METHOD()
2568 zend_string_release_ex(fptr->common.function_name, 0); in ZEND_METHOD()
2569 zend_free_trampoline(fptr); in ZEND_METHOD()
2587 _parameter_string(&str, param->fptr, param->arg_info, param->offset, param->required, ""); in ZEND_METHOD()
2602 if (has_internal_arg_info(param->fptr)) { in ZEND_METHOD()
2619 if (!param->fptr->common.scope) { in ZEND_METHOD()
2620 …reflection_function_factory(_copy_function(param->fptr), Z_ISUNDEF(intern->obj)? NULL : &intern->o… in ZEND_METHOD()
2622 …reflection_method_factory(param->fptr->common.scope, _copy_function(param->fptr), Z_ISUNDEF(intern… in ZEND_METHOD()
2636 if (param->fptr->common.scope) { in ZEND_METHOD()
2637 zend_reflection_class_factory(param->fptr->common.scope, return_value); in ZEND_METHOD()
2670 ce = param->fptr->common.scope; in ZEND_METHOD()
2677 ce = param->fptr->common.scope; in ZEND_METHOD()
2815 HashTable *attributes = param->fptr->common.attributes; in ZEND_METHOD()
2816 zend_class_entry *scope = param->fptr->common.scope; in ZEND_METHOD()
2820 param->fptr->type == ZEND_USER_FUNCTION ? param->fptr->op_array.filename : NULL); in ZEND_METHOD()
2859 if (param->fptr->type == ZEND_INTERNAL_FUNCTION) { in ZEND_METHOD()
2860 RETURN_BOOL(!(param->fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO) in ZEND_METHOD()
2863 zval *default_value = get_default_from_recv((zend_op_array *)param->fptr, param->offset); in ZEND_METHOD()
2886 zval_update_constant_ex(return_value, param->fptr->common.scope); in ZEND_METHOD()
3485 zend_function *fptr; in ZEND_METHOD() local
3489 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
3491 if ((fptr->common.fn_flags & (ZEND_ACC_CLOSURE | ZEND_ACC_FAKE_CLOSURE)) == ZEND_ACC_CLOSURE) { in ZEND_METHOD()
3495 zend_string *name = fptr->common.function_name; in ZEND_METHOD()
3505 zend_function *fptr; in ZEND_METHOD() local
3509 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
3511 if ((fptr->common.fn_flags & (ZEND_ACC_CLOSURE | ZEND_ACC_FAKE_CLOSURE)) == ZEND_ACC_CLOSURE) { in ZEND_METHOD()
3515 zend_string *name = fptr->common.function_name; in ZEND_METHOD()
3528 zend_function *fptr; in ZEND_METHOD() local
3532 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
3534 zend_string *name = fptr->common.function_name; in ZEND_METHOD()
3535 if ((fptr->common.fn_flags & (ZEND_ACC_CLOSURE | ZEND_ACC_FAKE_CLOSURE)) != ZEND_ACC_CLOSURE) { in ZEND_METHOD()
3550 zend_function *fptr; in ZEND_METHOD() local
3554 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
3556 …RETVAL_BOOL((fptr->op_array.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) && !ZEND_ARG_TYPE_IS_TENTATIVE(&f… in ZEND_METHOD()
3564 zend_function *fptr; in ZEND_METHOD() local
3568 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
3570 …if (!(fptr->op_array.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || ZEND_ARG_TYPE_IS_TENTATIVE(&fptr->com… in ZEND_METHOD()
3574 reflection_type_factory(fptr->common.arg_info[-1].type, return_value, 1); in ZEND_METHOD()
3582 zend_function *fptr; in ZEND_METHOD() local
3586 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
3588 …RETVAL_BOOL(fptr->op_array.fn_flags & ZEND_ACC_HAS_RETURN_TYPE && ZEND_ARG_TYPE_IS_TENTATIVE(&fptr in ZEND_METHOD()
3596 zend_function *fptr; in ZEND_METHOD() local
3600 GET_REFLECTION_OBJECT_PTR(fptr); in ZEND_METHOD()
3602 …if (!(fptr->op_array.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || !ZEND_ARG_TYPE_IS_TENTATIVE(&fptr->co… in ZEND_METHOD()
3606 reflection_type_factory(fptr->common.arg_info[-1].type, return_value, 1); in ZEND_METHOD()
6519 zend_function *fptr; in ZEND_METHOD() local
6525 ZEND_HASH_MAP_FOREACH_PTR(CG(function_table), fptr) { in ZEND_METHOD()
6526 if (fptr->common.type==ZEND_INTERNAL_FUNCTION in ZEND_METHOD()
6527 && fptr->internal_function.module == module) { in ZEND_METHOD()
6528 reflection_function_factory(fptr, NULL, &function); in ZEND_METHOD()
6529 zend_hash_update(Z_ARRVAL_P(return_value), fptr->common.function_name, &function); in ZEND_METHOD()