Lines Matching refs:opcode
73 } while (b->len > 0 && opcodes[b->start].opcode == ZEND_NOP); in strip_leading_nops()
84 if (op_array->opcodes[b->start].opcode == ZEND_NOP) { in strip_nops()
95 if (op_array->opcodes[i].opcode != ZEND_NOP) { in strip_nops()
113 if ((opline->opcode == ZEND_SWITCH_LONG && Z_TYPE_P(val) != IS_LONG) in get_const_switch_target()
114 || (opline->opcode == ZEND_SWITCH_STRING && Z_TYPE_P(val) != IS_STRING)) { in get_const_switch_target()
118 if (opline->opcode == ZEND_MATCH && Z_TYPE_P(val) != IS_LONG && Z_TYPE_P(val) != IS_STRING) { in get_const_switch_target()
130 return block->successors[block->successors_count - (opline->opcode == ZEND_MATCH ? 1 : 2)]; in get_const_switch_target()
144 if (op_array->opcodes[block->start].opcode == ZEND_NOP) { in zend_optimize_block()
154 opline->opcode != ZEND_FREE) { in zend_optimize_block()
157 src->opcode == ZEND_QM_ASSIGN && in zend_optimize_block()
161 if (opline->opcode == ZEND_VERIFY_RETURN_TYPE) { in zend_optimize_block()
186 src->opcode == ZEND_QM_ASSIGN && in zend_optimize_block()
204 switch (opline->opcode) { in zend_optimize_block()
209 src->opcode == ZEND_CAST && in zend_optimize_block()
258 switch (src->opcode) { in zend_optimize_block()
294 src->opcode != ZEND_FETCH_R && in zend_optimize_block()
295 src->opcode != ZEND_FETCH_STATIC_PROP_R && in zend_optimize_block()
296 src->opcode != ZEND_FETCH_DIM_R && in zend_optimize_block()
297 src->opcode != ZEND_FETCH_OBJ_R && in zend_optimize_block()
298 src->opcode != ZEND_NEW && in zend_optimize_block()
299 src->opcode != ZEND_FETCH_THIS) { in zend_optimize_block()
303 if (src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
305 src->opcode = ZEND_FREE; in zend_optimize_block()
322 VAR_SOURCE(opline->op1) && VAR_SOURCE(opline->op1)->opcode == ZEND_DO_CF_FCALL && in zend_optimize_block()
326 if(sv >= block->start_opline && sv->opcode == ZEND_SEND_VAL && in zend_optimize_block()
387 opline->opcode = ZEND_JMP; in zend_optimize_block()
424 opline->opcode = in zend_optimize_block()
425 ((opline->opcode != ZEND_IS_NOT_EQUAL) == ((Z_TYPE(ZEND_OP1_LITERAL(opline))) == IS_TRUE)) ? in zend_optimize_block()
437 opline->opcode = in zend_optimize_block()
438 ((opline->opcode != ZEND_IS_NOT_EQUAL) == ((Z_TYPE(ZEND_OP2_LITERAL(opline))) == IS_TRUE)) ? in zend_optimize_block()
456 switch (src->opcode) { in zend_optimize_block()
461 opline->opcode = (opline->opcode == ZEND_BOOL) ? ZEND_BOOL_NOT : ZEND_BOOL; in zend_optimize_block()
473 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
474 src->opcode = ZEND_IS_NOT_EQUAL; in zend_optimize_block()
482 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
483 src->opcode = ZEND_IS_EQUAL; in zend_optimize_block()
491 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
492 src->opcode = ZEND_IS_NOT_IDENTICAL; in zend_optimize_block()
500 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
501 src->opcode = ZEND_IS_IDENTICAL; in zend_optimize_block()
509 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
513 src->opcode = ZEND_IS_SMALLER_OR_EQUAL; in zend_optimize_block()
527 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
531 src->opcode = ZEND_IS_SMALLER; in zend_optimize_block()
554 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
574 (opline->opcode == ZEND_JMPZ)) { in zend_optimize_block()
588 opline->opcode = ZEND_JMP; in zend_optimize_block()
596 if (src->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
600 opline->opcode = INV_COND(opline->opcode); in zend_optimize_block()
604 } else if (src->opcode == ZEND_BOOL || in zend_optimize_block()
605 src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
633 opline->opcode = ZEND_JMP; in zend_optimize_block()
639 if (src->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
651 } else if (src->opcode == ZEND_BOOL || in zend_optimize_block()
652 src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
670 (opline->opcode == ZEND_JMPZ_EX)) { in zend_optimize_block()
673 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
675 ZVAL_BOOL(&ZEND_OP1_LITERAL(opline), opline->opcode == ZEND_JMPZ_EX); in zend_optimize_block()
687 if (src->opcode == ZEND_BOOL || in zend_optimize_block()
688 src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
713 (src->opcode == ZEND_CONCAT || in zend_optimize_block()
714 src->opcode == ZEND_FAST_CONCAT) && in zend_optimize_block()
751 src->opcode == ZEND_CAST && in zend_optimize_block()
764 src->opcode == ZEND_CAST && in zend_optimize_block()
780 opline->opcode = ZEND_CAST; in zend_optimize_block()
791 opline->opcode = ZEND_CAST; in zend_optimize_block()
796 } else if (opline->opcode == ZEND_CONCAT && in zend_optimize_block()
800 (VAR_SOURCE(opline->op1)->opcode == ZEND_FAST_CONCAT || in zend_optimize_block()
801 VAR_SOURCE(opline->op1)->opcode == ZEND_ROPE_END || in zend_optimize_block()
802 VAR_SOURCE(opline->op1)->opcode == ZEND_FETCH_CONSTANT || in zend_optimize_block()
803 VAR_SOURCE(opline->op1)->opcode == ZEND_FETCH_CLASS_CONSTANT))) && in zend_optimize_block()
807 (VAR_SOURCE(opline->op2)->opcode == ZEND_FAST_CONCAT || in zend_optimize_block()
808 VAR_SOURCE(opline->op2)->opcode == ZEND_ROPE_END || in zend_optimize_block()
809 VAR_SOURCE(opline->op2)->opcode == ZEND_FETCH_CONSTANT || in zend_optimize_block()
810 VAR_SOURCE(opline->op2)->opcode == ZEND_FETCH_CLASS_CONSTANT)))) { in zend_optimize_block()
811 opline->opcode = ZEND_FAST_CONCAT; in zend_optimize_block()
837 …if (zend_optimizer_eval_binary_op(&result, opline->opcode, &ZEND_OP1_LITERAL(opline), &ZEND_OP2_LI… in zend_optimize_block()
840 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
854 … if (zend_optimizer_eval_unary_op(&result, opline->opcode, &ZEND_OP1_LITERAL(opline)) == SUCCESS) { in zend_optimize_block()
856 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
870 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
884 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
895 if (src && src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
933 src->opcode != ZEND_COPY_TMP && in zend_optimize_block()
934 src->opcode != ZEND_ADD_ARRAY_ELEMENT && in zend_optimize_block()
935 src->opcode != ZEND_ADD_ARRAY_UNPACK && in zend_optimize_block()
936 (src->opcode != ZEND_DECLARE_LAMBDA_FUNCTION || in zend_optimize_block()
974 ZEND_ASSERT(op_array->opcodes[b->start].opcode == ZEND_FREE in assemble_code_blocks()
975 || op_array->opcodes[b->start].opcode == ZEND_FE_FREE); in assemble_code_blocks()
981 if (opline->opcode == ZEND_JMP) { in assemble_code_blocks()
992 } else if (b->len == 1 && opline->opcode == ZEND_NOP) { in assemble_code_blocks()
1034 switch (opline->opcode) { in assemble_code_blocks()
1070 …ZEND_ASSERT(b->successors_count == (opline->opcode == ZEND_MATCH ? 1 : 2) + zend_hash_num_elements… in assemble_code_blocks()
1121 if (opline->opcode == ZEND_FAST_RET && in assemble_code_blocks()
1233 switch (last_op->opcode) { in zend_jmp_optimization()
1240 if (target->opcode == ZEND_JMP) { in zend_jmp_optimization()
1260 if (target->opcode == ZEND_JMPZNZ) { in zend_jmp_optimization()
1273 } else if ((target->opcode == ZEND_RETURN || in zend_jmp_optimization()
1274 target->opcode == ZEND_RETURN_BY_REF || in zend_jmp_optimization()
1275 target->opcode == ZEND_GENERATOR_RETURN || in zend_jmp_optimization()
1276 target->opcode == ZEND_EXIT) && in zend_jmp_optimization()
1300 if (target->opcode == ZEND_JMP) { in zend_jmp_optimization()
1321 if (target->opcode == ZEND_JMP) { in zend_jmp_optimization()
1324 } else if (target->opcode == last_op->opcode && in zend_jmp_optimization()
1328 } else if (target->opcode == INV_COND(last_op->opcode) && in zend_jmp_optimization()
1332 } else if (target->opcode == ZEND_JMPZNZ && in zend_jmp_optimization()
1335 next = target_block->successors[last_op->opcode == ZEND_JMPNZ]; in zend_jmp_optimization()
1349 last_op->opcode = ZEND_CHECK_VAR; in zend_jmp_optimization()
1352 last_op->opcode = ZEND_FREE; in zend_jmp_optimization()
1362 if (target->opcode == ZEND_JMP) { in zend_jmp_optimization()
1366 last_op->opcode = ZEND_CHECK_VAR; in zend_jmp_optimization()
1369 last_op->opcode = ZEND_FREE; in zend_jmp_optimization()
1385 last_op->opcode = INV_COND(last_op->opcode); in zend_jmp_optimization()
1401 if (last_op->opcode == ZEND_JMPZ) { in zend_jmp_optimization()
1407 last_op->opcode = ZEND_JMPZNZ; in zend_jmp_optimization()
1421 if (target->opcode == ZEND_JMP) { in zend_jmp_optimization()
1424 } else if (target->opcode == last_op->opcode-3 && in zend_jmp_optimization()
1429 } else if (target->opcode == last_op->opcode && in zend_jmp_optimization()
1435 } else if (target->opcode == ZEND_JMPZNZ && in zend_jmp_optimization()
1439 next = target_block->successors[last_op->opcode == ZEND_JMPNZ_EX]; in zend_jmp_optimization()
1440 } else if (target->opcode == INV_EX_COND(last_op->opcode) && in zend_jmp_optimization()
1445 } else if (target->opcode == INV_EX_COND_EX(last_op->opcode) && in zend_jmp_optimization()
1451 } else if (target->opcode == ZEND_BOOL && in zend_jmp_optimization()
1479 last_op->opcode = ZEND_BOOL; in zend_jmp_optimization()
1494 if (target->opcode == ZEND_JMP) { in zend_jmp_optimization()
1497 } else if ((target->opcode == ZEND_JMPZ || target->opcode == ZEND_JMPZNZ) && in zend_jmp_optimization()
1501 } else if (target->opcode == ZEND_JMPNZ && in zend_jmp_optimization()
1519 if (target->opcode == ZEND_JMP) { in zend_jmp_optimization()
1522 } else if (target->opcode == ZEND_JMPNZ && in zend_jmp_optimization()
1526 } else if ((target->opcode == ZEND_JMPZ || target->opcode == ZEND_JMPZNZ) && in zend_jmp_optimization()
1543 last_op->opcode = ZEND_JMP; in zend_jmp_optimization()
1553 last_op->opcode = ZEND_JMPNZ; in zend_jmp_optimization()
1560 last_op->opcode = ZEND_JMPZ; in zend_jmp_optimization()
1618 if (opline->opcode == ZEND_FE_FETCH_R || in zend_t_usage()
1619 opline->opcode == ZEND_FE_FETCH_RW) { in zend_t_usage()
1637 switch (opline->opcode) { in zend_t_usage()
1698 switch (opline->opcode) { in zend_t_usage()
1719 opline->opcode -= 2; in zend_t_usage()
1726 opline->opcode = ZEND_CHECK_VAR; in zend_t_usage()
1729 opline->opcode = ZEND_FREE; in zend_t_usage()
1740 opline->opcode -= 3; in zend_t_usage()
1750 switch (opline->opcode) { in zend_t_usage()
1763 switch (opline->opcode) { in zend_t_usage()
1801 if (prev->len != 0 && last_op->opcode == ZEND_JMP) { in zend_merge_blocks()