Lines Matching refs:common
76 bool is_fake_closure = (func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE) != 0; in zend_valid_closure_binding()
78 if (func->common.fn_flags & ZEND_ACC_STATIC) { in zend_valid_closure_binding()
83 if (is_fake_closure && func->common.scope && in zend_valid_closure_binding()
84 !instanceof_function(Z_OBJCE_P(newthis), func->common.scope)) { in zend_valid_closure_binding()
87 ZSTR_VAL(func->common.scope->name), in zend_valid_closure_binding()
88 ZSTR_VAL(func->common.function_name), in zend_valid_closure_binding()
92 } else if (is_fake_closure && func->common.scope in zend_valid_closure_binding()
93 && !(func->common.fn_flags & ZEND_ACC_STATIC)) { in zend_valid_closure_binding()
97 && (func->common.fn_flags & ZEND_ACC_USES_THIS)) { in zend_valid_closure_binding()
102 if (scope && scope != func->common.scope && scope->type == ZEND_INTERNAL_CLASS) { in zend_valid_closure_binding()
109 if (is_fake_closure && scope != func->common.scope) { in zend_valid_closure_binding()
110 if (func->common.scope == NULL) { in zend_valid_closure_binding()
157 if (closure->func.common.fn_flags & ZEND_ACC_GENERATOR) { in ZEND_METHOD()
184 my_function->common.scope = newclass; in ZEND_METHOD()
192 && (closure->func.common.scope != newclass in ZEND_METHOD()
193 || (closure->func.common.fn_flags & ZEND_ACC_HEAP_RT_CACHE))) { in ZEND_METHOD()
205 if (fci_cache.function_handler->common.fn_flags & ZEND_ACC_HEAP_RT_CACHE) { in ZEND_METHOD()
230 ce = closure->func.common.scope; in do_closure_bind()
301 ZVAL_STR(&fci.params[0], EX(func)->common.function_name); in ZEND_NAMED_FUNCTION()
340 if (mptr->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) { in zend_create_closure_from_callable()
343 && zend_string_equals(mptr->common.function_name, ZSTR_KNOWN(ZEND_STR_MAGIC_INVOKE))) { in zend_create_closure_from_callable()
349 if (!mptr->common.scope) { in zend_create_closure_from_callable()
352 if (mptr->common.fn_flags & ZEND_ACC_STATIC) { in zend_create_closure_from_callable()
353 if (!mptr->common.scope->__callstatic) { in zend_create_closure_from_callable()
357 if (!mptr->common.scope->__call) { in zend_create_closure_from_callable()
364 call.fn_flags = mptr->common.fn_flags & ZEND_ACC_STATIC; in zend_create_closure_from_callable()
366 call.function_name = mptr->common.function_name; in zend_create_closure_from_callable()
367 call.scope = mptr->common.scope; in zend_create_closure_from_callable()
376 zend_create_fake_closure(return_value, mptr, mptr->common.scope, fcc.called_scope, &instance); in zend_create_closure_from_callable()
378 zend_create_fake_closure(return_value, mptr, mptr->common.scope, fcc.called_scope, NULL); in zend_create_closure_from_callable()
382 zend_string_release(mptr->common.function_name); in zend_create_closure_from_callable()
430 …if (!((lhs->func.common.fn_flags & ZEND_ACC_FAKE_CLOSURE) && (rhs->func.common.fn_flags & ZEND_ACC… in zend_closure_compare()
450 if (lhs->func.common.scope != rhs->func.common.scope) { in zend_closure_compare()
454 if (!zend_string_equals(lhs->func.common.function_name, rhs->func.common.function_name)) { in zend_closure_compare()
469 invoke->common = closure->func.common; in zend_get_closure_invoke_method()
477 ZEND_ACC_PUBLIC | ZEND_ACC_CALL_VIA_HANDLER | (closure->func.common.fn_flags & keep_flags); in zend_get_closure_invoke_method()
478 …if (closure->func.type != ZEND_INTERNAL_FUNCTION || (closure->func.common.fn_flags & ZEND_ACC_USER… in zend_get_closure_invoke_method()
529 zend_string_release(closure->func.common.function_name); in zend_closure_free_storage()
557 closure->func.common.scope, closure->called_scope, &closure->this_ptr); in zend_closure_clone()
584 struct _zend_arg_info *arg_info = closure->func.common.arg_info; in zend_closure_get_debug_info()
586 …bool zstr_args = (closure->func.type == ZEND_USER_FUNCTION) || (closure->func.common.fn_flags & ZE… in zend_closure_get_debug_info()
593 if (closure->func.common.scope) { in zend_closure_get_debug_info()
594 zend_string *class_name = closure->func.common.scope->name; in zend_closure_get_debug_info()
595 zend_string *func_name = closure->func.common.function_name; in zend_closure_get_debug_info()
603 ZVAL_STR_COPY(&val, closure->func.common.function_name); in zend_closure_get_debug_info()
607 ZVAL_STR_COPY(&val, closure->func.common.function_name); in zend_closure_get_debug_info()
648 (closure->func.common.num_args || in zend_closure_get_debug_info()
649 (closure->func.common.fn_flags & ZEND_ACC_VARIADIC))) { in zend_closure_get_debug_info()
650 uint32_t i, num_args, required = closure->func.common.required_num_args; in zend_closure_get_debug_info()
654 num_args = closure->func.common.num_args; in zend_closure_get_debug_info()
655 if (closure->func.common.fn_flags & ZEND_ACC_VARIADIC) { in zend_closure_get_debug_info()
748 closure->func.common.fn_flags |= ZEND_ACC_CLOSURE; in zend_create_closure_ex()
749 closure->func.common.fn_flags &= ~ZEND_ACC_IMMUTABLE; in zend_create_closure_ex()
777 || func->common.scope != scope in zend_create_closure_ex()
778 || (func->common.fn_flags & ZEND_ACC_HEAP_RT_CACHE) in zend_create_closure_ex()
781 && (func->common.fn_flags & ZEND_ACC_CLOSURE) in zend_create_closure_ex()
782 && (func->common.scope == scope || in zend_create_closure_ex()
783 !(func->common.fn_flags & ZEND_ACC_IMMUTABLE))) { in zend_create_closure_ex()
786 if (func->common.scope != scope) { in zend_create_closure_ex()
787 func->common.scope = scope; in zend_create_closure_ex()
802 closure->func.common.fn_flags |= ZEND_ACC_CLOSURE; in zend_create_closure_ex()
814 if (!func->common.scope) { in zend_create_closure_ex()
824 closure->func.common.scope = scope; in zend_create_closure_ex()
827 closure->func.common.fn_flags |= ZEND_ACC_PUBLIC; in zend_create_closure_ex()
828 …if (this_ptr && Z_TYPE_P(this_ptr) == IS_OBJECT && (closure->func.common.fn_flags & ZEND_ACC_STATI… in zend_create_closure_ex()
838 /* is_fake */ (func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE) != 0); in zend_create_closure()
848 closure->func.common.fn_flags |= ZEND_ACC_FAKE_CLOSURE; in zend_create_fake_closure()
864 if (mptr->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) { in zend_closure_from_frame()
867 && zend_string_equals(mptr->common.function_name, ZSTR_KNOWN(ZEND_STR_MAGIC_INVOKE))) { in zend_closure_from_frame()
874 …trampoline.fn_flags = mptr->common.fn_flags & (ZEND_ACC_STATIC | ZEND_ACC_VARIADIC | ZEND_ACC_RETU… in zend_closure_from_frame()
876 trampoline.function_name = mptr->common.function_name; in zend_closure_from_frame()
877 trampoline.scope = mptr->common.scope; in zend_closure_from_frame()
890 zend_create_fake_closure(return_value, mptr, mptr->common.scope, Z_OBJCE(instance), &instance); in zend_closure_from_frame()
892 zend_create_fake_closure(return_value, mptr, mptr->common.scope, Z_CE(call->This), NULL); in zend_closure_from_frame()
896 zend_string_release(mptr->common.function_name); in zend_closure_from_frame()