Lines Matching refs:opline
654 zend_op *opline = op_array->opcodes, *end=opline+op_array->last; in zend_update_extended_stmts() local
656 while (opline<end) { in zend_update_extended_stmts()
657 if (opline->opcode == ZEND_EXT_STMT) { in zend_update_extended_stmts()
658 if (opline+1<end) { in zend_update_extended_stmts()
659 if ((opline+1)->opcode == ZEND_EXT_STMT) { in zend_update_extended_stmts()
660 opline->opcode = ZEND_NOP; in zend_update_extended_stmts()
661 opline++; in zend_update_extended_stmts()
664 if (opline+1<end) { in zend_update_extended_stmts()
665 opline->lineno = (opline+1)->lineno; in zend_update_extended_stmts()
668 opline->opcode = ZEND_NOP; in zend_update_extended_stmts()
671 opline++; in zend_update_extended_stmts()
707 static uint32_t zend_get_brk_cont_target(const zend_op_array *op_array, const zend_op *opline) { in zend_get_brk_cont_target() argument
708 int nest_levels = opline->op2.num; in zend_get_brk_cont_target()
709 int array_offset = opline->op1.num; in zend_get_brk_cont_target()
718 return opline->opcode == ZEND_BRK ? jmp_to->brk : jmp_to->cont; in zend_get_brk_cont_target()
883 static bool is_fake_def(zend_op *opline) { in is_fake_def() argument
885 return opline->opcode == ZEND_ROPE_ADD in is_fake_def()
886 || opline->opcode == ZEND_ADD_ARRAY_ELEMENT in is_fake_def()
887 || opline->opcode == ZEND_ADD_ARRAY_UNPACK; in is_fake_def()
890 static bool keeps_op1_alive(zend_op *opline) { in keeps_op1_alive() argument
893 if (opline->opcode == ZEND_CASE in keeps_op1_alive()
894 || opline->opcode == ZEND_CASE_STRICT in keeps_op1_alive()
895 || opline->opcode == ZEND_SWITCH_LONG in keeps_op1_alive()
896 || opline->opcode == ZEND_SWITCH_STRING in keeps_op1_alive()
897 || opline->opcode == ZEND_MATCH in keeps_op1_alive()
898 || opline->opcode == ZEND_FETCH_LIST_R in keeps_op1_alive()
899 || opline->opcode == ZEND_FETCH_LIST_W in keeps_op1_alive()
900 || opline->opcode == ZEND_COPY_TMP) { in keeps_op1_alive()
903 ZEND_ASSERT(opline->opcode != ZEND_FE_FETCH_R in keeps_op1_alive()
904 && opline->opcode != ZEND_FE_FETCH_RW in keeps_op1_alive()
905 && opline->opcode != ZEND_VERIFY_RETURN_TYPE in keeps_op1_alive()
906 && opline->opcode != ZEND_BIND_LEXICAL in keeps_op1_alive()
907 && opline->opcode != ZEND_ROPE_ADD); in keeps_op1_alive()
931 zend_op *opline = &op_array->opcodes[opnum]; in zend_calc_live_ranges() local
940 opline--; in zend_calc_live_ranges()
942 if ((opline->result_type & (IS_TMP_VAR|IS_VAR)) && !is_fake_def(opline)) { in zend_calc_live_ranges()
943 uint32_t var_num = EX_VAR_TO_NUM(opline->result.var) - var_offset; in zend_calc_live_ranges()
956 ZEND_ASSERT(opline->opcode != ZEND_OP_DATA); in zend_calc_live_ranges()
960 num = opnum - (opline->opcode == ZEND_OP_DATA); in zend_calc_live_ranges()
968 if ((opline->op1_type & (IS_TMP_VAR|IS_VAR))) { in zend_calc_live_ranges()
969 uint32_t var_num = EX_VAR_TO_NUM(opline->op1.var) - var_offset; in zend_calc_live_ranges()
971 if (EXPECTED(!keeps_op1_alive(opline))) { in zend_calc_live_ranges()
973 last_use[var_num] = opnum - (opline->opcode == ZEND_OP_DATA); in zend_calc_live_ranges()
977 if (opline->op2_type & (IS_TMP_VAR|IS_VAR)) { in zend_calc_live_ranges()
978 uint32_t var_num = EX_VAR_TO_NUM(opline->op2.var) - var_offset; in zend_calc_live_ranges()
979 if (UNEXPECTED(opline->opcode == ZEND_FE_FETCH_R in zend_calc_live_ranges()
980 || opline->opcode == ZEND_FE_FETCH_RW)) { in zend_calc_live_ranges()
992 ZEND_ASSERT(opline->opcode != ZEND_OP_DATA); in zend_calc_live_ranges()
996 last_use[var_num] = opnum - (opline->opcode == ZEND_OP_DATA); in zend_calc_live_ranges()
1040 zend_op *opline, *end; in pass_two() local
1088 opline = op_array->opcodes; in pass_two()
1089 end = opline + op_array->last; in pass_two()
1090 while (opline < end) { in pass_two()
1091 switch (opline->opcode) { in pass_two()
1094 zval *val = CT_CONSTANT(opline->op2); in pass_two()
1103 opline->op1.opline_num = op_array->try_catch_array[opline->op1.num].finally_op; in pass_two()
1104 ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op1); in pass_two()
1109 uint32_t jmp_target = zend_get_brk_cont_target(op_array, opline); in pass_two()
1112 zend_check_finally_breakout(op_array, opline - op_array->opcodes, jmp_target); in pass_two()
1114 opline->opcode = ZEND_JMP; in pass_two()
1115 opline->op1.opline_num = jmp_target; in pass_two()
1116 opline->op2.num = 0; in pass_two()
1117 ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op1); in pass_two()
1121 zend_resolve_goto_label(op_array, opline); in pass_two()
1123 zend_check_finally_breakout(op_array, opline - op_array->opcodes, opline->op1.opline_num); in pass_two()
1127 ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op1); in pass_two()
1140 ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op2); in pass_two()
1145 zend_op *call = &op_array->opcodes[opline->op2.opline_num - 1]; in pass_two()
1150 opline->result_type = IS_UNUSED; in pass_two()
1152 ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op2); in pass_two()
1158 opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, opline->extended_value); in pass_two()
1161 if (!(opline->extended_value & ZEND_LAST_CATCH)) { in pass_two()
1162 ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op2); in pass_two()
1168 opline->opcode = ZEND_GENERATOR_RETURN; in pass_two()
1176 HashTable *jumptable = Z_ARRVAL_P(CT_CONSTANT(opline->op2)); in pass_two()
1179 Z_LVAL_P(zv) = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, Z_LVAL_P(zv)); in pass_two()
1182 opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, opline->extended_value); in pass_two()
1186 if (opline->op1_type == IS_CONST) { in pass_two()
1187 ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline, opline->op1); in pass_two()
1188 } else if (opline->op1_type & (IS_VAR|IS_TMP_VAR)) { in pass_two()
1189 opline->op1.var = EX_NUM_TO_VAR(op_array->last_var + opline->op1.var); in pass_two()
1191 if (opline->op2_type == IS_CONST) { in pass_two()
1192 ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline, opline->op2); in pass_two()
1193 } else if (opline->op2_type & (IS_VAR|IS_TMP_VAR)) { in pass_two()
1194 opline->op2.var = EX_NUM_TO_VAR(op_array->last_var + opline->op2.var); in pass_two()
1196 if (opline->result_type & (IS_VAR|IS_TMP_VAR)) { in pass_two()
1197 opline->result.var = EX_NUM_TO_VAR(op_array->last_var + opline->result.var); in pass_two()
1199 ZEND_VM_SET_OPCODE_HANDLER(opline); in pass_two()
1200 opline++; in pass_two()