/PHP-8.1/Zend/ |
H A D | zend_vm_opcodes.c | 437 ZEND_API const char* ZEND_FASTCALL zend_get_opcode_name(zend_uchar opcode) { in zend_get_opcode_name() argument 438 if (UNEXPECTED(opcode > ZEND_VM_LAST_OPCODE)) { in zend_get_opcode_name() 441 return zend_vm_opcodes_names[opcode]; in zend_get_opcode_name() 443 ZEND_API uint32_t ZEND_FASTCALL zend_get_opcode_flags(zend_uchar opcode) { in zend_get_opcode_flags() argument 444 if (UNEXPECTED(opcode > ZEND_VM_LAST_OPCODE)) { in zend_get_opcode_flags() 445 opcode = ZEND_NOP; in zend_get_opcode_flags() 447 return zend_vm_opcodes_flags[opcode]; in zend_get_opcode_flags() 450 zend_uchar opcode; in zend_get_opcode_id() local 451 …for (opcode = 0; opcode < (sizeof(zend_vm_opcodes_names) / sizeof(zend_vm_opcodes_names[0])) - 1; … in zend_get_opcode_id() 452 const char *opcode_name = zend_vm_opcodes_names[opcode]; in zend_get_opcode_id() [all …]
|
H A D | zend_opcode.c | 623 opline->opcode = ZEND_NOP; in zend_update_extended_stmts() 631 opline->opcode = ZEND_NOP; in zend_update_extended_stmts() 707 switch (def_opline->opcode) { in emit_live_range() 758 switch (def_opline->opcode) { in emit_live_range() 855 if (opline->opcode == ZEND_CASE in keeps_op1_alive() 859 || opline->opcode == ZEND_MATCH in keeps_op1_alive() 869 && opline->opcode != ZEND_ROPE_ADD); in keeps_op1_alive() 1051 switch (opline->opcode) { in pass_two() 1074 opline->opcode = ZEND_JMP; in pass_two() 1172 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
|
/PHP-8.1/Zend/Optimizer/ |
H A D | pass3.c | 68 switch (opline->opcode) { in zend_optimizer_pass3() 170 } else if (target->opcode == opline->opcode && in zend_optimizer_pass3() 176 } else if (target->opcode == INV_COND(opline->opcode) && in zend_optimizer_pass3() 201 opline->opcode = ZEND_FREE; in zend_optimizer_pass3() 220 } else if (target->opcode == opline->opcode-3 && in zend_optimizer_pass3() 227 } else if (target->opcode == opline->opcode && in zend_optimizer_pass3() 243 } else if (target->opcode == INV_EX_COND(opline->opcode) && in zend_optimizer_pass3() 249 } else if (target->opcode == INV_EX_COND_EX(opline->opcode) && in zend_optimizer_pass3() 283 opline->opcode = ZEND_BOOL; in zend_optimizer_pass3() 297 } else if ((target->opcode == ZEND_JMPZ || target->opcode == ZEND_JMPZNZ) && in zend_optimizer_pass3() [all …]
|
H A D | optimize_func_calls.c | 52 switch (opline->opcode) { in zend_delete_call_instructions() 80 opline->opcode = ZEND_CHECK_VAR; in zend_delete_call_instructions() 84 opline->opcode = ZEND_FREE; in zend_delete_call_instructions() 140 opline->opcode = ZEND_QM_ASSIGN; in zend_try_inline_call() 182 switch (opline->opcode) { in zend_optimize_func_calls() 258 if ((opline->opcode == ZEND_FETCH_OBJ_FUNC_ARG || opline->opcode == ZEND_FETCH_DIM_FUNC_ARG) in zend_optimize_func_calls() 265 opline->opcode -= 9; in zend_optimize_func_calls() 279 opline->opcode -= 12; in zend_optimize_func_calls() 297 opline->opcode = ZEND_SEND_VAL; in zend_optimize_func_calls() 333 opline->opcode = ZEND_SEND_REF; in zend_optimize_func_calls() [all …]
|
H A D | block_pass.c | 215 switch (opline->opcode) { in zend_optimize_block() 443 opline->opcode = in zend_optimize_block() 456 opline->opcode = in zend_optimize_block() 619 opline->opcode = INV_COND(opline->opcode); in zend_optimize_block() 1335 } else if (target->opcode == last_op->opcode && in zend_jmp_optimization() 1339 } else if (target->opcode == INV_COND(last_op->opcode) && in zend_jmp_optimization() 1396 last_op->opcode = INV_COND(last_op->opcode); in zend_jmp_optimization() 1435 } else if (target->opcode == last_op->opcode-3 && in zend_jmp_optimization() 1440 } else if (target->opcode == last_op->opcode && in zend_jmp_optimization() 1451 } else if (target->opcode == INV_EX_COND(last_op->opcode) && in zend_jmp_optimization() [all …]
|
H A D | pass1.c | 47 switch (opline->opcode) { in zend_optimizer_pass1() 98 opline->opcode = ZEND_QM_ASSIGN; in zend_optimizer_pass1() 123 opline->opcode = ZEND_QM_ASSIGN; in zend_optimizer_pass1() 143 opline->opcode = ZEND_QM_ASSIGN; in zend_optimizer_pass1() 169 opline->opcode = ZEND_QM_ASSIGN; in zend_optimizer_pass1() 196 opline->opcode = ZEND_QM_ASSIGN; in zend_optimizer_pass1() 509 opline->opcode = ZEND_QM_ASSIGN; in zend_optimizer_pass1() 534 ((opline + 1)->opcode == opline->opcode + 1 || in zend_optimizer_pass1() 551 (opline + 1)->opcode = opline->opcode; in zend_optimizer_pass1() 605 opline->opcode = ZEND_JMP; in zend_optimizer_pass1() [all …]
|
H A D | optimize_temp_vars_5.c | 82 if (opline->opcode == ZEND_ROPE_END) { in zend_optimize_temporary_variables() 109 (opline->opcode == ZEND_RETURN || in zend_optimize_temporary_variables() 110 opline->opcode == ZEND_GENERATOR_RETURN || in zend_optimize_temporary_variables() 111 opline->opcode == ZEND_RETURN_BY_REF || in zend_optimize_temporary_variables() 112 opline->opcode == ZEND_FREE || in zend_optimize_temporary_variables() 113 opline->opcode == ZEND_FE_FREE)) { in zend_optimize_temporary_variables() 117 if (curr->opcode == ZEND_FAST_CALL) { in zend_optimize_temporary_variables() 120 } else if (curr->opcode != ZEND_FREE && in zend_optimize_temporary_variables() 121 curr->opcode != ZEND_FE_FREE && in zend_optimize_temporary_variables() 158 if (opline->opcode != ZEND_FAST_CALL) { in zend_optimize_temporary_variables() [all …]
|
H A D | dfa_pass.c | 337 if (opline->opcode == ZEND_NEW) { in opline_supports_assign_contraction() 342 if (opline->opcode == ZEND_DO_ICALL || opline->opcode == ZEND_DO_UCALL in opline_supports_assign_contraction() 343 || opline->opcode == ZEND_DO_FCALL || opline->opcode == ZEND_DO_FCALL_BY_NAME) { in opline_supports_assign_contraction() 351 if (opline->opcode == ZEND_POST_INC || opline->opcode == ZEND_POST_DEC) { in opline_supports_assign_contraction() 363 if (opline->opcode == ZEND_CAST in opline_supports_assign_contraction() 653 switch (opline->opcode) { in zend_ssa_replace_control_link() 789 switch (opline->opcode) { in zend_dfa_optimize_jmps() 807 opline->opcode = ZEND_JMP; in zend_dfa_optimize_jmps() 873 opline->opcode = ZEND_JMP; in zend_dfa_optimize_jmps() 1031 opline->opcode = ZEND_JMP; in zend_dfa_optimize_jmps() [all …]
|
H A D | escape_analysis.c | 108 if (opline->opcode != ZEND_ASSIGN) { in zend_build_equi_escape_sets() 123 if (opline->opcode != ZEND_QM_ASSIGN) { in zend_build_equi_escape_sets() 156 switch (opline->opcode) { in is_allocation_def() 192 switch (opline->opcode) { in is_allocation_def() 221 switch (opline->opcode) { in is_local_def() 240 switch (opline->opcode) { in is_local_def() 265 switch (opline->opcode) { in is_escape_use() 310 if ((opline-1)->opcode != ZEND_ASSIGN_DIM in is_escape_use() 334 switch (opline->opcode) { in is_escape_use() 355 switch (opline->opcode) { in is_escape_use() [all …]
|
H A D | zend_optimizer.c | 188 switch (opline->opcode) { in zend_optimizer_update_op1_const() 190 switch ((opline-1)->opcode) { in zend_optimizer_update_op1_const() 281 opline->opcode = ZEND_SEND_VAL; in zend_optimizer_update_op1_const() 351 switch (opline->opcode) { in zend_optimizer_update_op2_const() 543 switch (opline->opcode) { in zend_optimizer_replace_by_const() 622 } while (opline->opcode != ZEND_RETURN && opline->opcode != ZEND_RETURN_BY_REF); in zend_optimizer_replace_by_const() 645 switch (new_opline->opcode) { in zend_optimizer_migrate_jump() 691 switch (opline->opcode) { in zend_optimizer_shift_jump() 768 switch (opline->opcode) { in zend_optimizer_get_called_func() 1075 switch (opline->opcode) { in zend_redo_pass_two() [all …]
|
H A D | sccp.c | 213 switch (opline->opcode) { in can_replace_op1() 282 switch (opline->opcode) { in can_replace_op2() 302 switch (opline->opcode) { in try_replace_op1() 351 switch (opline->opcode) { in try_replace_op2() 729 if (opcode == ZEND_PRE_INC in ct_eval_incdec() 997 switch (opline->opcode) { in sccp_visit_instr() 1375 switch (opline->opcode) { in sccp_visit_instr() 1531 if (opline->opcode == ZEND_PRE_INC_OBJ || opline->opcode == ZEND_PRE_DEC_OBJ) { in sccp_visit_instr() 1813 if (opline->opcode != ZEND_SEND_VAL && opline->opcode != ZEND_SEND_VAR) { in sccp_visit_instr() 1875 switch (opline->opcode) { in sccp_mark_feasible_successors() [all …]
|
H A D | nop_removal.c | 47 if (opline->opcode == ZEND_JMP && ZEND_OP1_JMP_ADDR(opline) > op_array->opcodes + i) { in zend_optimizer_nop_removal() 51 while (target->opcode == ZEND_NOP) { in zend_optimizer_nop_removal() 56 opline->opcode = ZEND_NOP; in zend_optimizer_nop_removal() 61 if (opline->opcode == ZEND_NOP) { in zend_optimizer_nop_removal()
|
H A D | dce.c | 78 switch (opline->opcode) { in may_have_side_effects() 300 || (opline->opcode == ZEND_ASSIGN in add_operands_to_worklists() 309 || (opline->opcode == ZEND_FE_FETCH_R in add_operands_to_worklists() 356 switch (def_opline->opcode) { in try_remove_var_def() 398 switch (opline->opcode) { in is_free_of_live_var() 419 if (opline->opcode == ZEND_NOP) { in dce_instr() 431 && opline->opcode != ZEND_CASE && opline->opcode != ZEND_CASE_STRICT) { in dce_instr() 455 opline->opcode = ZEND_FREE; in dce_instr() 581 if (op_array->opcodes[i].opcode == ZEND_OP_DATA) { in dce_optimize_op_array() 596 if (op_array->opcodes[i].opcode == ZEND_NEW in dce_optimize_op_array() [all …]
|
H A D | zend_ssa.h | 222 if (opline->opcode == ZEND_ASSIGN in zend_ssa_is_no_val_use() 223 || opline->opcode == ZEND_UNSET_CV in zend_ssa_is_no_val_use() 224 || opline->opcode == ZEND_BIND_GLOBAL in zend_ssa_is_no_val_use() 225 || opline->opcode == ZEND_BIND_STATIC) { in zend_ssa_is_no_val_use() 228 if (opline->opcode == ZEND_FE_FETCH_R || opline->opcode == ZEND_FE_FETCH_RW) { in zend_ssa_is_no_val_use() 232 && opline->opcode != ZEND_ADD_ARRAY_ELEMENT in zend_ssa_is_no_val_use() 233 && opline->opcode != ZEND_ADD_ARRAY_UNPACK) { in zend_ssa_is_no_val_use()
|
H A D | zend_cfg.c | 44 zend_uchar opcode = opcodes[b->start + b->len - 1].opcode; in zend_mark_reachable() local 45 if (opcode == ZEND_MATCH) { in zend_mark_reachable() 47 } else if (opcode == ZEND_SWITCH_LONG || opcode == ZEND_SWITCH_STRING) { in zend_mark_reachable() 54 if (opcode == ZEND_JMP) { in zend_mark_reachable() 62 opcode == ZEND_YIELD || in zend_mark_reachable() 64 opcode == ZEND_DO_FCALL || in zend_mark_reachable() 65 opcode == ZEND_DO_UCALL || in zend_mark_reachable() 71 if (opcode == ZEND_RECV || in zend_mark_reachable() 72 opcode == ZEND_RECV_INIT) { in zend_mark_reachable() 290 switch (opline->opcode) { in zend_build_cfg() [all …]
|
/PHP-8.1/ext/zend_test/tests/ |
H A D | observer_opline_01.phpt | 25 <!-- opcode: 'ZEND_INIT_FCALL' --> 27 <!-- opcode: 'ZEND_INIT_FCALL' --> 29 <!-- opcode: 'ZEND_ECHO' --> 31 <!-- opcode: 'ZEND_ECHO' --> 33 <!-- opcode: 'ZEND_RETURN' --> 40 <!-- opcode: 'ZEND_ECHO' --> 42 <!-- opcode: 'ZEND_ECHO' --> 46 <!-- opcode: 'ZEND_RETURN' --> 50 <!-- opcode: 'ZEND_ECHO' --> 52 <!-- opcode: 'ZEND_RETURN' --> [all …]
|
/PHP-8.1/ext/opcache/jit/ |
H A D | zend_jit_vm_helpers.c | 626 && opline->opcode != ZEND_ROPE_ADD 627 && opline->opcode != ZEND_ROPE_END 628 && opline->opcode != ZEND_NEW 655 && opline->opcode != ZEND_INSTANCEOF 672 || (opline->opcode != ZEND_FE_FETCH_R 693 if (opline->opcode == ZEND_ASSIGN_DIM || 694 opline->opcode == ZEND_ASSIGN_OBJ || 730 switch (opline->opcode) { 828 if (opline->opcode == ZEND_DO_FCALL 829 || opline->opcode == ZEND_DO_ICALL [all …]
|
H A D | zend_jit_trace.c | 295 switch (opline->opcode) { in zend_jit_trace_may_exit() 626 switch (opline->opcode) { in zend_jit_trace_op_len() 1050 switch (opline->opcode) { in zend_jit_trace_find_init_fcall_op() 1691 switch (opline->opcode) { in zend_jit_trace_build_tssa() 2229 if ((opline->opcode != ZEND_FE_FETCH_R && opline->opcode != ZEND_FE_FETCH_RW) in zend_jit_trace_build_tssa() 2907 || (opline->opcode != ZEND_PRE_INC && opline->opcode != ZEND_PRE_DEC)) { in zend_jit_trace_allocate_registers() 3743 switch (opline->opcode) { in zend_jit_trace_update_condition_ranges() 6246 if (opline->opcode != ZEND_NOP && opline->opcode != ZEND_JMP) { in zend_jit_trace() 6365 && ((opline->opcode != ZEND_QM_ASSIGN && opline->opcode != ZEND_CAST) in zend_jit_trace() 8293 switch (opline->opcode) { in zend_jit_trace_supported() [all …]
|
/PHP-8.1/ext/opcache/tests/jit/ |
H A D | ignored_opcodes.phpt | 29 <!-- opcode: 'ZEND_BEGIN_SILENCE' in user handler --> 30 <!-- opcode: 'ZEND_END_SILENCE' in user handler --> 31 <!-- opcode: 'ZEND_EXIT' in user handler -->
|
H A D | bug80745.phpt | 19 public $opcode = 0; 30 $flags = ($flags << 4) | $message->opcode;
|
/PHP-8.1/Zend/tests/ |
H A D | bug81684.phpt | 2 Bug #81684: ??= on $GLOBALS produces an invalid opcode 5 $GLOBALS['x'] ??= 'x'; // Fatal error: Invalid opcode 23/1/0
|
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
|
/PHP-8.1/sapi/phpdbg/ |
H A D | phpdbg.c | 432 …opcode == ZEND_NOP || opcode == ZEND_OP_DATA || opcode == ZEND_FE_FREE || opcode == ZEND_FREE || o… in phpdbg_is_ignored_opcode() 433 || opcode == ZEND_DECLARE_CONST || opcode == ZEND_DECLARE_CLASS || opcode == ZEND_DECLARE_FUNCTION in phpdbg_is_ignored_opcode() 434 || opcode == ZEND_DECLARE_CLASS_DELAYED in phpdbg_is_ignored_opcode() 435 || opcode == ZEND_DECLARE_ANON_CLASS || opcode == ZEND_FAST_RET || opcode == ZEND_TICKS in phpdbg_is_ignored_opcode() 436 || opcode == ZEND_EXT_STMT || opcode == ZEND_EXT_FCALL_BEGIN || opcode == ZEND_EXT_FCALL_END in phpdbg_is_ignored_opcode() 437 || opcode == ZEND_BIND_GLOBAL in phpdbg_is_ignored_opcode() 451 …_array->last >= 1 && (((end - 1)->opcode == ZEND_RETURN || (end - 1)->opcode == ZEND_RETURN_BY_REF… in phpdbg_oplog_fill_executable() 452 …(end - 2)->opcode == ZEND_RETURN || (end - 2)->opcode == ZEND_RETURN_BY_REF || (end - 2)->opcode =… in phpdbg_oplog_fill_executable() 458 zend_uchar opcode = cur->opcode; in phpdbg_oplog_fill_executable() local 459 if (phpdbg_is_ignored_opcode(opcode)) { in phpdbg_oplog_fill_executable() [all …]
|