Coverage Report

Created: 2025-11-16 06:23

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 (c) The PHP Group                                          |
6
   +----------------------------------------------------------------------+
7
   | This source file is subject to version 3.01 of the PHP license,      |
8
   | that is bundled with this package in the file LICENSE, and is        |
9
   | available through the world-wide-web at the following url:           |
10
   | https://www.php.net/license/3_01.txt                                 |
11
   | If you did not receive a copy of the PHP license and are unable to   |
12
   | obtain it through the world-wide-web, please send a note to          |
13
   | license@php.net so we can mail you a copy immediately.               |
14
   +----------------------------------------------------------------------+
15
   | Authors: Dmitry Stogov <dmitry@php.net>                              |
16
   +----------------------------------------------------------------------+
17
*/
18
19
#ifndef ZEND_INFERENCE_H
20
#define ZEND_INFERENCE_H
21
22
#include "zend_optimizer.h"
23
#include "zend_ssa.h"
24
#include "zend_bitset.h"
25
26
/* Bitmask for type inference (zend_ssa_var_info.type) */
27
#include "zend_type_info.h"
28
29
#include <stdint.h>
30
31
0
#define MAY_BE_PACKED_GUARD         (1<<27) /* needs packed array guard */
32
0
#define MAY_BE_CLASS_GUARD          (1<<27) /* needs class guard */
33
1.12M
#define MAY_BE_GUARD                (1<<28) /* needs type guard */
34
35
#define MAY_HAVE_DTOR \
36
3.94k
  (MAY_BE_OBJECT|MAY_BE_RESOURCE \
37
3.94k
  |MAY_BE_ARRAY_OF_ARRAY|MAY_BE_ARRAY_OF_OBJECT|MAY_BE_ARRAY_OF_RESOURCE)
38
39
#define DEFINE_SSA_OP_HAS_RANGE(opN) \
40
  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) \
41
268k
  { \
42
268k
    if (opline->opN##_type == IS_CONST) { \
43
36.0k
      zval *zv = CRT_CONSTANT(opline->opN); \
44
36.0k
      return (Z_TYPE_P(zv) == IS_LONG); \
45
232k
    } else { \
46
232k
      return (opline->opN##_type != IS_UNUSED && \
47
232k
            ssa->var_info && \
48
232k
            ssa_op->opN##_use >= 0 && \
49
232k
          ssa->var_info[ssa_op->opN##_use].has_range); \
50
232k
    } \
51
268k
    return 0; \
52
268k
  } \
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
41
153k
  { \
42
153k
    if (opline->opN##_type == IS_CONST) { \
43
16.7k
      zval *zv = CRT_CONSTANT(opline->opN); \
44
16.7k
      return (Z_TYPE_P(zv) == IS_LONG); \
45
136k
    } else { \
46
136k
      return (opline->opN##_type != IS_UNUSED && \
47
136k
            ssa->var_info && \
48
136k
            ssa_op->opN##_use >= 0 && \
49
136k
          ssa->var_info[ssa_op->opN##_use].has_range); \
50
136k
    } \
51
153k
    return 0; \
52
153k
  } \
zend_inference.c:_ssa_op2_has_range
Line
Count
Source
41
114k
  { \
42
114k
    if (opline->opN##_type == IS_CONST) { \
43
19.3k
      zval *zv = CRT_CONSTANT(opline->opN); \
44
19.3k
      return (Z_TYPE_P(zv) == IS_LONG); \
45
95.6k
    } else { \
46
95.6k
      return (opline->opN##_type != IS_UNUSED && \
47
95.6k
            ssa->var_info && \
48
95.6k
            ssa_op->opN##_use >= 0 && \
49
95.6k
          ssa->var_info[ssa_op->opN##_use].has_range); \
50
95.6k
    } \
51
114k
    return 0; \
52
114k
  } \
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
53
54
#define DEFINE_SSA_OP_MIN_RANGE(opN) \
55
  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) \
56
202k
  { \
57
202k
    if (opline->opN##_type == IS_CONST) { \
58
17.2k
      zval *zv = CRT_CONSTANT(opline->opN); \
59
17.2k
      if (Z_TYPE_P(zv) == IS_LONG) { \
60
17.2k
        return Z_LVAL_P(zv); \
61
17.2k
      } \
62
185k
    } else if (opline->opN##_type != IS_UNUSED && \
63
185k
        ssa->var_info && \
64
185k
        ssa_op->opN##_use >= 0 && \
65
185k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
66
185k
      return ssa->var_info[ssa_op->opN##_use].range.min; \
67
185k
    } \
68
202k
    return ZEND_LONG_MIN; \
69
202k
  } \
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
70
71
#define DEFINE_SSA_OP_MAX_RANGE(opN) \
72
  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) \
73
202k
  { \
74
202k
    if (opline->opN##_type == IS_CONST) { \
75
16.7k
      zval *zv = CRT_CONSTANT(opline->opN); \
76
16.7k
      if (Z_TYPE_P(zv) == IS_LONG) { \
77
16.7k
        return Z_LVAL_P(zv); \
78
16.7k
      } \
79
185k
    } else if (opline->opN##_type != IS_UNUSED && \
80
185k
        ssa->var_info && \
81
185k
        ssa_op->opN##_use >= 0 && \
82
185k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
83
185k
      return ssa->var_info[ssa_op->opN##_use].range.max; \
84
185k
    } \
85
202k
    return ZEND_LONG_MAX; \
86
202k
  } \
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
87
88
#define DEFINE_SSA_OP_RANGE_UNDERFLOW(opN) \
89
  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) \
90
176k
  { \
91
176k
    if (opline->opN##_type == IS_CONST) { \
92
12.7k
      zval *zv = CRT_CONSTANT(opline->opN); \
93
12.7k
      if (Z_TYPE_P(zv) == IS_LONG) { \
94
12.7k
        return 0; \
95
12.7k
      } \
96
163k
    } else if (opline->opN##_type != IS_UNUSED && \
97
163k
        ssa->var_info && \
98
163k
        ssa_op->opN##_use >= 0 && \
99
163k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
100
163k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
101
163k
    } \
102
176k
    return 1; \
103
176k
  } \
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
90
122k
  { \
91
122k
    if (opline->opN##_type == IS_CONST) { \
92
4.83k
      zval *zv = CRT_CONSTANT(opline->opN); \
93
4.83k
      if (Z_TYPE_P(zv) == IS_LONG) { \
94
4.83k
        return 0; \
95
4.83k
      } \
96
117k
    } else if (opline->opN##_type != IS_UNUSED && \
97
117k
        ssa->var_info && \
98
117k
        ssa_op->opN##_use >= 0 && \
99
117k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
100
117k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
101
117k
    } \
102
122k
    return 1; \
103
122k
  } \
zend_inference.c:_ssa_op2_range_underflow
Line
Count
Source
90
54.0k
  { \
91
54.0k
    if (opline->opN##_type == IS_CONST) { \
92
7.90k
      zval *zv = CRT_CONSTANT(opline->opN); \
93
7.90k
      if (Z_TYPE_P(zv) == IS_LONG) { \
94
7.90k
        return 0; \
95
7.90k
      } \
96
46.1k
    } else if (opline->opN##_type != IS_UNUSED && \
97
46.1k
        ssa->var_info && \
98
46.1k
        ssa_op->opN##_use >= 0 && \
99
46.1k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
100
46.1k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
101
46.1k
    } \
102
54.0k
    return 1; \
103
54.0k
  } \
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
104
105
#define DEFINE_SSA_OP_RANGE_OVERFLOW(opN) \
106
  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) \
107
147k
  { \
108
147k
    if (opline->opN##_type == IS_CONST) { \
109
12.3k
      zval *zv = CRT_CONSTANT(opline->opN); \
110
12.3k
      if (Z_TYPE_P(zv) == IS_LONG) { \
111
12.3k
        return 0; \
112
12.3k
      } \
113
135k
    } else if (opline->opN##_type != IS_UNUSED && \
114
135k
        ssa->var_info && \
115
135k
        ssa_op->opN##_use >= 0 && \
116
135k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
117
135k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
118
135k
    } \
119
147k
    return 1; \
120
147k
  } \
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
107
95.3k
  { \
108
95.3k
    if (opline->opN##_type == IS_CONST) { \
109
4.51k
      zval *zv = CRT_CONSTANT(opline->opN); \
110
4.51k
      if (Z_TYPE_P(zv) == IS_LONG) { \
111
4.51k
        return 0; \
112
4.51k
      } \
113
90.7k
    } else if (opline->opN##_type != IS_UNUSED && \
114
90.7k
        ssa->var_info && \
115
90.7k
        ssa_op->opN##_use >= 0 && \
116
90.7k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
117
90.7k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
118
90.7k
    } \
119
95.3k
    return 1; \
120
95.3k
  } \
zend_inference.c:_ssa_op2_range_overflow
Line
Count
Source
107
52.1k
  { \
108
52.1k
    if (opline->opN##_type == IS_CONST) { \
109
7.87k
      zval *zv = CRT_CONSTANT(opline->opN); \
110
7.87k
      if (Z_TYPE_P(zv) == IS_LONG) { \
111
7.87k
        return 0; \
112
7.87k
      } \
113
44.2k
    } else if (opline->opN##_type != IS_UNUSED && \
114
44.2k
        ssa->var_info && \
115
44.2k
        ssa_op->opN##_use >= 0 && \
116
44.2k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
117
44.2k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
118
44.2k
    } \
119
52.1k
    return 1; \
120
52.1k
  } \
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
121
122
DEFINE_SSA_OP_HAS_RANGE(op1)
123
111k
DEFINE_SSA_OP_MIN_RANGE(op1)
Unexecuted instantiation: zend_jit.c:_ssa_op1_min_range
Unexecuted instantiation: zend_inference.c:_ssa_op1_min_range
124
111k
DEFINE_SSA_OP_MAX_RANGE(op1)
Unexecuted instantiation: zend_jit.c:_ssa_op1_max_range
Unexecuted instantiation: zend_inference.c:_ssa_op1_max_range
125
DEFINE_SSA_OP_RANGE_UNDERFLOW(op1)
126
DEFINE_SSA_OP_RANGE_OVERFLOW(op1)
127
DEFINE_SSA_OP_HAS_RANGE(op2)
128
90.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
129
90.3k
DEFINE_SSA_OP_MAX_RANGE(op2)
Unexecuted instantiation: zend_jit.c:_ssa_op2_max_range
Unexecuted instantiation: zend_inference.c:_ssa_op2_max_range
130
DEFINE_SSA_OP_RANGE_UNDERFLOW(op2)
131
DEFINE_SSA_OP_RANGE_OVERFLOW(op2)
132
133
233k
#define OP1_HAS_RANGE()       (_ssa_op1_has_range (op_array, ssa, opline, ssa_op))
134
111k
#define OP1_MIN_RANGE()       (_ssa_op1_min_range (op_array, ssa, opline, ssa_op))
135
111k
#define OP1_MAX_RANGE()       (_ssa_op1_max_range (op_array, ssa, opline, ssa_op))
136
202k
#define OP1_RANGE_UNDERFLOW() (_ssa_op1_range_underflow (op_array, ssa, opline, ssa_op))
137
153k
#define OP1_RANGE_OVERFLOW()  (_ssa_op1_range_overflow (op_array, ssa, opline, ssa_op))
138
116k
#define OP2_HAS_RANGE()       (_ssa_op2_has_range (op_array, ssa, opline, ssa_op))
139
90.9k
#define OP2_MIN_RANGE()       (_ssa_op2_min_range (op_array, ssa, opline, ssa_op))
140
90.3k
#define OP2_MAX_RANGE()       (_ssa_op2_max_range (op_array, ssa, opline, ssa_op))
141
112k
#define OP2_RANGE_UNDERFLOW() (_ssa_op2_range_underflow (op_array, ssa, opline, ssa_op))
142
98.5k
#define OP2_RANGE_OVERFLOW()  (_ssa_op2_range_overflow (op_array, ssa, opline, ssa_op))
143
144
BEGIN_EXTERN_C()
145
ZEND_API uint32_t ZEND_FASTCALL zend_array_type_info(const zval *zv);
146
END_EXTERN_C()
147
148
964k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
964k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
1.34k
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
963k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
14.3k
    return zend_array_type_info(zv);
153
948k
  } else {
154
948k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
948k
    if (Z_REFCOUNTED_P(zv)) {
157
106k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
842k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
576k
      tmp |= MAY_BE_RCN;
160
576k
    }
161
948k
    return tmp;
162
948k
  }
163
964k
}
Unexecuted instantiation: zend_jit.c:_const_op_type
Unexecuted instantiation: dce.c:_const_op_type
dfa_pass.c:_const_op_type
Line
Count
Source
148
2.90k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
2.90k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
0
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
2.90k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
0
    return zend_array_type_info(zv);
153
2.90k
  } else {
154
2.90k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
2.90k
    if (Z_REFCOUNTED_P(zv)) {
157
540
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
2.36k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
2.36k
      tmp |= MAY_BE_RCN;
160
2.36k
    }
161
2.90k
    return tmp;
162
2.90k
  }
163
2.90k
}
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
148
423
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
423
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
0
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
423
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
0
    return zend_array_type_info(zv);
153
423
  } else {
154
423
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
423
    if (Z_REFCOUNTED_P(zv)) {
157
0
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
423
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
32
      tmp |= MAY_BE_RCN;
160
32
    }
161
423
    return tmp;
162
423
  }
163
423
}
zend_inference.c:_const_op_type
Line
Count
Source
148
468k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
468k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
667
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
468k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
6.74k
    return zend_array_type_info(zv);
153
461k
  } else {
154
461k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
461k
    if (Z_REFCOUNTED_P(zv)) {
157
58.6k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
402k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
267k
      tmp |= MAY_BE_RCN;
160
267k
    }
161
461k
    return tmp;
162
461k
  }
163
468k
}
zend_optimizer.c:_const_op_type
Line
Count
Source
148
492k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
492k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
680
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
491k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
7.64k
    return zend_array_type_info(zv);
153
484k
  } else {
154
484k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
484k
    if (Z_REFCOUNTED_P(zv)) {
157
47.0k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
437k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
306k
      tmp |= MAY_BE_RCN;
160
306k
    }
161
484k
    return tmp;
162
484k
  }
163
492k
}
Unexecuted instantiation: zend_ssa.c:_const_op_type
164
165
static zend_always_inline uint32_t get_ssa_var_info(const zend_ssa *ssa, int ssa_var_num)
166
4.32M
{
167
4.32M
  if (ssa->var_info && ssa_var_num >= 0) {
168
3.14M
    return ssa->var_info[ssa_var_num].type;
169
3.14M
  } else {
170
1.17M
    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;
171
1.17M
  }
172
4.32M
}
Unexecuted instantiation: zend_jit.c:get_ssa_var_info
dce.c:get_ssa_var_info
Line
Count
Source
166
5.51k
{
167
5.51k
  if (ssa->var_info && ssa_var_num >= 0) {
168
5.51k
    return ssa->var_info[ssa_var_num].type;
169
5.51k
  } else {
170
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;
171
0
  }
172
5.51k
}
dfa_pass.c:get_ssa_var_info
Line
Count
Source
166
38.2k
{
167
38.2k
  if (ssa->var_info && ssa_var_num >= 0) {
168
38.2k
    return ssa->var_info[ssa_var_num].type;
169
38.2k
  } else {
170
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;
171
0
  }
172
38.2k
}
escape_analysis.c:get_ssa_var_info
Line
Count
Source
166
8.94k
{
167
8.94k
  if (ssa->var_info && ssa_var_num >= 0) {
168
8.94k
    return ssa->var_info[ssa_var_num].type;
169
8.94k
  } else {
170
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;
171
0
  }
172
8.94k
}
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
166
43
{
167
43
  if (ssa->var_info && ssa_var_num >= 0) {
168
43
    return ssa->var_info[ssa_var_num].type;
169
43
  } else {
170
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;
171
0
  }
172
43
}
zend_inference.c:get_ssa_var_info
Line
Count
Source
166
1.91M
{
167
1.91M
  if (ssa->var_info && ssa_var_num >= 0) {
168
1.26M
    return ssa->var_info[ssa_var_num].type;
169
1.26M
  } else {
170
644k
    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;
171
644k
  }
172
1.91M
}
zend_optimizer.c:get_ssa_var_info
Line
Count
Source
166
2.36M
{
167
2.36M
  if (ssa->var_info && ssa_var_num >= 0) {
168
1.82M
    return ssa->var_info[ssa_var_num].type;
169
1.82M
  } else {
170
531k
    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;
171
531k
  }
172
2.36M
}
Unexecuted instantiation: zend_ssa.c:get_ssa_var_info
173
174
#define DEFINE_SSA_OP_INFO(opN) \
175
  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) \
176
4.23M
  {                                   \
177
4.23M
    if (opline->opN##_type == IS_CONST) {             \
178
964k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
3.26M
    } else { \
180
3.26M
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
3.26M
    } \
182
4.23M
  } \
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_op2_info
Line
Count
Source
176
3.66k
  {                                   \
177
3.66k
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
3.66k
    } else { \
180
3.66k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
3.66k
    } \
182
3.66k
  } \
dce.c:_ssa_op1_info
Line
Count
Source
176
1.85k
  {                                   \
177
1.85k
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
1.85k
    } else { \
180
1.85k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
1.85k
    } \
182
1.85k
  } \
Unexecuted instantiation: dce.c:_ssa_result_info
dfa_pass.c:_ssa_op2_info
Line
Count
Source
176
11.5k
  {                                   \
177
11.5k
    if (opline->opN##_type == IS_CONST) {             \
178
1.58k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
10.0k
    } else { \
180
10.0k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
10.0k
    } \
182
11.5k
  } \
dfa_pass.c:_ssa_op1_info
Line
Count
Source
176
29.5k
  {                                   \
177
29.5k
    if (opline->opN##_type == IS_CONST) {             \
178
1.31k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
28.2k
    } else { \
180
28.2k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
28.2k
    } \
182
29.5k
  } \
Unexecuted instantiation: dfa_pass.c:_ssa_result_info
escape_analysis.c:_ssa_op1_info
Line
Count
Source
176
8.26k
  {                                   \
177
8.26k
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
8.26k
    } else { \
180
8.26k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
8.26k
    } \
182
8.26k
  } \
escape_analysis.c:_ssa_op2_info
Line
Count
Source
176
679
  {                                   \
177
679
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
679
    } else { \
180
679
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
679
    } \
182
679
  } \
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
176
466
  {                                   \
177
466
    if (opline->opN##_type == IS_CONST) {             \
178
423
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
423
    } else { \
180
43
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
43
    } \
182
466
  } \
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
176
30.7k
  {                                   \
177
30.7k
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
30.7k
    } else { \
180
30.7k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
30.7k
    } \
182
30.7k
  } \
zend_inference.c:_ssa_op1_info
Line
Count
Source
176
1.08M
  {                                   \
177
1.08M
    if (opline->opN##_type == IS_CONST) {             \
178
137k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
952k
    } else { \
180
952k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
952k
    } \
182
1.08M
  } \
zend_inference.c:_ssa_op2_info
Line
Count
Source
176
989k
  {                                   \
177
989k
    if (opline->opN##_type == IS_CONST) {             \
178
331k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
658k
    } else { \
180
658k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
658k
    } \
182
989k
  } \
zend_optimizer.c:_ssa_op1_info
Line
Count
Source
176
1.03M
  {                                   \
177
1.03M
    if (opline->opN##_type == IS_CONST) {             \
178
215k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
818k
    } else { \
180
818k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
818k
    } \
182
1.03M
  } \
zend_optimizer.c:_ssa_op2_info
Line
Count
Source
176
1.03M
  {                                   \
177
1.03M
    if (opline->opN##_type == IS_CONST) {             \
178
276k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
757k
    } else { \
180
757k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
757k
    } \
182
1.03M
  } \
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
183
184
#define DEFINE_SSA_OP_DEF_INFO(opN) \
185
  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) \
186
785k
  { \
187
785k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
188
785k
  } \
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
186
5.68k
  { \
187
5.68k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
188
5.68k
  } \
zend_optimizer.c:_ssa_result_def_info
Line
Count
Source
186
779k
  { \
187
779k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
188
779k
  } \
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
189
190
191
DEFINE_SSA_OP_INFO(op1)
192
DEFINE_SSA_OP_INFO(op2)
193
DEFINE_SSA_OP_INFO(result)
194
DEFINE_SSA_OP_DEF_INFO(op1)
195
DEFINE_SSA_OP_DEF_INFO(op2)
196
DEFINE_SSA_OP_DEF_INFO(result)
197
198
2.13M
#define OP1_INFO()           (_ssa_op1_info(op_array, ssa, opline, ssa_op))
199
2.03M
#define OP2_INFO()           (_ssa_op2_info(op_array, ssa, opline, ssa_op))
200
31.6k
#define OP1_DATA_INFO()      (_ssa_op1_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
201
#define OP2_DATA_INFO()      (_ssa_op2_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
202
30.7k
#define RES_USE_INFO()       (_ssa_result_info(op_array, ssa, opline, ssa_op))
203
5.68k
#define OP1_DEF_INFO()       (_ssa_op1_def_info(op_array, ssa, opline, ssa_op))
204
#define OP2_DEF_INFO()       (_ssa_op2_def_info(op_array, ssa, opline, ssa_op))
205
#define OP1_DATA_DEF_INFO()  (_ssa_op1_def_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
206
#define OP2_DATA_DEF_INFO()  (_ssa_op2_def_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
207
779k
#define RES_INFO()           (_ssa_result_def_info(op_array, ssa, opline, ssa_op))
208
209
7.70k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
210
7.70k
  return (b > 0 && a > ZEND_LONG_MAX - b)
211
7.05k
    || (b < 0 && a < ZEND_LONG_MIN - b);
212
7.70k
}
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
209
2.70k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
210
2.70k
  return (b > 0 && a > ZEND_LONG_MAX - b)
211
2.06k
    || (b < 0 && a < ZEND_LONG_MIN - b);
212
2.70k
}
Unexecuted instantiation: zend_optimizer.c:zend_add_will_overflow
zend_ssa.c:zend_add_will_overflow
Line
Count
Source
209
4.99k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
210
4.99k
  return (b > 0 && a > ZEND_LONG_MAX - b)
211
4.99k
    || (b < 0 && a < ZEND_LONG_MIN - b);
212
4.99k
}
213
6.96k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
214
6.96k
  return (b > 0 && a < ZEND_LONG_MIN + b)
215
6.65k
    || (b < 0 && a > ZEND_LONG_MAX + b);
216
6.96k
}
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
213
4.67k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
214
4.67k
  return (b > 0 && a < ZEND_LONG_MIN + b)
215
4.37k
    || (b < 0 && a > ZEND_LONG_MAX + b);
216
4.67k
}
Unexecuted instantiation: zend_optimizer.c:zend_sub_will_overflow
zend_ssa.c:zend_sub_will_overflow
Line
Count
Source
213
2.28k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
214
2.28k
  return (b > 0 && a < ZEND_LONG_MIN + b)
215
2.28k
    || (b < 0 && a > ZEND_LONG_MAX + b);
216
2.28k
}
217
218
BEGIN_EXTERN_C()
219
220
ZEND_API void zend_ssa_find_false_dependencies(const zend_op_array *op_array, const zend_ssa *ssa);
221
ZEND_API void zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa);
222
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);
223
224
ZEND_API uint32_t zend_array_element_type(uint32_t t1, uint8_t op_type, bool write, bool insert);
225
226
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);
227
228
ZEND_API uint32_t zend_fetch_arg_info_type(
229
  const zend_script *script, const zend_arg_info *arg_info, zend_class_entry **pce);
230
ZEND_API void zend_init_func_return_info(
231
  const zend_op_array *op_array, const zend_script *script, zend_ssa_var_info *ret);
232
uint32_t zend_get_return_info_from_signature_only(
233
    const zend_function *func, const zend_script *script,
234
    zend_class_entry **ce, bool *ce_is_instanceof, bool use_tentative_return_info);
235
236
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);
237
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);
238
239
ZEND_API zend_result zend_update_type_info(
240
  const zend_op_array *op_array, zend_ssa *ssa, const zend_script *script,
241
  const zend_op *opline, zend_ssa_op *ssa_op, const zend_op **ssa_opcodes,
242
  zend_long optimization_level);
243
244
END_EXTERN_C()
245
246
#endif /* ZEND_INFERENCE_H */