Lines Matching refs:target

35 static zend_always_inline int in_hitlist(zend_op *target, zend_op **jmp_hitlist, int jmp_hitlist_co…  in in_hitlist()  argument
40 if (jmp_hitlist[i] == target) { in in_hitlist()
47 #define CHECK_LOOP(target) \ argument
48 if (EXPECTED(!in_hitlist(target, jmp_hitlist, jmp_hitlist_count))) { \
49 jmp_hitlist[jmp_hitlist_count++] = target; \
58 zend_op *target; in zend_optimizer_pass3() local
73 target = ZEND_OP1_JMP_ADDR(opline); in zend_optimizer_pass3()
75 if (target->opcode == ZEND_JMP) { in zend_optimizer_pass3()
77 target = ZEND_OP1_JMP_ADDR(target); in zend_optimizer_pass3()
78 CHECK_LOOP(target); in zend_optimizer_pass3()
79 } else if (target->opcode == ZEND_NOP) { in zend_optimizer_pass3()
80 target = target + 1; in zend_optimizer_pass3()
84 ZEND_SET_OP_JMP_ADDR(opline, opline->op1, target); in zend_optimizer_pass3()
87 if (target == opline + 1) { in zend_optimizer_pass3()
90 } else if (target->opcode == ZEND_JMPZNZ) { in zend_optimizer_pass3()
92 *opline = *target; in zend_optimizer_pass3()
99 ZEND_SET_OP_JMP_ADDR(opline, opline->op2, ZEND_OP2_JMP_ADDR(target)); in zend_optimizer_pass3()
101 ZEND_OFFSET_TO_OPLINE(target, target->extended_value)); in zend_optimizer_pass3()
103 } else if ((target->opcode == ZEND_RETURN || in zend_optimizer_pass3()
104 target->opcode == ZEND_RETURN_BY_REF || in zend_optimizer_pass3()
105 target->opcode == ZEND_GENERATOR_RETURN || in zend_optimizer_pass3()
106 target->opcode == ZEND_EXIT) && in zend_optimizer_pass3()
109 *opline = *target; in zend_optimizer_pass3()
118 if (ZEND_OP2_JMP_ADDR(opline-1) == target) { in zend_optimizer_pass3()
132 (opline-1)->extended_value = ZEND_OPLINE_TO_OFFSET((opline-1), target); in zend_optimizer_pass3()
135 ZEND_SET_OP_JMP_ADDR((opline-1), (opline-1)->op2, target); in zend_optimizer_pass3()
146 target = ZEND_OP2_JMP_ADDR(opline); in zend_optimizer_pass3()
148 if (target->opcode == ZEND_JMP) { in zend_optimizer_pass3()
149 target = ZEND_OP1_JMP_ADDR(target); in zend_optimizer_pass3()
150 CHECK_LOOP(target); in zend_optimizer_pass3()
151 } else if (target->opcode == ZEND_NOP) { in zend_optimizer_pass3()
152 target = target + 1; in zend_optimizer_pass3()
156 ZEND_SET_OP_JMP_ADDR(opline, opline->op2, target); in zend_optimizer_pass3()
164 target = ZEND_OP2_JMP_ADDR(opline); in zend_optimizer_pass3()
166 if (target->opcode == ZEND_JMP) { in zend_optimizer_pass3()
169 target = ZEND_OP1_JMP_ADDR(target); in zend_optimizer_pass3()
170 CHECK_LOOP(target); in zend_optimizer_pass3()
171 } else if (target->opcode == opline->opcode && in zend_optimizer_pass3()
172 SAME_VAR(opline->op1, target->op1)) { in zend_optimizer_pass3()
175 target = ZEND_OP2_JMP_ADDR(target); in zend_optimizer_pass3()
176 CHECK_LOOP(target); in zend_optimizer_pass3()
177 } else if (target->opcode == INV_COND(opline->opcode) && in zend_optimizer_pass3()
178 SAME_VAR(opline->op1, target->op1)) { in zend_optimizer_pass3()
181 target = target + 1; in zend_optimizer_pass3()
182 } else if (target->opcode == ZEND_JMPZNZ && in zend_optimizer_pass3()
183 SAME_VAR(opline->op1, target->op1)) { in zend_optimizer_pass3()
184 target = (opline->opcode == ZEND_JMPZ) ? in zend_optimizer_pass3()
185 ZEND_OP2_JMP_ADDR(target) : in zend_optimizer_pass3()
186 ZEND_OFFSET_TO_OPLINE(target, target->extended_value); in zend_optimizer_pass3()
187 CHECK_LOOP(target); in zend_optimizer_pass3()
188 } else if (target->opcode == ZEND_NOP) { in zend_optimizer_pass3()
189 target = target + 1; in zend_optimizer_pass3()
193 ZEND_SET_OP_JMP_ADDR(opline, opline->op2, target); in zend_optimizer_pass3()
197 if (target == opline + 1) { in zend_optimizer_pass3()
214 target = ZEND_OP2_JMP_ADDR(opline); in zend_optimizer_pass3()
216 if (target->opcode == ZEND_JMP) { in zend_optimizer_pass3()
219 target = ZEND_OP1_JMP_ADDR(target); in zend_optimizer_pass3()
220 CHECK_LOOP(target); in zend_optimizer_pass3()
221 } else if (target->opcode == opline->opcode-3 && in zend_optimizer_pass3()
222 (SAME_VAR(target->op1, opline->result) || in zend_optimizer_pass3()
223 SAME_VAR(target->op1, opline->op1))) { in zend_optimizer_pass3()
226 target = ZEND_OP2_JMP_ADDR(target); in zend_optimizer_pass3()
227 CHECK_LOOP(target); in zend_optimizer_pass3()
228 } else if (target->opcode == opline->opcode && in zend_optimizer_pass3()
229 target->result.var == opline->result.var && in zend_optimizer_pass3()
230 (SAME_VAR(target->op1, opline->result) || in zend_optimizer_pass3()
231 SAME_VAR(target->op1, opline->op1))) { in zend_optimizer_pass3()
234 target = ZEND_OP2_JMP_ADDR(target); in zend_optimizer_pass3()
235 CHECK_LOOP(target); in zend_optimizer_pass3()
236 } else if (target->opcode == ZEND_JMPZNZ && in zend_optimizer_pass3()
237 (SAME_VAR(target->op1, opline->result) || in zend_optimizer_pass3()
238 SAME_VAR(target->op1, opline->op1))) { in zend_optimizer_pass3()
240 target = (opline->opcode == ZEND_JMPZ_EX) ? in zend_optimizer_pass3()
241 ZEND_OP2_JMP_ADDR(target) : in zend_optimizer_pass3()
242 ZEND_OFFSET_TO_OPLINE(target, target->extended_value); in zend_optimizer_pass3()
243 CHECK_LOOP(target); in zend_optimizer_pass3()
244 } else if (target->opcode == INV_EX_COND(opline->opcode) && in zend_optimizer_pass3()
245 (SAME_VAR(target->op1, opline->result) || in zend_optimizer_pass3()
246 SAME_VAR(target->op1, opline->op1))) { in zend_optimizer_pass3()
249 target = target + 1; in zend_optimizer_pass3()
250 } else if (target->opcode == INV_EX_COND_EX(opline->opcode) && in zend_optimizer_pass3()
251 target->result.var == opline->result.var && in zend_optimizer_pass3()
252 (SAME_VAR(target->op1, opline->result) || in zend_optimizer_pass3()
253 SAME_VAR(target->op1, opline->op1))) { in zend_optimizer_pass3()
256 target = target + 1; in zend_optimizer_pass3()
257 } else if (target->opcode == ZEND_BOOL && in zend_optimizer_pass3()
258 (SAME_VAR(target->op1, opline->result) || in zend_optimizer_pass3()
259 SAME_VAR(target->op1, opline->op1))) { in zend_optimizer_pass3()
271 opline->result.var = target->result.var; in zend_optimizer_pass3()
272 target = target + 1; in zend_optimizer_pass3()
273 CHECK_LOOP(target); in zend_optimizer_pass3()
274 } else if (target->opcode == ZEND_NOP) { in zend_optimizer_pass3()
275 target = target + 1; in zend_optimizer_pass3()
279 ZEND_SET_OP_JMP_ADDR(opline, opline->op2, target); in zend_optimizer_pass3()
283 if (target == opline + 1) { in zend_optimizer_pass3()
292 target = ZEND_OP2_JMP_ADDR(opline); in zend_optimizer_pass3()
294 if (target->opcode == ZEND_JMP) { in zend_optimizer_pass3()
296 target = ZEND_OP1_JMP_ADDR(target); in zend_optimizer_pass3()
297 CHECK_LOOP(target); in zend_optimizer_pass3()
298 } else if ((target->opcode == ZEND_JMPZ || target->opcode == ZEND_JMPZNZ) && in zend_optimizer_pass3()
299 SAME_VAR(target->op1, opline->op1)) { in zend_optimizer_pass3()
301 target = ZEND_OP2_JMP_ADDR(target); in zend_optimizer_pass3()
302 CHECK_LOOP(target); in zend_optimizer_pass3()
303 } else if (target->opcode == ZEND_JMPNZ && in zend_optimizer_pass3()
304 SAME_VAR(target->op1, opline->op1)) { in zend_optimizer_pass3()
306 target = target + 1; in zend_optimizer_pass3()
307 } else if (target->opcode == ZEND_NOP) { in zend_optimizer_pass3()
308 target = target + 1; in zend_optimizer_pass3()
312 ZEND_SET_OP_JMP_ADDR(opline, opline->op2, target); in zend_optimizer_pass3()
316 target = ZEND_OFFSET_TO_OPLINE(opline, opline->extended_value); in zend_optimizer_pass3()
318 if (target->opcode == ZEND_JMP) { in zend_optimizer_pass3()
320 target = ZEND_OP1_JMP_ADDR(target); in zend_optimizer_pass3()
321 CHECK_LOOP(target); in zend_optimizer_pass3()
322 } else if (target->opcode == ZEND_JMPNZ && in zend_optimizer_pass3()
323 SAME_VAR(target->op1, opline->op1)) { in zend_optimizer_pass3()
325 target = ZEND_OP2_JMP_ADDR(target); in zend_optimizer_pass3()
326 CHECK_LOOP(target); in zend_optimizer_pass3()
327 } else if (target->opcode == ZEND_JMPZ && in zend_optimizer_pass3()
328 SAME_VAR(target->op1, opline->op1)) { in zend_optimizer_pass3()
330 target = target + 1; in zend_optimizer_pass3()
331 } else if (target->opcode == ZEND_JMPZNZ && in zend_optimizer_pass3()
332 SAME_VAR(target->op1, opline->op1)) { in zend_optimizer_pass3()
334 target = ZEND_OFFSET_TO_OPLINE(target, target->extended_value); in zend_optimizer_pass3()
335 CHECK_LOOP(target); in zend_optimizer_pass3()
336 } else if (target->opcode == ZEND_NOP) { in zend_optimizer_pass3()
337 target = target + 1; in zend_optimizer_pass3()
341 opline->extended_value = ZEND_OPLINE_TO_OFFSET(opline, target); in zend_optimizer_pass3()
344 if (ZEND_OP2_JMP_ADDR(opline) == target && in zend_optimizer_pass3()
348 ZEND_SET_OP_JMP_ADDR(opline, opline->op1, target); in zend_optimizer_pass3()