Lines Matching refs:opline
33 zend_op *opline; member
40 static void zend_delete_call_instructions(zend_op_array *op_array, zend_op *opline) in zend_delete_call_instructions() argument
45 switch (opline->opcode) { in zend_delete_call_instructions()
53 MAKE_NOP(opline); in zend_delete_call_instructions()
71 zend_optimizer_convert_to_free_op1(op_array, opline); in zend_delete_call_instructions()
75 opline--; in zend_delete_call_instructions()
79 static void zend_try_inline_call(zend_op_array *op_array, zend_op *fcall, zend_op *opline, zend_fun… in zend_try_inline_call() argument
120 if (RETURN_VALUE_USED(opline)) { in zend_try_inline_call()
124 opline->opcode = ZEND_QM_ASSIGN; in zend_try_inline_call()
125 opline->op1_type = IS_CONST; in zend_try_inline_call()
126 opline->op1.constant = zend_optimizer_add_literal(op_array, &zv); in zend_try_inline_call()
127 SET_UNUSED(opline->op2); in zend_try_inline_call()
129 MAKE_NOP(opline); in zend_try_inline_call()
132 zend_delete_call_instructions(op_array, opline-1); in zend_try_inline_call()
153 zend_op *opline = op_array->opcodes; in zend_optimize_func_calls() local
154 zend_op *end = opline + op_array->last; in zend_optimize_func_calls()
165 while (opline < end) { in zend_optimize_func_calls()
166 switch (opline->opcode) { in zend_optimize_func_calls()
177 ctx->script, op_array, opline, &call_stack[call].is_prototype); in zend_optimize_func_calls()
180 && opline->opcode != ZEND_NEW in zend_optimize_func_calls()
181 && opline->opcode != ZEND_INIT_PARENT_PROPERTY_HOOK_CALL; in zend_optimize_func_calls()
185 call_stack[call].opline = opline; in zend_optimize_func_calls()
195 if (call_stack[call].func && call_stack[call].opline) { in zend_optimize_func_calls()
196 zend_op *fcall = call_stack[call].opline; in zend_optimize_func_calls()
205 if (opline->opcode != ZEND_CALLABLE_CONVERT) { in zend_optimize_func_calls()
206 opline->opcode = zend_get_call_op(fcall, call_stack[call].func); in zend_optimize_func_calls()
214 if (opline->opcode != ZEND_CALLABLE_CONVERT) { in zend_optimize_func_calls()
215 opline->opcode = zend_get_call_op(fcall, call_stack[call].func); in zend_optimize_func_calls()
228 && opline->opcode != ZEND_CALLABLE_CONVERT) { in zend_optimize_func_calls()
229 zend_try_inline_call(op_array, fcall, opline, call_stack[call].func); in zend_optimize_func_calls()
233 call_stack[call].opline = NULL; in zend_optimize_func_calls()
246 if ((opline->opcode == ZEND_FETCH_OBJ_FUNC_ARG || opline->opcode == ZEND_FETCH_DIM_FUNC_ARG) in zend_optimize_func_calls()
247 … && (opline->op1_type == IS_TMP_VAR || call_stack[call - 1].last_check_func_arg_opline == NULL)) { in zend_optimize_func_calls()
252 if (opline->opcode != ZEND_FETCH_STATIC_PROP_FUNC_ARG) { in zend_optimize_func_calls()
253 opline->opcode -= 9; in zend_optimize_func_calls()
255 opline->opcode = ZEND_FETCH_STATIC_PROP_W; in zend_optimize_func_calls()
258 if (opline->opcode == ZEND_FETCH_DIM_FUNC_ARG in zend_optimize_func_calls()
259 && opline->op2_type == IS_UNUSED) { in zend_optimize_func_calls()
266 if (opline->opcode != ZEND_FETCH_STATIC_PROP_FUNC_ARG) { in zend_optimize_func_calls()
267 opline->opcode -= 12; in zend_optimize_func_calls()
269 opline->opcode = ZEND_FETCH_STATIC_PROP_R; in zend_optimize_func_calls()
275 if (opline->op2_type == IS_CONST) { in zend_optimize_func_calls()
280 if (has_known_send_mode(&call_stack[call - 1], opline->op2.num)) { in zend_optimize_func_calls()
281 if (!ARG_MUST_BE_SENT_BY_REF(call_stack[call - 1].func, opline->op2.num)) { in zend_optimize_func_calls()
282 opline->opcode = ZEND_SEND_VAL; in zend_optimize_func_calls()
287 if (opline->op2_type == IS_CONST) { in zend_optimize_func_calls()
293 if (has_known_send_mode(&call_stack[call - 1], opline->op2.num)) { in zend_optimize_func_calls()
294 call_stack[call - 1].func_arg_num = opline->op2.num; in zend_optimize_func_calls()
295 call_stack[call - 1].last_check_func_arg_opline = opline; in zend_optimize_func_calls()
301 if (opline->op2_type == IS_CONST) { in zend_optimize_func_calls()
310 if (opline->op2_type == IS_CONST) { in zend_optimize_func_calls()
315 if (has_known_send_mode(&call_stack[call - 1], opline->op2.num)) { in zend_optimize_func_calls()
317 if (ARG_SHOULD_BE_SENT_BY_REF(call_stack[call - 1].func, opline->op2.num)) { in zend_optimize_func_calls()
318 opline->opcode = ZEND_SEND_REF; in zend_optimize_func_calls()
320 opline->opcode = ZEND_SEND_VAR; in zend_optimize_func_calls()
325 if (opline->op2_type == IS_CONST) { in zend_optimize_func_calls()
330 if (has_known_send_mode(&call_stack[call - 1], opline->op2.num)) { in zend_optimize_func_calls()
331 if (ARG_MUST_BE_SENT_BY_REF(call_stack[call - 1].func, opline->op2.num)) { in zend_optimize_func_calls()
332 opline->opcode = ZEND_SEND_VAR_NO_REF; in zend_optimize_func_calls()
333 } else if (ARG_MAY_BE_SENT_BY_REF(call_stack[call - 1].func, opline->op2.num)) { in zend_optimize_func_calls()
334 opline->opcode = ZEND_SEND_VAL; in zend_optimize_func_calls()
336 opline->opcode = ZEND_SEND_VAR; in zend_optimize_func_calls()
343 if (opline->op2_type == IS_CONST) { in zend_optimize_func_calls()
356 opline++; in zend_optimize_func_calls()