Lines Matching refs:alfi
375 autoload_func_info *alfi = (autoload_func_info*)Z_PTR_P(element); in autoload_func_info_dtor() local
376 if (!Z_ISUNDEF(alfi->obj)) { in autoload_func_info_dtor()
377 zval_ptr_dtor(&alfi->obj); in autoload_func_info_dtor()
379 if (alfi->func_ptr && in autoload_func_info_dtor()
380 UNEXPECTED(alfi->func_ptr->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) { in autoload_func_info_dtor()
381 zend_string_release(alfi->func_ptr->common.function_name); in autoload_func_info_dtor()
382 zend_free_trampoline(alfi->func_ptr); in autoload_func_info_dtor()
384 if (!Z_ISUNDEF(alfi->closure)) { in autoload_func_info_dtor()
385 zval_ptr_dtor(&alfi->closure); in autoload_func_info_dtor()
387 efree(alfi); in autoload_func_info_dtor()
396 autoload_func_info *alfi; in PHP_FUNCTION() local
425 alfi = zend_hash_get_current_data_ptr_ex(SPL_G(autoload_functions), &pos); in PHP_FUNCTION()
426 func = alfi->func_ptr; in PHP_FUNCTION()
429 memcpy(func, alfi->func_ptr, sizeof(zend_op_array)); in PHP_FUNCTION()
434 if (Z_ISUNDEF(alfi->obj)) { in PHP_FUNCTION()
437 fcic.calling_scope = alfi->ce; in PHP_FUNCTION()
438 if (alfi->ce && in PHP_FUNCTION()
440 !instanceof_function(called_scope, alfi->ce))) { in PHP_FUNCTION()
441 fcic.called_scope = alfi->ce; in PHP_FUNCTION()
446 fci.object = Z_OBJ(alfi->obj); in PHP_FUNCTION()
447 fcic.object = Z_OBJ(alfi->obj); in PHP_FUNCTION()
448 fcic.called_scope = Z_OBJCE(alfi->obj); in PHP_FUNCTION()
490 autoload_func_info alfi; in PHP_FUNCTION() local
500 alfi.ce = fcc.calling_scope; in PHP_FUNCTION()
501 alfi.func_ptr = fcc.function_handler; in PHP_FUNCTION()
504 if (!obj_ptr && alfi.func_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) { in PHP_FUNCTION()
514 …l_ce_LogicException, 0, "Passed array does not specify %s %smethod (%s)", alfi.func_ptr ? "a calla… in PHP_FUNCTION()
523 …l_ce_LogicException, 0, "Function '%s' not %s (%s)", ZSTR_VAL(func_name), alfi.func_ptr ? "callabl… in PHP_FUNCTION()
551 alfi.ce = fcc.calling_scope; in PHP_FUNCTION()
552 alfi.func_ptr = fcc.function_handler; in PHP_FUNCTION()
559 ZVAL_COPY(&alfi.closure, zcallable); in PHP_FUNCTION()
566 ZVAL_UNDEF(&alfi.closure); in PHP_FUNCTION()
579 if (!Z_ISUNDEF(alfi.closure)) { in PHP_FUNCTION()
580 Z_DELREF_P(&alfi.closure); in PHP_FUNCTION()
585 if (obj_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) { in PHP_FUNCTION()
590 ZVAL_OBJ(&alfi.obj, obj_ptr); in PHP_FUNCTION()
591 Z_ADDREF(alfi.obj); in PHP_FUNCTION()
593 ZVAL_UNDEF(&alfi.obj); in PHP_FUNCTION()
618 if (UNEXPECTED(alfi.func_ptr == &EG(trampoline))) { in PHP_FUNCTION()
621 memcpy(copy, alfi.func_ptr, sizeof(zend_op_array)); in PHP_FUNCTION()
622 alfi.func_ptr->common.function_name = NULL; in PHP_FUNCTION()
623 alfi.func_ptr = copy; in PHP_FUNCTION()
625 …if (zend_hash_add_mem(SPL_G(autoload_functions), lc_name, &alfi, sizeof(autoload_func_info)) == NU… in PHP_FUNCTION()
626 if (obj_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) { in PHP_FUNCTION()
627 Z_DELREF(alfi.obj); in PHP_FUNCTION()
629 if (!Z_ISUNDEF(alfi.closure)) { in PHP_FUNCTION()
630 Z_DELREF(alfi.closure); in PHP_FUNCTION()
632 if (UNEXPECTED(alfi.func_ptr->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) { in PHP_FUNCTION()
633 zend_string_release(alfi.func_ptr->common.function_name); in PHP_FUNCTION()
634 zend_free_trampoline(alfi.func_ptr); in PHP_FUNCTION()
744 autoload_func_info *alfi; in PHP_FUNCTION() local
764 ZEND_HASH_FOREACH_STR_KEY_PTR(SPL_G(autoload_functions), key, alfi) { in PHP_FUNCTION()
765 if (!Z_ISUNDEF(alfi->closure)) { in PHP_FUNCTION()
766 Z_ADDREF(alfi->closure); in PHP_FUNCTION()
767 add_next_index_zval(return_value, &alfi->closure); in PHP_FUNCTION()
768 } else if (alfi->func_ptr->common.scope) { in PHP_FUNCTION()
772 if (!Z_ISUNDEF(alfi->obj)) { in PHP_FUNCTION()
773 Z_ADDREF(alfi->obj); in PHP_FUNCTION()
774 add_next_index_zval(&tmp, &alfi->obj); in PHP_FUNCTION()
776 add_next_index_str(&tmp, zend_string_copy(alfi->ce->name)); in PHP_FUNCTION()
778 add_next_index_str(&tmp, zend_string_copy(alfi->func_ptr->common.function_name)); in PHP_FUNCTION()
781 …if (strncmp(ZSTR_VAL(alfi->func_ptr->common.function_name), "__lambda_func", sizeof("__lambda_func… in PHP_FUNCTION()
782 add_next_index_str(return_value, zend_string_copy(alfi->func_ptr->common.function_name)); in PHP_FUNCTION()