35#define SET_UNUSED(op) do { \
36 op ## _type = IS_UNUSED; \
37 op.num = (uint32_t) -1; \
40#define MAKE_NOP(opline) do { \
41 (opline)->opcode = ZEND_NOP; \
42 SET_UNUSED((opline)->op1); \
43 SET_UNUSED((opline)->op2); \
44 SET_UNUSED((opline)->result); \
47#define RESET_DOC_COMMENT() do { \
48 if (CG(doc_comment)) { \
49 zend_string_release_ex(CG(doc_comment), 0); \
50 CG(doc_comment) = NULL; \
61# define ZEND_USE_ABS_JMP_ADDR 1
62# define ZEND_USE_ABS_CONST_ADDR 1
64# define ZEND_USE_ABS_JMP_ADDR 0
65# define ZEND_USE_ABS_CONST_ADDR 0
73#if ZEND_USE_ABS_JMP_ADDR
78#if ZEND_USE_ABS_CONST_ADDR
148#ifdef ZEND_VERIFY_TYPE_INFERENCE
149 uint32_t op1_use_type;
150 uint32_t op2_use_type;
151 uint32_t result_use_type;
152 uint32_t op1_def_type;
153 uint32_t op2_def_type;
154 uint32_t result_def_type;
179#define ZEND_LIVE_TMPVAR 0
180#define ZEND_LIVE_LOOP 1
181#define ZEND_LIVE_SILENCE 2
182#define ZEND_LIVE_ROPE 3
183#define ZEND_LIVE_NEW 4
184#define ZEND_LIVE_MASK 7
218#define ZEND_ACC_PUBLIC (1 << 0)
219#define ZEND_ACC_PROTECTED (1 << 1)
220#define ZEND_ACC_PRIVATE (1 << 2)
223#define ZEND_ACC_CHANGED (1 << 3)
226#define ZEND_ACC_STATIC (1 << 4)
229#define ZEND_ACC_FINAL (1 << 5)
232#define ZEND_ACC_ABSTRACT (1 << 6)
233#define ZEND_ACC_EXPLICIT_ABSTRACT_CLASS (1 << 6)
236#define ZEND_ACC_READONLY (1 << 7)
240#define ZEND_ACC_IMMUTABLE (1 << 7)
243#define ZEND_ACC_HAS_TYPE_HINTS (1 << 8)
246#define ZEND_ACC_TOP_LEVEL (1 << 9)
249#define ZEND_ACC_PRELOADED (1 << 10)
254#define ZEND_CLASS_CONST_IS_CASE (1 << 6)
260#define ZEND_ACC_PROMOTED (1 << 8)
263#define ZEND_ACC_VIRTUAL (1 << 9)
266#define ZEND_ACC_PUBLIC_SET (1 << 10)
267#define ZEND_ACC_PROTECTED_SET (1 << 11)
268#define ZEND_ACC_PRIVATE_SET (1 << 12)
274#define ZEND_ACC_INTERFACE (1 << 0)
275#define ZEND_ACC_TRAIT (1 << 1)
276#define ZEND_ACC_ANON_CLASS (1 << 2)
277#define ZEND_ACC_ENUM (1 << 28)
280#define ZEND_ACC_LINKED (1 << 3)
284#define ZEND_ACC_IMPLICIT_ABSTRACT_CLASS (1 << 4)
288#define ZEND_ACC_USE_GUARDS (1 << 11)
291#define ZEND_ACC_CONSTANTS_UPDATED (1 << 12)
294#define ZEND_ACC_NO_DYNAMIC_PROPERTIES (1 << 13)
297#define ZEND_HAS_STATIC_IN_METHODS (1 << 14)
301#define ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES (1 << 15)
304#define ZEND_ACC_READONLY_CLASS (1 << 16)
307#define ZEND_ACC_RESOLVED_PARENT (1 << 17)
310#define ZEND_ACC_RESOLVED_INTERFACES (1 << 18)
313#define ZEND_ACC_UNRESOLVED_VARIANCE (1 << 19)
316#define ZEND_ACC_NEARLY_LINKED (1 << 20)
318#define ZEND_ACC_HAS_READONLY_PROPS (1 << 21)
321#define ZEND_ACC_CACHED (1 << 22)
324#define ZEND_ACC_CACHEABLE (1 << 23)
326#define ZEND_ACC_HAS_AST_CONSTANTS (1 << 24)
327#define ZEND_ACC_HAS_AST_PROPERTIES (1 << 25)
328#define ZEND_ACC_HAS_AST_STATICS (1 << 26)
331#define ZEND_ACC_FILE_CACHED (1 << 27)
334#define ZEND_ACC_NOT_SERIALIZABLE (1 << 29)
340#define ZEND_ACC_DEPRECATED (1 << 11)
343#define ZEND_ACC_RETURN_REFERENCE (1 << 12)
346#define ZEND_ACC_HAS_RETURN_TYPE (1 << 13)
349#define ZEND_ACC_VARIADIC (1 << 14)
352#define ZEND_ACC_HAS_FINALLY_BLOCK (1 << 15)
356#define ZEND_ACC_EARLY_BINDING (1 << 16)
359#define ZEND_ACC_USES_THIS (1 << 17)
363#define ZEND_ACC_CALL_VIA_TRAMPOLINE (1 << 18)
366#define ZEND_ACC_NEVER_CACHE (1 << 19)
369#define ZEND_ACC_TRAIT_CLONE (1 << 20)
372#define ZEND_ACC_CTOR (1 << 21)
375#define ZEND_ACC_CLOSURE (1 << 22)
376#define ZEND_ACC_FAKE_CLOSURE (1 << 23)
378#define ZEND_ACC_GENERATOR (1 << 24)
381#define ZEND_ACC_DONE_PASS_TWO (1 << 25)
384#define ZEND_ACC_ARENA_ALLOCATED (1 << 25)
387#define ZEND_ACC_HEAP_RT_CACHE (1 << 26)
390#define ZEND_ACC_USER_ARG_INFO (1 << 26)
393#define ZEND_ACC_COMPILE_TIME_EVAL (1 << 27)
396#define ZEND_ACC_OVERRIDE (1 << 28)
399#define ZEND_ACC_STRICT_TYPES (1U << 31)
401#define ZEND_ACC_PPP_MASK (ZEND_ACC_PUBLIC | ZEND_ACC_PROTECTED | ZEND_ACC_PRIVATE)
402#define ZEND_ACC_PPP_SET_MASK (ZEND_ACC_PUBLIC_SET | ZEND_ACC_PROTECTED_SET | ZEND_ACC_PRIVATE_SET)
404static zend_always_inline uint32_t zend_visibility_to_set_visibility(uint32_t visibility)
406 switch (visibility) {
418#define ZEND_ACC_CALL_VIA_HANDLER ZEND_ACC_CALL_VIA_TRAMPOLINE
420#define ZEND_ACC_UNINSTANTIABLE ( \
421 ZEND_ACC_INTERFACE | \
423 ZEND_ACC_IMPLICIT_ABSTRACT_CLASS | \
424 ZEND_ACC_EXPLICIT_ABSTRACT_CLASS | \
428#define ZEND_SHORT_CIRCUITING_CHAIN_MASK 0x3
429#define ZEND_SHORT_CIRCUITING_CHAIN_EXPR 0
430#define ZEND_SHORT_CIRCUITING_CHAIN_ISSET 1
431#define ZEND_SHORT_CIRCUITING_CHAIN_EMPTY 2
434#define ZEND_JMP_NULL_BP_VAR_IS 4
438#define ZEND_PROPERTY_HOOK_COUNT 2
439#define ZEND_PROPERTY_HOOK_STRUCT_SIZE (sizeof(zend_function*) * ZEND_PROPERTY_HOOK_COUNT)
442#define ZEND_VIRTUAL_PROPERTY_OFFSET ((uint32_t)-1)
459#define OBJ_PROP(obj, offset) \
460 ((zval*)((char*)(obj) + offset))
461#define OBJ_PROP_NUM(obj, num) \
462 (&(obj)->properties_table[(num)])
463#define OBJ_PROP_TO_OFFSET(num) \
464 ((uint32_t)(XtOffsetOf(zend_object, properties_table) + sizeof(zval) * (num)))
465#define OBJ_PROP_TO_NUM(offset) \
466 (((offset) - OBJ_PROP_TO_OFFSET(0)) / sizeof(zval))
467#define OBJ_PROP_SLOT_TO_OFFSET(obj, slot) \
468 ((uintptr_t)(slot) - (uintptr_t)(obj))
478#define ZEND_CLASS_CONST_FLAGS(c) Z_CONSTANT_FLAGS((c)->value)
555#define ZEND_RETURN_VALUE 0
556#define ZEND_RETURN_REFERENCE 1
558#define INTERNAL_FUNCTION_PARAMETERS zend_execute_data *execute_data, zval *return_value
559#define INTERNAL_FUNCTION_PARAM_PASSTHRU execute_data, return_value
588#define ZEND_FN_SCOPE_NAME(function) ((function) && (function)->common.scope ? ZSTR_VAL((function)->common.scope->name) : "")
627#define ZEND_CALL_HAS_THIS IS_OBJECT_EX
630#define ZEND_CALL_FUNCTION (0 << 16)
631#define ZEND_CALL_CODE (1 << 16)
632#define ZEND_CALL_NESTED (0 << 17)
633#define ZEND_CALL_TOP (1 << 17)
634#define ZEND_CALL_ALLOCATED (1 << 18)
635#define ZEND_CALL_FREE_EXTRA_ARGS (1 << 19)
636#define ZEND_CALL_HAS_SYMBOL_TABLE (1 << 20)
637#define ZEND_CALL_RELEASE_THIS (1 << 21)
638#define ZEND_CALL_CLOSURE (1 << 22)
639#define ZEND_CALL_FAKE_CLOSURE (1 << 23)
640#define ZEND_CALL_GENERATOR (1 << 24)
641#define ZEND_CALL_DYNAMIC (1 << 25)
642#define ZEND_CALL_MAY_HAVE_UNDEF (1 << 26)
643#define ZEND_CALL_HAS_EXTRA_NAMED_PARAMS (1 << 27)
644#define ZEND_CALL_OBSERVED (1 << 28)
647#define ZEND_CALL_JIT_RESERVED (1 << 29)
648#define ZEND_CALL_NEEDS_REATTACH (1 << 30)
649#define ZEND_CALL_SEND_ARG_BY_REF (1u << 31)
651#define ZEND_CALL_NESTED_FUNCTION (ZEND_CALL_FUNCTION | ZEND_CALL_NESTED)
652#define ZEND_CALL_NESTED_CODE (ZEND_CALL_CODE | ZEND_CALL_NESTED)
653#define ZEND_CALL_TOP_FUNCTION (ZEND_CALL_TOP | ZEND_CALL_FUNCTION)
654#define ZEND_CALL_TOP_CODE (ZEND_CALL_CODE | ZEND_CALL_TOP)
656#define ZEND_CALL_INFO(call) \
657 Z_TYPE_INFO((call)->This)
659#define ZEND_CALL_KIND_EX(call_info) \
660 (call_info & (ZEND_CALL_CODE | ZEND_CALL_TOP))
662#define ZEND_CALL_KIND(call) \
663 ZEND_CALL_KIND_EX(ZEND_CALL_INFO(call))
665#define ZEND_ADD_CALL_FLAG_EX(call_info, flag) do { \
666 call_info |= (flag); \
669#define ZEND_DEL_CALL_FLAG_EX(call_info, flag) do { \
670 call_info &= ~(flag); \
673#define ZEND_ADD_CALL_FLAG(call, flag) do { \
674 ZEND_ADD_CALL_FLAG_EX(Z_TYPE_INFO((call)->This), flag); \
677#define ZEND_DEL_CALL_FLAG(call, flag) do { \
678 ZEND_DEL_CALL_FLAG_EX(Z_TYPE_INFO((call)->This), flag); \
681#define ZEND_CALL_NUM_ARGS(call) \
682 (call)->This.u2.num_args
686 "zval must be aligned by ZEND_MM_ALIGNMENT");
688#define ZEND_CALL_FRAME_SLOT \
689 ((int)((sizeof(zend_execute_data) + sizeof(zval) - 1) / sizeof(zval)))
691#define ZEND_CALL_VAR(call, n) \
692 ((zval*)(((char*)(call)) + ((int)(n))))
694#define ZEND_CALL_VAR_NUM(call, n) \
695 (((zval*)(call)) + (ZEND_CALL_FRAME_SLOT + ((int)(n))))
697#define ZEND_CALL_ARG(call, n) \
698 ZEND_CALL_VAR_NUM(call, ((int)(n)) - 1)
700#define EX(element) ((execute_data)->element)
702#define EX_CALL_INFO() ZEND_CALL_INFO(execute_data)
703#define EX_CALL_KIND() ZEND_CALL_KIND(execute_data)
704#define EX_NUM_ARGS() ZEND_CALL_NUM_ARGS(execute_data)
706#define ZEND_CALL_USES_STRICT_TYPES(call) \
707 (((call)->func->common.fn_flags & ZEND_ACC_STRICT_TYPES) != 0)
709#define EX_USES_STRICT_TYPES() \
710 ZEND_CALL_USES_STRICT_TYPES(execute_data)
712#define ZEND_ARG_USES_STRICT_TYPES() \
713 (EG(current_execute_data)->prev_execute_data && \
714 EG(current_execute_data)->prev_execute_data->func && \
715 ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data)->prev_execute_data))
717#define ZEND_FLF_ARG_USES_STRICT_TYPES() \
718 (EG(current_execute_data) && \
719 EG(current_execute_data)->func && \
720 ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data)))
722#define ZEND_RET_USES_STRICT_TYPES() \
723 ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data))
725#define EX_VAR(n) ZEND_CALL_VAR(execute_data, n)
726#define EX_VAR_NUM(n) ZEND_CALL_VAR_NUM(execute_data, n)
728#define EX_VAR_TO_NUM(n) ((uint32_t)((n) / sizeof(zval) - ZEND_CALL_FRAME_SLOT))
729#define EX_NUM_TO_VAR(n) ((uint32_t)(((n) + ZEND_CALL_FRAME_SLOT) * sizeof(zval)))
731#define ZEND_OPLINE_TO_OFFSET(opline, target) \
732 ((char*)(target) - (char*)(opline))
734#define ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, opline_num) \
735 ((char*)&(op_array)->opcodes[opline_num] - (char*)(opline))
737#define ZEND_OFFSET_TO_OPLINE(base, offset) \
738 ((zend_op*)(((char*)(base)) + (int)offset))
740#define ZEND_OFFSET_TO_OPLINE_NUM(op_array, base, offset) \
741 (ZEND_OFFSET_TO_OPLINE(base, offset) - op_array->opcodes)
743#if ZEND_USE_ABS_JMP_ADDR
746# define OP_JMP_ADDR(opline, node) \
749# define ZEND_SET_OP_JMP_ADDR(opline, node, val) do { \
750 (node).jmp_addr = (val); \
754# define ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, node) do { \
755 (node).jmp_addr = (op_array)->opcodes + (node).opline_num; \
759# define ZEND_PASS_TWO_UNDO_JMP_TARGET(op_array, opline, node) do { \
760 (node).opline_num = (node).jmp_addr - (op_array)->opcodes; \
766# define OP_JMP_ADDR(opline, node) \
767 ZEND_OFFSET_TO_OPLINE(opline, (node).jmp_offset)
769# define ZEND_SET_OP_JMP_ADDR(opline, node, val) do { \
770 (node).jmp_offset = ZEND_OPLINE_TO_OFFSET(opline, val); \
774# define ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, node) do { \
775 (node).jmp_offset = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, (node).opline_num); \
779# define ZEND_PASS_TWO_UNDO_JMP_TARGET(op_array, opline, node) do { \
780 (node).opline_num = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, (node).jmp_offset); \
786# define CT_CONSTANT_EX(op_array, num) \
787 ((op_array)->literals + (num))
789# define CT_CONSTANT(node) \
790 CT_CONSTANT_EX(CG(active_op_array), (node).constant)
792#if ZEND_USE_ABS_CONST_ADDR
795# define RT_CONSTANT(opline, node) \
799# define ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline, node) do { \
800 (node).zv = CT_CONSTANT_EX(op_array, (node).constant); \
810# define RT_CONSTANT(opline, node) \
811 ((zval*)(((char*)(opline)) + (int32_t)(node).constant))
814# define ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline, node) do { \
816 (((char*)CT_CONSTANT_EX(op_array, (node).constant)) - \
823#define ZEND_PASS_TWO_UNDO_CONSTANT(op_array, opline, node) do { \
824 (node).constant = RT_CONSTANT(opline, node) - (op_array)->literals; \
827#define RUN_TIME_CACHE(op_array) \
828 ZEND_MAP_PTR_GET((op_array)->run_time_cache)
830#define ZEND_OP_ARRAY_EXTENSION(op_array, handle) \
831 ((void**)RUN_TIME_CACHE(op_array))[handle]
834#define IS_CONST (1<<0)
835#define IS_TMP_VAR (1<<1)
840#define IS_SMART_BRANCH_JMPZ (1<<4)
841#define IS_SMART_BRANCH_JMPNZ (1<<5)
843#define ZEND_EXTRA_VALUE 1
880const char *zend_get_zendtext(
void);
881int zend_get_zendleng(
void);
923#define INITIAL_OP_ARRAY_SIZE 64
949#define zend_try_exception_handler() do { \
950 if (UNEXPECTED(EG(exception))) { \
951 if (Z_TYPE(EG(user_exception_handler)) != IS_UNDEF) { \
952 zend_user_exception_handler(); \
964#define zend_unmangle_property_name(mangled_property, class_name, prop_name) \
965 zend_unmangle_property_name_ex(mangled_property, class_name, prop_name, NULL)
969 const char *class_name, *prop_name;
974#define ZEND_FUNCTION_DTOR zend_function_dtor
975#define ZEND_CLASS_DTOR destroy_zend_class
1018#define ZEND_FETCH_CLASS_DEFAULT 0
1019#define ZEND_FETCH_CLASS_SELF 1
1020#define ZEND_FETCH_CLASS_PARENT 2
1021#define ZEND_FETCH_CLASS_STATIC 3
1022#define ZEND_FETCH_CLASS_AUTO 4
1023#define ZEND_FETCH_CLASS_INTERFACE 5
1024#define ZEND_FETCH_CLASS_TRAIT 6
1025#define ZEND_FETCH_CLASS_MASK 0x0f
1026#define ZEND_FETCH_CLASS_NO_AUTOLOAD 0x80
1027#define ZEND_FETCH_CLASS_SILENT 0x0100
1028#define ZEND_FETCH_CLASS_EXCEPTION 0x0200
1029#define ZEND_FETCH_CLASS_ALLOW_UNLINKED 0x0400
1030#define ZEND_FETCH_CLASS_ALLOW_NEARLY_LINKED 0x0800
1033#define ZEND_PARAM_REF (1<<3)
1034#define ZEND_PARAM_VARIADIC (1<<4)
1036#define ZEND_NAME_FQ 0
1037#define ZEND_NAME_NOT_FQ 1
1038#define ZEND_NAME_RELATIVE 2
1041#define ZEND_CONST_EXPR_NEW_FETCH_TYPE_SHIFT 2
1043#define ZEND_TYPE_NULLABLE (1<<8)
1045#define ZEND_ARRAY_SYNTAX_LIST 1
1046#define ZEND_ARRAY_SYNTAX_LONG 2
1047#define ZEND_ARRAY_SYNTAX_SHORT 3
1054#define BP_VAR_FUNC_ARG 4
1055#define BP_VAR_UNSET 5
1057#define ZEND_INTERNAL_FUNCTION 1
1058#define ZEND_USER_FUNCTION 2
1059#define ZEND_EVAL_CODE 4
1061#define ZEND_USER_CODE(type) ((type) != ZEND_INTERNAL_FUNCTION)
1063#define ZEND_INTERNAL_CLASS 1
1064#define ZEND_USER_CLASS 2
1066#define ZEND_EVAL (1<<0)
1067#define ZEND_INCLUDE (1<<1)
1068#define ZEND_INCLUDE_ONCE (1<<2)
1069#define ZEND_REQUIRE (1<<3)
1070#define ZEND_REQUIRE_ONCE (1<<4)
1073#define ZEND_FETCH_GLOBAL (1<<1)
1074#define ZEND_FETCH_LOCAL (1<<2)
1075#define ZEND_FETCH_GLOBAL_LOCK (1<<3)
1077#define ZEND_FETCH_TYPE_MASK 0xe
1080#define ZEND_FETCH_REF 1
1081#define ZEND_FETCH_DIM_WRITE 2
1082#define ZEND_FETCH_OBJ_FLAGS 3
1086#define ZEND_FETCH_DIM_REF 1
1087#define ZEND_FETCH_DIM_DIM 2
1088#define ZEND_FETCH_DIM_OBJ 3
1089#define ZEND_FETCH_DIM_INCDEC 4
1091#define ZEND_ISEMPTY (1<<0)
1093#define ZEND_LAST_CATCH (1<<0)
1095#define ZEND_FREE_ON_RETURN (1<<0)
1096#define ZEND_FREE_SWITCH (1<<1)
1098#define ZEND_SEND_BY_VAL 0u
1099#define ZEND_SEND_BY_REF 1u
1100#define ZEND_SEND_PREFER_REF 2u
1102#define ZEND_THROW_IS_EXPR 1u
1104#define ZEND_FCALL_MAY_HAVE_EXTRA_NAMED_PARAMS 1
1107#define _ZEND_SEND_MODE_SHIFT _ZEND_TYPE_EXTRA_FLAGS_SHIFT
1108#define _ZEND_IS_VARIADIC_BIT (1 << (_ZEND_TYPE_EXTRA_FLAGS_SHIFT + 2))
1109#define _ZEND_IS_PROMOTED_BIT (1 << (_ZEND_TYPE_EXTRA_FLAGS_SHIFT + 3))
1110#define _ZEND_IS_TENTATIVE_BIT (1 << (_ZEND_TYPE_EXTRA_FLAGS_SHIFT + 4))
1111#define ZEND_ARG_SEND_MODE(arg_info) \
1112 ((ZEND_TYPE_FULL_MASK((arg_info)->type) >> _ZEND_SEND_MODE_SHIFT) & 3)
1113#define ZEND_ARG_IS_VARIADIC(arg_info) \
1114 ((ZEND_TYPE_FULL_MASK((arg_info)->type) & _ZEND_IS_VARIADIC_BIT) != 0)
1115#define ZEND_ARG_IS_PROMOTED(arg_info) \
1116 ((ZEND_TYPE_FULL_MASK((arg_info)->type) & _ZEND_IS_PROMOTED_BIT) != 0)
1117#define ZEND_ARG_TYPE_IS_TENTATIVE(arg_info) \
1118 ((ZEND_TYPE_FULL_MASK((arg_info)->type) & _ZEND_IS_TENTATIVE_BIT) != 0)
1120#define ZEND_DIM_IS (1 << 0)
1125#define ZEND_ENCAPS_VAR_DOLLAR_CURLY (1 << 0)
1126#define ZEND_ENCAPS_VAR_DOLLAR_CURLY_VAR_VAR (1 << 1)
1129#define IS_CONSTANT_CLASS 0x400
1130#define IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE 0x800
1144#define ARG_MUST_BE_SENT_BY_REF(zf, arg_num) \
1145 zend_check_arg_send_type(zf, arg_num, ZEND_SEND_BY_REF)
1147#define ARG_SHOULD_BE_SENT_BY_REF(zf, arg_num) \
1148 zend_check_arg_send_type(zf, arg_num, ZEND_SEND_BY_REF|ZEND_SEND_PREFER_REF)
1150#define ARG_MAY_BE_SENT_BY_REF(zf, arg_num) \
1151 zend_check_arg_send_type(zf, arg_num, ZEND_SEND_PREFER_REF)
1154#define MAX_ARG_FLAG_NUM 12
1156#ifdef WORDS_BIGENDIAN
1157# define ZEND_SET_ARG_FLAG(zf, arg_num, mask) do { \
1158 (zf)->quick_arg_flags |= ((mask) << ((arg_num) - 1) * 2); \
1160# define ZEND_CHECK_ARG_FLAG(zf, arg_num, mask) \
1161 (((zf)->quick_arg_flags >> (((arg_num) - 1) * 2)) & (mask))
1163# define ZEND_SET_ARG_FLAG(zf, arg_num, mask) do { \
1164 (zf)->quick_arg_flags |= (((mask) << 6) << (arg_num) * 2); \
1166# define ZEND_CHECK_ARG_FLAG(zf, arg_num, mask) \
1167 (((zf)->quick_arg_flags >> (((arg_num) + 3) * 2)) & (mask))
1170#define QUICK_ARG_MUST_BE_SENT_BY_REF(zf, arg_num) \
1171 ZEND_CHECK_ARG_FLAG(zf, arg_num, ZEND_SEND_BY_REF)
1173#define QUICK_ARG_SHOULD_BE_SENT_BY_REF(zf, arg_num) \
1174 ZEND_CHECK_ARG_FLAG(zf, arg_num, ZEND_SEND_BY_REF|ZEND_SEND_PREFER_REF)
1176#define QUICK_ARG_MAY_BE_SENT_BY_REF(zf, arg_num) \
1177 ZEND_CHECK_ARG_FLAG(zf, arg_num, ZEND_SEND_PREFER_REF)
1179#define ZEND_RETURN_VAL 0
1180#define ZEND_RETURN_REF 1
1182#define ZEND_BIND_VAL 0
1183#define ZEND_BIND_REF 1
1184#define ZEND_BIND_IMPLICIT 2
1185#define ZEND_BIND_EXPLICIT 4
1187#define ZEND_RETURNS_FUNCTION (1<<0)
1188#define ZEND_RETURNS_VALUE (1<<1)
1190#define ZEND_ARRAY_ELEMENT_REF (1<<0)
1191#define ZEND_ARRAY_NOT_PACKED (1<<1)
1192#define ZEND_ARRAY_SIZE_SHIFT 2
1195#define ZEND_PARENTHESIZED_CONDITIONAL 1
1198#define ZEND_PARENTHESIZED_STATIC_PROP 1
1201#define ZEND_SYMBOL_CLASS (1<<0)
1202#define ZEND_SYMBOL_FUNCTION (1<<1)
1203#define ZEND_SYMBOL_CONST (1<<2)
1206#define ZEND_IS_INCREMENT(opcode) (((opcode) & 1) == 0)
1208#define ZEND_IS_BINARY_ASSIGN_OP_OPCODE(opcode) \
1209 (((opcode) >= ZEND_ADD) && ((opcode) <= ZEND_POW))
1212#define ZEND_GOTO 253
1214#define ZEND_CONT 255
1219#define ZEND_CLONE_FUNC_NAME "__clone"
1220#define ZEND_CONSTRUCTOR_FUNC_NAME "__construct"
1221#define ZEND_DESTRUCTOR_FUNC_NAME "__destruct"
1222#define ZEND_GET_FUNC_NAME "__get"
1223#define ZEND_SET_FUNC_NAME "__set"
1224#define ZEND_UNSET_FUNC_NAME "__unset"
1225#define ZEND_ISSET_FUNC_NAME "__isset"
1226#define ZEND_CALL_FUNC_NAME "__call"
1227#define ZEND_CALLSTATIC_FUNC_NAME "__callstatic"
1228#define ZEND_TOSTRING_FUNC_NAME "__tostring"
1229#define ZEND_INVOKE_FUNC_NAME "__invoke"
1230#define ZEND_DEBUGINFO_FUNC_NAME "__debuginfo"
1236#define ZEND_COMPILE_EXTENDED_STMT (1<<0)
1237#define ZEND_COMPILE_EXTENDED_FCALL (1<<1)
1238#define ZEND_COMPILE_EXTENDED_INFO (ZEND_COMPILE_EXTENDED_STMT|ZEND_COMPILE_EXTENDED_FCALL)
1241#define ZEND_COMPILE_HANDLE_OP_ARRAY (1<<2)
1244#define ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS (1<<3)
1249#define ZEND_COMPILE_IGNORE_INTERNAL_CLASSES (1<<4)
1252#define ZEND_COMPILE_DELAYED_BINDING (1<<5)
1255#define ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION (1<<6)
1258#define ZEND_COMPILE_NO_PERSISTENT_CONSTANT_SUBSTITUTION (1<<8)
1261#define ZEND_COMPILE_IGNORE_USER_FUNCTIONS (1<<9)
1264#define ZEND_COMPILE_GUARDS (1<<10)
1267#define ZEND_COMPILE_NO_BUILTINS (1<<11)
1270#define ZEND_COMPILE_WITH_FILE_CACHE (1<<12)
1273#define ZEND_COMPILE_IGNORE_OTHER_FILES (1<<13)
1276#define ZEND_COMPILE_WITHOUT_EXECUTION (1<<14)
1279#define ZEND_COMPILE_PRELOAD (1<<15)
1282#define ZEND_COMPILE_NO_JUMPTABLES (1<<16)
1285#define ZEND_COMPILE_PRELOAD_IN_CHILD (1<<17)
1288#define ZEND_COMPILE_IGNORE_OBSERVER (1<<18)
1291#define ZEND_COMPILE_DEFAULT ZEND_COMPILE_HANDLE_OP_ARRAY
1294#define ZEND_COMPILE_DEFAULT_FOR_EVAL 0
zend_op_array *(* compile_string)(zend_string *source_string, const char *filename, zend_compile_position position)
zend_op_array *(* compile_file)(zend_file_handle *file_handle, int type)
zend_string * default_value
zend_auto_global_callback auto_global_callback
zend_string * doc_comment
zend_array * extra_named_params
zend_execute_data * prev_execute_data
zend_array * symbol_table
zend_declarables declarables
bool has_bracketed_namespaces
HashTable * imports_const
HashTable * imports_function
zend_string * current_namespace
const char * default_value
uintptr_t required_num_args
const char * default_value
uint32_t required_num_args
const zend_property_info * prop_info
zend_string * function_name
zend_function * prototype
ZEND_MAP_PTR_DEF(void **, run_time_cache)
struct _zend_module_entry * module
const zend_frameless_function_info * frameless_function_infos
void * reserved[ZEND_MAX_RESERVED_RESOURCES]
zend_internal_arg_info * arg_info
zend_string * doc_comment
ZEND_MAP_PTR_DEF(HashTable *, static_variables_ptr)
zend_function * prototype
HashTable * static_variables
zend_op_array ** dynamic_func_defs
const zend_property_info * prop_info
zend_string * doc_comment
uint32_t required_num_args
zend_try_catch_element * try_catch_array
zend_live_range * live_range
void * reserved[ZEND_MAX_RESERVED_RESOURCES]
zend_string * function_name
uint32_t num_dynamic_func_defs
ZEND_MAP_PTR_DEF(void **, run_time_cache)
zend_property_hook_kind active_property_hook_kind
uint32_t try_catch_offset
struct _zend_oparray_context * prev
bool in_jmp_frameless_branch
const zend_property_info * active_property_info
zend_brk_cont_element * brk_cont_array
const zend_property_info * prototype
zend_string * doc_comment
zend_function * prototype
zend_string * doc_comment
uint32_t required_num_args
const zend_property_info * prop_info
zend_string * function_name
struct _zend_function::@236135173067030250234125302313220025134003177336 common
zend_internal_function internal_function
#define INTERNAL_FUNCTION_PARAMETERS
#define ZEND_MM_ALIGNED_SIZE(size)
ZEND_API zend_string * zend_get_compiled_variable_name(const zend_op_array *op_array, uint32_t var)
ZEND_API void zend_restore_compiled_filename(zend_string *original_compiled_filename)
ZEND_API zend_string * zend_set_compiled_filename(zend_string *new_compiled_filename)
void zend_oparray_context_end(zend_oparray_context *prev_context)
void zend_oparray_context_begin(zend_oparray_context *prev_context, zend_op_array *op_array)
void zend_file_context_begin(zend_file_context *prev_context)
ZEND_API zend_op_array *(* zend_compile_file)(zend_file_handle *file_handle, int type)
ZEND_API zend_op_array *(* zend_compile_string)(zend_string *source_string, const char *filename, zend_compile_position position)
ZEND_API int zend_get_compiled_lineno(void)
void zend_init_compiler_data_structures(void)
ZEND_API zend_string * zend_get_compiled_filename(void)
void shutdown_compiler(void)
void zend_file_context_end(zend_file_context *prev_context)
ZEND_API zend_result zend_register_auto_global(zend_string *name, bool jit, zend_auto_global_callback auto_global_callback)
ZEND_API bool zend_unary_op_produces_error(uint32_t opcode, const zval *op)
zend_result(ZEND_FASTCALL * binary_op_type)(zval *, zval *, zval *)
ZEND_API zend_result zend_execute_script(int type, zval *retval, zend_file_handle *file_handle)
ZEND_API bool zend_is_smart_branch(const zend_op *opline)
struct _zend_oparray_context zend_oparray_context
struct _zend_brk_cont_element zend_brk_cont_element
void startup_scanner(void)
ZEND_API zend_op_array * compile_filename(int type, zend_string *filename)
void zend_emit_final_return(bool return_one)
ZEND_API bool zend_is_op_long_compatible(const zval *op)
ZEND_API char * zend_make_compiled_string_description(const char *name)
ZEND_API void zend_activate_auto_globals(void)
void zend_const_expr_to_zval(zval *result, zend_ast **ast_ptr, bool allow_dynamic)
ZEND_API zend_result zend_execute_scripts(int type, zval *retval, int file_count,...)
uint32_t zend_modifier_list_to_flags(zend_modifier_target target, zend_ast *modifiers)
ZEND_API zend_ast * zend_compile_string_to_ast(zend_string *code, struct _zend_arena **ast_arena, zend_string *filename)
ZEND_API void zend_initialize_class_data(zend_class_entry *ce, bool nullify_handlers)
ZEND_API void destroy_op_array(zend_op_array *op_array)
ZEND_API void zend_function_dtor(zval *zv)
ZEND_API bool zend_binary_op_produces_error(uint32_t opcode, const zval *op1, const zval *op2)
uint32_t zend_get_class_fetch_type(const zend_string *name)
struct _zend_label zend_label
ZEND_API void pass_two(zend_op_array *op_array)
struct _zend_internal_function_info zend_internal_function_info
void zend_assert_valid_class_name(const zend_string *const_name, const char *type)
ZEND_API zend_result do_bind_class(zval *lcname, zend_string *lc_parent_name)
struct _zend_declarables zend_declarables
bool(* zend_needs_live_range_cb)(zend_op_array *op_array, zend_op *opline)
ZEND_API bool zend_is_compiling(void)
zend_ast * zend_ast_append_str(zend_ast *left, zend_ast *right)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_znode(znode *node)
enum _zend_compile_position zend_compile_position
#define ZEND_ACC_PROTECTED_SET
uint32_t zend_add_anonymous_class_modifier(uint32_t flags, uint32_t new_flag)
ZEND_API void destroy_zend_function(zend_function *function)
#define ZEND_ARG_SEND_MODE(arg_info)
#define zend_unmangle_property_name(mangled_property, class_name, prop_name)
uint32_t zend_add_class_modifier(uint32_t flags, uint32_t new_flag)
ZEND_API bool zend_is_auto_global_str(const char *name, size_t len)
ZEND_API size_t zend_dirname(char *path, size_t len)
ZEND_API uint8_t zend_get_call_op(const zend_op *init_op, zend_function *fbc)
ZEND_API binary_op_type get_binary_op(int opcode)
ZEND_API void zend_set_function_arg_flags(zend_function *func)
union _zend_parser_stack_elem zend_parser_stack_elem
ZEND_API int ZEND_FASTCALL lex_scan(zval *zendlval, zend_parser_stack_elem *elem)
struct _zend_file_context zend_file_context
int(* user_opcode_handler_t)(zend_execute_data *execute_data)
ZEND_API zend_string * zend_type_to_string(zend_type type)
#define ZEND_ACC_PRIVATE_SET
void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline)
struct _zend_op_array zend_op_array
struct _zend_ast_znode zend_ast_znode
ZEND_API zend_class_entry * zend_bind_class_in_slot(zval *class_table_slot, zval *lcname, zend_string *lc_parent_name)
ZEND_API void destroy_zend_class(zval *zv)
struct _zend_class_constant zend_class_constant
struct _zend_property_info zend_property_info
ZEND_API unary_op_type get_unary_op(int opcode)
ZEND_API void zend_destroy_static_vars(zend_op_array *op_array)
void zend_compile_top_stmt(zend_ast *ast)
zend_string * zval_make_interned_string(zval *zv)
ZEND_API void init_op_array(zend_op_array *op_array, uint8_t type, int initial_ops_size)
struct _zend_internal_arg_info zend_internal_arg_info
ZEND_API zend_string * zend_mangle_property_name(const char *src1, size_t src1_length, const char *src2, size_t src2_length, bool internal)
bool(* zend_auto_global_callback)(zend_string *name)
void shutdown_scanner(void)
ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle)
struct _zend_arg_info zend_arg_info
@ ZEND_COMPILE_POSITION_AFTER_OPEN_TAG
@ ZEND_COMPILE_POSITION_AT_SHEBANG
@ ZEND_COMPILE_POSITION_AT_OPEN_TAG
#define ZEND_ACC_PUBLIC_SET
zend_property_hook_kind zend_get_property_hook_kind_from_name(zend_string *name)
ZEND_API void zend_type_release(zend_type type, bool persistent)
ZEND_API size_t zend_get_scanned_file_offset(void)
ZEND_API zend_string * zend_create_member_string(zend_string *class_name, zend_string *member_name)
ZEND_API bool zend_is_auto_global(zend_string *name)
void zend_class_add_ref(zval *zv)
zend_ast * zend_negate_num_string(zend_ast *ast)
#define ZEND_ACC_VARIADIC
@ ZEND_MODIFIER_TARGET_CONSTANT
@ ZEND_MODIFIER_TARGET_PROPERTY
@ ZEND_MODIFIER_TARGET_PROPERTY_HOOK
@ ZEND_MODIFIER_TARGET_METHOD
@ ZEND_MODIFIER_TARGET_CPP
ZEND_API zend_result do_bind_function(zend_function *func, zval *lcname)
zend_string * zend_type_to_string_resolved(zend_type type, zend_class_entry *scope)
ZEND_API ZEND_COLD void zend_user_exception_handler(void)
uint32_t zend_add_member_modifier(uint32_t flags, uint32_t new_flag, zend_modifier_target target)
void zend_free_internal_arg_info(zend_internal_function *function)
ZEND_API void zend_cleanup_mutable_class_data(zend_class_entry *ce)
ZEND_API void function_add_ref(zend_function *function)
ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce)
struct _zend_auto_global zend_auto_global
ZEND_API void zend_recalc_live_ranges(zend_op_array *op_array, zend_needs_live_range_cb needs_live_range)
struct _zend_try_catch_element zend_try_catch_element
struct _zend_live_range zend_live_range
struct _zend_internal_function zend_internal_function
zend_result(ZEND_FASTCALL * unary_op_type)(zval *, zval *)
ZEND_API zend_result zend_unmangle_property_name_ex(const zend_string *name, const char **class_name, const char **prop_name, size_t *prop_len)
void(ZEND_FASTCALL * zif_handler)(INTERNAL_FUNCTION_PARAMETERS)
char * zend_visibility_string(uint32_t fn_flags)
void zend_stop_lexing(void)
#define ZEND_ACC_PROTECTED
bool zend_handle_encoding_declaration(zend_ast *ast)
uint32_t zend_modifier_token_to_flag(zend_modifier_target target, uint32_t flags)
ZEND_API zend_result open_file_for_scanning(zend_file_handle *file_handle)
ZEND_API void(ZEND_FASTCALL *zend_touch_vm_stack_data)(void *vm_stack_data)
union _zend_function zend_function
struct _zend_file_handle zend_file_handle
struct _zend_string zend_string
#define ZEND_MAP_PTR_DEF(type, name)
#define EXPECTED(condition)
#define zend_always_inline
#define ZEND_STATIC_ASSERT(c, m)
#define ZEND_MAX_RESERVED_RESOURCES
#define EMPTY_SWITCH_DEFAULT_CASE()
#define UNEXPECTED(condition)
struct _zend_array zend_array
struct _zend_class_entry zend_class_entry
struct _zend_array HashTable
ZEND_RESULT_CODE zend_result
struct _zend_ast zend_ast
struct _zend_execute_data zend_execute_data
function(EX_VAR(opline->result.var))