Lines Matching refs:op_array
40 static void zend_delete_call_instructions(zend_op_array *op_array, zend_op *opline) in zend_delete_call_instructions() argument
71 zend_optimizer_convert_to_free_op1(op_array, 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
82 && !(func->op_array.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_HAS_TYPE_HINTS|ZEND_ACC_DEPRECATED)) in zend_try_inline_call()
84 && !(func->op_array.fn_flags & (ZEND_ACC_TRAIT_CLONE)) in zend_try_inline_call()
85 && fcall->extended_value >= func->op_array.required_num_args in zend_try_inline_call()
86 && func->op_array.opcodes[func->op_array.num_args].opcode == ZEND_RETURN) { in zend_try_inline_call()
88 zend_op *ret_opline = func->op_array.opcodes + func->op_array.num_args; in zend_try_inline_call()
91 uint32_t i, num_args = func->op_array.num_args; in zend_try_inline_call()
92 num_args += (func->op_array.fn_flags & ZEND_ACC_VARIADIC) != 0; in zend_try_inline_call()
95 && !(func->op_array.fn_flags & ZEND_ACC_STATIC)) { in zend_try_inline_call()
103 if (ZEND_ARG_SEND_MODE(&func->op_array.arg_info[i])) { in zend_try_inline_call()
108 if (fcall->extended_value < func->op_array.num_args) { in zend_try_inline_call()
113 …if (Z_TYPE_P(CRT_CONSTANT_EX(&func->op_array, &func->op_array.opcodes[i], func->op_array.opcodes[i… in zend_try_inline_call()
117 } while (i < func->op_array.num_args); in zend_try_inline_call()
123 ZVAL_COPY(&zv, CRT_CONSTANT_EX(&func->op_array, ret_opline, ret_opline->op1)); in zend_try_inline_call()
126 opline->op1.constant = zend_optimizer_add_literal(op_array, &zv); in zend_try_inline_call()
132 zend_delete_call_instructions(op_array, opline-1); in zend_try_inline_call()
151 void zend_optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx) in zend_optimize_func_calls() argument
153 zend_op *opline = op_array->opcodes; in zend_optimize_func_calls()
154 zend_op *end = opline + op_array->last; in zend_optimize_func_calls()
159 if (op_array->last < 2) { in zend_optimize_func_calls()
164 call_stack = zend_arena_calloc(&ctx->arena, op_array->last / 2, sizeof(optimizer_call_info)); in zend_optimize_func_calls()
177 ctx->script, op_array, opline, &call_stack[call].is_prototype); in zend_optimize_func_calls()
211 literal_dtor(&op_array->literals[fcall->op2.constant]); in zend_optimize_func_calls()
212 literal_dtor(&op_array->literals[fcall->op2.constant + 2]); in zend_optimize_func_calls()
229 zend_try_inline_call(op_array, fcall, opline, call_stack[call].func); in zend_optimize_func_calls()