Lines Matching refs:last_op

641 	zend_op *end, *last_op = NULL;  in zend_optimize_block()  local
939 } else if (last_op && opline->opcode == ZEND_ECHO && in zend_optimize_block()
940 last_op->opcode == ZEND_ECHO && in zend_optimize_block()
943 ZEND_OP1_TYPE(last_op) == IS_CONST && in zend_optimize_block()
944 Z_TYPE(ZEND_OP1_LITERAL(last_op)) != IS_DOUBLE) { in zend_optimize_block()
954 if (Z_TYPE(ZEND_OP1_LITERAL(last_op)) != IS_STRING) { in zend_optimize_block()
955 convert_to_string_safe(&ZEND_OP1_LITERAL(last_op)); in zend_optimize_block()
957 old_len = Z_STRLEN(ZEND_OP1_LITERAL(last_op)); in zend_optimize_block()
959 if (!Z_REFCOUNTED(ZEND_OP1_LITERAL(last_op))) { in zend_optimize_block()
961 memcpy(ZSTR_VAL(tmp), Z_STRVAL(ZEND_OP1_LITERAL(last_op)), old_len); in zend_optimize_block()
962 Z_STR(ZEND_OP1_LITERAL(last_op)) = tmp; in zend_optimize_block()
964 Z_STR(ZEND_OP1_LITERAL(last_op)) = zend_string_extend(Z_STR(ZEND_OP1_LITERAL(last_op)), l, 0); in zend_optimize_block()
966 Z_TYPE_INFO(ZEND_OP1_LITERAL(last_op)) = IS_STRING_EX; in zend_optimize_block()
967 …memcpy(Z_STRVAL(ZEND_OP1_LITERAL(last_op)) + old_len, Z_STRVAL(ZEND_OP1_LITERAL(opline)), Z_STRLEN… in zend_optimize_block()
968 Z_STRVAL(ZEND_OP1_LITERAL(last_op))[l] = '\0'; in zend_optimize_block()
970 ZVAL_STR(&ZEND_OP1_LITERAL(opline), zend_new_interned_string(Z_STR(ZEND_OP1_LITERAL(last_op)))); in zend_optimize_block()
971 ZVAL_NULL(&ZEND_OP1_LITERAL(last_op)); in zend_optimize_block()
972 MAKE_NOP(last_op); in zend_optimize_block()
999 Z_STR(ZEND_OP2_LITERAL(last_op)) = tmp; in zend_optimize_block()
1003 Z_TYPE_INFO(ZEND_OP2_LITERAL(last_op)) = IS_STRING_EX; in zend_optimize_block()
1172 last_op = opline; in zend_optimize_block()
1294 zend_op *last_op = (block->start_opline + block->len - 1); in zend_jmp_optimization() local
1299 switch (last_op->opcode) { in zend_jmp_optimization()
1314 MAKE_NOP(last_op); in zend_jmp_optimization()
1329 *last_op = *target; in zend_jmp_optimization()
1330 if (ZEND_OP1_TYPE(last_op) == IS_CONST) { in zend_jmp_optimization()
1331 zval zv = ZEND_OP1_LITERAL(last_op); in zend_jmp_optimization()
1333 last_op->op1.constant = zend_optimizer_add_literal(op_array, &zv); in zend_jmp_optimization()
1355 *last_op = *target; in zend_jmp_optimization()
1356 if (ZEND_OP1_TYPE(last_op) == IS_CONST) { in zend_jmp_optimization()
1357 zval zv = ZEND_OP1_LITERAL(last_op); in zend_jmp_optimization()
1359 last_op->op1.constant = zend_optimizer_add_literal(op_array, &zv); in zend_jmp_optimization()
1406 MAKE_NOP(last_op); in zend_jmp_optimization()
1423 if (ZEND_OP1_TYPE(last_op) == IS_CONST) { in zend_jmp_optimization()
1424 int should_jmp = zend_is_true(&ZEND_OP1_LITERAL(last_op)); in zend_jmp_optimization()
1426 if (last_op->opcode == ZEND_JMPZ) { in zend_jmp_optimization()
1429 literal_dtor(&ZEND_OP1_LITERAL(last_op)); in zend_jmp_optimization()
1430 ZEND_OP1_TYPE(last_op) = IS_UNUSED; in zend_jmp_optimization()
1433 last_op->opcode = ZEND_JMP; in zend_jmp_optimization()
1434 COPY_NODE(last_op->op1, last_op->op2); in zend_jmp_optimization()
1441 MAKE_NOP(last_op); in zend_jmp_optimization()
1451 if (last_op->op1_type == IS_VAR) { in zend_jmp_optimization()
1453 zend_op *src = VAR_SOURCE(last_op->op1); in zend_jmp_optimization()
1460 MAKE_NOP(last_op); in zend_jmp_optimization()
1465 if (last_op->op1_type == IS_CV) { in zend_jmp_optimization()
1467 } else if (last_op->op1_type & (IS_VAR|IS_TMP_VAR)) { in zend_jmp_optimization()
1468 last_op->opcode = ZEND_FREE; in zend_jmp_optimization()
1469 last_op->op2.num = 0; in zend_jmp_optimization()
1472 MAKE_NOP(last_op); in zend_jmp_optimization()
1479 zend_uchar same_type = ZEND_OP1_TYPE(last_op); in zend_jmp_optimization()
1480 uint32_t same_var = VAR_NUM_EX(last_op->op1); in zend_jmp_optimization()
1496 } else if (target->opcode == INV_COND(last_op->opcode) && in zend_jmp_optimization()
1507 } else if (target->opcode == INV_COND_EX(last_op->opcode) && in zend_jmp_optimization()
1514 last_op->opcode += 3; in zend_jmp_optimization()
1515 COPY_NODE(last_op->result, target->result); in zend_jmp_optimization()
1520 target->opcode == last_op->opcode && in zend_jmp_optimization()
1545 if (last_op->opcode == ZEND_JMPZ) { in zend_jmp_optimization()
1555 (last_op->opcode == ZEND_JMPZ || last_op->opcode == ZEND_JMPNZ)) { in zend_jmp_optimization()
1580 if (last_op->opcode == ZEND_JMPZ) { in zend_jmp_optimization()
1589 last_op->opcode = ZEND_JMPZNZ; in zend_jmp_optimization()
1597 if (ZEND_OP1_TYPE(last_op) == IS_CONST) { in zend_jmp_optimization()
1598 int should_jmp = zend_is_true(&ZEND_OP1_LITERAL(last_op)); in zend_jmp_optimization()
1600 if (last_op->opcode == ZEND_JMPZ_EX) { in zend_jmp_optimization()
1607 last_op->opcode = ZEND_QM_ASSIGN; in zend_jmp_optimization()
1608 SET_UNUSED(last_op->op2); in zend_jmp_optimization()
1626 same_t[VAR_NUM_EX(last_op->op1)] |= ZEND_OP1_TYPE(last_op); in zend_jmp_optimization()
1627 same_t[VAR_NUM_EX(last_op->result)] |= ZEND_RESULT_TYPE(last_op); in zend_jmp_optimization()
1640 target->opcode == last_op->opcode-3 && in zend_jmp_optimization()
1649 target->opcode == INV_EX_COND(last_op->opcode) && in zend_jmp_optimization()
1658 target->opcode == INV_EX_COND_EX(last_op->opcode) && in zend_jmp_optimization()
1668 target->opcode == last_op->opcode && in zend_jmp_optimization()
1692 if (last_op->opcode == ZEND_JMPZ_EX) { in zend_jmp_optimization()
1710 if (ZEND_OP1_TYPE(last_op) == IS_CONST) { in zend_jmp_optimization()
1711 if (!zend_is_true(&ZEND_OP1_LITERAL(last_op))) { in zend_jmp_optimization()
1715 literal_dtor(&ZEND_OP1_LITERAL(last_op)); in zend_jmp_optimization()
1716 last_op->opcode = ZEND_JMP; in zend_jmp_optimization()
1717 SET_UNUSED(last_op->op1); in zend_jmp_optimization()
1718 SET_UNUSED(last_op->op2); in zend_jmp_optimization()
1728 literal_dtor(&ZEND_OP1_LITERAL(last_op)); in zend_jmp_optimization()
1729 last_op->opcode = ZEND_JMP; in zend_jmp_optimization()
1730 SET_UNUSED(last_op->op1); in zend_jmp_optimization()
1731 SET_UNUSED(last_op->op2); in zend_jmp_optimization()
1740 if (!(last_op->op1_type & (IS_VAR|IS_TMP_VAR))) { in zend_jmp_optimization()
1742 last_op->opcode = ZEND_JMP; in zend_jmp_optimization()
1743 SET_UNUSED(last_op->op1); in zend_jmp_optimization()
1744 SET_UNUSED(last_op->op2); in zend_jmp_optimization()
1752 last_op->opcode = ZEND_JMPNZ; in zend_jmp_optimization()
1760 last_op->opcode = ZEND_JMPZ; in zend_jmp_optimization()
1766 if (last_op->opcode == ZEND_JMPZNZ && block->op2_to) { in zend_jmp_optimization()
1767 zend_uchar same_type = ZEND_OP1_TYPE(last_op); in zend_jmp_optimization()
1768 zend_uchar same_var = VAR_NUM_EX(last_op->op1); in zend_jmp_optimization()