Coverage Report

Created: 2026-09-14 06:25

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.37M
#define MAY_BE_GUARD                (1<<28) /* needs type guard */
32
33
#define MAY_HAVE_DTOR \
34
7.60k
  (MAY_BE_OBJECT|MAY_BE_RESOURCE \
35
7.60k
  |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
420k
  { \
40
420k
    if (opline->opN##_type == IS_CONST) { \
41
52.8k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
52.8k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
367k
    } else { \
44
367k
      return (opline->opN##_type != IS_UNUSED && \
45
367k
            ssa->var_info && \
46
367k
            ssa_op->opN##_use >= 0 && \
47
367k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
367k
    } \
49
420k
    return 0; \
50
420k
  } \
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
233k
  { \
40
233k
    if (opline->opN##_type == IS_CONST) { \
41
20.2k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
20.2k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
213k
    } else { \
44
213k
      return (opline->opN##_type != IS_UNUSED && \
45
213k
            ssa->var_info && \
46
213k
            ssa_op->opN##_use >= 0 && \
47
213k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
213k
    } \
49
233k
    return 0; \
50
233k
  } \
zend_inference.c:_ssa_op2_has_range
Line
Count
Source
39
186k
  { \
40
186k
    if (opline->opN##_type == IS_CONST) { \
41
32.6k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
32.6k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
153k
    } else { \
44
153k
      return (opline->opN##_type != IS_UNUSED && \
45
153k
            ssa->var_info && \
46
153k
            ssa_op->opN##_use >= 0 && \
47
153k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
153k
    } \
49
186k
    return 0; \
50
186k
  } \
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
300k
  { \
55
300k
    if (opline->opN##_type == IS_CONST) { \
56
29.4k
      zval *zv = CRT_CONSTANT(opline->opN); \
57
29.4k
      if (Z_TYPE_P(zv) == IS_LONG) { \
58
29.4k
        return Z_LVAL_P(zv); \
59
29.4k
      } \
60
271k
    } else if (opline->opN##_type != IS_UNUSED && \
61
271k
        ssa->var_info && \
62
271k
        ssa_op->opN##_use >= 0 && \
63
271k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
64
271k
      return ssa->var_info[ssa_op->opN##_use].range.min; \
65
271k
    } \
66
300k
    return ZEND_LONG_MIN; \
67
300k
  } \
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
300k
  { \
72
300k
    if (opline->opN##_type == IS_CONST) { \
73
29.2k
      zval *zv = CRT_CONSTANT(opline->opN); \
74
29.2k
      if (Z_TYPE_P(zv) == IS_LONG) { \
75
29.2k
        return Z_LVAL_P(zv); \
76
29.2k
      } \
77
271k
    } else if (opline->opN##_type != IS_UNUSED && \
78
271k
        ssa->var_info && \
79
271k
        ssa_op->opN##_use >= 0 && \
80
271k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
81
271k
      return ssa->var_info[ssa_op->opN##_use].range.max; \
82
271k
    } \
83
300k
    return ZEND_LONG_MAX; \
84
300k
  } \
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
283k
  { \
89
283k
    if (opline->opN##_type == IS_CONST) { \
90
22.3k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
22.3k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
22.3k
        return 0; \
93
22.3k
      } \
94
261k
    } else if (opline->opN##_type != IS_UNUSED && \
95
261k
        ssa->var_info && \
96
261k
        ssa_op->opN##_use >= 0 && \
97
261k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
261k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
261k
    } \
100
283k
    return 1; \
101
283k
  } \
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
183k
  { \
89
183k
    if (opline->opN##_type == IS_CONST) { \
90
7.16k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
7.16k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
7.16k
        return 0; \
93
7.16k
      } \
94
176k
    } else if (opline->opN##_type != IS_UNUSED && \
95
176k
        ssa->var_info && \
96
176k
        ssa_op->opN##_use >= 0 && \
97
176k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
176k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
176k
    } \
100
183k
    return 1; \
101
183k
  } \
zend_inference.c:_ssa_op2_range_underflow
Line
Count
Source
88
100k
  { \
89
100k
    if (opline->opN##_type == IS_CONST) { \
90
15.1k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
15.1k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
15.1k
        return 0; \
93
15.1k
      } \
94
84.9k
    } else if (opline->opN##_type != IS_UNUSED && \
95
84.9k
        ssa->var_info && \
96
84.9k
        ssa_op->opN##_use >= 0 && \
97
84.9k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
84.9k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
84.9k
    } \
100
100k
    return 1; \
101
100k
  } \
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
241k
  { \
106
241k
    if (opline->opN##_type == IS_CONST) { \
107
21.3k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
21.3k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
21.3k
        return 0; \
110
21.3k
      } \
111
220k
    } else if (opline->opN##_type != IS_UNUSED && \
112
220k
        ssa->var_info && \
113
220k
        ssa_op->opN##_use >= 0 && \
114
220k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
220k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
220k
    } \
117
241k
    return 1; \
118
241k
  } \
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
146k
  { \
106
146k
    if (opline->opN##_type == IS_CONST) { \
107
6.29k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
6.29k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
6.29k
        return 0; \
110
6.29k
      } \
111
140k
    } else if (opline->opN##_type != IS_UNUSED && \
112
140k
        ssa->var_info && \
113
140k
        ssa_op->opN##_use >= 0 && \
114
140k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
140k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
140k
    } \
117
146k
    return 1; \
118
146k
  } \
zend_inference.c:_ssa_op2_range_overflow
Line
Count
Source
105
95.3k
  { \
106
95.3k
    if (opline->opN##_type == IS_CONST) { \
107
15.0k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
15.0k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
15.0k
        return 0; \
110
15.0k
      } \
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
95.3k
    return 1; \
118
95.3k
  } \
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
160k
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
160k
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
139k
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
139k
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
358k
#define OP1_HAS_RANGE()       (_ssa_op1_has_range (op_array, ssa, opline, ssa_op))
132
160k
#define OP1_MIN_RANGE()       (_ssa_op1_min_range (op_array, ssa, opline, ssa_op))
133
160k
#define OP1_MAX_RANGE()       (_ssa_op1_max_range (op_array, ssa, opline, ssa_op))
134
293k
#define OP1_RANGE_UNDERFLOW() (_ssa_op1_range_underflow (op_array, ssa, opline, ssa_op))
135
234k
#define OP1_RANGE_OVERFLOW()  (_ssa_op1_range_overflow (op_array, ssa, opline, ssa_op))
136
187k
#define OP2_HAS_RANGE()       (_ssa_op2_has_range (op_array, ssa, opline, ssa_op))
137
139k
#define OP2_MIN_RANGE()       (_ssa_op2_min_range (op_array, ssa, opline, ssa_op))
138
139k
#define OP2_MAX_RANGE()       (_ssa_op2_max_range (op_array, ssa, opline, ssa_op))
139
188k
#define OP2_RANGE_UNDERFLOW() (_ssa_op2_range_underflow (op_array, ssa, opline, ssa_op))
140
156k
#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.19M
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
1.19M
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
1.73k
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
1.19M
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
23.3k
    return zend_array_type_info(zv);
151
1.16M
  } else {
152
1.16M
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
1.16M
    if (Z_REFCOUNTED_P(zv)) {
155
107k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
1.06M
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
677k
      tmp |= MAY_BE_RCN;
158
677k
    }
159
1.16M
    return tmp;
160
1.16M
  }
161
1.19M
}
Unexecuted instantiation: zend_jit.c:_const_op_type
dce.c:_const_op_type
Line
Count
Source
146
94
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
94
  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
94
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
94
    return zend_array_type_info(zv);
151
94
  } else {
152
0
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
0
    if (Z_REFCOUNTED_P(zv)) {
155
0
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
0
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
0
      tmp |= MAY_BE_RCN;
158
0
    }
159
0
    return tmp;
160
0
  }
161
94
}
dfa_pass.c:_const_op_type
Line
Count
Source
146
4.34k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
4.34k
  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.34k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
0
    return zend_array_type_info(zv);
151
4.34k
  } else {
152
4.34k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
4.34k
    if (Z_REFCOUNTED_P(zv)) {
155
570
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
3.77k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
3.77k
      tmp |= MAY_BE_RCN;
158
3.77k
    }
159
4.34k
    return tmp;
160
4.34k
  }
161
4.34k
}
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
564
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
564
  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
564
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
0
    return zend_array_type_info(zv);
151
564
  } else {
152
564
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
564
    if (Z_REFCOUNTED_P(zv)) {
155
0
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
564
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
32
      tmp |= MAY_BE_RCN;
158
32
    }
159
564
    return tmp;
160
564
  }
161
564
}
zend_inference.c:_const_op_type
Line
Count
Source
146
571k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
571k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
1.07k
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
570k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
11.2k
    return zend_array_type_info(zv);
151
559k
  } else {
152
559k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
559k
    if (Z_REFCOUNTED_P(zv)) {
155
55.4k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
503k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
306k
      tmp |= MAY_BE_RCN;
158
306k
    }
159
559k
    return tmp;
160
559k
  }
161
571k
}
zend_optimizer.c:_const_op_type
Line
Count
Source
146
617k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
617k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
656
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
616k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
12.0k
    return zend_array_type_info(zv);
151
604k
  } else {
152
604k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
604k
    if (Z_REFCOUNTED_P(zv)) {
155
51.2k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
553k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
367k
      tmp |= MAY_BE_RCN;
158
367k
    }
159
604k
    return tmp;
160
604k
  }
161
617k
}
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.15M
{
165
5.15M
  if (ssa->var_info && ssa_var_num >= 0) {
166
3.87M
    return ssa->var_info[ssa_var_num].type;
167
3.87M
  } else {
168
1.28M
    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.28M
  }
170
5.15M
}
Unexecuted instantiation: zend_jit.c:get_ssa_var_info
dce.c:get_ssa_var_info
Line
Count
Source
164
10.5k
{
165
10.5k
  if (ssa->var_info && ssa_var_num >= 0) {
166
10.5k
    return ssa->var_info[ssa_var_num].type;
167
10.5k
  } 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
10.5k
}
dfa_pass.c:get_ssa_var_info
Line
Count
Source
164
58.2k
{
165
58.2k
  if (ssa->var_info && ssa_var_num >= 0) {
166
58.2k
    return ssa->var_info[ssa_var_num].type;
167
58.2k
  } 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
58.2k
}
escape_analysis.c:get_ssa_var_info
Line
Count
Source
164
14.7k
{
165
14.7k
  if (ssa->var_info && ssa_var_num >= 0) {
166
14.7k
    return ssa->var_info[ssa_var_num].type;
167
14.7k
  } 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.7k
}
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
102
{
165
102
  if (ssa->var_info && ssa_var_num >= 0) {
166
102
    return ssa->var_info[ssa_var_num].type;
167
102
  } 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
102
}
zend_inference.c:get_ssa_var_info
Line
Count
Source
164
2.33M
{
165
2.33M
  if (ssa->var_info && ssa_var_num >= 0) {
166
1.68M
    return ssa->var_info[ssa_var_num].type;
167
1.68M
  } else {
168
655k
    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
655k
  }
170
2.33M
}
zend_optimizer.c:get_ssa_var_info
Line
Count
Source
164
2.73M
{
165
2.73M
  if (ssa->var_info && ssa_var_num >= 0) {
166
2.10M
    return ssa->var_info[ssa_var_num].type;
167
2.10M
  } else {
168
632k
    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
632k
  }
170
2.73M
}
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.12M
  {                                   \
175
5.12M
    if (opline->opN##_type == IS_CONST) {             \
176
1.19M
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
3.93M
    } else { \
178
3.93M
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
3.93M
    } \
180
5.12M
  } \
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.56k
  {                                   \
175
3.56k
    if (opline->opN##_type == IS_CONST) {             \
176
94
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
3.47k
    } else { \
178
3.47k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
3.47k
    } \
180
3.56k
  } \
dce.c:_ssa_op2_info
Line
Count
Source
174
7.05k
  {                                   \
175
7.05k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
7.05k
    } else { \
178
7.05k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
7.05k
    } \
180
7.05k
  } \
Unexecuted instantiation: dce.c:_ssa_result_info
dfa_pass.c:_ssa_op2_info
Line
Count
Source
174
17.0k
  {                                   \
175
17.0k
    if (opline->opN##_type == IS_CONST) {             \
176
2.61k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
14.4k
    } else { \
178
14.4k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
14.4k
    } \
180
17.0k
  } \
dfa_pass.c:_ssa_op1_info
Line
Count
Source
174
45.5k
  {                                   \
175
45.5k
    if (opline->opN##_type == IS_CONST) {             \
176
1.73k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
43.8k
    } else { \
178
43.8k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
43.8k
    } \
180
45.5k
  } \
Unexecuted instantiation: dfa_pass.c:_ssa_result_info
escape_analysis.c:_ssa_op1_info
Line
Count
Source
174
13.4k
  {                                   \
175
13.4k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      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
13.4k
  } \
escape_analysis.c:_ssa_op2_info
Line
Count
Source
174
1.32k
  {                                   \
175
1.32k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
1.32k
    } else { \
178
1.32k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
1.32k
    } \
180
1.32k
  } \
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
666
  {                                   \
175
666
    if (opline->opN##_type == IS_CONST) {             \
176
564
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
564
    } else { \
178
102
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
102
    } \
180
666
  } \
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
44.6k
  {                                   \
175
44.6k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
44.6k
    } else { \
178
44.6k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
44.6k
    } \
180
44.6k
  } \
zend_inference.c:_ssa_op1_info
Line
Count
Source
174
1.33M
  {                                   \
175
1.33M
    if (opline->opN##_type == IS_CONST) {             \
176
179k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
1.15M
    } else { \
178
1.15M
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
1.15M
    } \
180
1.33M
  } \
zend_inference.c:_ssa_op2_info
Line
Count
Source
174
1.17M
  {                                   \
175
1.17M
    if (opline->opN##_type == IS_CONST) {             \
176
391k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
787k
    } else { \
178
787k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
787k
    } \
180
1.17M
  } \
zend_optimizer.c:_ssa_op1_info
Line
Count
Source
174
1.24M
  {                                   \
175
1.24M
    if (opline->opN##_type == IS_CONST) {             \
176
282k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
959k
    } else { \
178
959k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
959k
    } \
180
1.24M
  } \
zend_optimizer.c:_ssa_op2_info
Line
Count
Source
174
1.24M
  {                                   \
175
1.24M
    if (opline->opN##_type == IS_CONST) {             \
176
334k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
908k
    } else { \
178
908k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
908k
    } \
180
1.24M
  } \
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
870k
  { \
185
870k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
870k
  } \
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.4k
  { \
185
10.4k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
10.4k
  } \
zend_optimizer.c:_ssa_result_def_info
Line
Count
Source
184
859k
  { \
185
859k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
859k
  } \
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.57M
#define OP1_INFO()           (_ssa_op1_info(op_array, ssa, opline, ssa_op))
197
2.44M
#define OP2_INFO()           (_ssa_op2_info(op_array, ssa, opline, ssa_op))
198
65.0k
#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
44.6k
#define RES_USE_INFO()       (_ssa_result_info(op_array, ssa, opline, ssa_op))
201
10.4k
#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
859k
#define RES_INFO()           (_ssa_result_def_info(op_array, ssa, opline, ssa_op))
206
207
16.6k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
16.6k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
15.0k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
16.6k
}
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
7.78k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
7.78k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
6.18k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
7.78k
}
Unexecuted instantiation: zend_optimizer.c:zend_add_will_overflow
zend_ssa.c:zend_add_will_overflow
Line
Count
Source
207
8.86k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
8.86k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
8.86k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
8.86k
}
211
15.8k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
15.8k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
14.8k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
15.8k
}
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
11.0k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
11.0k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
10.0k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
11.0k
}
Unexecuted instantiation: zend_optimizer.c:zend_sub_will_overflow
zend_ssa.c:zend_sub_will_overflow
Line
Count
Source
211
4.79k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
4.79k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
4.79k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
4.79k
}
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 */