summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/opcache/Optimizer/zend_call_graph.h6
-rw-r--r--ext/opcache/Optimizer/zend_dump.c11
-rw-r--r--ext/opcache/Optimizer/zend_inference.c25
3 files changed, 2 insertions, 40 deletions
diff --git a/ext/opcache/Optimizer/zend_call_graph.h b/ext/opcache/Optimizer/zend_call_graph.h
index c31d8cef03..5c50134c6d 100644
--- a/ext/opcache/Optimizer/zend_call_graph.h
+++ b/ext/opcache/Optimizer/zend_call_graph.h
@@ -27,11 +27,6 @@ typedef struct _zend_send_arg_info {
zend_op *opline;
} zend_send_arg_info;
-typedef struct _zend_recv_arg_info {
- int ssa_var;
- zend_ssa_var_info info;
-} zend_recv_arg_info;
-
struct _zend_call_info {
zend_op_array *caller_op_array;
zend_op *caller_init_opline;
@@ -55,7 +50,6 @@ struct _zend_func_info {
zend_call_info **call_map; /* Call info associated with init/call/send opnum */
int num_args; /* (-1 - unknown) */
int return_value_used; /* -1 unknown, 0 no, 1 yes */
- zend_recv_arg_info *arg_info;
zend_ssa_var_info return_info;
};
diff --git a/ext/opcache/Optimizer/zend_dump.c b/ext/opcache/Optimizer/zend_dump.c
index b9c77cda63..57e283d1f3 100644
--- a/ext/opcache/Optimizer/zend_dump.c
+++ b/ext/opcache/Optimizer/zend_dump.c
@@ -969,17 +969,6 @@ void zend_dump_op_array(const zend_op_array *op_array, uint32_t dump_flags, cons
}
fprintf(stderr, " ; %s:%u-%u\n", op_array->filename->val, op_array->line_start, op_array->line_end);
- if (func_info && func_info->num_args > 0) {
- uint32_t j;
-
- for (j = 0; j < MIN(op_array->num_args, func_info->num_args ); j++) {
- fprintf(stderr, " ; arg %d ", j);
- zend_dump_type_info(func_info->arg_info[j].info.type, func_info->arg_info[j].info.ce, func_info->arg_info[j].info.is_instanceof, dump_flags);
- zend_dump_range(&func_info->arg_info[j].info.range);
- fprintf(stderr, "\n");
- }
- }
-
if (func_info) {
fprintf(stderr, " ; return ");
zend_dump_type_info(func_info->return_info.type, func_info->return_info.ce, func_info->return_info.is_instanceof, dump_flags);
diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c
index f5059104de..669c88cc7a 100644
--- a/ext/opcache/Optimizer/zend_inference.c
+++ b/ext/opcache/Optimizer/zend_inference.c
@@ -1398,14 +1398,7 @@ int zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *ssa, int
case ZEND_RECV:
case ZEND_RECV_INIT:
if (ssa_op->result_def == var) {
- zend_func_info *func_info = ZEND_FUNC_INFO(op_array);
-
- if (func_info &&
- (int)opline->op1.num-1 < func_info->num_args &&
- func_info->arg_info[opline->op1.num-1].info.has_range) {
- *tmp = func_info->arg_info[opline->op1.num-1].info.range;
- return 1;
- } else if (op_array->arg_info &&
+ if (op_array->arg_info &&
opline->op1.num <= op_array->num_args) {
zend_type type = op_array->arg_info[opline->op1.num-1].type;
uint32_t mask = ZEND_TYPE_PURE_MASK_WITHOUT_NULL(type);
@@ -3005,7 +2998,6 @@ static zend_always_inline int _zend_update_type_info(
case ZEND_RECV_INIT:
{
/* Typehinting */
- zend_func_info *func_info;
zend_arg_info *arg_info = &op_array->arg_info[opline->op1.num-1];
ce = NULL;
@@ -3014,21 +3006,8 @@ static zend_always_inline int _zend_update_type_info(
tmp |= MAY_BE_REF;
}
- func_info = ZEND_FUNC_INFO(op_array);
- if (func_info && (int)opline->op1.num-1 < func_info->num_args) {
- tmp = (tmp & (MAY_BE_RC1|MAY_BE_RCN|MAY_BE_REF)) |
- (tmp & func_info->arg_info[opline->op1.num-1].info.type);
- }
-
UPDATE_SSA_TYPE(tmp, ssa_op->result_def);
- if (func_info &&
- (int)opline->op1.num-1 < func_info->num_args &&
- func_info->arg_info[opline->op1.num-1].info.ce) {
- UPDATE_SSA_OBJ_TYPE(
- func_info->arg_info[opline->op1.num-1].info.ce,
- func_info->arg_info[opline->op1.num-1].info.is_instanceof,
- ssa_op->result_def);
- } else if (ce) {
+ if (ce) {
UPDATE_SSA_OBJ_TYPE(ce, 1, ssa_op->result_def);
} else {
UPDATE_SSA_OBJ_TYPE(NULL, 0, ssa_op->result_def);