/PHP-7.4/ext/opcache/Optimizer/ |
H A D | nop_removal.c | 44 end = op_array->opcodes + op_array->last; in zend_optimizer_nop_removal() 45 for (opline = op_array->opcodes; opline < end; opline++) { in zend_optimizer_nop_removal() 48 if (opline->opcode == ZEND_JMP && ZEND_OP1_JMP_ADDR(opline) > op_array->opcodes + i) { in zend_optimizer_nop_removal() 66 zend_op *new_opline = op_array->opcodes + new_count; in zend_optimizer_nop_removal() 77 end = op_array->opcodes + op_array->last; in zend_optimizer_nop_removal() 80 for (opline = op_array->opcodes; opline<end; opline++) { in zend_optimizer_nop_removal() 101 opline_num = &op_array->opcodes[*opline_num].result.opline_num; in zend_optimizer_nop_removal()
|
H A D | zend_inference.h | 49 ssa->ops[opline - op_array->opcodes].opN##_use >= 0 && \ 50 ssa->var_info[ssa->ops[opline - op_array->opcodes].opN##_use].has_range); \ 72 ssa->ops[opline - op_array->opcodes].opN##_use >= 0 && \ 73 ssa->var_info[ssa->ops[opline - op_array->opcodes].opN##_use].has_range) { \ 74 return ssa->var_info[ssa->ops[opline - op_array->opcodes].opN##_use].range.min; \ 96 ssa->ops[opline - op_array->opcodes].opN##_use >= 0 && \ 97 ssa->var_info[ssa->ops[opline - op_array->opcodes].opN##_use].has_range) { \ 114 ssa->ops[opline - op_array->opcodes].opN##_use >= 0 && \ 115 ssa->var_info[ssa->ops[opline - op_array->opcodes].opN##_use].has_range) { \ 132 ssa->ops[opline - op_array->opcodes].opN##_use >= 0 && \ [all …]
|
H A D | dce.c | 329 && var->use_chain == (opline - ctx->op_array->opcodes)) { in try_remove_var_def() 330 zend_op *def_opline = &ctx->op_array->opcodes[def]; in try_remove_var_def() 405 zend_bitset_excl(ctx->instr_dead, opline - ctx->op_array->opcodes); in dce_instr() 534 if (op_array->opcodes[i].opcode == ZEND_OP_DATA) { in dce_optimize_op_array() 541 add_operands_to_worklists(&ctx, &op_array->opcodes[i], &ssa->ops[i], ssa, 0); in dce_optimize_op_array() 546 || zend_may_throw(&op_array->opcodes[i], op_array, ssa) in dce_optimize_op_array() 548 if (op_array->opcodes[i].opcode == ZEND_NEW in dce_optimize_op_array() 549 && op_array->opcodes[i+1].opcode == ZEND_DO_FCALL in dce_optimize_op_array() 575 add_operands_to_worklists(&ctx, &op_array->opcodes[i], &ssa->ops[i], ssa, 1); in dce_optimize_op_array() 576 if (i < op_array->last && op_array->opcodes[i+1].opcode == ZEND_OP_DATA) { in dce_optimize_op_array() [all …]
|
H A D | zend_cfg.c | 44 zend_uchar opcode = opcodes[b->start + b->len - 1].opcode; in zend_mark_reachable() 98 zend_mark_reachable(opcodes, cfg, succ); in zend_mark_reachable() 111 zend_mark_reachable(op_array->opcodes, cfg, blocks + start); in zend_mark_reachable_blocks() 164 zend_mark_reachable(op_array->opcodes, cfg, b); in zend_mark_reachable_blocks() 172 zend_mark_reachable(op_array->opcodes, cfg, b); in zend_mark_reachable_blocks() 180 zend_mark_reachable(op_array->opcodes, cfg, b); in zend_mark_reachable_blocks() 210 zend_op *opline = &op_array->opcodes[j]; in zend_mark_reachable_blocks() 287 zend_op *opline = op_array->opcodes + i; in zend_build_cfg() 339 BB_START(OP_JMP_ADDR(opline, opline->op1) - op_array->opcodes); in zend_build_cfg() 348 BB_START(OP_JMP_ADDR(opline, opline->op1) - op_array->opcodes); in zend_build_cfg() [all …]
|
H A D | dfa_pass.c | 150 return (op_array->opcodes[next].opcode == ZEND_JMPZ || in is_smart_branch_inhibiting_nop() 151 op_array->opcodes[next].opcode == ZEND_JMPNZ) && in is_smart_branch_inhibiting_nop() 152 zend_is_smart_branch(op_array->opcodes + target - 1); in is_smart_branch_inhibiting_nop() 205 op_array->opcodes[target] = op_array->opcodes[i]; in zend_ssa_remove_nops() 219 opline = op_array->opcodes + old_end - 1; in zend_ssa_remove_nops() 224 new_opline = op_array->opcodes + target - 1; in zend_ssa_remove_nops() 239 MAKE_NOP(op_array->opcodes + i); in zend_ssa_remove_nops() 462 uint32_t op_num = send_needly - op_array->opcodes; in zend_dfa_optimize_calls() 614 opline = op_array->opcodes + src->start + src->len - 1; in zend_ssa_replace_control_link() 723 opline = op_array->opcodes + op_num; in zend_dfa_optimize_jmps() [all …]
|
H A D | optimize_temp_vars_5.c | 63 end = op_array->opcodes; in zend_optimize_temporary_variables() 64 opline = &op_array->opcodes[op_array->last - 1]; in zend_optimize_temporary_variables() 77 end = op_array->opcodes; in zend_optimize_temporary_variables() 78 opline = &op_array->opcodes[op_array->last - 1]; in zend_optimize_temporary_variables()
|
H A D | zend_optimizer.c | 559 zend_op *end = op_array->opcodes + op_array->last; in zend_optimizer_replace_by_const() 623 zend_op *end = op_array->opcodes + op_array->last; in zend_optimizer_replace_by_const() 926 while (--free_opline >= op_array->opcodes) { in zend_optimizer_get_loop_var_def() 1069 opline = op_array->opcodes; in zend_revert_pass_two() 1093 zend_op *old_opcodes = op_array->opcodes; in zend_redo_pass_two() 1098 op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, in zend_redo_pass_two() 1113 opline = op_array->opcodes; in zend_redo_pass_two() 1168 zend_op *old_opcodes = op_array->opcodes; in zend_redo_pass_two_ex() 1173 op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, in zend_redo_pass_two_ex() 1188 opline = op_array->opcodes; in zend_redo_pass_two_ex() [all …]
|
H A D | block_pass.c | 86 zend_op *opcodes = op_array->opcodes; in strip_leading_nops() local 91 && (opcodes[b->start + 1].opcode == ZEND_JMPZ in strip_leading_nops() 122 if (op_array->opcodes[i].opcode != ZEND_NOP) { in strip_nops() 124 op_array->opcodes[j] = op_array->opcodes[i]; in strip_nops() 129 && (op_array->opcodes[i+1].opcode == ZEND_JMPZ in strip_nops() 140 MAKE_NOP(op_array->opcodes + j); in strip_nops() 180 opline = op_array->opcodes + block->start; in zend_optimize_block() 978 efree(op_array->opcodes); in assemble_code_blocks() 979 op_array->opcodes = new_opcodes; in assemble_code_blocks() 1635 opline = op_array->opcodes + block->start; in zend_t_usage() [all …]
|
H A D | optimize_func_calls.c | 101 && func->op_array.opcodes[func->op_array.num_args].opcode == ZEND_RETURN) { in zend_try_inline_call() 103 zend_op *ret_opline = func->op_array.opcodes + func->op_array.num_args; in zend_try_inline_call() 135 …if (Z_TYPE_P(RT_CONSTANT(&func->op_array.opcodes[i], func->op_array.opcodes[i].op2)) == IS_CONSTAN… in zend_try_inline_call() 161 zend_op *opline = op_array->opcodes; in zend_optimize_func_calls()
|
H A D | zend_dump.c | 432 int ssa_var_num = ssa->ops[opline - op_array->opcodes].result_def; in zend_dump_op() 600 int ssa_var_num = ssa->ops[opline - op_array->opcodes].op1_use; in zend_dump_op() 604 } else if (ssa->ops[opline - op_array->opcodes].op1_def < 0) { in zend_dump_op() 613 int ssa_var_num = ssa->ops[opline - op_array->opcodes].op1_def; in zend_dump_op() 657 int ssa_var_num = ssa->ops[opline - op_array->opcodes].op2_use; in zend_dump_op() 661 } else if (ssa->ops[opline - op_array->opcodes].op2_def < 0) { in zend_dump_op() 670 int ssa_var_num = ssa->ops[opline - op_array->opcodes].op2_def; in zend_dump_op() 703 int ssa_var_num = ssa->ops[opline - op_array->opcodes].result_use; in zend_dump_op() 713 int ssa_var_num = ssa->ops[opline - op_array->opcodes].result_def; in zend_dump_op() 996 opline = op_array->opcodes + b->start; in zend_dump_op_array() [all …]
|
H A D | zend_call_graph.c | 89 zend_op *opline = op_array->opcodes; in zend_analyze_calls() 292 map[call->caller_init_opline - op_array->opcodes] = call; in zend_build_call_map() 294 map[call->caller_call_opline - op_array->opcodes] = call; in zend_build_call_map() 298 map[call->arg_info[i].opline - op_array->opcodes] = call; in zend_build_call_map()
|
H A D | compact_vars.c | 38 zend_op *opline = &op_array->opcodes[i]; in zend_optimizer_compact_vars() 86 zend_op *opline = &op_array->opcodes[i]; in zend_optimizer_compact_vars()
|
H A D | scdf.c | 124 zend_op *opline = &scdf->op_array->opcodes[i]; in scdf_solve() 164 opline = &scdf->op_array->opcodes[j]; in scdf_solve() 197 zend_op *opline = &op_array->opcodes[i]; in kept_alive_by_loop_var_free()
|
H A D | escape_analysis.c | 105 zend_op *opline = op_array->opcodes + def; in zend_build_equi_escape_sets() 170 zend_op *opline = op_array->opcodes + def; in is_allocation_def() 236 zend_op *opline = op_array->opcodes + def; in is_local_def() 280 zend_op *opline = op_array->opcodes + use; in is_escape_use() 485 zend_op *opline = op_array->opcodes + use; in zend_ssa_escape_analysis()
|
H A D | pass2.c | 38 zend_op *end = op_array->opcodes + op_array->last; in zend_optimizer_pass2() 40 opline = op_array->opcodes; in zend_optimizer_pass2()
|
H A D | zend_inference.c | 121 if (op_array->opcodes[line].opcode == ZEND_OP_DATA) { \ 983 opline = op_array->opcodes + line; in zend_inference_calc_range() 1939 if (op_array->opcodes[use].opcode == ZEND_OP_DATA) { in add_usages() 1951 && op_array->opcodes[use + 1].opcode == ZEND_OP_DATA) { in add_usages() 2002 if (op_array->opcodes[use+1].opcode == ZEND_OP_DATA) { in reset_dependent_vars() 2435 zend_op *opline = op_array->opcodes + i; in zend_update_type_info() 3455 switch (op_array->opcodes[j].opcode) { in zend_update_type_info() 3888 zend_op *opline = &op_array->opcodes[use]; in can_convert_to_double() 4024 opline = op_array->opcodes + ssa->vars[v].definition; in zend_type_narrowing() 4068 …zend_op *op = op_array->opcodes + info->ssa.vars[info->ssa.ops[opline - op_array->opcodes].op1_use… in is_recursive_tail_call() [all …]
|
H A D | pass3.c | 56 zend_op *end = op_array->opcodes + op_array->last; in zend_optimizer_pass3() 64 opline = op_array->opcodes; in zend_optimizer_pass3() 333 for(op = &op_array->opcodes[opline->op2.opline_num]; op<end; op++) { in zend_optimizer_pass3()
|
/PHP-7.4/Zend/ |
H A D | zend_vm_gen.php | 699 global $prefix, $opnames, $opcodes; 1740 …_handler($f, 1, $kind, $opcodes[$num]["op"], $op1, $op2, isset($opcodes[$num]["use"]), $opcodes[$n… 1769 …handler($f, 0, $kind, $opcodes[$num]["op"], "ANY", "ANY", isset($opcodes[$num]["use"]), $opcodes[$… 2430 if (isset($opcodes[$code])) { 2480 if (isset($opcodes[$code])) { 2580 if (isset($opcodes[$code])) { 2597 ksort($opcodes); 2600 foreach ($opcodes as $dsc) { 2658 foreach ($opcodes as $code => $dsc) { 2685 fputs($f,"\t".(isset($opcodes[$i]["op"])?'"'.$opcodes[$i]["op"].'"':"NULL").",\n"); [all …]
|
H A D | zend_opcode.c | 465 efree(op_array->opcodes); in destroy_op_array() 548 CG(zend_lineno) = op_array->opcodes[op_num].lineno; in zend_check_finally_breakout() 556 CG(zend_lineno) = op_array->opcodes[op_num].lineno; in zend_check_finally_breakout() 596 zend_op *use_opline = &op_array->opcodes[end]; in emit_live_range() 704 start = block_start_op - op_array->opcodes; in emit_live_range() 716 start = def_opline + 1 - op_array->opcodes; in emit_live_range() 717 end = use_opline - op_array->opcodes; in emit_live_range() 772 zend_op *opline = &op_array->opcodes[opnum]; in zend_calc_live_ranges() 902 op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, sizeof(zend_op)*op_array->last); in pass_two() 910 op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, in pass_two() [all …]
|
H A D | zend_generators.c | 99 if (execute_data->opline != op_array->opcodes) { in zend_generator_cleanup_unfinished_execution() 101 uint32_t op_num = execute_data->opline - op_array->opcodes - 1; in zend_generator_cleanup_unfinished_execution() 198 op_num = ex->opline - ex->func->op_array.opcodes - 1; in zend_generator_dtor_storage() 219 ZEND_CALL_VAR(ex, ex->func->op_array.opcodes[try_catch->finally_end].op1.var); in zend_generator_dtor_storage() 226 ex->opline = &ex->func->op_array.opcodes[try_catch->finally_op]; in zend_generator_dtor_storage() 235 ZEND_CALL_VAR(ex, ex->func->op_array.opcodes[try_catch->finally_end].op1.var); in zend_generator_dtor_storage() 238 zend_op *retval_op = &ex->func->op_array.opcodes[Z_OPLINE_NUM_P(fast_call)]; in zend_generator_dtor_storage() 296 if (execute_data->opline != op_array->opcodes) { in calc_gc_buffer_size() 298 uint32_t i, op_num = execute_data->opline - op_array->opcodes - 1; in calc_gc_buffer_size() 390 if (execute_data->opline != op_array->opcodes) { in zend_generator_get_gc() [all …]
|
/PHP-7.4/sapi/phpdbg/ |
H A D | phpdbg_opcode.h | 36 zend_op *opcodes; member
|
H A D | phpdbg_opcode.c | 73 spprintf(&result, 0, "J%td", OP_JMP_ADDR(opline, op) - ops->opcodes); in phpdbg_decode_input_op() 181 cur->opcodes = op_array->opcodes; in phpdbg_print_opline_ex()
|
/PHP-7.4/Zend/tests/ |
H A D | bug73338.phpt | 2 Bug #73338: Ensure exceptions in function init opcodes are cleaned properly
|
/PHP-7.4/ext/opcache/ |
H A D | zend_persist.c | 295 persist_ptr = zend_shared_alloc_get_xlat_entry(op_array->opcodes); in zend_persist_op_array_ex() 297 op_array->opcodes = persist_ptr; in zend_persist_op_array_ex() 389 …zend_op *new_opcodes = zend_shared_memdup_put(op_array->opcodes, sizeof(zend_op) * op_array->last); in zend_persist_op_array_ex() 412 ((zval*)((char*)(op_array->opcodes + (opline - new_opcodes)) + in zend_persist_op_array_ex() 424 ((zval*)((char*)(op_array->opcodes + (opline - new_opcodes)) + in zend_persist_op_array_ex() 435 opline->op1.jmp_addr = &new_opcodes[opline->op1.jmp_addr - op_array->opcodes]; in zend_persist_op_array_ex() 449 opline->op2.jmp_addr = &new_opcodes[opline->op2.jmp_addr - op_array->opcodes]; in zend_persist_op_array_ex() 453 opline->op2.jmp_addr = &new_opcodes[opline->op2.jmp_addr - op_array->opcodes]; in zend_persist_op_array_ex() 467 efree(op_array->opcodes); in zend_persist_op_array_ex() 468 op_array->opcodes = new_opcodes; in zend_persist_op_array_ex()
|
H A D | zend_file_cache.c | 407 if (IS_SERIALIZED(op_array->opcodes)) { 429 if (UNEXPECTED(zend_shared_alloc_get_xlat_entry(op_array->opcodes))) { 432 SERIALIZE_PTR(op_array->opcodes); 444 zend_shared_alloc_register_xlat_entry(op_array->opcodes, op_array->opcodes); 468 SERIALIZE_PTR(op_array->opcodes); 469 opline = op_array->opcodes; 1117 if (IS_UNSERIALIZED(op_array->opcodes)) { 1154 UNSERIALIZE_PTR(op_array->opcodes); 1182 UNSERIALIZE_PTR(op_array->opcodes); 1183 opline = op_array->opcodes;
|