Lines Matching refs:opcodes
166 ZEND_ASSERT(op_array->opcodes[b->start].opcode == ZEND_FREE in zend_ssa_remove_nops()
167 || op_array->opcodes[b->start].opcode == ZEND_FE_FREE); in zend_ssa_remove_nops()
175 if (EXPECTED(op_array->opcodes[i].opcode != ZEND_NOP)) { in zend_ssa_remove_nops()
177 op_array->opcodes[target] = op_array->opcodes[i]; in zend_ssa_remove_nops()
191 opline = op_array->opcodes + old_end - 1; in zend_ssa_remove_nops()
196 new_opline = op_array->opcodes + target - 1; in zend_ssa_remove_nops()
211 MAKE_NOP(op_array->opcodes + i); in zend_ssa_remove_nops()
238 zend_op *opline = op_array->opcodes + b->start + b->len - 1; in zend_ssa_remove_nops()
260 opline_num = &op_array->opcodes[*opline_num].result.opline_num; in zend_ssa_remove_nops()
269 shiftlist[call_info->caller_init_opline - op_array->opcodes]; in zend_ssa_remove_nops()
272 shiftlist[call_info->caller_call_opline - op_array->opcodes]; in zend_ssa_remove_nops()
462 uint32_t op_num = send_needly - op_array->opcodes; in zend_dfa_optimize_calls()
474 op_num = call_info->caller_call_opline - op_array->opcodes; in zend_dfa_optimize_calls()
498 op_num = call_info->caller_call_opline - op_array->opcodes; in zend_dfa_optimize_calls()
510 && (op_array->opcodes[use].opcode == ZEND_JMPZ in zend_dfa_optimize_calls()
511 || op_array->opcodes[use].opcode == ZEND_JMPNZ)) { in zend_dfa_optimize_calls()
513 op_array->opcodes[use].op1_type = IS_TMP_VAR; in zend_dfa_optimize_calls()
563 zend_op *opline = &op_array->opcodes[block->start + block->len - 1]; in compress_block()
639 opline = op_array->opcodes + src->start + src->len - 1; in zend_ssa_replace_control_link()
643 ZEND_ASSERT(ZEND_OP1_JMP_ADDR(opline) == op_array->opcodes + old->start); in zend_ssa_replace_control_link()
644 ZEND_SET_OP_JMP_ADDR(opline, opline->op1, op_array->opcodes + dst->start); in zend_ssa_replace_control_link()
661 if (ZEND_OP2_JMP_ADDR(opline) == op_array->opcodes + old->start) { in zend_ssa_replace_control_link()
662 ZEND_SET_OP_JMP_ADDR(opline, opline->op2, op_array->opcodes + dst->start); in zend_ssa_replace_control_link()
667 if (ZEND_OP2_JMP_ADDR(opline) == op_array->opcodes + old->start) { in zend_ssa_replace_control_link()
668 ZEND_SET_OP_JMP_ADDR(opline, opline->op2, op_array->opcodes + dst->start); in zend_ssa_replace_control_link()
712 if ((op_array->opcodes[pred_block->start + pred_block->len - 1].opcode == ZEND_FE_FETCH_R in zend_ssa_unlink_block()
713 || op_array->opcodes[pred_block->start + pred_block->len - 1].opcode == ZEND_FE_FETCH_RW) in zend_ssa_unlink_block()
714 && op_array->opcodes[pred_block->start + pred_block->len - 1].op2_type == IS_CV) { in zend_ssa_unlink_block()
773 opline = op_array->opcodes + op_num; in zend_dfa_optimize_jmps()
1011 ZEND_SET_OP_JMP_ADDR(opline, opline->op1, op_array->opcodes + target); in zend_dfa_optimize_jmps()
1060 && op_array->opcodes[use].opcode != ZEND_FREE in zend_dfa_try_to_replace_result()
1061 && op_array->opcodes[use].opcode != ZEND_SEND_VAL in zend_dfa_try_to_replace_result()
1062 && op_array->opcodes[use].opcode != ZEND_SEND_VAL_EX in zend_dfa_try_to_replace_result()
1063 && op_array->opcodes[use].opcode != ZEND_VERIFY_RETURN_TYPE in zend_dfa_try_to_replace_result()
1064 && op_array->opcodes[use].opcode != ZEND_YIELD) { in zend_dfa_try_to_replace_result()
1067 const zend_op *opline = &op_array->opcodes[use]; in zend_dfa_try_to_replace_result()
1084 op_array->opcodes[def].result_type = IS_UNUSED; in zend_dfa_try_to_replace_result()
1085 op_array->opcodes[def].result.var = 0; in zend_dfa_try_to_replace_result()
1092 op_array->opcodes[use].op1_type = IS_CV; in zend_dfa_try_to_replace_result()
1093 op_array->opcodes[use].op1.var = cv; in zend_dfa_try_to_replace_result()
1099 op_array->opcodes[use].op2_type = IS_CV; in zend_dfa_try_to_replace_result()
1100 op_array->opcodes[use].op2.var = cv; in zend_dfa_try_to_replace_result()
1106 op_array->opcodes[use].result_type = IS_CV; in zend_dfa_try_to_replace_result()
1107 op_array->opcodes[use].result.var = cv; in zend_dfa_try_to_replace_result()
1184 opline = op_array->opcodes + op_1; in zend_dfa_optimize_op_array()
1341 op_array, ssa, &op_array->opcodes[ssa->vars[src_var].definition], in zend_dfa_optimize_op_array()
1369 op_array->opcodes[op_2].result_type = opline->result_type; in zend_dfa_optimize_op_array()
1370 op_array->opcodes[op_2].result.var = opline->result.var; in zend_dfa_optimize_op_array()
1375 if (op_array->opcodes[op_2].opcode == ZEND_SUB in zend_dfa_optimize_op_array()
1376 && op_array->opcodes[op_2].op1_type == op_array->opcodes[op_2].result_type in zend_dfa_optimize_op_array()
1377 && op_array->opcodes[op_2].op1.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array()
1378 && op_array->opcodes[op_2].op2_type == IS_CONST in zend_dfa_optimize_op_array()
1379 && Z_TYPE_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op2.constant)) == IS_LONG in zend_dfa_optimize_op_array()
1380 && Z_LVAL_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op2.constant)) == 1 in zend_dfa_optimize_op_array()
1384 op_array->opcodes[op_2].opcode = ZEND_PRE_DEC; in zend_dfa_optimize_op_array()
1385 SET_UNUSED(op_array->opcodes[op_2].op2); in zend_dfa_optimize_op_array()
1386 SET_UNUSED(op_array->opcodes[op_2].result); in zend_dfa_optimize_op_array()
1391 } else if (op_array->opcodes[op_2].opcode == ZEND_ADD in zend_dfa_optimize_op_array()
1392 && op_array->opcodes[op_2].op1_type == op_array->opcodes[op_2].result_type in zend_dfa_optimize_op_array()
1393 && op_array->opcodes[op_2].op1.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array()
1394 && op_array->opcodes[op_2].op2_type == IS_CONST in zend_dfa_optimize_op_array()
1395 && Z_TYPE_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op2.constant)) == IS_LONG in zend_dfa_optimize_op_array()
1396 && Z_LVAL_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op2.constant)) == 1 in zend_dfa_optimize_op_array()
1400 op_array->opcodes[op_2].opcode = ZEND_PRE_INC; in zend_dfa_optimize_op_array()
1401 SET_UNUSED(op_array->opcodes[op_2].op2); in zend_dfa_optimize_op_array()
1402 SET_UNUSED(op_array->opcodes[op_2].result); in zend_dfa_optimize_op_array()
1407 } else if (op_array->opcodes[op_2].opcode == ZEND_ADD in zend_dfa_optimize_op_array()
1408 && op_array->opcodes[op_2].op2_type == op_array->opcodes[op_2].result_type in zend_dfa_optimize_op_array()
1409 && op_array->opcodes[op_2].op2.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array()
1410 && op_array->opcodes[op_2].op1_type == IS_CONST in zend_dfa_optimize_op_array()
1411 && Z_TYPE_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op1.constant)) == IS_LONG in zend_dfa_optimize_op_array()
1412 && Z_LVAL_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op1.constant)) == 1 in zend_dfa_optimize_op_array()
1416 op_array->opcodes[op_2].opcode = ZEND_PRE_INC; in zend_dfa_optimize_op_array()
1417 op_array->opcodes[op_2].op1_type = op_array->opcodes[op_2].op2_type; in zend_dfa_optimize_op_array()
1418 op_array->opcodes[op_2].op1.var = op_array->opcodes[op_2].op2.var; in zend_dfa_optimize_op_array()
1419 SET_UNUSED(op_array->opcodes[op_2].op2); in zend_dfa_optimize_op_array()
1420 SET_UNUSED(op_array->opcodes[op_2].result); in zend_dfa_optimize_op_array()
1452 if (use >= 0 && op_array->opcodes[use].opcode == ZEND_IS_SMALLER in zend_dfa_optimize_op_array()
1456 op_array->opcodes[use].opcode = ZEND_IS_SMALLER_OR_EQUAL; in zend_dfa_optimize_op_array()
1466 if (use >= 0 && op_array->opcodes[use].opcode == ZEND_IS_SMALLER in zend_dfa_optimize_op_array()
1470 op_array->opcodes[use].opcode = ZEND_IS_SMALLER_OR_EQUAL; in zend_dfa_optimize_op_array()
1498 op_array, ssa, &op_array->opcodes[ssa->vars[src_var].definition], in zend_dfa_optimize_op_array()
1523 op_array->opcodes[op_2].result_type = opline->op1_type; in zend_dfa_optimize_op_array()
1524 op_array->opcodes[op_2].result.var = opline->op1.var; in zend_dfa_optimize_op_array()
1529 if (op_array->opcodes[op_2].opcode == ZEND_SUB in zend_dfa_optimize_op_array()
1530 && op_array->opcodes[op_2].op1_type == op_array->opcodes[op_2].result_type in zend_dfa_optimize_op_array()
1531 && op_array->opcodes[op_2].op1.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array()
1532 && op_array->opcodes[op_2].op2_type == IS_CONST in zend_dfa_optimize_op_array()
1533 && Z_TYPE_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op2.constant)) == IS_LONG in zend_dfa_optimize_op_array()
1534 && Z_LVAL_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op2.constant)) == 1 in zend_dfa_optimize_op_array()
1538 op_array->opcodes[op_2].opcode = ZEND_PRE_DEC; in zend_dfa_optimize_op_array()
1539 SET_UNUSED(op_array->opcodes[op_2].op2); in zend_dfa_optimize_op_array()
1540 SET_UNUSED(op_array->opcodes[op_2].result); in zend_dfa_optimize_op_array()
1545 } else if (op_array->opcodes[op_2].opcode == ZEND_ADD in zend_dfa_optimize_op_array()
1546 && op_array->opcodes[op_2].op1_type == op_array->opcodes[op_2].result_type in zend_dfa_optimize_op_array()
1547 && op_array->opcodes[op_2].op1.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array()
1548 && op_array->opcodes[op_2].op2_type == IS_CONST in zend_dfa_optimize_op_array()
1549 && Z_TYPE_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op2.constant)) == IS_LONG in zend_dfa_optimize_op_array()
1550 && Z_LVAL_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op2.constant)) == 1 in zend_dfa_optimize_op_array()
1554 op_array->opcodes[op_2].opcode = ZEND_PRE_INC; in zend_dfa_optimize_op_array()
1555 SET_UNUSED(op_array->opcodes[op_2].op2); in zend_dfa_optimize_op_array()
1556 SET_UNUSED(op_array->opcodes[op_2].result); in zend_dfa_optimize_op_array()
1561 } else if (op_array->opcodes[op_2].opcode == ZEND_ADD in zend_dfa_optimize_op_array()
1562 && op_array->opcodes[op_2].op2_type == op_array->opcodes[op_2].result_type in zend_dfa_optimize_op_array()
1563 && op_array->opcodes[op_2].op2.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array()
1564 && op_array->opcodes[op_2].op1_type == IS_CONST in zend_dfa_optimize_op_array()
1565 && Z_TYPE_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op1.constant)) == IS_LONG in zend_dfa_optimize_op_array()
1566 && Z_LVAL_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op1.constant)) == 1 in zend_dfa_optimize_op_array()
1570 op_array->opcodes[op_2].opcode = ZEND_PRE_INC; in zend_dfa_optimize_op_array()
1571 op_array->opcodes[op_2].op1_type = op_array->opcodes[op_2].op2_type; in zend_dfa_optimize_op_array()
1572 op_array->opcodes[op_2].op1.var = op_array->opcodes[op_2].op2.var; in zend_dfa_optimize_op_array()
1573 SET_UNUSED(op_array->opcodes[op_2].op2); in zend_dfa_optimize_op_array()
1574 SET_UNUSED(op_array->opcodes[op_2].result); in zend_dfa_optimize_op_array()