Lines Matching refs:src

136 	zend_op *opline, *src;  in zend_optimize_block()  local
154 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
155 if (src && in zend_optimize_block()
156 src->opcode == ZEND_QM_ASSIGN && in zend_optimize_block()
157 src->op1_type == IS_CONST in zend_optimize_block()
162 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
164 MAKE_NOP(src); in zend_optimize_block()
168 ZVAL_COPY(&c, &ZEND_OP1_LITERAL(src)); in zend_optimize_block()
179 && !zend_bitset_in(used_ext, VAR_NUM(src->result.var))) { in zend_optimize_block()
180 literal_dtor(&ZEND_OP1_LITERAL(src)); in zend_optimize_block()
181 MAKE_NOP(src); in zend_optimize_block()
193 src = VAR_SOURCE(opline->op2); in zend_optimize_block()
194 if (src && in zend_optimize_block()
195 src->opcode == ZEND_QM_ASSIGN && in zend_optimize_block()
196 src->op1_type == IS_CONST) { in zend_optimize_block()
201 ZVAL_COPY(&c, &ZEND_OP1_LITERAL(src)); in zend_optimize_block()
204 if (!zend_bitset_in(used_ext, VAR_NUM(src->result.var))) { in zend_optimize_block()
205 literal_dtor(&ZEND_OP1_LITERAL(src)); in zend_optimize_block()
206 MAKE_NOP(src); in zend_optimize_block()
218 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
219 if (src && in zend_optimize_block()
220 src->opcode == ZEND_CAST && in zend_optimize_block()
221 src->extended_value == IS_STRING) { in zend_optimize_block()
224 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
225 MAKE_NOP(src); in zend_optimize_block()
271 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
272 if (src) { in zend_optimize_block()
273 switch (src->opcode) { in zend_optimize_block()
297 if (src < op_array->opcodes + block->start) { in zend_optimize_block()
300 src->result_type = IS_UNUSED; in zend_optimize_block()
310 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
312 if (src >= op_array->opcodes + block->start && in zend_optimize_block()
313 src->opcode != ZEND_FETCH_R && in zend_optimize_block()
314 src->opcode != ZEND_FETCH_STATIC_PROP_R && in zend_optimize_block()
315 src->opcode != ZEND_FETCH_DIM_R && in zend_optimize_block()
316 src->opcode != ZEND_FETCH_OBJ_R && in zend_optimize_block()
317 src->opcode != ZEND_NEW && in zend_optimize_block()
318 src->opcode != ZEND_FETCH_THIS) { in zend_optimize_block()
319 src->result_type = IS_UNUSED; in zend_optimize_block()
322 if (src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
323 if (src->op1_type & (IS_VAR|IS_TMP_VAR)) { in zend_optimize_block()
324 src->opcode = ZEND_FREE; in zend_optimize_block()
326 MAKE_NOP(src); in zend_optimize_block()
473 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
474 if (src) { in zend_optimize_block()
475 switch (src->opcode) { in zend_optimize_block()
479 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
481 MAKE_NOP(src); in zend_optimize_block()
487 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
488 MAKE_NOP(src); in zend_optimize_block()
493 src->opcode = ZEND_IS_NOT_EQUAL; in zend_optimize_block()
495 COPY_NODE(src->result, opline->result); in zend_optimize_block()
496 SET_VAR_SOURCE(src); in zend_optimize_block()
502 src->opcode = ZEND_IS_EQUAL; in zend_optimize_block()
504 COPY_NODE(src->result, opline->result); in zend_optimize_block()
505 SET_VAR_SOURCE(src); in zend_optimize_block()
511 src->opcode = ZEND_IS_NOT_IDENTICAL; in zend_optimize_block()
513 COPY_NODE(src->result, opline->result); in zend_optimize_block()
514 SET_VAR_SOURCE(src); in zend_optimize_block()
520 src->opcode = ZEND_IS_IDENTICAL; in zend_optimize_block()
522 COPY_NODE(src->result, opline->result); in zend_optimize_block()
523 SET_VAR_SOURCE(src); in zend_optimize_block()
532 src->opcode = ZEND_IS_SMALLER_OR_EQUAL; in zend_optimize_block()
533 tmp_type = src->op1_type; in zend_optimize_block()
534 src->op1_type = src->op2_type; in zend_optimize_block()
535 src->op2_type = tmp_type; in zend_optimize_block()
536 tmp = src->op1.num; in zend_optimize_block()
537 src->op1.num = src->op2.num; in zend_optimize_block()
538 src->op2.num = tmp; in zend_optimize_block()
540 COPY_NODE(src->result, opline->result); in zend_optimize_block()
541 SET_VAR_SOURCE(src); in zend_optimize_block()
550 src->opcode = ZEND_IS_SMALLER; in zend_optimize_block()
551 tmp_type = src->op1_type; in zend_optimize_block()
552 src->op1_type = src->op2_type; in zend_optimize_block()
553 src->op2_type = tmp_type; in zend_optimize_block()
554 tmp = src->op1.num; in zend_optimize_block()
555 src->op1.num = src->op2.num; in zend_optimize_block()
556 src->op2.num = tmp; in zend_optimize_block()
558 COPY_NODE(src->result, opline->result); in zend_optimize_block()
559 SET_VAR_SOURCE(src); in zend_optimize_block()
576 COPY_NODE(src->result, opline->result); in zend_optimize_block()
577 SET_VAR_SOURCE(src); in zend_optimize_block()
613 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
614 if (src) { in zend_optimize_block()
615 if (src->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
617 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
620 MAKE_NOP(src); in zend_optimize_block()
623 } else if (src->opcode == ZEND_BOOL || in zend_optimize_block()
624 src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
626 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
627 MAKE_NOP(src); in zend_optimize_block()
656 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
657 if (src) { in zend_optimize_block()
658 if (src->opcode == ZEND_BOOL_NOT) { in zend_optimize_block()
663 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
667 MAKE_NOP(src); in zend_optimize_block()
670 } else if (src->opcode == ZEND_BOOL || in zend_optimize_block()
671 src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
673 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
674 MAKE_NOP(src); in zend_optimize_block()
704 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
705 if (src) { in zend_optimize_block()
706 if (src->opcode == ZEND_BOOL || in zend_optimize_block()
707 src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
709 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
710 MAKE_NOP(src); in zend_optimize_block()
730 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
731 if (src && in zend_optimize_block()
732 (src->opcode == ZEND_CONCAT || in zend_optimize_block()
733 src->opcode == ZEND_FAST_CONCAT) && in zend_optimize_block()
734 src->op2_type == IS_CONST) { in zend_optimize_block()
741 if (Z_TYPE(ZEND_OP2_LITERAL(src)) != IS_STRING) { in zend_optimize_block()
742 convert_to_string(&ZEND_OP2_LITERAL(src)); in zend_optimize_block()
746 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
747 old_len = Z_STRLEN(ZEND_OP2_LITERAL(src)); in zend_optimize_block()
749 if (!Z_REFCOUNTED(ZEND_OP2_LITERAL(src))) { in zend_optimize_block()
751 memcpy(ZSTR_VAL(tmp), Z_STRVAL(ZEND_OP2_LITERAL(src)), old_len); in zend_optimize_block()
752 Z_STR(ZEND_OP2_LITERAL(src)) = tmp; in zend_optimize_block()
754 Z_STR(ZEND_OP2_LITERAL(src)) = zend_string_extend(Z_STR(ZEND_OP2_LITERAL(src)), l, 0); in zend_optimize_block()
756 Z_TYPE_INFO(ZEND_OP2_LITERAL(src)) = IS_STRING_EX; in zend_optimize_block()
757 …memcpy(Z_STRVAL(ZEND_OP2_LITERAL(src)) + old_len, Z_STRVAL(ZEND_OP2_LITERAL(opline)), Z_STRLEN(ZEN… in zend_optimize_block()
758 Z_STRVAL(ZEND_OP2_LITERAL(src))[l] = '\0'; in zend_optimize_block()
760 ZVAL_STR(&ZEND_OP2_LITERAL(opline), zend_new_interned_string(Z_STR(ZEND_OP2_LITERAL(src)))); in zend_optimize_block()
761 ZVAL_NULL(&ZEND_OP2_LITERAL(src)); in zend_optimize_block()
762 MAKE_NOP(src); in zend_optimize_block()
768 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
769 if (src && in zend_optimize_block()
770 src->opcode == ZEND_CAST && in zend_optimize_block()
771 src->extended_value == IS_STRING && in zend_optimize_block()
772 src->op1_type != IS_CONST) { in zend_optimize_block()
775 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
776 MAKE_NOP(src); in zend_optimize_block()
781 src = VAR_SOURCE(opline->op2); in zend_optimize_block()
782 if (src && in zend_optimize_block()
783 src->opcode == ZEND_CAST && in zend_optimize_block()
784 src->extended_value == IS_STRING && in zend_optimize_block()
785 src->op1_type != IS_CONST) { in zend_optimize_block()
787 zend_op *src = VAR_SOURCE(opline->op2); in zend_optimize_block() local
789 COPY_NODE(opline->op2, src->op1); in zend_optimize_block()
790 MAKE_NOP(src); in zend_optimize_block()
913 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
914 if (src && src->opcode == ZEND_QM_ASSIGN) { in zend_optimize_block()
915 zend_op *op = src + 1; in zend_optimize_block()
932 COPY_NODE(opline->op1, src->op1); in zend_optimize_block()
933 MAKE_NOP(src); in zend_optimize_block()
950 src = VAR_SOURCE(opline->op1); in zend_optimize_block()
951 if (src && in zend_optimize_block()
952 src->opcode != ZEND_COPY_TMP && in zend_optimize_block()
953 src->opcode != ZEND_ADD_ARRAY_ELEMENT && in zend_optimize_block()
954 src->opcode != ZEND_ADD_ARRAY_UNPACK && in zend_optimize_block()
955 (src->opcode != ZEND_DECLARE_LAMBDA_FUNCTION || in zend_optimize_block()
956 src == opline -1)) { in zend_optimize_block()
957 src->result.var = opline->result.var; in zend_optimize_block()
959 VAR_SOURCE(opline->result) = src; in zend_optimize_block()