Lines Matching refs:src
168 zend_op *opline, *src; in zend_optimize_block() local
186 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
187 if (src && in zend_optimize_block()
188 src->opcode == ZEND_QM_ASSIGN && in zend_optimize_block()
189 src->op1_type == IS_CONST in zend_optimize_block()
194 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
196 MAKE_NOP(src); in zend_optimize_block()
200 ZVAL_COPY(&c, &ZEND_OP1_LITERAL(src)); in zend_optimize_block()
203 literal_dtor(&ZEND_OP1_LITERAL(src)); in zend_optimize_block()
204 MAKE_NOP(src); in zend_optimize_block()
261 src = VAR_SOURCE(opline->op2); in zend_optimize_block()
262 if (src && in zend_optimize_block()
263 src->opcode == ZEND_QM_ASSIGN && in zend_optimize_block()
264 src->op1_type == IS_CONST) { in zend_optimize_block()
269 ZVAL_COPY(&c, &ZEND_OP1_LITERAL(src)); in zend_optimize_block()
272 literal_dtor(&ZEND_OP1_LITERAL(src)); in zend_optimize_block()
273 MAKE_NOP(src); in zend_optimize_block()
283 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
284 if (src && in zend_optimize_block()
285 src->opcode == ZEND_CAST && in zend_optimize_block()
286 src->extended_value == IS_STRING) { in zend_optimize_block()
289 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
290 MAKE_NOP(src); in zend_optimize_block()
342 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
343 if (src && in zend_optimize_block()
344 (src->opcode == ZEND_BOOL || src->opcode == ZEND_BOOL_NOT)) { in zend_optimize_block()
352 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
354 if (src && in zend_optimize_block()
355 src->opcode != ZEND_FETCH_R && in zend_optimize_block()
356 src->opcode != ZEND_FETCH_STATIC_PROP_R && in zend_optimize_block()
357 src->opcode != ZEND_FETCH_DIM_R && in zend_optimize_block()
358 src->opcode != ZEND_FETCH_OBJ_R && in zend_optimize_block()
359 src->opcode != ZEND_NEW) { in zend_optimize_block()
360 src->result_type = IS_UNUSED; in zend_optimize_block()
505 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
506 if (src) { in zend_optimize_block()
507 switch (src->opcode) { in zend_optimize_block()
511 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
513 MAKE_NOP(src); in zend_optimize_block()
519 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
520 MAKE_NOP(src); in zend_optimize_block()
525 src->opcode = ZEND_IS_NOT_EQUAL; in zend_optimize_block()
527 COPY_NODE(src->result, opline->result); in zend_optimize_block()
528 SET_VAR_SOURCE(src); in zend_optimize_block()
534 src->opcode = ZEND_IS_EQUAL; in zend_optimize_block()
536 COPY_NODE(src->result, opline->result); in zend_optimize_block()
537 SET_VAR_SOURCE(src); in zend_optimize_block()
543 src->opcode = ZEND_IS_NOT_IDENTICAL; in zend_optimize_block()
545 COPY_NODE(src->result, opline->result); in zend_optimize_block()
546 SET_VAR_SOURCE(src); in zend_optimize_block()
552 src->opcode = ZEND_IS_IDENTICAL; in zend_optimize_block()
554 COPY_NODE(src->result, opline->result); in zend_optimize_block()
555 SET_VAR_SOURCE(src); in zend_optimize_block()
564 src->opcode = ZEND_IS_SMALLER_OR_EQUAL; in zend_optimize_block()
565 tmp_type = src->op1_type; in zend_optimize_block()
566 src->op1_type = src->op2_type; in zend_optimize_block()
567 src->op2_type = tmp_type; in zend_optimize_block()
568 tmp = src->op1.num; in zend_optimize_block()
569 src->op1.num = src->op2.num; in zend_optimize_block()
570 src->op2.num = tmp; in zend_optimize_block()
572 COPY_NODE(src->result, opline->result); in zend_optimize_block()
573 SET_VAR_SOURCE(src); in zend_optimize_block()
582 src->opcode = ZEND_IS_SMALLER; in zend_optimize_block()
583 tmp_type = src->op1_type; in zend_optimize_block()
584 src->op1_type = src->op2_type; in zend_optimize_block()
585 src->op2_type = tmp_type; in zend_optimize_block()
586 tmp = src->op1.num; in zend_optimize_block()
587 src->op1.num = src->op2.num; in zend_optimize_block()
588 src->op2.num = tmp; in zend_optimize_block()
590 COPY_NODE(src->result, opline->result); in zend_optimize_block()
591 SET_VAR_SOURCE(src); in zend_optimize_block()
606 COPY_NODE(src->result, opline->result); in zend_optimize_block()
607 SET_VAR_SOURCE(src); in zend_optimize_block()
626 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
627 if (src) { in zend_optimize_block()
628 if (src->opcode == ZEND_BOOL_NOT && in zend_optimize_block()
632 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
656 MAKE_NOP(src); in zend_optimize_block()
659 } else if (src->opcode == ZEND_BOOL || in zend_optimize_block()
660 src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
662 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
663 MAKE_NOP(src); in zend_optimize_block()
681 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
682 if (src && in zend_optimize_block()
683 (src->opcode == ZEND_CONCAT || in zend_optimize_block()
684 src->opcode == ZEND_FAST_CONCAT) && in zend_optimize_block()
685 src->op2_type == IS_CONST) { in zend_optimize_block()
692 if (Z_TYPE(ZEND_OP2_LITERAL(src)) != IS_STRING) { in zend_optimize_block()
693 convert_to_string(&ZEND_OP2_LITERAL(src)); in zend_optimize_block()
697 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
698 old_len = Z_STRLEN(ZEND_OP2_LITERAL(src)); in zend_optimize_block()
700 if (!Z_REFCOUNTED(ZEND_OP2_LITERAL(src))) { in zend_optimize_block()
702 memcpy(ZSTR_VAL(tmp), Z_STRVAL(ZEND_OP2_LITERAL(src)), old_len); in zend_optimize_block()
703 Z_STR(ZEND_OP2_LITERAL(src)) = tmp; in zend_optimize_block()
705 Z_STR(ZEND_OP2_LITERAL(src)) = zend_string_extend(Z_STR(ZEND_OP2_LITERAL(src)), l, 0); in zend_optimize_block()
707 Z_TYPE_INFO(ZEND_OP2_LITERAL(src)) = IS_STRING_EX; in zend_optimize_block()
708 …memcpy(Z_STRVAL(ZEND_OP2_LITERAL(src)) + old_len, Z_STRVAL(ZEND_OP2_LITERAL(opline)), Z_STRLEN(ZEN… in zend_optimize_block()
709 Z_STRVAL(ZEND_OP2_LITERAL(src))[l] = '\0'; in zend_optimize_block()
711 ZVAL_STR(&ZEND_OP2_LITERAL(opline), zend_new_interned_string(Z_STR(ZEND_OP2_LITERAL(src)))); in zend_optimize_block()
712 ZVAL_NULL(&ZEND_OP2_LITERAL(src)); in zend_optimize_block()
713 MAKE_NOP(src); in zend_optimize_block()
719 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
720 if (src && in zend_optimize_block()
721 src->opcode == ZEND_CAST && in zend_optimize_block()
722 src->extended_value == IS_STRING && in zend_optimize_block()
723 src->op1_type != IS_CONST) { in zend_optimize_block()
726 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
727 MAKE_NOP(src); in zend_optimize_block()
732 src = VAR_SOURCE(opline->op2); in zend_optimize_block()
733 if (src && in zend_optimize_block()
734 src->opcode == ZEND_CAST && in zend_optimize_block()
735 src->extended_value == IS_STRING && in zend_optimize_block()
736 src->op1_type != IS_CONST) { in zend_optimize_block()
738 zend_op *src = VAR_SOURCE(opline->op2); in zend_optimize_block() local
740 COPY_NODE(opline->op2, src->op1); in zend_optimize_block()
741 MAKE_NOP(src); in zend_optimize_block()
864 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
865 if (src && src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
866 zend_op *op = src + 1; in zend_optimize_block()
883 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
884 MAKE_NOP(src); in zend_optimize_block()