Coverage Report

Created: 2026-06-02 06:40

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.10M
#define MAY_BE_GUARD                (1<<28) /* needs type guard */
32
33
#define MAY_HAVE_DTOR \
34
5.73k
  (MAY_BE_OBJECT|MAY_BE_RESOURCE \
35
5.73k
  |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
286k
  { \
40
286k
    if (opline->opN##_type == IS_CONST) { \
41
37.1k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
37.1k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
249k
    } else { \
44
249k
      return (opline->opN##_type != IS_UNUSED && \
45
249k
            ssa->var_info && \
46
249k
            ssa_op->opN##_use >= 0 && \
47
249k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
249k
    } \
49
286k
    return 0; \
50
286k
  } \
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
161k
  { \
40
161k
    if (opline->opN##_type == IS_CONST) { \
41
15.0k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
15.0k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
146k
    } else { \
44
146k
      return (opline->opN##_type != IS_UNUSED && \
45
146k
            ssa->var_info && \
46
146k
            ssa_op->opN##_use >= 0 && \
47
146k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
146k
    } \
49
161k
    return 0; \
50
161k
  } \
zend_inference.c:_ssa_op2_has_range
Line
Count
Source
39
124k
  { \
40
124k
    if (opline->opN##_type == IS_CONST) { \
41
22.0k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
22.0k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
102k
    } else { \
44
102k
      return (opline->opN##_type != IS_UNUSED && \
45
102k
            ssa->var_info && \
46
102k
            ssa_op->opN##_use >= 0 && \
47
102k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
102k
    } \
49
124k
    return 0; \
50
124k
  } \
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
209k
  { \
55
209k
    if (opline->opN##_type == IS_CONST) { \
56
19.9k
      zval *zv = CRT_CONSTANT(opline->opN); \
57
19.9k
      if (Z_TYPE_P(zv) == IS_LONG) { \
58
19.9k
        return Z_LVAL_P(zv); \
59
19.9k
      } \
60
189k
    } else if (opline->opN##_type != IS_UNUSED && \
61
189k
        ssa->var_info && \
62
189k
        ssa_op->opN##_use >= 0 && \
63
189k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
64
189k
      return ssa->var_info[ssa_op->opN##_use].range.min; \
65
189k
    } \
66
209k
    return ZEND_LONG_MIN; \
67
209k
  } \
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
209k
  { \
72
209k
    if (opline->opN##_type == IS_CONST) { \
73
19.8k
      zval *zv = CRT_CONSTANT(opline->opN); \
74
19.8k
      if (Z_TYPE_P(zv) == IS_LONG) { \
75
19.8k
        return Z_LVAL_P(zv); \
76
19.8k
      } \
77
189k
    } else if (opline->opN##_type != IS_UNUSED && \
78
189k
        ssa->var_info && \
79
189k
        ssa_op->opN##_use >= 0 && \
80
189k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
81
189k
      return ssa->var_info[ssa_op->opN##_use].range.max; \
82
189k
    } \
83
209k
    return ZEND_LONG_MAX; \
84
209k
  } \
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
194k
  { \
89
194k
    if (opline->opN##_type == IS_CONST) { \
90
15.2k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
15.2k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
15.2k
        return 0; \
93
15.2k
      } \
94
179k
    } else if (opline->opN##_type != IS_UNUSED && \
95
179k
        ssa->var_info && \
96
179k
        ssa_op->opN##_use >= 0 && \
97
179k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
179k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
179k
    } \
100
194k
    return 1; \
101
194k
  } \
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
126k
  { \
89
126k
    if (opline->opN##_type == IS_CONST) { \
90
5.01k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
5.01k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
5.01k
        return 0; \
93
5.01k
      } \
94
121k
    } else if (opline->opN##_type != IS_UNUSED && \
95
121k
        ssa->var_info && \
96
121k
        ssa_op->opN##_use >= 0 && \
97
121k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
121k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
121k
    } \
100
126k
    return 1; \
101
126k
  } \
zend_inference.c:_ssa_op2_range_underflow
Line
Count
Source
88
67.6k
  { \
89
67.6k
    if (opline->opN##_type == IS_CONST) { \
90
10.2k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
10.2k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
10.2k
        return 0; \
93
10.2k
      } \
94
57.4k
    } else if (opline->opN##_type != IS_UNUSED && \
95
57.4k
        ssa->var_info && \
96
57.4k
        ssa_op->opN##_use >= 0 && \
97
57.4k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
57.4k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
57.4k
    } \
100
67.6k
    return 1; \
101
67.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
169k
  { \
106
169k
    if (opline->opN##_type == IS_CONST) { \
107
14.7k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
14.7k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
14.7k
        return 0; \
110
14.7k
      } \
111
154k
    } else if (opline->opN##_type != IS_UNUSED && \
112
154k
        ssa->var_info && \
113
154k
        ssa_op->opN##_use >= 0 && \
114
154k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
154k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
154k
    } \
117
169k
    return 1; \
118
169k
  } \
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
103k
  { \
106
103k
    if (opline->opN##_type == IS_CONST) { \
107
4.56k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
4.56k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
4.56k
        return 0; \
110
4.56k
      } \
111
99.0k
    } else if (opline->opN##_type != IS_UNUSED && \
112
99.0k
        ssa->var_info && \
113
99.0k
        ssa_op->opN##_use >= 0 && \
114
99.0k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
99.0k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
99.0k
    } \
117
103k
    return 1; \
118
103k
  } \
zend_inference.c:_ssa_op2_range_overflow
Line
Count
Source
105
65.5k
  { \
106
65.5k
    if (opline->opN##_type == IS_CONST) { \
107
10.1k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
10.1k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
10.1k
        return 0; \
110
10.1k
      } \
111
55.3k
    } else if (opline->opN##_type != IS_UNUSED && \
112
55.3k
        ssa->var_info && \
113
55.3k
        ssa_op->opN##_use >= 0 && \
114
55.3k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
55.3k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
55.3k
    } \
117
65.5k
    return 1; \
118
65.5k
  } \
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
114k
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
114k
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
95.9k
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
95.7k
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
243k
#define OP1_HAS_RANGE()       (_ssa_op1_has_range (op_array, ssa, opline, ssa_op))
132
114k
#define OP1_MIN_RANGE()       (_ssa_op1_min_range (op_array, ssa, opline, ssa_op))
133
114k
#define OP1_MAX_RANGE()       (_ssa_op1_max_range (op_array, ssa, opline, ssa_op))
134
202k
#define OP1_RANGE_UNDERFLOW() (_ssa_op1_range_underflow (op_array, ssa, opline, ssa_op))
135
159k
#define OP1_RANGE_OVERFLOW()  (_ssa_op1_range_overflow (op_array, ssa, opline, ssa_op))
136
125k
#define OP2_HAS_RANGE()       (_ssa_op2_has_range (op_array, ssa, opline, ssa_op))
137
95.9k
#define OP2_MIN_RANGE()       (_ssa_op2_min_range (op_array, ssa, opline, ssa_op))
138
95.7k
#define OP2_MAX_RANGE()       (_ssa_op2_max_range (op_array, ssa, opline, ssa_op))
139
123k
#define OP2_RANGE_UNDERFLOW() (_ssa_op2_range_underflow (op_array, ssa, opline, ssa_op))
140
107k
#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
950k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
950k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
1.25k
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
948k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
15.9k
    return zend_array_type_info(zv);
151
933k
  } else {
152
933k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
933k
    if (Z_REFCOUNTED_P(zv)) {
155
93.3k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
839k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
563k
      tmp |= MAY_BE_RCN;
158
563k
    }
159
933k
    return tmp;
160
933k
  }
161
950k
}
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
3.50k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
3.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
3.50k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
0
    return zend_array_type_info(zv);
151
3.50k
  } else {
152
3.50k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
3.50k
    if (Z_REFCOUNTED_P(zv)) {
155
526
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
2.97k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
2.97k
      tmp |= MAY_BE_RCN;
158
2.97k
    }
159
3.50k
    return tmp;
160
3.50k
  }
161
3.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
444
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
444
  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
444
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
0
    return zend_array_type_info(zv);
151
444
  } else {
152
444
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
444
    if (Z_REFCOUNTED_P(zv)) {
155
1
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
443
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
35
      tmp |= MAY_BE_RCN;
158
35
    }
159
444
    return tmp;
160
444
  }
161
444
}
zend_inference.c:_const_op_type
Line
Count
Source
146
452k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
452k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
818
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
451k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
7.57k
    return zend_array_type_info(zv);
151
444k
  } else {
152
444k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
444k
    if (Z_REFCOUNTED_P(zv)) {
155
49.2k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
394k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
254k
      tmp |= MAY_BE_RCN;
158
254k
    }
159
444k
    return tmp;
160
444k
  }
161
452k
}
zend_optimizer.c:_const_op_type
Line
Count
Source
146
493k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
493k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
436
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
493k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
8.33k
    return zend_array_type_info(zv);
151
484k
  } else {
152
484k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
484k
    if (Z_REFCOUNTED_P(zv)) {
155
43.5k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
441k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
306k
      tmp |= MAY_BE_RCN;
158
306k
    }
159
484k
    return tmp;
160
484k
  }
161
493k
}
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
4.19M
{
165
4.19M
  if (ssa->var_info && ssa_var_num >= 0) {
166
3.13M
    return ssa->var_info[ssa_var_num].type;
167
3.13M
  } else {
168
1.05M
    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.05M
  }
170
4.19M
}
Unexecuted instantiation: zend_jit.c:get_ssa_var_info
dce.c:get_ssa_var_info
Line
Count
Source
164
7.83k
{
165
7.83k
  if (ssa->var_info && ssa_var_num >= 0) {
166
7.83k
    return ssa->var_info[ssa_var_num].type;
167
7.83k
  } 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
7.83k
}
dfa_pass.c:get_ssa_var_info
Line
Count
Source
164
39.2k
{
165
39.2k
  if (ssa->var_info && ssa_var_num >= 0) {
166
39.2k
    return ssa->var_info[ssa_var_num].type;
167
39.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
39.2k
}
escape_analysis.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
}
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
78
{
165
78
  if (ssa->var_info && ssa_var_num >= 0) {
166
78
    return ssa->var_info[ssa_var_num].type;
167
78
  } 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
78
}
zend_inference.c:get_ssa_var_info
Line
Count
Source
164
1.87M
{
165
1.87M
  if (ssa->var_info && ssa_var_num >= 0) {
166
1.32M
    return ssa->var_info[ssa_var_num].type;
167
1.32M
  } else {
168
546k
    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
546k
  }
170
1.87M
}
zend_optimizer.c:get_ssa_var_info
Line
Count
Source
164
2.26M
{
165
2.26M
  if (ssa->var_info && ssa_var_num >= 0) {
166
1.75M
    return ssa->var_info[ssa_var_num].type;
167
1.75M
  } else {
168
510k
    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
510k
  }
170
2.26M
}
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
4.12M
  {                                   \
175
4.12M
    if (opline->opN##_type == IS_CONST) {             \
176
950k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
3.17M
    } else { \
178
3.17M
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
3.17M
    } \
180
4.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
2.52k
  {                                   \
175
2.52k
    if (opline->opN##_type == IS_CONST) {             \
176
66
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
2.46k
    } else { \
178
2.46k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
2.46k
    } \
180
2.52k
  } \
dce.c:_ssa_op2_info
Line
Count
Source
174
5.37k
  {                                   \
175
5.37k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
5.37k
    } else { \
178
5.37k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
5.37k
    } \
180
5.37k
  } \
Unexecuted instantiation: dce.c:_ssa_result_info
dfa_pass.c:_ssa_op2_info
Line
Count
Source
174
11.1k
  {                                   \
175
11.1k
    if (opline->opN##_type == IS_CONST) {             \
176
2.03k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
9.10k
    } else { \
178
9.10k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
9.10k
    } \
180
11.1k
  } \
dfa_pass.c:_ssa_op1_info
Line
Count
Source
174
31.5k
  {                                   \
175
31.5k
    if (opline->opN##_type == IS_CONST) {             \
176
1.47k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
30.1k
    } else { \
178
30.1k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
30.1k
    } \
180
31.5k
  } \
Unexecuted instantiation: dfa_pass.c:_ssa_result_info
escape_analysis.c:_ssa_op1_info
Line
Count
Source
174
9.62k
  {                                   \
175
9.62k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
9.62k
    } else { \
178
9.62k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
9.62k
    } \
180
9.62k
  } \
escape_analysis.c:_ssa_op2_info
Line
Count
Source
174
912
  {                                   \
175
912
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
912
    } else { \
178
912
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
912
    } \
180
912
  } \
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
522
  {                                   \
175
522
    if (opline->opN##_type == IS_CONST) {             \
176
444
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
444
    } else { \
178
78
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
78
    } \
180
522
  } \
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
30.8k
  {                                   \
175
30.8k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
30.8k
    } else { \
178
30.8k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
30.8k
    } \
180
30.8k
  } \
zend_inference.c:_ssa_op1_info
Line
Count
Source
174
1.05M
  {                                   \
175
1.05M
    if (opline->opN##_type == IS_CONST) {             \
176
134k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
924k
    } else { \
178
924k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
924k
    } \
180
1.05M
  } \
zend_inference.c:_ssa_op2_info
Line
Count
Source
174
947k
  {                                   \
175
947k
    if (opline->opN##_type == IS_CONST) {             \
176
317k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
629k
    } else { \
178
629k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
629k
    } \
180
947k
  } \
zend_optimizer.c:_ssa_op1_info
Line
Count
Source
174
1.01M
  {                                   \
175
1.01M
    if (opline->opN##_type == IS_CONST) {             \
176
214k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
799k
    } else { \
178
799k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
799k
    } \
180
1.01M
  } \
zend_optimizer.c:_ssa_op2_info
Line
Count
Source
174
1.01M
  {                                   \
175
1.01M
    if (opline->opN##_type == IS_CONST) {             \
176
278k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
734k
    } else { \
178
734k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
734k
    } \
180
1.01M
  } \
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
729k
  { \
185
729k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
729k
  } \
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
7.19k
  { \
185
7.19k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
7.19k
  } \
zend_optimizer.c:_ssa_result_def_info
Line
Count
Source
184
722k
  { \
185
722k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
722k
  } \
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.07M
#define OP1_INFO()           (_ssa_op1_info(op_array, ssa, opline, ssa_op))
197
1.97M
#define OP2_INFO()           (_ssa_op2_info(op_array, ssa, opline, ssa_op))
198
44.9k
#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
30.8k
#define RES_USE_INFO()       (_ssa_result_info(op_array, ssa, opline, ssa_op))
201
7.19k
#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
722k
#define RES_INFO()           (_ssa_result_def_info(op_array, ssa, opline, ssa_op))
206
207
9.90k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
9.90k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
8.97k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
9.90k
}
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
3.82k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
3.82k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
2.89k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
3.82k
}
Unexecuted instantiation: zend_optimizer.c:zend_add_will_overflow
zend_ssa.c:zend_add_will_overflow
Line
Count
Source
207
6.08k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
6.08k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
6.08k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
6.08k
}
211
11.9k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
11.9k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
11.2k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
11.9k
}
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
9.11k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
9.11k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
8.44k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
9.11k
}
Unexecuted instantiation: zend_optimizer.c:zend_sub_will_overflow
zend_ssa.c:zend_sub_will_overflow
Line
Count
Source
211
2.84k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
2.84k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
2.84k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
2.84k
}
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 */