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()
280 switch (src->opcode) { in zend_optimize_block()
320 src->opcode != ZEND_FETCH_R && in zend_optimize_block()
321 src->opcode != ZEND_FETCH_STATIC_PROP_R && in zend_optimize_block()
322 src->opcode != ZEND_FETCH_DIM_R && in zend_optimize_block()
323 src->opcode != ZEND_FETCH_OBJ_R && in zend_optimize_block()
324 src->opcode != ZEND_NEW && in zend_optimize_block()
325 src->opcode != ZEND_FETCH_THIS) { in zend_optimize_block()
329 if (src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
331 src->opcode = ZEND_FREE; in zend_optimize_block()
348 VAR_SOURCE(opline->op1) && VAR_SOURCE(opline->op1)->opcode == ZEND_DO_CF_FCALL && in zend_optimize_block()
352 if(sv >= block->start_opline && sv->opcode == ZEND_SEND_VAL && in zend_optimize_block()
413 opline->opcode = ZEND_JMP; in zend_optimize_block()
450 opline->opcode = in zend_optimize_block()
451 ((opline->opcode != ZEND_IS_NOT_EQUAL) == ((Z_TYPE(ZEND_OP1_LITERAL(opline))) == IS_TRUE)) ? in zend_optimize_block()
463 opline->opcode = in zend_optimize_block()
464 ((opline->opcode != ZEND_IS_NOT_EQUAL) == ((Z_TYPE(ZEND_OP2_LITERAL(opline))) == IS_TRUE)) ? in zend_optimize_block()
482 switch (src->opcode) { in zend_optimize_block()
487 opline->opcode = (opline->opcode == ZEND_BOOL) ? ZEND_BOOL_NOT : ZEND_BOOL; in zend_optimize_block()
499 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
500 src->opcode = ZEND_IS_NOT_EQUAL; in zend_optimize_block()
508 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
509 src->opcode = ZEND_IS_EQUAL; in zend_optimize_block()
517 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
518 src->opcode = ZEND_IS_NOT_IDENTICAL; in zend_optimize_block()
526 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
527 src->opcode = ZEND_IS_IDENTICAL; in zend_optimize_block()
535 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
539 src->opcode = ZEND_IS_SMALLER_OR_EQUAL; in zend_optimize_block()
553 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
557 src->opcode = ZEND_IS_SMALLER; in zend_optimize_block()
580 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
600 (opline->opcode == ZEND_JMPZ)) { in zend_optimize_block()
614 opline->opcode = ZEND_JMP; in zend_optimize_block()
622 if (src->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
626 opline->opcode = INV_COND(opline->opcode); in zend_optimize_block()
630 } else if (src->opcode == ZEND_BOOL || in zend_optimize_block()
631 src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
648 bool is_jmpz_ex = opline->opcode == ZEND_JMPZ_EX; in zend_optimize_block()
652 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
666 if (src->opcode == ZEND_BOOL || in zend_optimize_block()
667 src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
692 (src->opcode == ZEND_CONCAT || in zend_optimize_block()
693 src->opcode == ZEND_FAST_CONCAT) && in zend_optimize_block()
730 src->opcode == ZEND_CAST && in zend_optimize_block()
743 src->opcode == ZEND_CAST && in zend_optimize_block()
759 opline->opcode = ZEND_CAST; in zend_optimize_block()
770 opline->opcode = ZEND_CAST; in zend_optimize_block()
775 } else if (opline->opcode == ZEND_CONCAT && in zend_optimize_block()
779 (VAR_SOURCE(opline->op1)->opcode == ZEND_FAST_CONCAT || in zend_optimize_block()
780 VAR_SOURCE(opline->op1)->opcode == ZEND_ROPE_END || in zend_optimize_block()
781 VAR_SOURCE(opline->op1)->opcode == ZEND_FETCH_CONSTANT || in zend_optimize_block()
782 VAR_SOURCE(opline->op1)->opcode == ZEND_FETCH_CLASS_CONSTANT))) && in zend_optimize_block()
786 (VAR_SOURCE(opline->op2)->opcode == ZEND_FAST_CONCAT || in zend_optimize_block()
787 VAR_SOURCE(opline->op2)->opcode == ZEND_ROPE_END || in zend_optimize_block()
788 VAR_SOURCE(opline->op2)->opcode == ZEND_FETCH_CONSTANT || in zend_optimize_block()
789 VAR_SOURCE(opline->op2)->opcode == ZEND_FETCH_CLASS_CONSTANT)))) { in zend_optimize_block()
790 opline->opcode = ZEND_FAST_CONCAT; in zend_optimize_block()
816 …if (zend_optimizer_eval_binary_op(&result, opline->opcode, &ZEND_OP1_LITERAL(opline), &ZEND_OP2_LI… in zend_optimize_block()
819 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
833 … if (zend_optimizer_eval_unary_op(&result, opline->opcode, &ZEND_OP1_LITERAL(opline)) == SUCCESS) { in zend_optimize_block()
835 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
849 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
863 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
874 if (src && src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
912 src->opcode != ZEND_COPY_TMP && in zend_optimize_block()
913 src->opcode != ZEND_ADD_ARRAY_ELEMENT && in zend_optimize_block()
914 src->opcode != ZEND_ADD_ARRAY_UNPACK && in zend_optimize_block()
915 (src->opcode != ZEND_DECLARE_LAMBDA_FUNCTION || in zend_optimize_block()
951 if (opline->opcode == ZEND_JMP) { in assemble_code_blocks()
962 } else if (b->len == 1 && opline->opcode == ZEND_NOP) { in assemble_code_blocks()
1004 switch (opline->opcode) { in assemble_code_blocks()
1037 …ZEND_ASSERT(b->successors_count == (opline->opcode == ZEND_MATCH ? 1 : 2) + zend_hash_num_elements… in assemble_code_blocks()
1088 if (opline->opcode == ZEND_FAST_RET && in assemble_code_blocks()
1193 switch (last_op->opcode) { in zend_jmp_optimization()
1200 if (target->opcode == ZEND_JMP) { in zend_jmp_optimization()
1220 if ((target->opcode == ZEND_RETURN || in zend_jmp_optimization()
1221 target->opcode == ZEND_RETURN_BY_REF || in zend_jmp_optimization()
1222 target->opcode == ZEND_GENERATOR_RETURN || in zend_jmp_optimization()
1223 target->opcode == ZEND_EXIT) && in zend_jmp_optimization()
1247 if (target->opcode == ZEND_JMP) { in zend_jmp_optimization()
1268 if (target->opcode == ZEND_JMP) { in zend_jmp_optimization()
1271 } else if (target->opcode == last_op->opcode && in zend_jmp_optimization()
1275 } else if (target->opcode == INV_COND(last_op->opcode) && in zend_jmp_optimization()
1292 if (last_op->opcode == ZEND_NOP) { in zend_jmp_optimization()
1299 if (target->opcode == ZEND_JMP) { in zend_jmp_optimization()
1303 if (last_op->opcode == ZEND_NOP) { in zend_jmp_optimization()
1316 last_op->opcode = INV_COND(last_op->opcode); in zend_jmp_optimization()
1342 if (target->opcode == ZEND_JMP) { in zend_jmp_optimization()
1345 } else if (target->opcode == last_op->opcode-3 && in zend_jmp_optimization()
1350 } else if (target->opcode == last_op->opcode && in zend_jmp_optimization()
1356 } else if (target->opcode == INV_EX_COND(last_op->opcode) && in zend_jmp_optimization()
1361 } else if (target->opcode == INV_EX_COND_EX(last_op->opcode) && in zend_jmp_optimization()
1367 } else if (target->opcode == ZEND_BOOL && in zend_jmp_optimization()
1395 last_op->opcode = ZEND_BOOL; in zend_jmp_optimization()
1455 if (opline->opcode == ZEND_FE_FETCH_R || in zend_t_usage()
1456 opline->opcode == ZEND_FE_FETCH_RW) { in zend_t_usage()
1474 switch (opline->opcode) { in zend_t_usage()
1535 switch (opline->opcode) { in zend_t_usage()
1556 opline->opcode -= 2; in zend_t_usage()
1566 opline->opcode -= 3; in zend_t_usage()
1576 switch (opline->opcode) { in zend_t_usage()
1589 switch (opline->opcode) { in zend_t_usage()
1627 if (prev->len != 0 && last_op->opcode == ZEND_JMP) { in zend_merge_blocks()