116#define ZEND_REF_TYPE_SOURCES(ref) \
119#define ZEND_REF_HAS_TYPE_SOURCES(ref) \
120 (ZEND_REF_TYPE_SOURCES(ref).ptr != NULL)
122#define ZEND_REF_FIRST_SOURCE(ref) \
123 (ZEND_PROPERTY_INFO_SOURCE_IS_LIST((ref)->sources.list) \
124 ? ZEND_PROPERTY_INFO_SOURCE_TO_LIST((ref)->sources.list)->ptr[0] \
125 : (ref)->sources.ptr)
223 "zval must be aligned by ZEND_MM_ALIGNMENT");
225#define ZEND_VM_STACK_HEADER_SLOTS \
226 ((sizeof(struct _zend_vm_stack) + sizeof(zval) - 1) / sizeof(zval))
228#define ZEND_VM_STACK_ELEMENTS(stack) \
229 (((zval*)(stack)) + ZEND_VM_STACK_HEADER_SLOTS)
239# define ZEND_ASSERT_VM_STACK(stack) ZEND_ASSERT(stack->top > (zval *) stack && stack->end > (zval *) stack && stack->top <= stack->end)
240# define ZEND_ASSERT_VM_STACK_GLOBAL ZEND_ASSERT(EG(vm_stack_top) > (zval *) EG(vm_stack) && EG(vm_stack_end) > (zval *) EG(vm_stack) && EG(vm_stack_top) <= EG(vm_stack_end))
242# define ZEND_ASSERT_VM_STACK(stack)
243# define ZEND_ASSERT_VM_STACK_GLOBAL
264 Z_PTR(
call->This) = object_or_called_scope;
275 if (
UNEXPECTED(used_stack > (
size_t)(((
char*)
EG(vm_stack_end)) - (
char*)
call))) {
281 EG(vm_stack_top) = (
zval*)((
char*)
call + used_stack);
294 return used_stack *
sizeof(
zval);
299 uint32_t used_stack = zend_vm_calc_used_stack(
num_args,
func);
301 return zend_vm_stack_push_call_frame_ex(used_stack,
call_info,
330 zval_ptr_dtor_nogc(
p);
345 EG(vm_stack_top) =
prev->top;
346 EG(vm_stack_end) =
prev->end;
367 if (
EXPECTED((uint32_t)(
EG(vm_stack_end) -
EG(vm_stack_top)) > additional_args)) {
368 EG(vm_stack_top) += additional_args;
419#define ZEND_USER_OPCODE_CONTINUE 0
420#define ZEND_USER_OPCODE_RETURN 1
421#define ZEND_USER_OPCODE_DISPATCH 2
422#define ZEND_USER_OPCODE_ENTER 3
423#define ZEND_USER_OPCODE_LEAVE 4
425#define ZEND_USER_OPCODE_DISPATCH_TO 0x100
443 uint32_t *arg_num_ptr,
void **cache_slot);
446#define CACHE_ADDR(num) \
447 ((void**)((char*)EX(run_time_cache) + (num)))
449#define CACHED_PTR(num) \
450 ((void**)((char*)EX(run_time_cache) + (num)))[0]
452#define CACHE_PTR(num, ptr) do { \
453 ((void**)((char*)EX(run_time_cache) + (num)))[0] = (ptr); \
456#define CACHED_POLYMORPHIC_PTR(num, ce) \
457 (EXPECTED(((void**)((char*)EX(run_time_cache) + (num)))[0] == (void*)(ce)) ? \
458 ((void**)((char*)EX(run_time_cache) + (num)))[1] : \
461#define CACHE_POLYMORPHIC_PTR(num, ce, ptr) do { \
462 void **slot = (void**)((char*)EX(run_time_cache) + (num)); \
467#define CACHED_PTR_EX(slot) \
470#define CACHE_PTR_EX(slot, ptr) do { \
474#define CACHED_POLYMORPHIC_PTR_EX(slot, ce) \
475 (EXPECTED((slot)[0] == (ce)) ? (slot)[1] : NULL)
477#define CACHE_POLYMORPHIC_PTR_EX(slot, ce, ptr) do { \
482#define CACHE_SPECIAL (1<<0)
484#define IS_SPECIAL_CACHE_VAL(ptr) \
485 (((uintptr_t)(ptr)) & CACHE_SPECIAL)
487#define ENCODE_SPECIAL_CACHE_NUM(num) \
488 ((void*)((((uintptr_t)(num)) << 1) | CACHE_SPECIAL))
490#define DECODE_SPECIAL_CACHE_NUM(ptr) \
491 (((uintptr_t)(ptr)) >> 1)
493#define ENCODE_SPECIAL_CACHE_PTR(ptr) \
494 ((void*)(((uintptr_t)(ptr)) | CACHE_SPECIAL))
496#define DECODE_SPECIAL_CACHE_PTR(ptr) \
497 ((void*)(((uintptr_t)(ptr)) & ~CACHE_SPECIAL))
499#define SKIP_EXT_OPLINE(opline) do { \
500 while (UNEXPECTED((opline)->opcode >= ZEND_EXT_STMT \
501 && (opline)->opcode <= ZEND_TICKS)) { \
506#define ZEND_CLASS_HAS_TYPE_HINTS(ce) ((ce->ce_flags & ZEND_ACC_HAS_TYPE_HINTS) == ZEND_ACC_HAS_TYPE_HINTS)
507#define ZEND_CLASS_HAS_READONLY_PROPS(ce) ((ce->ce_flags & ZEND_ACC_HAS_READONLY_PROPS) == ZEND_ACC_HAS_READONLY_PROPS)
517#define ZEND_REF_ADD_TYPE_SOURCE(ref, source) \
518 zend_ref_add_type_source(&ZEND_REF_TYPE_SOURCES(ref), source)
520#define ZEND_REF_DEL_TYPE_SOURCE(ref, source) \
521 zend_ref_del_type_source(&ZEND_REF_TYPE_SOURCES(ref), source)
523#define ZEND_REF_FOREACH_TYPE_SOURCES(ref, prop) do { \
524 zend_property_info_source_list *_source_list = &ZEND_REF_TYPE_SOURCES(ref); \
525 zend_property_info **_prop, **_end; \
526 zend_property_info_list *_list; \
527 if (_source_list->ptr) { \
528 if (ZEND_PROPERTY_INFO_SOURCE_IS_LIST(_source_list->list)) { \
529 _list = ZEND_PROPERTY_INFO_SOURCE_TO_LIST(_source_list->list); \
530 _prop = _list->ptr; \
531 _end = _list->ptr + _list->num; \
533 _prop = &_source_list->ptr; \
536 for (; _prop < _end; _prop++) { \
539#define ZEND_REF_FOREACH_TYPE_SOURCES_END() \
prev(array|object &$array)
count(Countable|array $value, int $mode=COUNT_NORMAL)
zend_ffi_ctype_name_buf buf
#define efree_size(ptr, size)
#define ZEND_MM_ALIGNED_SIZE(size)
#define ZEND_USER_CODE(type)
#define ZEND_CALL_ALLOCATED
#define ZEND_CALL_FRAME_SLOT
int(* user_opcode_handler_t)(zend_execute_data *execute_data)
struct _zend_op_array zend_op_array
struct _zend_class_constant zend_class_constant
struct _zend_property_info zend_property_info
#define ZEND_CALL_NUM_ARGS(call)
#define ZEND_CALL_INFO(call)
struct _zend_arg_info zend_arg_info
#define ZEND_CALL_FREE_EXTRA_ARGS
struct _zend_internal_function zend_internal_function
#define ZEND_CALL_VAR_NUM(call, n)
#define ZEND_CALL_ARG(call, n)
ZEND_API void zend_init_func_execute_data(zend_execute_data *ex, zend_op_array *op_array, zval *return_value)
ZEND_API const zend_internal_function zend_pass_function
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_deprecated_class_constant(const zend_class_constant *c, const zend_string *constant_name)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_deprecated_function(const zend_function *fbc)
ZEND_API void execute_internal(zend_execute_data *execute_data, zval *return_value)
ZEND_API void zend_init_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value)
ZEND_API bool ZEND_FASTCALL zend_verify_ref_assignable_zval(zend_reference *ref, zval *zv, bool strict)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_use_resource_as_offset(const zval *dim)
ZEND_COLD void ZEND_FASTCALL zend_param_must_be_ref(const zend_function *func, uint32_t arg_num)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_missing_arg_error(zend_execute_data *execute_data)
ZEND_API void zend_init_code_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_false_to_array_deprecated(void)
ZEND_API void ZEND_FASTCALL zend_free_extra_named_params(zend_array *extra_named_params)
ZEND_API HashTable * zend_unfinished_execution_gc_ex(zend_execute_data *execute_data, zend_execute_data *call, zend_get_gc_buffer *gc_buffer, bool suspended_by_yield)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_readonly_property_indirect_modification_error(const zend_property_info *info)
ZEND_API zend_class_entry * zend_get_called_scope(zend_execute_data *ex)
ZEND_API bool zend_verify_ref_array_assignable(zend_reference *ref)
ZEND_API void zend_vm_stack_init_ex(size_t page_size)
ZEND_API void zend_unfinished_calls_gc(zend_execute_data *execute_data, zend_execute_data *call, uint32_t op_num, zend_get_gc_buffer *buf)
#define ZEND_REF_HAS_TYPE_SOURCES(ref)
ZEND_API zend_class_entry * zend_lookup_class(zend_string *name)
ZEND_API bool zend_check_user_type_slow(zend_type *type, zval *arg, zend_reference *ref, void **cache_slot, bool is_return_type)
ZEND_API void ZEND_FASTCALL zend_init_func_run_time_cache(zend_op_array *op_array)
ZEND_API zval * zend_assign_to_typed_ref_ex(zval *variable_ptr, zval *value, uint8_t value_type, bool strict, zend_refcounted **garbage_ptr)
ZEND_COLD void zend_verify_class_constant_type_error(const zend_class_constant *c, const zend_string *name, const zval *constant)
ZEND_API void zend_frameless_observed_call(zend_execute_data *execute_data)
ZEND_API ZEND_COLD zval *ZEND_FASTCALL zend_undefined_offset_write(HashTable *ht, zend_long lval)
ZEND_API const char * get_function_arg_name(const zend_function *func, uint32_t arg_num)
ZEND_API const char * get_active_function_name(void)
ZEND_API zend_result ZEND_FASTCALL zval_update_constant(zval *pp)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_readonly_property_modification_error_ex(const char *class_name, const char *prop_name)
ZEND_API uint32_t zend_get_executed_lineno(void)
ZEND_API zend_class_entry * zend_get_executed_scope(void)
#define ZEND_VM_STACK_ELEMENTS(stack)
ZEND_API void zend_clean_and_cache_symbol_table(zend_array *symbol_table)
ZEND_API zend_string * get_function_or_method_name(const zend_function *func)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_fcall_interrupt(zend_execute_data *call)
ZEND_API ZEND_ATTRIBUTE_DEPRECATED HashTable * zend_unfinished_execution_gc(zend_execute_data *execute_data, zend_execute_data *call, zend_get_gc_buffer *gc_buffer)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_invalid_class_constant_type_error(uint8_t type)
#define ZEND_ASSERT_VM_STACK_GLOBAL
ZEND_COLD void zend_magic_get_property_type_inconsistency_error(const zend_property_info *info, const zval *property)
ZEND_COLD void zend_match_unhandled_error(const zval *value)
ZEND_API zend_function *ZEND_FASTCALL zend_fetch_function(zend_string *name)
ZEND_API const char * zend_get_executed_filename(void)
void shutdown_destructors(void)
ZEND_API ZEND_COLD void zend_verify_arg_error(const zend_function *zf, const zend_arg_info *arg_info, uint32_t arg_num, zval *value)
void shutdown_executor(void)
ZEND_API void(* zend_execute_ex)(zend_execute_data *execute_data)
ZEND_API void(* zend_execute_internal)(zend_execute_data *execute_data, zval *return_value)
ZEND_API zend_object * zend_get_this_object(zend_execute_data *ex)
ZEND_API bool zend_is_valid_class_name(zend_string *name)
ZEND_API void zend_cleanup_unfinished_execution(zend_execute_data *execute_data, uint32_t op_num, uint32_t catch_op_num)
ZEND_API ZEND_COLD void zend_verify_never_error(const zend_function *zf)
ZEND_API void zend_execute(zend_op_array *op_array, zval *return_value)
ZEND_API void zend_vm_stack_destroy(void)
ZEND_API void zend_vm_stack_init(void)
ZEND_API void execute_ex(zend_execute_data *execute_data)
ZEND_API zend_string * zend_get_executed_filename_ex(void)
ZEND_API zend_class_entry * zend_fetch_class(zend_string *class_name, uint32_t fetch_type)
ZEND_API void zend_set_timeout(zend_long seconds, bool reset_signals)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_asymmetric_visibility_property_modification_error(const zend_property_info *info, const char *operation)
ZEND_API zend_class_entry * zend_fetch_class_by_name(zend_string *class_name, zend_string *lcname, uint32_t fetch_type)
ZEND_API void ZEND_FASTCALL zend_free_compiled_variables(zend_execute_data *execute_data)
ZEND_API zend_result ZEND_FASTCALL zend_handle_undef_args(zend_execute_data *call)
ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref(const zend_property_info *prop_info, zval *orig_val, bool strict)
ZEND_API zend_function *ZEND_FASTCALL zend_fetch_function_str(const char *name, size_t len)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_object_released_while_assigning_to_property_error(const zend_property_info *info)
ZEND_API void zend_shutdown_executor_values(bool fast_shutdown)
ZEND_API bool zend_gcc_global_regs(void)
ZEND_API zval * zend_assign_to_typed_ref(zval *variable_ptr, zval *value, uint8_t value_type, bool strict)
ZEND_API ZEND_COLD void zend_throw_ref_type_error_type(const zend_property_info *prop1, const zend_property_info *prop2, const zval *zv)
ZEND_API zend_result ZEND_FASTCALL zval_update_constant_with_ctx(zval *pp, zend_class_entry *scope, zend_ast_evaluate_ctx *ctx)
ZEND_API void zend_fetch_dimension_const(zval *result, zval *container, zval *dim, int type)
ZEND_API const char * get_active_function_arg_name(uint32_t arg_num)
ZEND_API const char * get_active_class_name(const char **space)
ZEND_API zend_result ZEND_FASTCALL zval_update_constant_ex(zval *pp, zend_class_entry *scope)
ZEND_API void ZEND_FASTCALL zend_ref_add_type_source(zend_property_info_source_list *source_list, zend_property_info *prop)
ZEND_API zval * zend_get_compiled_variable_value(const zend_execute_data *execute_data_ptr, uint32_t var)
ZEND_API zend_result zend_eval_string(const char *str, zval *retval_ptr, const char *string_name)
ZEND_API bool zend_verify_scalar_type_hint(uint32_t type_mask, zval *arg, bool strict, bool is_internal_arg)
ZEND_API bool zend_is_executing(void)
ZEND_API zend_class_entry *(* zend_autoload)(zend_string *name, zend_string *lc_name)
ZEND_API ZEND_COLD zval *ZEND_FASTCALL zend_undefined_index_write(HashTable *ht, zend_string *offset)
ZEND_API ZEND_COLD void zend_wrong_string_offset_error(void)
ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref_ex(const zend_property_info *prop_info, zval *orig_val, bool strict, zend_verify_prop_assignable_by_ref_context context)
ZEND_API zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_call_stack_size_error(void)
ZEND_API void zend_unset_timeout(void)
ZEND_API bool zend_verify_property_type(const zend_property_info *info, zval *property, bool strict)
ZEND_API user_opcode_handler_t zend_get_user_opcode_handler(uint8_t opcode)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_cannot_add_element(void)
ZEND_API ZEND_NORETURN void ZEND_FASTCALL zend_timeout(void)
ZEND_API void ZEND_FASTCALL zend_ref_del_type_source(zend_property_info_source_list *source_list, const zend_property_info *prop)
ZEND_COLD void zend_verify_property_type_error(const zend_property_info *info, const zval *property)
ZEND_API bool zend_verify_class_constant_type(zend_class_constant *c, const zend_string *name, zval *constant)
ZEND_API bool ZEND_FASTCALL zend_asymmetric_property_has_set_access(const zend_property_info *prop_info)
zend_execute_data * zend_vm_stack_copy_call_frame(zend_execute_data *call, uint32_t passed_args, uint32_t additional_args)
ZEND_API zval * zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const zend_execute_data *execute_data)
ZEND_API zend_string * get_active_function_or_method_name(void)
ZEND_API zend_class_entry * zend_fetch_class_with_scope(zend_string *class_name, uint32_t fetch_type, zend_class_entry *scope)
ZEND_API zend_result zend_eval_stringl_ex(const char *str, size_t str_len, zval *retval_ptr, const char *string_name, bool handle_exceptions)
ZEND_API void * zend_vm_stack_extend(size_t size)
ZEND_API zend_result zend_eval_stringl(const char *str, size_t str_len, zval *retval_ptr, const char *string_name)
ZEND_API zend_result zend_eval_string_ex(const char *str, zval *retval_ptr, const char *string_name, bool handle_exceptions)
ZEND_API ZEND_COLD void zend_throw_ref_type_error_zval(const zend_property_info *prop, const zval *zv)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_cannot_pass_by_reference(uint32_t arg_num)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_readonly_property_modification_error(const zend_property_info *info)
zval *ZEND_FASTCALL zend_handle_named_arg(zend_execute_data **call_ptr, zend_string *arg_name, uint32_t *arg_num_ptr, void **cache_slot)
ZEND_API zend_result zend_set_user_opcode_handler(uint8_t opcode, user_opcode_handler_t handler)
zend_verify_prop_assignable_by_ref_context
@ ZEND_VERIFY_PROP_ASSIGNABLE_BY_REF_CONTEXT_MAGIC_GET
@ ZEND_VERIFY_PROP_ASSIGNABLE_BY_REF_CONTEXT_ASSIGNMENT
ZEND_API ZEND_COLD void zend_verify_return_error(const zend_function *zf, zval *value)
ZEND_API zend_class_entry * zend_lookup_class_ex(zend_string *name, zend_string *lcname, uint32_t flags)
ZEND_API zend_function * zend_active_function_ex(zend_execute_data *execute_data)
union _zend_function zend_function
struct _zend_vm_stack * zend_vm_stack
struct _zend_string zend_string
#define ZEND_ATTRIBUTE_DEPRECATED
#define zend_never_inline
#define EXPECTED(condition)
#define zend_always_inline
#define ZEND_CONST_COND(_condition, _default)
#define ZEND_STATIC_ASSERT(c, m)
#define ZEND_UNREACHABLE()
#define UNEXPECTED(condition)
struct _zend_array zend_array
struct _zend_class_entry zend_class_entry
struct _zend_object zend_object
#define Z_ISREF_P(zval_p)
#define Z_REFVAL_P(zval_p)
#define GC_DTOR_NO_REF(p)
#define Z_OPT_REFCOUNTED_P(zval_p)
#define Z_REFCOUNTED_P(zval_p)
struct _zend_array HashTable
#define Z_COUNTED_P(zval_p)
struct _zend_refcounted zend_refcounted
ZEND_RESULT_CODE zend_result
struct _zend_execute_data zend_execute_data
#define ZVAL_COPY_VALUE(z, v)
struct _zend_reference zend_reference
zend_property_info * prop_info
fbc internal_function handler(call, ret)
zend_refcounted * garbage