/PHP-7.4/ext/opcache/Optimizer/ |
H A D | pass3.c | 179 } else if (target->opcode == opline->opcode && in zend_optimizer_pass3() 185 } else if (target->opcode == opline->opcode + 3 && in zend_optimizer_pass3() 193 } else if (target->opcode == INV_COND(opline->opcode) && in zend_optimizer_pass3() 199 } else if (target->opcode == INV_COND_EX(opline->opcode) && in zend_optimizer_pass3() 237 if (target->opcode == opline->opcode-3 && in zend_optimizer_pass3() 243 } else if (target->opcode == opline->opcode && in zend_optimizer_pass3() 263 } else if ((target->opcode == INV_EX_COND_EX(opline->opcode) || in zend_optimizer_pass3() 264 target->opcode == INV_EX_COND(opline->opcode)) && in zend_optimizer_pass3() 270 } else if (target->opcode == INV_EX_COND(opline->opcode) && in zend_optimizer_pass3() 276 } else if (target->opcode == INV_EX_COND_EX(opline->opcode) && in zend_optimizer_pass3() [all …]
|
H A D | optimize_func_calls.c | 51 switch (opline->opcode) { in zend_delete_call_instructions() 79 opline->opcode = ZEND_CHECK_VAR; in zend_delete_call_instructions() 83 opline->opcode = ZEND_FREE; in zend_delete_call_instructions() 146 opline->opcode = ZEND_QM_ASSIGN; in zend_try_inline_call() 174 switch (opline->opcode) { in zend_optimize_func_calls() 240 opline->opcode -= 9; in zend_optimize_func_calls() 254 opline->opcode -= 12; in zend_optimize_func_calls() 267 opline->opcode = ZEND_SEND_VAL; in zend_optimize_func_calls() 282 opline->opcode = ZEND_SEND_REF; in zend_optimize_func_calls() 284 opline->opcode = ZEND_SEND_VAR; in zend_optimize_func_calls() [all …]
|
H A D | block_pass.c | 344 (src->opcode == ZEND_BOOL || src->opcode == ZEND_BOOL_NOT)) { in zend_optimize_block() 475 opline->opcode = in zend_optimize_block() 488 opline->opcode = in zend_optimize_block() 1290 } else if (target->opcode == INV_COND(last_op->opcode) && in zend_jmp_optimization() 1301 } else if (target->opcode == INV_COND_EX(last_op->opcode) && in zend_jmp_optimization() 1313 } else if (target->opcode == last_op->opcode && in zend_jmp_optimization() 1347 if (last_op->opcode == ZEND_JMPZ || last_op->opcode == ZEND_JMPNZ) { in zend_jmp_optimization() 1434 } else if (target->opcode == last_op->opcode-3 && in zend_jmp_optimization() 1443 } else if (target->opcode == INV_EX_COND(last_op->opcode) && in zend_jmp_optimization() 1452 } else if (target->opcode == INV_EX_COND_EX(last_op->opcode) && in zend_jmp_optimization() [all …]
|
H A D | optimize_temp_vars_5.c | 83 if (opline->opcode == ZEND_ROPE_END) { in zend_optimize_temporary_variables() 110 (opline->opcode == ZEND_RETURN || in zend_optimize_temporary_variables() 111 opline->opcode == ZEND_GENERATOR_RETURN || in zend_optimize_temporary_variables() 112 opline->opcode == ZEND_RETURN_BY_REF || in zend_optimize_temporary_variables() 113 opline->opcode == ZEND_FREE || in zend_optimize_temporary_variables() 114 opline->opcode == ZEND_FE_FREE)) { in zend_optimize_temporary_variables() 118 if (curr->opcode == ZEND_FAST_CALL) { in zend_optimize_temporary_variables() 121 } else if (curr->opcode != ZEND_FREE && in zend_optimize_temporary_variables() 122 curr->opcode != ZEND_FE_FREE && in zend_optimize_temporary_variables() 159 if (opline->opcode != ZEND_FAST_CALL) { in zend_optimize_temporary_variables() [all …]
|
H A D | pass1_5.c | 47 switch (opline->opcode) { in zend_optimizer_pass1() 81 opline->opcode = ZEND_QM_ASSIGN; in zend_optimizer_pass1() 99 opline->opcode = ZEND_QM_ASSIGN; in zend_optimizer_pass1() 109 opline->opcode = ZEND_BOOL; in zend_optimizer_pass1() 125 opline->opcode = ZEND_QM_ASSIGN; in zend_optimizer_pass1() 151 opline->opcode = ZEND_QM_ASSIGN; in zend_optimizer_pass1() 178 opline->opcode = ZEND_QM_ASSIGN; in zend_optimizer_pass1() 419 opline->opcode = ZEND_QM_ASSIGN; in zend_optimizer_pass1() 506 opline->opcode = ZEND_QM_ASSIGN; in zend_optimizer_pass1() 531 ((opline + 1)->opcode == opline->opcode + 1 || in zend_optimizer_pass1() [all …]
|
H A D | pass2.c | 42 switch (opline->opcode) { in zend_optimizer_pass2() 145 opline->opcode -= 3; in zend_optimizer_pass2() 153 if (opline->opcode == ZEND_JMPZ_EX) { in zend_optimizer_pass2() 157 opline->opcode = ZEND_QM_ASSIGN; in zend_optimizer_pass2() 168 if (opline->opcode == ZEND_JMPZ) { in zend_optimizer_pass2() 174 opline->opcode = ZEND_JMP; in zend_optimizer_pass2() 187 opline->opcode = ZEND_CHECK_VAR; in zend_optimizer_pass2() 190 opline->opcode = ZEND_FREE; in zend_optimizer_pass2() 196 if (opline->opcode == ZEND_JMPZ) { in zend_optimizer_pass2() 202 opline->opcode = ZEND_JMPZNZ; in zend_optimizer_pass2() [all …]
|
H A D | escape_analysis.c | 109 if (opline->opcode != ZEND_ASSIGN) { in zend_build_equi_escape_sets() 124 if (opline->opcode != ZEND_QM_ASSIGN) { in zend_build_equi_escape_sets() 173 switch (opline->opcode) { in is_allocation_def() 208 switch (opline->opcode) { in is_allocation_def() 239 switch (opline->opcode) { in is_local_def() 258 switch (opline->opcode) { in is_local_def() 283 switch (opline->opcode) { in is_escape_use() 328 if ((opline-1)->opcode != ZEND_ASSIGN_DIM in is_escape_use() 352 switch (opline->opcode) { in is_escape_use() 373 switch (opline->opcode) { in is_escape_use() [all …]
|
H A D | dfa_pass.c | 353 if (opline->opcode == ZEND_NEW) { in opline_supports_assign_contraction() 358 if (opline->opcode == ZEND_DO_ICALL || opline->opcode == ZEND_DO_UCALL in opline_supports_assign_contraction() 359 || opline->opcode == ZEND_DO_FCALL || opline->opcode == ZEND_DO_FCALL_BY_NAME) { in opline_supports_assign_contraction() 367 if (opline->opcode == ZEND_POST_INC || opline->opcode == ZEND_POST_DEC) { in opline_supports_assign_contraction() 379 if (opline->opcode == ZEND_CAST in opline_supports_assign_contraction() 547 if (opline->opcode == ZEND_NOP in compress_block() 615 switch (opline->opcode) { in zend_ssa_replace_control_link() 726 switch (opline->opcode) { in zend_dfa_optimize_jmps() 744 opline->opcode = ZEND_JMP; in zend_dfa_optimize_jmps() 770 opline->opcode = ZEND_JMP; in zend_dfa_optimize_jmps() [all …]
|
H A D | zend_dfg.c | 50 if (opline->opcode != ZEND_OP_DATA) { in zend_build_dfg() 52 if (next < end && next->opcode == ZEND_OP_DATA) { in zend_build_dfg() 55 if (next->op1_type == IS_CV && (opline->opcode == ZEND_ASSIGN_OBJ_REF in zend_build_dfg() 56 || opline->opcode == ZEND_ASSIGN_STATIC_PROP_REF)) { in zend_build_dfg() 74 switch (opline->opcode) { in zend_build_dfg() 153 if (opline->opcode == ZEND_VERIFY_RETURN_TYPE) { in zend_build_dfg() 159 switch (opline->opcode) { in zend_build_dfg() 187 if (opline->opcode == ZEND_FE_FETCH_R || opline->opcode == ZEND_FE_FETCH_RW) { in zend_build_dfg()
|
H A D | nop_removal.c | 48 if (opline->opcode == ZEND_JMP && ZEND_OP1_JMP_ADDR(opline) > op_array->opcodes + i) { in zend_optimizer_nop_removal() 52 while (target->opcode == ZEND_NOP) { in zend_optimizer_nop_removal() 57 opline->opcode = ZEND_NOP; in zend_optimizer_nop_removal() 62 if (opline->opcode == ZEND_NOP) { in zend_optimizer_nop_removal()
|
H A D | zend_optimizer.c | 66 switch (opcode) { in zend_optimizer_eval_binary_op() 116 if (opcode == ZEND_BW_NOT in zend_optimizer_eval_unary_op() 239 switch (opline->opcode) { in zend_optimizer_update_op1_const() 378 switch (opline->opcode) { in zend_optimizer_update_op2_const() 564 switch (opline->opcode) { in zend_optimizer_replace_by_const() 671 } while (opline->opcode != ZEND_RETURN && opline->opcode != ZEND_RETURN_BY_REF); in zend_optimizer_replace_by_const() 694 switch (new_opline->opcode) { in zend_optimizer_migrate_jump() 738 switch (opline->opcode) { in zend_optimizer_shift_jump() 811 switch (opline->opcode) { in zend_optimizer_get_called_func() 1125 switch (opline->opcode) { in zend_redo_pass_two() [all …]
|
H A D | sccp.c | 211 switch (opline->opcode) { in can_replace_op1() 280 switch (opline->opcode) { in can_replace_op2() 300 switch (opline->opcode) { in try_replace_op1() 344 switch (opline->opcode) { in try_replace_op2() 702 if (opcode == ZEND_PRE_INC in ct_eval_incdec() 703 || opcode == ZEND_POST_INC in ct_eval_incdec() 1074 switch (opline->opcode) { in sccp_visit_instr() 1456 switch (opline->opcode) { in sccp_visit_instr() 1866 if (opline->opcode != ZEND_SEND_VAL && opline->opcode != ZEND_SEND_VAR) { in sccp_visit_instr() 1928 switch (opline->opcode) { in sccp_mark_feasible_successors() [all …]
|
H A D | dce.c | 79 switch (opline->opcode) { in may_have_side_effects() 276 || (opline->opcode == ZEND_ASSIGN in add_operands_to_worklists() 285 || (opline->opcode == ZEND_FE_FETCH_R in add_operands_to_worklists() 332 switch (def_opline->opcode) { in try_remove_var_def() 381 if (opline->opcode == ZEND_NOP) { in dce_instr() 394 && opline->opcode != ZEND_CASE) { in dce_instr() 418 opline->opcode = ZEND_FREE; in dce_instr() 534 if (op_array->opcodes[i].opcode == ZEND_OP_DATA) { 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() [all …]
|
H A D | zend_inference.c | 556 switch (opcode) { in zend_inference_calc_binary_op_range() 987 switch (opline->opcode) { in zend_inference_calc_range() 2171 switch (opcode) { in binary_op_result_type() 2468 switch (opline->opcode) { in zend_update_type_info() 3837 return opline->opcode == ZEND_ADD || opline->opcode == ZEND_SUB in is_narrowable_instr() 3838 || opline->opcode == ZEND_MUL || opline->opcode == ZEND_DIV; in is_narrowable_instr() 3966 zend_uchar opcode = opline->opcode; in can_convert_to_double() local 4133 if (opline->opcode == ZEND_RETURN || opline->opcode == ZEND_RETURN_BY_REF) { in zend_func_return_info() 4412 switch (opline->opcode) { in zend_may_throw() 4436 switch (opline->opcode) { in zend_may_throw() [all …]
|
H A D | zend_cfg.c | 44 zend_uchar opcode = opcodes[b->start + b->len - 1].opcode; in zend_mark_reachable() local 46 if (opcode == ZEND_JMP) { in zend_mark_reachable() 54 opcode == ZEND_YIELD || in zend_mark_reachable() 55 opcode == ZEND_YIELD_FROM || in zend_mark_reachable() 56 opcode == ZEND_DO_FCALL || in zend_mark_reachable() 57 opcode == ZEND_DO_UCALL || in zend_mark_reachable() 63 if (opcode == ZEND_RECV || in zend_mark_reachable() 64 opcode == ZEND_RECV_INIT) { in zend_mark_reachable() 76 ZEND_ASSERT(opcode == ZEND_SWITCH_LONG || opcode == ZEND_SWITCH_STRING); in zend_mark_reachable() 288 switch (opline->opcode) { in zend_build_cfg() [all …]
|
H A D | zend_ssa.c | 183 if (op->opcode == ZEND_POST_DEC) { in find_adjusted_tmp_var() 188 } else if (op->opcode == ZEND_POST_INC) { in find_adjusted_tmp_var() 193 } else if (op->opcode == ZEND_ADD) { in find_adjusted_tmp_var() 209 } else if (op->opcode == ZEND_SUB) { in find_adjusted_tmp_var() 245 switch (opline->opcode) { in place_essa_pis() 267 ((opline-1)->opcode == ZEND_IS_EQUAL || in place_essa_pis() 382 if((opline-1)->opcode == ZEND_IS_EQUAL) { in place_essa_pis() 562 if (opline->opcode != ZEND_OP_DATA) { in zend_ssa_rename() 584 if (opline->opcode == ZEND_FE_FETCH_R || opline->opcode == ZEND_FE_FETCH_RW) { in zend_ssa_rename() 596 switch (opline->opcode) { in zend_ssa_rename() [all …]
|
/PHP-7.4/Zend/ |
H A D | zend_vm_opcodes.c | 421 ZEND_API const char* ZEND_FASTCALL zend_get_opcode_name(zend_uchar opcode) { in zend_get_opcode_name() argument 422 if (UNEXPECTED(opcode > ZEND_VM_LAST_OPCODE)) { in zend_get_opcode_name() 425 return zend_vm_opcodes_names[opcode]; in zend_get_opcode_name() 427 ZEND_API uint32_t ZEND_FASTCALL zend_get_opcode_flags(zend_uchar opcode) { in zend_get_opcode_flags() argument 428 if (UNEXPECTED(opcode > ZEND_VM_LAST_OPCODE)) { in zend_get_opcode_flags() 429 opcode = ZEND_NOP; in zend_get_opcode_flags() 431 return zend_vm_opcodes_flags[opcode]; in zend_get_opcode_flags()
|
H A D | zend_opcode.c | 515 opline->opcode = ZEND_NOP; in zend_update_extended_stmts() 523 opline->opcode = ZEND_NOP; in zend_update_extended_stmts() 599 switch (def_opline->opcode) { in emit_live_range() 650 switch (def_opline->opcode) { in emit_live_range() 736 if (opline->opcode == ZEND_CASE in keeps_op1_alive() 743 && opline->opcode != ZEND_FE_FETCH_R in keeps_op1_alive() 748 && opline->opcode != ZEND_ROPE_ADD); in keeps_op1_alive() 930 switch (opline->opcode) { in pass_two() 953 opline->opcode = ZEND_JMP; in pass_two() 1049 switch (opcode) { in get_unary_op() [all …]
|
H A D | zend_vm.h | 24 ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler(zend_op* opcode); 25 ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* opcode, uint32_t op1_info, uint3…
|
H A D | README.md | 33 `ZEND_VM` architecture allows specializing opcode handlers according to 42 opcode handlers and helpers. The typical opcode handler template looks like 52 `<OPCODE-NUMBER>` is a opcode number (0, 1, ...) 53 `<OPCODE>` is an opcode name (ZEN_NOP, ZEND_ADD, :) 59 same as in old `zend_execute.c`, but now it uses macros to access opcode 124 `zend_vm_opcodes.h` and `zend_vm_execute.h`. The first file is a list of opcode 129 different opcode threading model using `--with-vm-kind=CALL|SWITCH|GOTO`. You 130 can disable opcode specialization using `--without-specializer`. You can include
|
H A D | zend_compile.c | 56 zend_uchar opcode; member 1881 opline->opcode = opcode; in zend_emit_op() 1901 opline->opcode = opcode; in zend_emit_op_tmp() 2027 tmp_opline.opcode = opcode; in zend_delayed_emit_op() 4234 opline->opcode = loop_var->opcode; in zend_handle_loops_and_finally_ex() 7005 if (!(opcode == ZEND_ADD || opcode == ZEND_SUB || opcode == ZEND_MUL || opcode == ZEND_DIV in zend_binary_op_produces_numeric_string_error() 7006 || opcode == ZEND_POW || opcode == ZEND_MOD || opcode == ZEND_SL || opcode == ZEND_SR in zend_binary_op_produces_numeric_string_error() 7007 || opcode == ZEND_BW_OR || opcode == ZEND_BW_AND || opcode == ZEND_BW_XOR)) { in zend_binary_op_produces_numeric_string_error() 7013 if ((opcode == ZEND_BW_OR || opcode == ZEND_BW_AND || opcode == ZEND_BW_XOR) in zend_binary_op_produces_numeric_string_error() 7047 if ((opcode == ZEND_DIV || opcode == ZEND_MOD) && in zend_try_ct_eval_binary_op() [all …]
|
/PHP-7.4/Zend/tests/ |
H A D | bug73663.phpt | 2 Bug #73663 ("Invalid opcode 65/16/8" occurs with a variable created with list()) 15 var_dump(list($val) = $array); // NG: Invalid opcode
|
H A D | bug32833.phpt | 2 Bug #32833 (Invalid opcode with $a[] .= '')
|
/PHP-7.4/sapi/phpdbg/ |
H A D | phpdbg_opcode.c | 30 static inline const char *phpdbg_decode_opcode(zend_uchar opcode) /* {{{ */ in ZEND_EXTERN_MODULE_GLOBALS() 32 const char *ret = zend_get_opcode_name(opcode); in ZEND_EXTERN_MODULE_GLOBALS() 94 const char *opcode_name = phpdbg_decode_opcode(opline->opcode); in phpdbg_decode_opline() 95 uint32_t flags = zend_get_opcode_flags(opline->opcode); in phpdbg_decode_opline() 112 switch (opline->opcode) { in phpdbg_decode_opline()
|
/PHP-7.4/ext/xml/tests/ |
H A D | bug30266.phpt | 2 Bug #30266 (Invalid opcode 137/1/8) 13 Fatal error: Invalid opcode 137/1/8. in /home/hartmut/projects/php/dev/head/ext/xml/tests/bug30266.…
|