Coverage Report

Created: 2026-07-25 06:39

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/php-src/Zend/Optimizer/zend_inference.h
Line
Count
Source
1
/*
2
   +----------------------------------------------------------------------+
3
   | Zend Engine, e-SSA based Type & Range Inference                      |
4
   +----------------------------------------------------------------------+
5
   | Copyright © The PHP Group and Contributors.                          |
6
   +----------------------------------------------------------------------+
7
   | This source file is subject to the Modified BSD License that is      |
8
   | bundled with this package in the file LICENSE, and is available      |
9
   | through the World Wide Web at <https://www.php.net/license/>.        |
10
   |                                                                      |
11
   | SPDX-License-Identifier: BSD-3-Clause                                |
12
   +----------------------------------------------------------------------+
13
   | Authors: Dmitry Stogov <dmitry@php.net>                              |
14
   +----------------------------------------------------------------------+
15
*/
16
17
#ifndef ZEND_INFERENCE_H
18
#define ZEND_INFERENCE_H
19
20
#include "zend_optimizer.h"
21
#include "zend_ssa.h"
22
#include "zend_bitset.h"
23
24
/* Bitmask for type inference (zend_ssa_var_info.type) */
25
#include "zend_type_info.h"
26
27
#include <stdint.h>
28
29
0
#define MAY_BE_PACKED_GUARD         (1<<27) /* needs packed array guard */
30
0
#define MAY_BE_CLASS_GUARD          (1<<27) /* needs class guard */
31
1.47M
#define MAY_BE_GUARD                (1<<28) /* needs type guard */
32
33
#define MAY_HAVE_DTOR \
34
7.33k
  (MAY_BE_OBJECT|MAY_BE_RESOURCE \
35
7.33k
  |MAY_BE_ARRAY_OF_ARRAY|MAY_BE_ARRAY_OF_OBJECT|MAY_BE_ARRAY_OF_RESOURCE)
36
37
#define DEFINE_SSA_OP_HAS_RANGE(opN) \
38
  static zend_always_inline bool _ssa_##opN##_has_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
39
402k
  { \
40
402k
    if (opline->opN##_type == IS_CONST) { \
41
50.7k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
50.7k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
352k
    } else { \
44
352k
      return (opline->opN##_type != IS_UNUSED && \
45
352k
            ssa->var_info && \
46
352k
            ssa_op->opN##_use >= 0 && \
47
352k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
352k
    } \
49
402k
    return 0; \
50
402k
  } \
Unexecuted instantiation: zend_jit.c:_ssa_op1_has_range
Unexecuted instantiation: zend_jit.c:_ssa_op2_has_range
Unexecuted instantiation: dce.c:_ssa_op1_has_range
Unexecuted instantiation: dce.c:_ssa_op2_has_range
Unexecuted instantiation: dfa_pass.c:_ssa_op1_has_range
Unexecuted instantiation: dfa_pass.c:_ssa_op2_has_range
Unexecuted instantiation: escape_analysis.c:_ssa_op1_has_range
Unexecuted instantiation: escape_analysis.c:_ssa_op2_has_range
Unexecuted instantiation: sccp.c:_ssa_op1_has_range
Unexecuted instantiation: sccp.c:_ssa_op2_has_range
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_has_range
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_has_range
Unexecuted instantiation: zend_dump.c:_ssa_op1_has_range
Unexecuted instantiation: zend_dump.c:_ssa_op2_has_range
Unexecuted instantiation: zend_func_info.c:_ssa_op1_has_range
Unexecuted instantiation: zend_func_info.c:_ssa_op2_has_range
zend_inference.c:_ssa_op1_has_range
Line
Count
Source
39
223k
  { \
40
223k
    if (opline->opN##_type == IS_CONST) { \
41
19.7k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
19.7k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
203k
    } else { \
44
203k
      return (opline->opN##_type != IS_UNUSED && \
45
203k
            ssa->var_info && \
46
203k
            ssa_op->opN##_use >= 0 && \
47
203k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
203k
    } \
49
223k
    return 0; \
50
223k
  } \
zend_inference.c:_ssa_op2_has_range
Line
Count
Source
39
179k
  { \
40
179k
    if (opline->opN##_type == IS_CONST) { \
41
30.9k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
30.9k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
148k
    } else { \
44
148k
      return (opline->opN##_type != IS_UNUSED && \
45
148k
            ssa->var_info && \
46
148k
            ssa_op->opN##_use >= 0 && \
47
148k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
148k
    } \
49
179k
    return 0; \
50
179k
  } \
Unexecuted instantiation: zend_optimizer.c:_ssa_op1_has_range
Unexecuted instantiation: zend_optimizer.c:_ssa_op2_has_range
Unexecuted instantiation: zend_ssa.c:_ssa_op1_has_range
Unexecuted instantiation: zend_ssa.c:_ssa_op2_has_range
51
52
#define DEFINE_SSA_OP_MIN_RANGE(opN) \
53
  static zend_always_inline zend_long _ssa_##opN##_min_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
54
291k
  { \
55
291k
    if (opline->opN##_type == IS_CONST) { \
56
27.4k
      zval *zv = CRT_CONSTANT(opline->opN); \
57
27.4k
      if (Z_TYPE_P(zv) == IS_LONG) { \
58
27.4k
        return Z_LVAL_P(zv); \
59
27.4k
      } \
60
264k
    } else if (opline->opN##_type != IS_UNUSED && \
61
264k
        ssa->var_info && \
62
264k
        ssa_op->opN##_use >= 0 && \
63
264k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
64
264k
      return ssa->var_info[ssa_op->opN##_use].range.min; \
65
264k
    } \
66
291k
    return ZEND_LONG_MIN; \
67
291k
  } \
Unexecuted instantiation: dce.c:_ssa_op1_min_range
Unexecuted instantiation: dce.c:_ssa_op2_min_range
Unexecuted instantiation: dfa_pass.c:_ssa_op1_min_range
Unexecuted instantiation: dfa_pass.c:_ssa_op2_min_range
Unexecuted instantiation: escape_analysis.c:_ssa_op1_min_range
Unexecuted instantiation: escape_analysis.c:_ssa_op2_min_range
Unexecuted instantiation: sccp.c:_ssa_op1_min_range
Unexecuted instantiation: sccp.c:_ssa_op2_min_range
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_min_range
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_min_range
Unexecuted instantiation: zend_dump.c:_ssa_op1_min_range
Unexecuted instantiation: zend_dump.c:_ssa_op2_min_range
Unexecuted instantiation: zend_func_info.c:_ssa_op1_min_range
Unexecuted instantiation: zend_func_info.c:_ssa_op2_min_range
Unexecuted instantiation: zend_optimizer.c:_ssa_op1_min_range
Unexecuted instantiation: zend_optimizer.c:_ssa_op2_min_range
Unexecuted instantiation: zend_ssa.c:_ssa_op1_min_range
Unexecuted instantiation: zend_ssa.c:_ssa_op2_min_range
68
69
#define DEFINE_SSA_OP_MAX_RANGE(opN) \
70
  static zend_always_inline zend_long _ssa_##opN##_max_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
71
291k
  { \
72
291k
    if (opline->opN##_type == IS_CONST) { \
73
27.2k
      zval *zv = CRT_CONSTANT(opline->opN); \
74
27.2k
      if (Z_TYPE_P(zv) == IS_LONG) { \
75
27.2k
        return Z_LVAL_P(zv); \
76
27.2k
      } \
77
264k
    } else if (opline->opN##_type != IS_UNUSED && \
78
264k
        ssa->var_info && \
79
264k
        ssa_op->opN##_use >= 0 && \
80
264k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
81
264k
      return ssa->var_info[ssa_op->opN##_use].range.max; \
82
264k
    } \
83
291k
    return ZEND_LONG_MAX; \
84
291k
  } \
Unexecuted instantiation: dce.c:_ssa_op1_max_range
Unexecuted instantiation: dce.c:_ssa_op2_max_range
Unexecuted instantiation: dfa_pass.c:_ssa_op1_max_range
Unexecuted instantiation: dfa_pass.c:_ssa_op2_max_range
Unexecuted instantiation: escape_analysis.c:_ssa_op1_max_range
Unexecuted instantiation: escape_analysis.c:_ssa_op2_max_range
Unexecuted instantiation: sccp.c:_ssa_op1_max_range
Unexecuted instantiation: sccp.c:_ssa_op2_max_range
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_max_range
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_max_range
Unexecuted instantiation: zend_dump.c:_ssa_op1_max_range
Unexecuted instantiation: zend_dump.c:_ssa_op2_max_range
Unexecuted instantiation: zend_func_info.c:_ssa_op1_max_range
Unexecuted instantiation: zend_func_info.c:_ssa_op2_max_range
Unexecuted instantiation: zend_optimizer.c:_ssa_op1_max_range
Unexecuted instantiation: zend_optimizer.c:_ssa_op2_max_range
Unexecuted instantiation: zend_ssa.c:_ssa_op1_max_range
Unexecuted instantiation: zend_ssa.c:_ssa_op2_max_range
85
86
#define DEFINE_SSA_OP_RANGE_UNDERFLOW(opN) \
87
  static zend_always_inline char _ssa_##opN##_range_underflow(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
88
274k
  { \
89
274k
    if (opline->opN##_type == IS_CONST) { \
90
20.8k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
20.8k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
20.8k
        return 0; \
93
20.8k
      } \
94
253k
    } else if (opline->opN##_type != IS_UNUSED && \
95
253k
        ssa->var_info && \
96
253k
        ssa_op->opN##_use >= 0 && \
97
253k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
253k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
253k
    } \
100
274k
    return 1; \
101
274k
  } \
Unexecuted instantiation: zend_jit.c:_ssa_op1_range_underflow
Unexecuted instantiation: zend_jit.c:_ssa_op2_range_underflow
Unexecuted instantiation: dce.c:_ssa_op1_range_underflow
Unexecuted instantiation: dce.c:_ssa_op2_range_underflow
Unexecuted instantiation: dfa_pass.c:_ssa_op1_range_underflow
Unexecuted instantiation: dfa_pass.c:_ssa_op2_range_underflow
Unexecuted instantiation: escape_analysis.c:_ssa_op1_range_underflow
Unexecuted instantiation: escape_analysis.c:_ssa_op2_range_underflow
Unexecuted instantiation: sccp.c:_ssa_op1_range_underflow
Unexecuted instantiation: sccp.c:_ssa_op2_range_underflow
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_range_underflow
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_range_underflow
Unexecuted instantiation: zend_dump.c:_ssa_op1_range_underflow
Unexecuted instantiation: zend_dump.c:_ssa_op2_range_underflow
Unexecuted instantiation: zend_func_info.c:_ssa_op1_range_underflow
Unexecuted instantiation: zend_func_info.c:_ssa_op2_range_underflow
zend_inference.c:_ssa_op1_range_underflow
Line
Count
Source
88
175k
  { \
89
175k
    if (opline->opN##_type == IS_CONST) { \
90
6.61k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
6.61k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
6.61k
        return 0; \
93
6.61k
      } \
94
169k
    } else if (opline->opN##_type != IS_UNUSED && \
95
169k
        ssa->var_info && \
96
169k
        ssa_op->opN##_use >= 0 && \
97
169k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
169k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
169k
    } \
100
175k
    return 1; \
101
175k
  } \
zend_inference.c:_ssa_op2_range_underflow
Line
Count
Source
88
98.6k
  { \
89
98.6k
    if (opline->opN##_type == IS_CONST) { \
90
14.1k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
14.1k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
14.1k
        return 0; \
93
14.1k
      } \
94
84.4k
    } else if (opline->opN##_type != IS_UNUSED && \
95
84.4k
        ssa->var_info && \
96
84.4k
        ssa_op->opN##_use >= 0 && \
97
84.4k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
84.4k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
84.4k
    } \
100
98.6k
    return 1; \
101
98.6k
  } \
Unexecuted instantiation: zend_optimizer.c:_ssa_op1_range_underflow
Unexecuted instantiation: zend_optimizer.c:_ssa_op2_range_underflow
Unexecuted instantiation: zend_ssa.c:_ssa_op1_range_underflow
Unexecuted instantiation: zend_ssa.c:_ssa_op2_range_underflow
102
103
#define DEFINE_SSA_OP_RANGE_OVERFLOW(opN) \
104
  static zend_always_inline char _ssa_##opN##_range_overflow(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
105
236k
  { \
106
236k
    if (opline->opN##_type == IS_CONST) { \
107
20.0k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
20.0k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
20.0k
        return 0; \
110
20.0k
      } \
111
216k
    } else if (opline->opN##_type != IS_UNUSED && \
112
216k
        ssa->var_info && \
113
216k
        ssa_op->opN##_use >= 0 && \
114
216k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
216k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
216k
    } \
117
236k
    return 1; \
118
236k
  } \
Unexecuted instantiation: zend_jit.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_jit.c:_ssa_op2_range_overflow
Unexecuted instantiation: dce.c:_ssa_op1_range_overflow
Unexecuted instantiation: dce.c:_ssa_op2_range_overflow
Unexecuted instantiation: dfa_pass.c:_ssa_op1_range_overflow
Unexecuted instantiation: dfa_pass.c:_ssa_op2_range_overflow
Unexecuted instantiation: escape_analysis.c:_ssa_op1_range_overflow
Unexecuted instantiation: escape_analysis.c:_ssa_op2_range_overflow
Unexecuted instantiation: sccp.c:_ssa_op1_range_overflow
Unexecuted instantiation: sccp.c:_ssa_op2_range_overflow
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_range_overflow
Unexecuted instantiation: zend_dump.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_dump.c:_ssa_op2_range_overflow
Unexecuted instantiation: zend_func_info.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_func_info.c:_ssa_op2_range_overflow
zend_inference.c:_ssa_op1_range_overflow
Line
Count
Source
105
141k
  { \
106
141k
    if (opline->opN##_type == IS_CONST) { \
107
5.87k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
5.87k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
5.87k
        return 0; \
110
5.87k
      } \
111
135k
    } else if (opline->opN##_type != IS_UNUSED && \
112
135k
        ssa->var_info && \
113
135k
        ssa_op->opN##_use >= 0 && \
114
135k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
135k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
135k
    } \
117
141k
    return 1; \
118
141k
  } \
zend_inference.c:_ssa_op2_range_overflow
Line
Count
Source
105
94.4k
  { \
106
94.4k
    if (opline->opN##_type == IS_CONST) { \
107
14.1k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
14.1k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
14.1k
        return 0; \
110
14.1k
      } \
111
80.3k
    } else if (opline->opN##_type != IS_UNUSED && \
112
80.3k
        ssa->var_info && \
113
80.3k
        ssa_op->opN##_use >= 0 && \
114
80.3k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
80.3k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
80.3k
    } \
117
94.4k
    return 1; \
118
94.4k
  } \
Unexecuted instantiation: zend_optimizer.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_optimizer.c:_ssa_op2_range_overflow
Unexecuted instantiation: zend_ssa.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_ssa.c:_ssa_op2_range_overflow
119
120
DEFINE_SSA_OP_HAS_RANGE(op1)
121
154k
DEFINE_SSA_OP_MIN_RANGE(op1)
Unexecuted instantiation: zend_jit.c:_ssa_op1_min_range
Unexecuted instantiation: zend_inference.c:_ssa_op1_min_range
122
154k
DEFINE_SSA_OP_MAX_RANGE(op1)
Unexecuted instantiation: zend_jit.c:_ssa_op1_max_range
Unexecuted instantiation: zend_inference.c:_ssa_op1_max_range
123
DEFINE_SSA_OP_RANGE_UNDERFLOW(op1)
124
DEFINE_SSA_OP_RANGE_OVERFLOW(op1)
125
DEFINE_SSA_OP_HAS_RANGE(op2)
126
137k
DEFINE_SSA_OP_MIN_RANGE(op2)
Unexecuted instantiation: zend_jit.c:_ssa_op2_min_range
Unexecuted instantiation: zend_inference.c:_ssa_op2_min_range
127
136k
DEFINE_SSA_OP_MAX_RANGE(op2)
Unexecuted instantiation: zend_jit.c:_ssa_op2_max_range
Unexecuted instantiation: zend_inference.c:_ssa_op2_max_range
128
DEFINE_SSA_OP_RANGE_UNDERFLOW(op2)
129
DEFINE_SSA_OP_RANGE_OVERFLOW(op2)
130
131
341k
#define OP1_HAS_RANGE()       (_ssa_op1_has_range (op_array, ssa, opline, ssa_op))
132
154k
#define OP1_MIN_RANGE()       (_ssa_op1_min_range (op_array, ssa, opline, ssa_op))
133
154k
#define OP1_MAX_RANGE()       (_ssa_op1_max_range (op_array, ssa, opline, ssa_op))
134
280k
#define OP1_RANGE_UNDERFLOW() (_ssa_op1_range_underflow (op_array, ssa, opline, ssa_op))
135
224k
#define OP1_RANGE_OVERFLOW()  (_ssa_op1_range_overflow (op_array, ssa, opline, ssa_op))
136
180k
#define OP2_HAS_RANGE()       (_ssa_op2_has_range (op_array, ssa, opline, ssa_op))
137
137k
#define OP2_MIN_RANGE()       (_ssa_op2_min_range (op_array, ssa, opline, ssa_op))
138
136k
#define OP2_MAX_RANGE()       (_ssa_op2_max_range (op_array, ssa, opline, ssa_op))
139
181k
#define OP2_RANGE_UNDERFLOW() (_ssa_op2_range_underflow (op_array, ssa, opline, ssa_op))
140
153k
#define OP2_RANGE_OVERFLOW()  (_ssa_op2_range_overflow (op_array, ssa, opline, ssa_op))
141
142
BEGIN_EXTERN_C()
143
ZEND_API uint32_t ZEND_FASTCALL zend_array_type_info(const zval *zv);
144
END_EXTERN_C()
145
146
1.26M
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
1.26M
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
1.54k
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
1.26M
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
21.8k
    return zend_array_type_info(zv);
151
1.24M
  } else {
152
1.24M
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
1.24M
    if (Z_REFCOUNTED_P(zv)) {
155
113k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
1.12M
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
758k
      tmp |= MAY_BE_RCN;
158
758k
    }
159
1.24M
    return tmp;
160
1.24M
  }
161
1.26M
}
Unexecuted instantiation: zend_jit.c:_const_op_type
dce.c:_const_op_type
Line
Count
Source
146
66
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
66
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
0
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
66
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
64
    return zend_array_type_info(zv);
151
64
  } else {
152
2
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
2
    if (Z_REFCOUNTED_P(zv)) {
155
0
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
2
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
0
      tmp |= MAY_BE_RCN;
158
0
    }
159
2
    return tmp;
160
2
  }
161
66
}
dfa_pass.c:_const_op_type
Line
Count
Source
146
4.50k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
4.50k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
0
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
4.50k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
0
    return zend_array_type_info(zv);
151
4.50k
  } else {
152
4.50k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
4.50k
    if (Z_REFCOUNTED_P(zv)) {
155
622
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
3.88k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
3.88k
      tmp |= MAY_BE_RCN;
158
3.88k
    }
159
4.50k
    return tmp;
160
4.50k
  }
161
4.50k
}
Unexecuted instantiation: escape_analysis.c:_const_op_type
Unexecuted instantiation: sccp.c:_const_op_type
Unexecuted instantiation: zend_call_graph.c:_const_op_type
Unexecuted instantiation: zend_dump.c:_const_op_type
zend_func_info.c:_const_op_type
Line
Count
Source
146
600
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
600
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
0
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
600
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
0
    return zend_array_type_info(zv);
151
600
  } else {
152
600
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
600
    if (Z_REFCOUNTED_P(zv)) {
155
1
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
599
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
31
      tmp |= MAY_BE_RCN;
158
31
    }
159
600
    return tmp;
160
600
  }
161
600
}
zend_inference.c:_const_op_type
Line
Count
Source
146
607k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
607k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
988
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
606k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
10.6k
    return zend_array_type_info(zv);
151
596k
  } else {
152
596k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
596k
    if (Z_REFCOUNTED_P(zv)) {
155
58.5k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
537k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
346k
      tmp |= MAY_BE_RCN;
158
346k
    }
159
596k
    return tmp;
160
596k
  }
161
607k
}
zend_optimizer.c:_const_op_type
Line
Count
Source
146
653k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
653k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
556
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
653k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
11.2k
    return zend_array_type_info(zv);
151
642k
  } else {
152
642k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
642k
    if (Z_REFCOUNTED_P(zv)) {
155
54.7k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
587k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
407k
      tmp |= MAY_BE_RCN;
158
407k
    }
159
642k
    return tmp;
160
642k
  }
161
653k
}
Unexecuted instantiation: zend_ssa.c:_const_op_type
162
163
static zend_always_inline uint32_t get_ssa_var_info(const zend_ssa *ssa, int ssa_var_num)
164
5.50M
{
165
5.50M
  if (ssa->var_info && ssa_var_num >= 0) {
166
4.20M
    return ssa->var_info[ssa_var_num].type;
167
4.20M
  } else {
168
1.30M
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
169
1.30M
  }
170
5.50M
}
Unexecuted instantiation: zend_jit.c:get_ssa_var_info
dce.c:get_ssa_var_info
Line
Count
Source
164
9.96k
{
165
9.96k
  if (ssa->var_info && ssa_var_num >= 0) {
166
9.96k
    return ssa->var_info[ssa_var_num].type;
167
9.96k
  } else {
168
0
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
169
0
  }
170
9.96k
}
dfa_pass.c:get_ssa_var_info
Line
Count
Source
164
55.4k
{
165
55.4k
  if (ssa->var_info && ssa_var_num >= 0) {
166
55.4k
    return ssa->var_info[ssa_var_num].type;
167
55.4k
  } else {
168
0
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
169
0
  }
170
55.4k
}
escape_analysis.c:get_ssa_var_info
Line
Count
Source
164
14.4k
{
165
14.4k
  if (ssa->var_info && ssa_var_num >= 0) {
166
14.4k
    return ssa->var_info[ssa_var_num].type;
167
14.4k
  } else {
168
0
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
169
0
  }
170
14.4k
}
Unexecuted instantiation: sccp.c:get_ssa_var_info
Unexecuted instantiation: zend_call_graph.c:get_ssa_var_info
Unexecuted instantiation: zend_dump.c:get_ssa_var_info
zend_func_info.c:get_ssa_var_info
Line
Count
Source
164
104
{
165
104
  if (ssa->var_info && ssa_var_num >= 0) {
166
104
    return ssa->var_info[ssa_var_num].type;
167
104
  } else {
168
0
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
169
0
  }
170
104
}
zend_inference.c:get_ssa_var_info
Line
Count
Source
164
2.49M
{
165
2.49M
  if (ssa->var_info && ssa_var_num >= 0) {
166
1.82M
    return ssa->var_info[ssa_var_num].type;
167
1.82M
  } else {
168
666k
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
169
666k
  }
170
2.49M
}
zend_optimizer.c:get_ssa_var_info
Line
Count
Source
164
2.93M
{
165
2.93M
  if (ssa->var_info && ssa_var_num >= 0) {
166
2.30M
    return ssa->var_info[ssa_var_num].type;
167
2.30M
  } else {
168
636k
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
169
636k
  }
170
2.93M
}
Unexecuted instantiation: zend_ssa.c:get_ssa_var_info
171
172
#define DEFINE_SSA_OP_INFO(opN) \
173
  static zend_always_inline uint32_t _ssa_##opN##_info(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
174
5.42M
  {                                   \
175
5.42M
    if (opline->opN##_type == IS_CONST) {             \
176
1.26M
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
4.15M
    } else { \
178
4.15M
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
4.15M
    } \
180
5.42M
  } \
Unexecuted instantiation: zend_jit.c:_ssa_op1_info
Unexecuted instantiation: zend_jit.c:_ssa_op2_info
Unexecuted instantiation: zend_jit.c:_ssa_result_info
dce.c:_ssa_op1_info
Line
Count
Source
174
3.21k
  {                                   \
175
3.21k
    if (opline->opN##_type == IS_CONST) {             \
176
66
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
3.14k
    } else { \
178
3.14k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
3.14k
    } \
180
3.21k
  } \
dce.c:_ssa_op2_info
Line
Count
Source
174
6.81k
  {                                   \
175
6.81k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
6.81k
    } else { \
178
6.81k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
6.81k
    } \
180
6.81k
  } \
Unexecuted instantiation: dce.c:_ssa_result_info
dfa_pass.c:_ssa_op2_info
Line
Count
Source
174
16.1k
  {                                   \
175
16.1k
    if (opline->opN##_type == IS_CONST) {             \
176
2.66k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
13.4k
    } else { \
178
13.4k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
13.4k
    } \
180
16.1k
  } \
dfa_pass.c:_ssa_op1_info
Line
Count
Source
174
43.8k
  {                                   \
175
43.8k
    if (opline->opN##_type == IS_CONST) {             \
176
1.84k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
41.9k
    } else { \
178
41.9k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
41.9k
    } \
180
43.8k
  } \
Unexecuted instantiation: dfa_pass.c:_ssa_result_info
escape_analysis.c:_ssa_op1_info
Line
Count
Source
174
13.1k
  {                                   \
175
13.1k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
13.1k
    } else { \
178
13.1k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
13.1k
    } \
180
13.1k
  } \
escape_analysis.c:_ssa_op2_info
Line
Count
Source
174
1.26k
  {                                   \
175
1.26k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
1.26k
    } else { \
178
1.26k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
1.26k
    } \
180
1.26k
  } \
Unexecuted instantiation: escape_analysis.c:_ssa_result_info
Unexecuted instantiation: sccp.c:_ssa_op1_info
Unexecuted instantiation: sccp.c:_ssa_op2_info
Unexecuted instantiation: sccp.c:_ssa_result_info
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_info
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_info
Unexecuted instantiation: zend_call_graph.c:_ssa_result_info
Unexecuted instantiation: zend_dump.c:_ssa_op1_info
Unexecuted instantiation: zend_dump.c:_ssa_op2_info
Unexecuted instantiation: zend_dump.c:_ssa_result_info
zend_func_info.c:_ssa_op1_info
Line
Count
Source
174
704
  {                                   \
175
704
    if (opline->opN##_type == IS_CONST) {             \
176
600
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
600
    } else { \
178
104
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
104
    } \
180
704
  } \
Unexecuted instantiation: zend_func_info.c:_ssa_op2_info
Unexecuted instantiation: zend_func_info.c:_ssa_result_info
zend_inference.c:_ssa_result_info
Line
Count
Source
174
45.1k
  {                                   \
175
45.1k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
45.1k
    } else { \
178
45.1k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
45.1k
    } \
180
45.1k
  } \
zend_inference.c:_ssa_op1_info
Line
Count
Source
174
1.40M
  {                                   \
175
1.40M
    if (opline->opN##_type == IS_CONST) {             \
176
175k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
1.22M
    } else { \
178
1.22M
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
1.22M
    } \
180
1.40M
  } \
zend_inference.c:_ssa_op2_info
Line
Count
Source
174
1.25M
  {                                   \
175
1.25M
    if (opline->opN##_type == IS_CONST) {             \
176
432k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
823k
    } else { \
178
823k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
823k
    } \
180
1.25M
  } \
zend_optimizer.c:_ssa_op1_info
Line
Count
Source
174
1.31M
  {                                   \
175
1.31M
    if (opline->opN##_type == IS_CONST) {             \
176
277k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
1.04M
    } else { \
178
1.04M
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
1.04M
    } \
180
1.31M
  } \
zend_optimizer.c:_ssa_op2_info
Line
Count
Source
174
1.31M
  {                                   \
175
1.31M
    if (opline->opN##_type == IS_CONST) {             \
176
376k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
942k
    } else { \
178
942k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
942k
    } \
180
1.31M
  } \
Unexecuted instantiation: zend_optimizer.c:_ssa_result_info
Unexecuted instantiation: zend_ssa.c:_ssa_op1_info
Unexecuted instantiation: zend_ssa.c:_ssa_op2_info
Unexecuted instantiation: zend_ssa.c:_ssa_result_info
181
182
#define DEFINE_SSA_OP_DEF_INFO(opN) \
183
  static zend_always_inline uint32_t _ssa_##opN##_def_info(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
184
954k
  { \
185
954k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
954k
  } \
Unexecuted instantiation: zend_jit.c:_ssa_result_def_info
Unexecuted instantiation: zend_jit.c:_ssa_op1_def_info
Unexecuted instantiation: zend_jit.c:_ssa_op2_def_info
Unexecuted instantiation: dce.c:_ssa_op1_def_info
Unexecuted instantiation: dce.c:_ssa_op2_def_info
Unexecuted instantiation: dce.c:_ssa_result_def_info
Unexecuted instantiation: dfa_pass.c:_ssa_op1_def_info
Unexecuted instantiation: dfa_pass.c:_ssa_op2_def_info
Unexecuted instantiation: dfa_pass.c:_ssa_result_def_info
Unexecuted instantiation: escape_analysis.c:_ssa_op1_def_info
Unexecuted instantiation: escape_analysis.c:_ssa_op2_def_info
Unexecuted instantiation: escape_analysis.c:_ssa_result_def_info
Unexecuted instantiation: sccp.c:_ssa_op1_def_info
Unexecuted instantiation: sccp.c:_ssa_op2_def_info
Unexecuted instantiation: sccp.c:_ssa_result_def_info
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_def_info
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_def_info
Unexecuted instantiation: zend_call_graph.c:_ssa_result_def_info
Unexecuted instantiation: zend_dump.c:_ssa_op1_def_info
Unexecuted instantiation: zend_dump.c:_ssa_op2_def_info
Unexecuted instantiation: zend_dump.c:_ssa_result_def_info
Unexecuted instantiation: zend_func_info.c:_ssa_op1_def_info
Unexecuted instantiation: zend_func_info.c:_ssa_op2_def_info
Unexecuted instantiation: zend_func_info.c:_ssa_result_def_info
Unexecuted instantiation: zend_inference.c:_ssa_op1_def_info
Unexecuted instantiation: zend_inference.c:_ssa_op2_def_info
Unexecuted instantiation: zend_inference.c:_ssa_result_def_info
zend_optimizer.c:_ssa_op1_def_info
Line
Count
Source
184
10.1k
  { \
185
10.1k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
10.1k
  } \
zend_optimizer.c:_ssa_result_def_info
Line
Count
Source
184
944k
  { \
185
944k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
944k
  } \
Unexecuted instantiation: zend_optimizer.c:_ssa_op2_def_info
Unexecuted instantiation: zend_ssa.c:_ssa_op1_def_info
Unexecuted instantiation: zend_ssa.c:_ssa_op2_def_info
Unexecuted instantiation: zend_ssa.c:_ssa_result_def_info
187
188
189
DEFINE_SSA_OP_INFO(op1)
190
DEFINE_SSA_OP_INFO(op2)
191
DEFINE_SSA_OP_INFO(result)
192
DEFINE_SSA_OP_DEF_INFO(op1)
193
DEFINE_SSA_OP_DEF_INFO(op2)
194
DEFINE_SSA_OP_DEF_INFO(result)
195
196
2.71M
#define OP1_INFO()           (_ssa_op1_info(op_array, ssa, opline, ssa_op))
197
2.59M
#define OP2_INFO()           (_ssa_op2_info(op_array, ssa, opline, ssa_op))
198
64.1k
#define OP1_DATA_INFO()      (_ssa_op1_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
199
#define OP2_DATA_INFO()      (_ssa_op2_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
200
45.1k
#define RES_USE_INFO()       (_ssa_result_info(op_array, ssa, opline, ssa_op))
201
10.1k
#define OP1_DEF_INFO()       (_ssa_op1_def_info(op_array, ssa, opline, ssa_op))
202
#define OP2_DEF_INFO()       (_ssa_op2_def_info(op_array, ssa, opline, ssa_op))
203
#define OP1_DATA_DEF_INFO()  (_ssa_op1_def_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
204
#define OP2_DATA_DEF_INFO()  (_ssa_op2_def_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
205
944k
#define RES_INFO()           (_ssa_result_def_info(op_array, ssa, opline, ssa_op))
206
207
14.5k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
14.5k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
13.0k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
14.5k
}
Unexecuted instantiation: zend_jit.c:zend_add_will_overflow
Unexecuted instantiation: dce.c:zend_add_will_overflow
Unexecuted instantiation: dfa_pass.c:zend_add_will_overflow
Unexecuted instantiation: escape_analysis.c:zend_add_will_overflow
Unexecuted instantiation: sccp.c:zend_add_will_overflow
Unexecuted instantiation: zend_call_graph.c:zend_add_will_overflow
Unexecuted instantiation: zend_dump.c:zend_add_will_overflow
Unexecuted instantiation: zend_func_info.c:zend_add_will_overflow
zend_inference.c:zend_add_will_overflow
Line
Count
Source
207
6.06k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
6.06k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
4.63k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
6.06k
}
Unexecuted instantiation: zend_optimizer.c:zend_add_will_overflow
zend_ssa.c:zend_add_will_overflow
Line
Count
Source
207
8.45k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
8.45k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
8.45k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
8.45k
}
211
15.0k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
15.0k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
14.0k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
15.0k
}
Unexecuted instantiation: zend_jit.c:zend_sub_will_overflow
Unexecuted instantiation: dce.c:zend_sub_will_overflow
Unexecuted instantiation: dfa_pass.c:zend_sub_will_overflow
Unexecuted instantiation: escape_analysis.c:zend_sub_will_overflow
Unexecuted instantiation: sccp.c:zend_sub_will_overflow
Unexecuted instantiation: zend_call_graph.c:zend_sub_will_overflow
Unexecuted instantiation: zend_dump.c:zend_sub_will_overflow
Unexecuted instantiation: zend_func_info.c:zend_sub_will_overflow
zend_inference.c:zend_sub_will_overflow
Line
Count
Source
211
10.8k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
10.8k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
9.93k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
10.8k
}
Unexecuted instantiation: zend_optimizer.c:zend_sub_will_overflow
zend_ssa.c:zend_sub_will_overflow
Line
Count
Source
211
4.16k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
4.16k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
4.16k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
4.16k
}
215
216
BEGIN_EXTERN_C()
217
218
ZEND_API void zend_ssa_find_false_dependencies(const zend_op_array *op_array, const zend_ssa *ssa);
219
ZEND_API void zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa);
220
ZEND_API zend_result zend_ssa_inference(zend_arena **raena, const zend_op_array *op_array, const zend_script *script, zend_ssa *ssa, zend_long optimization_level);
221
222
ZEND_API uint32_t zend_array_element_type(uint32_t t1, uint8_t op_type, bool write, bool insert);
223
224
ZEND_API bool zend_inference_propagate_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op* ssa_op, int var, zend_ssa_range *tmp);
225
226
ZEND_API uint32_t zend_fetch_arg_info_type(
227
  const zend_script *script, const zend_arg_info *arg_info, zend_class_entry **pce);
228
ZEND_API void zend_init_func_return_info(
229
  const zend_op_array *op_array, const zend_script *script, zend_ssa_var_info *ret);
230
uint32_t zend_get_return_info_from_signature_only(
231
    const zend_function *func, const zend_script *script,
232
    zend_class_entry **ce, bool *ce_is_instanceof, bool use_tentative_return_info);
233
234
ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, const zend_ssa *ssa, uint32_t t1, uint32_t t2);
235
ZEND_API bool zend_may_throw(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, const zend_ssa *ssa);
236
237
ZEND_API zend_result zend_update_type_info(
238
  const zend_op_array *op_array, zend_ssa *ssa, const zend_script *script,
239
  const zend_op *opline, zend_ssa_op *ssa_op, const zend_op **ssa_opcodes,
240
  zend_long optimization_level);
241
242
END_EXTERN_C()
243
244
#endif /* ZEND_INFERENCE_H */