/PHP-8.3/Zend/ |
H A D | zend_opcode.c | 57 op_array->last = 0; in init_op_array() 63 op_array->T = 0; in init_op_array() 551 if (!op_array->refcount || --(*op_array->refcount) > 0) { in destroy_op_array() 555 efree_size(op_array->refcount, sizeof(*(op_array->refcount))); in destroy_op_array() 709 op_array->live_range = erealloc(op_array->live_range, in emit_live_range_raw() 713 range = &op_array->live_range[op_array->last_live_range - 1]; in emit_live_range_raw() 1037 …op_array->vars = (zend_string**) erealloc(op_array->vars, sizeof(zend_string*)*op_array->last_var); in pass_two() 1043 op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, sizeof(zend_op)*op_array->last); in pass_two() 1047 op_array->literals = (zval*)erealloc(op_array->literals, sizeof(zval) * op_array->last_literal); in pass_two() 1051 op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, in pass_two() [all …]
|
/PHP-8.3/Zend/Optimizer/ |
H A D | nop_removal.c | 43 end = op_array->opcodes + op_array->last; in zend_optimizer_nop_removal() 65 zend_op *new_opline = op_array->opcodes + new_count; in zend_optimizer_nop_removal() 75 op_array->last = new_count; in zend_optimizer_nop_removal() 76 end = op_array->opcodes + op_array->last; in zend_optimizer_nop_removal() 79 for (opline = op_array->opcodes; opline<end; opline++) { in zend_optimizer_nop_removal() 84 for (j = 0; j < op_array->last_try_catch; j++) { in zend_optimizer_nop_removal() 85 op_array->try_catch_array[j].try_op -= shiftlist[op_array->try_catch_array[j].try_op]; in zend_optimizer_nop_removal() 86 op_array->try_catch_array[j].catch_op -= shiftlist[op_array->try_catch_array[j].catch_op]; in zend_optimizer_nop_removal() 87 if (op_array->try_catch_array[j].finally_op) { in zend_optimizer_nop_removal() 88 op_array->try_catch_array[j].finally_op -= shiftlist[op_array->try_catch_array[j].finally_op]; in zend_optimizer_nop_removal() [all …]
|
H A D | zend_optimizer.c | 237 op_array->literals = (zval*)erealloc(op_array->literals, op_array->last_literal * sizeof(zval)); in zend_optimizer_add_literal() 626 zend_op *end = op_array->opcodes + op_array->last; in zend_optimizer_replace_by_const() 644 zend_op *end = op_array->opcodes + op_array->last; in zend_optimizer_replace_by_const() 803 || (op_array && ce->info.user.filename == op_array->filename))) { in zend_optimizer_get_class_entry() 807 if (op_array && op_array->scope && zend_string_equals_ci(op_array->scope->name, lcname)) { in zend_optimizer_get_class_entry() 845 func->op_array.filename == op_array->filename) { in zend_optimizer_get_called_func() 863 func->op_array.filename == op_array->filename) { in zend_optimizer_get_called_func() 1118 op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, in zend_redo_pass_two() 1122 op_array->literals, sizeof(zval) * op_array->last_literal); in zend_redo_pass_two() 1227 op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, in zend_redo_pass_two_ex() [all …]
|
H A D | compact_vars.c | 30 uint32_t used_vars_len = zend_bitset_len(op_array->last_var + op_array->T); in zend_optimizer_compact_vars() 32 uint32_t *vars_map = do_alloca((op_array->last_var + op_array->T) * sizeof(uint32_t), use_heap2); in zend_optimizer_compact_vars() 37 for (i = 0; i < op_array->last; i++) { in zend_optimizer_compact_vars() 67 for (i = op_array->last_var; i < op_array->last_var + op_array->T; i++) { in zend_optimizer_compact_vars() 76 if (num_cvs == op_array->last_var && num_tmps == op_array->T) { in zend_optimizer_compact_vars() 99 if (num_cvs != op_array->last_var) { in zend_optimizer_compact_vars() 109 efree(op_array->vars); in zend_optimizer_compact_vars() 110 op_array->vars = names; in zend_optimizer_compact_vars() 115 efree(op_array->vars); in zend_optimizer_compact_vars() 116 op_array->vars = NULL; in zend_optimizer_compact_vars() [all …]
|
H A D | dfa_pass.c | 162 op_array->opcodes[target] = op_array->opcodes[i]; in zend_ssa_remove_nops() 252 op_array->last = target; in zend_ssa_remove_nops() 1360 op_array, ssa, &op_array->opcodes[ssa->vars[src_var].definition], in zend_dfa_optimize_op_array() 1399 && op_array->opcodes[op_2].op1.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array() 1415 && op_array->opcodes[op_2].op1.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array() 1431 && op_array->opcodes[op_2].op2.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array() 1439 op_array->opcodes[op_2].op1_type = op_array->opcodes[op_2].op2_type; in zend_dfa_optimize_op_array() 1440 op_array->opcodes[op_2].op1.var = op_array->opcodes[op_2].op2.var; in zend_dfa_optimize_op_array() 1520 op_array, ssa, &op_array->opcodes[ssa->vars[src_var].definition], in zend_dfa_optimize_op_array() 1593 op_array->opcodes[op_2].op1_type = op_array->opcodes[op_2].op2_type; in zend_dfa_optimize_op_array() [all …]
|
H A D | zend_optimizer_internal.h | 30 #define ZEND_OP1_LITERAL(opline) (op_array)->literals[(opline)->op1.constant] 32 #define ZEND_OP2_LITERAL(opline) (op_array)->literals[(opline)->op2.constant] 57 op.constant = zend_optimizer_add_literal(op_array, &_c); \ 63 op.constant = zend_optimizer_add_literal(op_array, &_c); \ 82 int zend_optimizer_add_literal(zend_op_array *op_array, const zval *zv); 92 bool zend_optimizer_update_op1_const(zend_op_array *op_array, 95 bool zend_optimizer_update_op2_const(zend_op_array *op_array, 98 bool zend_optimizer_replace_by_const(zend_op_array *op_array, 112 void zend_optimize_cfg(zend_op_array *op_array, zend_optimizer_ctx *ctx); 113 void zend_optimize_dfa(zend_op_array *op_array, zend_optimizer_ctx *ctx); [all …]
|
H A D | zend_dump.h | 36 ZEND_API void zend_dump_op_array(const zend_op_array *op_array, uint32_t dump_flags, const char *ms… 37 ZEND_API void zend_dump_op(const zend_op_array *op_array, const zend_basic_block *b, const zend_op … 38 ZEND_API void zend_dump_op_line(const zend_op_array *op_array, const zend_basic_block *b, const zen… 39 void zend_dump_dominators(const zend_op_array *op_array, const zend_cfg *cfg); 40 void zend_dump_dfg(const zend_op_array *op_array, const zend_cfg *cfg, const zend_dfg *dfg); 41 void zend_dump_phi_placement(const zend_op_array *op_array, const zend_ssa *ssa); 42 void zend_dump_variables(const zend_op_array *op_array); 43 void zend_dump_ssa_variables(const zend_op_array *op_array, const zend_ssa *ssa, uint32_t dump_flag… 44 ZEND_API void zend_dump_ssa_var(const zend_op_array *op_array, const zend_ssa *ssa, int ssa_var_num… 45 ZEND_API void zend_dump_var(const zend_op_array *op_array, uint8_t var_type, int var_num); [all …]
|
H A D | compact_literals.c | 56 arg_info = &op_array->arg_info[op_array->num_args]; in type_num_classes() 325 op_array->literals[j] = op_array->literals[i]; in zend_optimizer_compact_literals() 337 op_array->literals[j] = op_array->literals[i]; in zend_optimizer_compact_literals() 349 op_array->literals[j] = op_array->literals[i]; in zend_optimizer_compact_literals() 365 op_array->literals[j] = op_array->literals[i]; in zend_optimizer_compact_literals() 383 op_array->literals[j] = op_array->literals[i]; in zend_optimizer_compact_literals() 385 op_array->literals[j+1] = op_array->literals[i+1]; in zend_optimizer_compact_literals() 405 op_array->literals[j] = op_array->literals[i]; in zend_optimizer_compact_literals() 432 op_array->literals[j] = op_array->literals[i]; in zend_optimizer_compact_literals() 452 op_array->literals[j] = op_array->literals[i]; in zend_optimizer_compact_literals() [all …]
|
H A D | zend_dump.c | 376 zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : var_type), var_num); in zend_dump_ssa_var() 914 if (op_array->function_name) { in zend_dump_op_array_name() 915 if (op_array->scope && op_array->scope->name) { in zend_dump_op_array_name() 916 fprintf(stderr, "%s::%s", op_array->scope->name->val, op_array->function_name->val); in zend_dump_op_array_name() 951 op_array->last, in zend_dump_op_array() 952 op_array->num_args); in zend_dump_op_array() 953 fprintf(stderr, ", vars=%d, tmps=%d", op_array->last_var, op_array->T); in zend_dump_op_array() 1003 …fprintf(stderr, " ; %s:%u-%u\n", op_array->filename->val, op_array->line_start, op_array->line… in zend_dump_op_array() 1066 if (op_array->last_try_catch) { in zend_dump_op_array() 1126 if (op_array->last_try_catch) { in zend_dump_op_array() [all …]
|
H A D | zend_inference.h | 133 #define OP1_HAS_RANGE() (_ssa_op1_has_range (op_array, ssa, opline, ssa_op)) 134 #define OP1_MIN_RANGE() (_ssa_op1_min_range (op_array, ssa, opline, ssa_op)) 135 #define OP1_MAX_RANGE() (_ssa_op1_max_range (op_array, ssa, opline, ssa_op)) 138 #define OP2_HAS_RANGE() (_ssa_op2_has_range (op_array, ssa, opline, ssa_op)) 198 #define OP1_INFO() (_ssa_op1_info(op_array, ssa, opline, ssa_op)) in DEFINE_SSA_OP_INFO() 199 #define OP2_INFO() (_ssa_op2_info(op_array, ssa, opline, ssa_op)) in DEFINE_SSA_OP_INFO() 202 #define RES_USE_INFO() (_ssa_result_info(op_array, ssa, opline, ssa_op)) in DEFINE_SSA_OP_INFO() 203 #define OP1_DEF_INFO() (_ssa_op1_def_info(op_array, ssa, opline, ssa_op)) in DEFINE_SSA_OP_INFO() 204 #define OP2_DEF_INFO() (_ssa_op2_def_info(op_array, ssa, opline, ssa_op)) in DEFINE_SSA_OP_INFO() 221 ZEND_API void zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa); [all …]
|
H A D | zend_cfg.c | 115 if (op_array->last_try_catch) { in zend_mark_reachable_blocks() 147 op_array->try_catch_array[j].try_op = op_array->try_catch_array[j].catch_op; in zend_mark_reachable_blocks() 149 …zend_mark_reachable(op_array->opcodes, cfg, blocks + block_map[op_array->try_catch_array[j].try_op… in zend_mark_reachable_blocks() 288 for (i = 0; i < op_array->last; i++) { in zend_build_cfg() 289 zend_op *opline = op_array->opcodes + i; in zend_build_cfg() 301 if (i + 1 < op_array->last) { in zend_build_cfg() 354 if (i + 1 < op_array->last) { in zend_build_cfg() 360 if (i + 1 < op_array->last) { in zend_build_cfg() 416 !op_array->function_name) { in zend_build_cfg() 448 if (op_array->last_try_catch) { in zend_build_cfg() [all …]
|
H A D | optimize_func_calls.c | 83 && !(func->op_array.fn_flags & (ZEND_ACC_TRAIT_CLONE)) in zend_try_inline_call() 85 && func->op_array.opcodes[func->op_array.num_args].opcode == ZEND_RETURN) { in zend_try_inline_call() 87 zend_op *ret_opline = func->op_array.opcodes + func->op_array.num_args; in zend_try_inline_call() 90 uint32_t i, num_args = func->op_array.num_args; in zend_try_inline_call() 94 && !(func->op_array.fn_flags & ZEND_ACC_STATIC)) { in zend_try_inline_call() 112 …if (Z_TYPE_P(CRT_CONSTANT_EX(&func->op_array, &func->op_array.opcodes[i], func->op_array.opcodes[i… in zend_try_inline_call() 116 } while (i < func->op_array.num_args); in zend_try_inline_call() 131 zend_delete_call_instructions(op_array, opline-1); in zend_try_inline_call() 152 zend_op *opline = op_array->opcodes; in zend_optimize_func_calls() 153 zend_op *end = opline + op_array->last; in zend_optimize_func_calls() [all …]
|
H A D | zend_call_graph.c | 40 ZEND_SET_FUNC_INFO(op_array, func_info); in zend_op_array_collect() 48 zend_op *opline = op_array->opcodes; in zend_analyze_calls() 49 zend_op *end = opline + op_array->last; in zend_analyze_calls() 66 script, op_array, opline, &is_prototype); in zend_analyze_calls() 69 call_info->caller_op_array = op_array; in zend_analyze_calls() 161 if (op_array == root) { in zend_is_indirectly_recursive() 165 func_info = ZEND_FUNC_INFO(op_array); in zend_is_indirectly_recursive() 183 zend_op_array *op_array; in zend_analyze_recursion() local 193 op_array = call_graph->op_arrays[i]; in zend_analyze_recursion() 201 if (call_info->caller_op_array == op_array) { in zend_analyze_recursion() [all …]
|
H A D | zend_cfg.h | 103 #define CRT_CONSTANT_EX(op_array, opline, node) \ argument 104 (((op_array)->fn_flags & ZEND_ACC_DONE_PASS_TWO) ? \ 107 CT_CONSTANT_EX(op_array, (node).constant) \ 111 CRT_CONSTANT_EX(op_array, opline, node) 118 ZEND_API void zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, uint32_t build_flag… 119 void zend_cfg_remark_reachable_blocks(const zend_op_array *op_array, zend_cfg *cfg); 121 ZEND_API void zend_cfg_compute_dominators_tree(const zend_op_array *op_array, zend_cfg *cfg); 122 ZEND_API void zend_cfg_identify_loops(const zend_op_array *op_array, zend_cfg *cfg);
|
H A D | dce.c | 51 zend_op_array *op_array; member 75 zend_op_array *op_array, zend_ssa *ssa, in may_have_side_effects() argument 242 if (op_array->static_variables) { in may_have_side_effects() 330 return var_num >= ctx->op_array->last_var; in is_var_dead() 531 ctx.op_array = op_array; in dce_optimize_op_array() 551 if (phi->var >= op_array->last_var in dce_optimize_op_array() 583 …} else if (may_have_side_effects(op_array, ssa, &op_array->opcodes[i], &ssa->ops[i], ctx.reorder_d… in dce_optimize_op_array() 584 || (zend_may_throw(&op_array->opcodes[i], &ssa->ops[i], op_array, ssa) in dce_optimize_op_array() 587 if (op_array->opcodes[i].opcode == ZEND_NEW in dce_optimize_op_array() 615 if (i < op_array->last in dce_optimize_op_array() [all …]
|
H A D | optimize_temp_vars_5.c | 43 void zend_optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_ctx *ctx) in zend_optimize_temporary_variables() argument 45 uint32_t T = op_array->T; in zend_optimize_temporary_variables() 46 int offset = op_array->last_var; in zend_optimize_temporary_variables() 63 end = op_array->opcodes; in zend_optimize_temporary_variables() 64 opline = &op_array->opcodes[op_array->last - 1]; in zend_optimize_temporary_variables() 76 end = op_array->opcodes; in zend_optimize_temporary_variables() 77 opline = &op_array->opcodes[op_array->last - 1]; in zend_optimize_temporary_variables() 107 if ((op_array->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK) && in zend_optimize_temporary_variables() 177 op_array->T = max + 1 + ZEND_OBSERVER_ENABLED; // reserve last temporary for observers if enabled in zend_optimize_temporary_variables()
|
H A D | block_pass.c | 84 strip_leading_nops(op_array, b); in strip_nops() 96 op_array->opcodes[j] = op_array->opcodes[i]; in strip_nops() 995 efree(op_array->opcodes); in assemble_code_blocks() 997 op_array->last = len; in assemble_code_blocks() 1422 if (op_array->T == 0) { in zend_t_usage() 1428 bitset_len = zend_bitset_len(op_array->last_var + op_array->T); in zend_t_usage() 1496 for (i = op_array->last_var; i< op_array->T; i++) { in zend_t_usage() 1690 if (cfg.blocks_count * (op_array->last_var + op_array->T) > 64 * 1024 * 1024) { in zend_optimize_cfg() 1699 bitset_len = zend_bitset_len(op_array->last_var + op_array->T); in zend_optimize_cfg() 1722 memset(Tsource, 0, (op_array->last_var + op_array->T) * sizeof(zend_op *)); in zend_optimize_cfg() [all …]
|
H A D | pass1.c | 56 zend_optimizer_update_op1_const(op_array, opline, result); in replace_by_const_or_qm_assign() 62 zend_op *opline = op_array->opcodes; in zend_optimizer_pass1() 63 zend_op *end = opline + op_array->last; in zend_optimizer_pass1() 65 (op_array == &ctx->script->main_op_array) : 0; in zend_optimizer_pass1() 102 replace_by_const_or_qm_assign(op_array, opline, &result); in zend_optimizer_pass1() 116 replace_by_const_or_qm_assign(op_array, opline, &result); in zend_optimizer_pass1() 124 replace_by_const_or_qm_assign(op_array, opline, &result); in zend_optimizer_pass1() 138 fake_execute_data.func = (zend_function*)op_array; in zend_optimizer_pass1() 143 replace_by_const_or_qm_assign(op_array, opline, offset); in zend_optimizer_pass1() 160 replace_by_const_or_qm_assign(op_array, opline, &result); in zend_optimizer_pass1() [all …]
|
H A D | zend_func_info.h | 47 #define ZEND_FUNC_INFO(op_array) \ argument 48 ((zend_func_info*)((op_array)->reserved[zend_func_info_rid])) 50 #define ZEND_SET_FUNC_INFO(op_array, info) do { \ argument 51 zend_func_info** pinfo = (zend_func_info**)&(op_array)->reserved[zend_func_info_rid]; \
|
/PHP-8.3/ext/opcache/ |
H A D | zend_persist.c | 378 if (op_array->refcount && --(*op_array->refcount) == 0) { in zend_persist_op_array_ex() 407 if (op_array->scope) { in zend_persist_op_array_ex() 471 op_array->vars = zend_shared_alloc_get_xlat_entry(op_array->vars); in zend_persist_op_array_ex() 486 if (op_array->scope in zend_persist_op_array_ex() 637 …op_array->live_range = zend_shared_memdup_put_free(op_array->live_range, sizeof(zend_live_range) *… in zend_persist_op_array_ex() 650 op_array->attributes = zend_persist_attributes(op_array->attributes); in zend_persist_op_array_ex() 657 if (op_array->vars) { in zend_persist_op_array_ex() 659 …op_array->vars = zend_shared_memdup_put_free(op_array->vars, sizeof(zend_string*) * op_array->last… in zend_persist_op_array_ex() 737 … if (!op_array->scope || (op_array->scope == ce && !(op_array->fn_flags & ZEND_ACC_TRAIT_CLONE))) { in zend_persist_class_method() 748 zend_shared_alloc_register_xlat_entry(op_array, op_array); in zend_persist_class_method() [all …]
|
H A D | zend_persist_calc.c | 215 if (op_array->scope) { in zend_persist_op_array_calc_ex() 223 if (op_array->scope in zend_persist_op_array_calc_ex() 229 if (op_array->static_variables && !zend_accel_in_shm(op_array->static_variables)) { in zend_persist_op_array_calc_ex() 244 if (op_array->literals) { in zend_persist_op_array_calc_ex() 254 zend_shared_alloc_register_xlat_entry(op_array->opcodes, op_array->opcodes); in zend_persist_op_array_calc_ex() 257 if (op_array->filename) { in zend_persist_op_array_calc_ex() 261 if (op_array->arg_info) { in zend_persist_op_array_calc_ex() 282 if (op_array->live_range) { in zend_persist_op_array_calc_ex() 298 if (op_array->vars) { in zend_persist_op_array_calc_ex() 324 zend_shared_alloc_register_xlat_entry(op_array, op_array); in zend_persist_op_array_calc() [all …]
|
H A D | zend_file_cache.c | 472 if (op_array->scope) { 490 zend_shared_alloc_register_xlat_entry(op_array->opcodes, op_array->opcodes); 502 if (op_array->literals) { 506 p = op_array->literals; 580 if (op_array->arg_info) { 583 p = op_array->arg_info; 601 if (op_array->vars) { 605 p = op_array->vars; 1364 p = op_array->literals; 1452 if (op_array->vars) { [all …]
|
/PHP-8.3/ext/opcache/jit/ |
H A D | zend_jit_trace.c | 1272 op_array = p->op_array; in zend_jit_trace_build_tssa() 1319 op_array = p->op_array; in zend_jit_trace_build_tssa() 1419 op_array = p->op_array; in zend_jit_trace_build_tssa() 1429 op_array = p->op_array; in zend_jit_trace_build_tssa() 2317 op_array = p->op_array; in zend_jit_trace_build_tssa() 2388 op_array = p->op_array; in zend_jit_trace_build_tssa() 3037 op_array = p->op_array; in zend_jit_trace_allocate_registers() 3063 op_array = p->op_array; in zend_jit_trace_allocate_registers() 4045 op_array = p->op_array; in zend_jit_trace() 7417 op_array = p->op_array; in zend_jit_dump_trace() [all …]
|
H A D | zend_jit.c | 403 const zend_op *end = op_array->opcodes + op_array->last; in zend_jit_needs_call_chain() 1059 (op_array && op_array->filename) ? ZSTR_VAL(op_array->filename) : NULL, in dasm_link_and_encode() 1060 op_array, in dasm_link_and_encode() 1071 (op_array && op_array->filename) ? ZSTR_VAL(op_array->filename) : NULL, in dasm_link_and_encode() 1072 op_array, in dasm_link_and_encode() 1087 op_array, in dasm_link_and_encode() 2730 ZSTR_VAL(op_array->filename), op_array->line_start); in zend_jit() 2815 arg_info = &op_array->arg_info[op_array->num_args]; in zend_jit() 4275 zend_op_array *op_array = &EX(func)->op_array; in zend_runtime_jit() local 4328 op_array = &func->op_array; in zend_jit_check_funcs() [all …]
|
H A D | zend_jit_vm_helpers.c | 130 zend_op_array *op_array = &EX(func)->op_array; in zend_jit_copy_extra_args_helper() local 150 dst = src + (op_array->last_var + op_array->T - first_extra_arg); in zend_jit_copy_extra_args_helper() 440 count += (unrolled_calls[i] == op_array); in zend_jit_trace_recursive_call_count() 595 const zend_op_array *op_array; local 625 op_array = &EX(func)->op_array; 629 if (!op_array->function_name 631 op_array = jit_extension->op_array; 923 op_array = &EX(func)->op_array; 932 if (!op_array->function_name 934 op_array = jit_extension->op_array; [all …]
|