Lines Matching refs:opcode
72 } while (b->len > 0 && opcodes[b->start].opcode == ZEND_NOP); in strip_leading_nops()
83 if (op_array->opcodes[b->start].opcode == ZEND_NOP) { in strip_nops()
94 if (op_array->opcodes[i].opcode != ZEND_NOP) { in strip_nops()
112 if ((opline->opcode == ZEND_SWITCH_LONG && Z_TYPE_P(val) != IS_LONG) in get_const_switch_target()
113 || (opline->opcode == ZEND_SWITCH_STRING && Z_TYPE_P(val) != IS_STRING)) { in get_const_switch_target()
117 if (opline->opcode == ZEND_MATCH && Z_TYPE_P(val) != IS_LONG && Z_TYPE_P(val) != IS_STRING) { in get_const_switch_target()
129 return block->successors[block->successors_count - (opline->opcode == ZEND_MATCH ? 1 : 2)]; in get_const_switch_target()
143 if (op_array->opcodes[block->start].opcode == ZEND_NOP) { in zend_optimize_block()
153 opline->opcode != ZEND_FREE) { in zend_optimize_block()
156 src->opcode == ZEND_QM_ASSIGN && in zend_optimize_block()
160 if (opline->opcode == ZEND_VERIFY_RETURN_TYPE) { in zend_optimize_block()
169 if (opline->opcode != ZEND_CASE in zend_optimize_block()
170 && opline->opcode != ZEND_CASE_STRICT in zend_optimize_block()
171 && opline->opcode != ZEND_FETCH_LIST_R in zend_optimize_block()
172 && opline->opcode != ZEND_SWITCH_LONG in zend_optimize_block()
173 && opline->opcode != ZEND_SWITCH_STRING in zend_optimize_block()
174 && opline->opcode != ZEND_MATCH in zend_optimize_block()
175 && opline->opcode != ZEND_MATCH_ERROR in zend_optimize_block()
178 if (opline->opcode != ZEND_JMP_NULL in zend_optimize_block()
195 src->opcode == ZEND_QM_ASSIGN && in zend_optimize_block()
215 switch (opline->opcode) { in zend_optimize_block()
220 src->opcode == ZEND_CAST && in zend_optimize_block()
273 switch (src->opcode) { in zend_optimize_block()
313 src->opcode != ZEND_FETCH_R && in zend_optimize_block()
314 src->opcode != ZEND_FETCH_STATIC_PROP_R && in zend_optimize_block()
315 src->opcode != ZEND_FETCH_DIM_R && in zend_optimize_block()
316 src->opcode != ZEND_FETCH_OBJ_R && in zend_optimize_block()
317 src->opcode != ZEND_NEW && in zend_optimize_block()
318 src->opcode != ZEND_FETCH_THIS) { in zend_optimize_block()
322 if (src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
324 src->opcode = ZEND_FREE; in zend_optimize_block()
341 VAR_SOURCE(opline->op1) && VAR_SOURCE(opline->op1)->opcode == ZEND_DO_CF_FCALL && in zend_optimize_block()
345 if(sv >= block->start_opline && sv->opcode == ZEND_SEND_VAL && in zend_optimize_block()
406 opline->opcode = ZEND_JMP; in zend_optimize_block()
443 opline->opcode = in zend_optimize_block()
444 ((opline->opcode != ZEND_IS_NOT_EQUAL) == ((Z_TYPE(ZEND_OP1_LITERAL(opline))) == IS_TRUE)) ? in zend_optimize_block()
456 opline->opcode = in zend_optimize_block()
457 ((opline->opcode != ZEND_IS_NOT_EQUAL) == ((Z_TYPE(ZEND_OP2_LITERAL(opline))) == IS_TRUE)) ? in zend_optimize_block()
475 switch (src->opcode) { in zend_optimize_block()
480 opline->opcode = (opline->opcode == ZEND_BOOL) ? ZEND_BOOL_NOT : ZEND_BOOL; in zend_optimize_block()
492 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
493 src->opcode = ZEND_IS_NOT_EQUAL; in zend_optimize_block()
501 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
502 src->opcode = ZEND_IS_EQUAL; in zend_optimize_block()
510 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
511 src->opcode = ZEND_IS_NOT_IDENTICAL; in zend_optimize_block()
519 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
520 src->opcode = ZEND_IS_IDENTICAL; in zend_optimize_block()
528 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
532 src->opcode = ZEND_IS_SMALLER_OR_EQUAL; in zend_optimize_block()
546 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
550 src->opcode = ZEND_IS_SMALLER; in zend_optimize_block()
573 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
593 (opline->opcode == ZEND_JMPZ)) { in zend_optimize_block()
607 opline->opcode = ZEND_JMP; in zend_optimize_block()
615 if (src->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
619 opline->opcode = INV_COND(opline->opcode); in zend_optimize_block()
623 } else if (src->opcode == ZEND_BOOL || in zend_optimize_block()
624 src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
652 opline->opcode = ZEND_JMP; in zend_optimize_block()
658 if (src->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
670 } else if (src->opcode == ZEND_BOOL || in zend_optimize_block()
671 src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
688 bool is_jmpz_ex = opline->opcode == ZEND_JMPZ_EX; in zend_optimize_block()
692 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
706 if (src->opcode == ZEND_BOOL || in zend_optimize_block()
707 src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
732 (src->opcode == ZEND_CONCAT || in zend_optimize_block()
733 src->opcode == ZEND_FAST_CONCAT) && in zend_optimize_block()
770 src->opcode == ZEND_CAST && in zend_optimize_block()
783 src->opcode == ZEND_CAST && in zend_optimize_block()
799 opline->opcode = ZEND_CAST; in zend_optimize_block()
810 opline->opcode = ZEND_CAST; in zend_optimize_block()
815 } else if (opline->opcode == ZEND_CONCAT && in zend_optimize_block()
819 (VAR_SOURCE(opline->op1)->opcode == ZEND_FAST_CONCAT || in zend_optimize_block()
820 VAR_SOURCE(opline->op1)->opcode == ZEND_ROPE_END || in zend_optimize_block()
821 VAR_SOURCE(opline->op1)->opcode == ZEND_FETCH_CONSTANT || in zend_optimize_block()
822 VAR_SOURCE(opline->op1)->opcode == ZEND_FETCH_CLASS_CONSTANT))) && in zend_optimize_block()
826 (VAR_SOURCE(opline->op2)->opcode == ZEND_FAST_CONCAT || in zend_optimize_block()
827 VAR_SOURCE(opline->op2)->opcode == ZEND_ROPE_END || in zend_optimize_block()
828 VAR_SOURCE(opline->op2)->opcode == ZEND_FETCH_CONSTANT || in zend_optimize_block()
829 VAR_SOURCE(opline->op2)->opcode == ZEND_FETCH_CLASS_CONSTANT)))) { in zend_optimize_block()
830 opline->opcode = ZEND_FAST_CONCAT; in zend_optimize_block()
856 …if (zend_optimizer_eval_binary_op(&result, opline->opcode, &ZEND_OP1_LITERAL(opline), &ZEND_OP2_LI… in zend_optimize_block()
859 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
873 … if (zend_optimizer_eval_unary_op(&result, opline->opcode, &ZEND_OP1_LITERAL(opline)) == SUCCESS) { in zend_optimize_block()
875 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
889 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
903 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
914 if (src && src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
952 src->opcode != ZEND_COPY_TMP && in zend_optimize_block()
953 src->opcode != ZEND_ADD_ARRAY_ELEMENT && in zend_optimize_block()
954 src->opcode != ZEND_ADD_ARRAY_UNPACK && in zend_optimize_block()
955 (src->opcode != ZEND_DECLARE_LAMBDA_FUNCTION || in zend_optimize_block()
992 if (opline->opcode == ZEND_JMP) { in assemble_code_blocks()
1003 } else if (b->len == 1 && opline->opcode == ZEND_NOP) { in assemble_code_blocks()
1045 switch (opline->opcode) { in assemble_code_blocks()
1081 …ZEND_ASSERT(b->successors_count == (opline->opcode == ZEND_MATCH ? 1 : 2) + zend_hash_num_elements… in assemble_code_blocks()
1132 if (opline->opcode == ZEND_FAST_RET && in assemble_code_blocks()
1244 switch (last_op->opcode) { in zend_jmp_optimization()
1251 if (target->opcode == ZEND_JMP) { in zend_jmp_optimization()
1271 if (target->opcode == ZEND_JMPZNZ) { in zend_jmp_optimization()
1284 } else if ((target->opcode == ZEND_RETURN || in zend_jmp_optimization()
1285 target->opcode == ZEND_RETURN_BY_REF || in zend_jmp_optimization()
1286 target->opcode == ZEND_GENERATOR_RETURN || in zend_jmp_optimization()
1287 target->opcode == ZEND_EXIT) && in zend_jmp_optimization()
1311 if (target->opcode == ZEND_JMP) { in zend_jmp_optimization()
1332 if (target->opcode == ZEND_JMP) { in zend_jmp_optimization()
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()
1343 } else if (target->opcode == ZEND_JMPZNZ && in zend_jmp_optimization()
1346 next = target_block->successors[last_op->opcode == ZEND_JMPNZ]; in zend_jmp_optimization()
1360 last_op->opcode = ZEND_CHECK_VAR; in zend_jmp_optimization()
1363 last_op->opcode = ZEND_FREE; in zend_jmp_optimization()
1373 if (target->opcode == ZEND_JMP) { in zend_jmp_optimization()
1377 last_op->opcode = ZEND_CHECK_VAR; in zend_jmp_optimization()
1380 last_op->opcode = ZEND_FREE; in zend_jmp_optimization()
1396 last_op->opcode = INV_COND(last_op->opcode); in zend_jmp_optimization()
1412 if (last_op->opcode == ZEND_JMPZ) { in zend_jmp_optimization()
1418 last_op->opcode = ZEND_JMPZNZ; in zend_jmp_optimization()
1432 if (target->opcode == ZEND_JMP) { 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()
1446 } else if (target->opcode == ZEND_JMPZNZ && in zend_jmp_optimization()
1450 next = target_block->successors[last_op->opcode == ZEND_JMPNZ_EX]; in zend_jmp_optimization()
1451 } else if (target->opcode == INV_EX_COND(last_op->opcode) && in zend_jmp_optimization()
1456 } else if (target->opcode == INV_EX_COND_EX(last_op->opcode) && in zend_jmp_optimization()
1462 } else if (target->opcode == ZEND_BOOL && in zend_jmp_optimization()
1490 last_op->opcode = ZEND_BOOL; in zend_jmp_optimization()
1505 if (target->opcode == ZEND_JMP) { in zend_jmp_optimization()
1508 } else if ((target->opcode == ZEND_JMPZ || target->opcode == ZEND_JMPZNZ) && in zend_jmp_optimization()
1512 } else if (target->opcode == ZEND_JMPNZ && in zend_jmp_optimization()
1530 if (target->opcode == ZEND_JMP) { in zend_jmp_optimization()
1533 } else if (target->opcode == ZEND_JMPNZ && in zend_jmp_optimization()
1537 } else if ((target->opcode == ZEND_JMPZ || target->opcode == ZEND_JMPZNZ) && in zend_jmp_optimization()
1554 last_op->opcode = ZEND_JMP; in zend_jmp_optimization()
1564 last_op->opcode = ZEND_JMPNZ; in zend_jmp_optimization()
1571 last_op->opcode = ZEND_JMPZ; in zend_jmp_optimization()
1629 if (opline->opcode == ZEND_FE_FETCH_R || in zend_t_usage()
1630 opline->opcode == ZEND_FE_FETCH_RW) { in zend_t_usage()
1648 switch (opline->opcode) { in zend_t_usage()
1709 switch (opline->opcode) { in zend_t_usage()
1730 opline->opcode -= 2; in zend_t_usage()
1737 opline->opcode = ZEND_CHECK_VAR; in zend_t_usage()
1740 opline->opcode = ZEND_FREE; in zend_t_usage()
1751 opline->opcode -= 3; in zend_t_usage()
1761 switch (opline->opcode) { in zend_t_usage()
1774 switch (opline->opcode) { in zend_t_usage()
1812 if (prev->len != 0 && last_op->opcode == ZEND_JMP) { in zend_merge_blocks()