Lines Matching refs:opcode
95 while (b->len > 0 && opcodes[b->start].opcode == ZEND_NOP) { in strip_leading_nops()
98 && (op_array->opcodes[b->start + 1].opcode == ZEND_JMPZ in strip_leading_nops()
99 || op_array->opcodes[b->start + 1].opcode == ZEND_JMPNZ) in strip_leading_nops()
122 if (op_array->opcodes[i].opcode != ZEND_NOP) { in strip_nops()
129 && (op_array->opcodes[i+1].opcode == ZEND_JMPZ in strip_nops()
130 || op_array->opcodes[i+1].opcode == ZEND_JMPNZ) in strip_nops()
148 if ((opline->opcode == ZEND_SWITCH_LONG && Z_TYPE_P(val) != IS_LONG) in get_const_switch_target()
149 || (opline->opcode == ZEND_SWITCH_STRING && Z_TYPE_P(val) != IS_STRING)) { in get_const_switch_target()
179 opline->opcode != ZEND_FREE) { in zend_optimize_block()
182 src->opcode == ZEND_QM_ASSIGN && in zend_optimize_block()
186 if (opline->opcode == ZEND_VERIFY_RETURN_TYPE) { in zend_optimize_block()
202 switch (opline->opcode) { in zend_optimize_block()
210 opline->opcode = ZEND_JMP; in zend_optimize_block()
218 opline->opcode = ZEND_JMP; in zend_optimize_block()
243 opline->opcode = ZEND_JMP; in zend_optimize_block()
259 src->opcode == ZEND_QM_ASSIGN && in zend_optimize_block()
278 if (opline->opcode == ZEND_ECHO) { in zend_optimize_block()
282 src->opcode == ZEND_CAST && in zend_optimize_block()
294 if (last_op && last_op->opcode == ZEND_ECHO && in zend_optimize_block()
336 switch (opline->opcode) { in zend_optimize_block()
342 (src->opcode == ZEND_BOOL || src->opcode == ZEND_BOOL_NOT)) { in zend_optimize_block()
353 src->opcode != ZEND_FETCH_R && in zend_optimize_block()
354 src->opcode != ZEND_FETCH_STATIC_PROP_R && in zend_optimize_block()
355 src->opcode != ZEND_FETCH_DIM_R && in zend_optimize_block()
356 src->opcode != ZEND_FETCH_OBJ_R && in zend_optimize_block()
357 src->opcode != ZEND_NEW) { in zend_optimize_block()
373 VAR_SOURCE(opline->op1) && VAR_SOURCE(opline->op1)->opcode == ZEND_DO_CF_FCALL && in zend_optimize_block()
377 if(sv >= block->start_opline && sv->opcode == ZEND_SEND_VAL && in zend_optimize_block()
437 opline->opcode = ZEND_JMP; in zend_optimize_block()
472 opline->opcode = in zend_optimize_block()
473 ((opline->opcode != ZEND_IS_NOT_EQUAL) == ((Z_TYPE(ZEND_OP1_LITERAL(opline))) == IS_TRUE)) ? in zend_optimize_block()
485 opline->opcode = in zend_optimize_block()
486 ((opline->opcode != ZEND_IS_NOT_EQUAL) == ((Z_TYPE(ZEND_OP2_LITERAL(opline))) == IS_TRUE)) ? in zend_optimize_block()
504 switch (src->opcode) { in zend_optimize_block()
509 opline->opcode = (opline->opcode == ZEND_BOOL) ? ZEND_BOOL_NOT : ZEND_BOOL; in zend_optimize_block()
521 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
522 src->opcode = ZEND_IS_NOT_EQUAL; in zend_optimize_block()
530 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
531 src->opcode = ZEND_IS_EQUAL; in zend_optimize_block()
539 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
540 src->opcode = ZEND_IS_NOT_IDENTICAL; in zend_optimize_block()
548 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
549 src->opcode = ZEND_IS_IDENTICAL; in zend_optimize_block()
557 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
561 src->opcode = ZEND_IS_SMALLER_OR_EQUAL; in zend_optimize_block()
575 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
579 src->opcode = ZEND_IS_SMALLER; in zend_optimize_block()
600 if (opline->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
625 if (src->opcode == ZEND_BOOL_NOT && in zend_optimize_block()
626 opline->opcode != ZEND_JMPZ_EX && in zend_optimize_block()
627 opline->opcode != ZEND_JMPNZ_EX) { in zend_optimize_block()
630 if (opline->opcode == ZEND_JMPZ) { in zend_optimize_block()
632 opline->opcode = ZEND_JMPNZ; in zend_optimize_block()
633 } else if (opline->opcode == ZEND_JMPNZ) { in zend_optimize_block()
635 opline->opcode = ZEND_JMPZ; in zend_optimize_block()
637 } else if (opline->opcode == ZEND_JMPZ_EX) { in zend_optimize_block()
639 opline->opcode = ZEND_JMPNZ_EX; in zend_optimize_block()
640 } else if (opline->opcode == ZEND_JMPNZ_EX) { in zend_optimize_block()
642 opline->opcode = ZEND_JMPZ; in zend_optimize_block()
648 ZEND_ASSERT(opline->opcode == ZEND_JMPZNZ); in zend_optimize_block()
656 } else if (src->opcode == ZEND_BOOL || in zend_optimize_block()
657 src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
680 (src->opcode == ZEND_CONCAT || in zend_optimize_block()
681 src->opcode == ZEND_FAST_CONCAT) && in zend_optimize_block()
718 src->opcode == ZEND_CAST && in zend_optimize_block()
731 src->opcode == ZEND_CAST && in zend_optimize_block()
747 opline->opcode = ZEND_CAST; in zend_optimize_block()
758 opline->opcode = ZEND_CAST; in zend_optimize_block()
763 } else if (opline->opcode == ZEND_CONCAT && in zend_optimize_block()
767 (VAR_SOURCE(opline->op1)->opcode == ZEND_FAST_CONCAT || in zend_optimize_block()
768 VAR_SOURCE(opline->op1)->opcode == ZEND_ROPE_END || in zend_optimize_block()
769 VAR_SOURCE(opline->op1)->opcode == ZEND_FETCH_CONSTANT || in zend_optimize_block()
770 VAR_SOURCE(opline->op1)->opcode == ZEND_FETCH_CLASS_CONSTANT))) && in zend_optimize_block()
774 (VAR_SOURCE(opline->op2)->opcode == ZEND_FAST_CONCAT || in zend_optimize_block()
775 VAR_SOURCE(opline->op2)->opcode == ZEND_ROPE_END || in zend_optimize_block()
776 VAR_SOURCE(opline->op2)->opcode == ZEND_FETCH_CONSTANT || in zend_optimize_block()
777 VAR_SOURCE(opline->op2)->opcode == ZEND_FETCH_CLASS_CONSTANT)))) { in zend_optimize_block()
778 opline->opcode = ZEND_FAST_CONCAT; in zend_optimize_block()
804 …if (zend_optimizer_eval_binary_op(&result, opline->opcode, &ZEND_OP1_LITERAL(opline), &ZEND_OP2_LI… in zend_optimize_block()
807 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
821 … if (zend_optimizer_eval_unary_op(&result, opline->opcode, &ZEND_OP1_LITERAL(opline)) == SUCCESS) { in zend_optimize_block()
823 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
837 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
851 opline->opcode = ZEND_QM_ASSIGN; in zend_optimize_block()
862 if (src && src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
923 if (opline->opcode == ZEND_JMP) { in assemble_code_blocks()
934 } else if (b->len == 1 && opline->opcode == ZEND_NOP) { in assemble_code_blocks()
976 switch (opline->opcode) { in assemble_code_blocks()
1063 if (opline->opcode == ZEND_FAST_RET && in assemble_code_blocks()
1139 switch (last_op->opcode) { in zend_jmp_optimization()
1159 if (target->opcode == ZEND_JMP && in zend_jmp_optimization()
1168 } else if (target->opcode == ZEND_JMPZNZ && in zend_jmp_optimization()
1184 } else if ((target->opcode == ZEND_RETURN || in zend_jmp_optimization()
1185 target->opcode == ZEND_RETURN_BY_REF || in zend_jmp_optimization()
1186 target->opcode == ZEND_EXIT) && in zend_jmp_optimization()
1203 target->opcode != ZEND_FREE) { in zend_jmp_optimization()
1261 if (last_op->opcode == ZEND_JMPZ) { in zend_jmp_optimization()
1268 last_op->opcode = ZEND_JMP; in zend_jmp_optimization()
1286 last_op->opcode = ZEND_CHECK_VAR; in zend_jmp_optimization()
1289 last_op->opcode = ZEND_FREE; in zend_jmp_optimization()
1309 while (target < target_end && target->opcode == ZEND_NOP) { in zend_jmp_optimization()
1318 } else if (target->opcode == INV_COND(last_op->opcode) && in zend_jmp_optimization()
1329 } else if (target->opcode == INV_COND_EX(last_op->opcode) && in zend_jmp_optimization()
1335 last_op->opcode += 3; in zend_jmp_optimization()
1341 } else if (target->opcode == last_op->opcode && in zend_jmp_optimization()
1351 } else if (target->opcode == ZEND_JMP && in zend_jmp_optimization()
1358 } else if (target->opcode == ZEND_JMPZNZ && in zend_jmp_optimization()
1365 if (last_op->opcode == ZEND_JMPZ) { in zend_jmp_optimization()
1375 if (last_op->opcode == ZEND_JMPZ || last_op->opcode == ZEND_JMPNZ) { in zend_jmp_optimization()
1384 while (target < target_end && target->opcode == ZEND_NOP) { in zend_jmp_optimization()
1399 if (target->opcode == ZEND_JMP && in zend_jmp_optimization()
1402 if (last_op->opcode == ZEND_JMPZ) { in zend_jmp_optimization()
1410 last_op->opcode = ZEND_JMPZNZ; in zend_jmp_optimization()
1422 if (last_op->opcode == ZEND_JMPZ_EX) { in zend_jmp_optimization()
1429 last_op->opcode = ZEND_QM_ASSIGN; in zend_jmp_optimization()
1454 while (target < target_end && target->opcode == ZEND_NOP) { in zend_jmp_optimization()
1462 } else if (target->opcode == last_op->opcode-3 && in zend_jmp_optimization()
1471 } else if (target->opcode == INV_EX_COND(last_op->opcode) && in zend_jmp_optimization()
1480 } else if (target->opcode == INV_EX_COND_EX(last_op->opcode) && in zend_jmp_optimization()
1490 } else if (target->opcode == last_op->opcode && in zend_jmp_optimization()
1500 } else if (target->opcode == ZEND_JMP && in zend_jmp_optimization()
1507 } else if (target->opcode == ZEND_JMPZNZ && in zend_jmp_optimization()
1513 if (last_op->opcode == ZEND_JMPZ_EX) { in zend_jmp_optimization()
1536 last_op->opcode = ZEND_JMP; in zend_jmp_optimization()
1544 last_op->opcode = ZEND_JMP; in zend_jmp_optimization()
1556 last_op->opcode = ZEND_JMP; in zend_jmp_optimization()
1565 last_op->opcode = ZEND_JMPNZ; in zend_jmp_optimization()
1573 last_op->opcode = ZEND_JMPZ; in zend_jmp_optimization()
1578 if (last_op->opcode == ZEND_JMPZNZ) { in zend_jmp_optimization()
1588 while (target < target_end && target->opcode == ZEND_NOP) { in zend_jmp_optimization()
1596 } else if ((target->opcode == ZEND_JMPZ || target->opcode == ZEND_JMPZNZ) && in zend_jmp_optimization()
1606 } else if (target->opcode == ZEND_JMPNZ && in zend_jmp_optimization()
1616 } else if (target->opcode == ZEND_JMP && in zend_jmp_optimization()
1680 if (opline->opcode == ZEND_FE_FETCH_R || in zend_t_usage()
1681 opline->opcode == ZEND_FE_FETCH_RW) { in zend_t_usage()
1699 switch (opline->opcode) { in zend_t_usage()
1759 switch (opline->opcode) { in zend_t_usage()
1788 switch (opline->opcode) { in zend_t_usage()
1793 opline->opcode -= 2; in zend_t_usage()
1800 opline->opcode = ZEND_CHECK_VAR; in zend_t_usage()
1803 opline->opcode = ZEND_FREE; in zend_t_usage()
1814 opline->opcode -= 3; in zend_t_usage()
1823 switch (opline->opcode) { in zend_t_usage()
1835 switch (opline->opcode) { in zend_t_usage()
1873 if (prev->len != 0 && last_op->opcode == ZEND_JMP) { in zend_merge_blocks()