Coverage Report

Created: 2026-06-02 06:39

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/php-src/Zend/Optimizer/zend_inference.h
Line
Count
Source
1
/*
2
   +----------------------------------------------------------------------+
3
   | Zend Engine, e-SSA based Type & Range Inference                      |
4
   +----------------------------------------------------------------------+
5
   | Copyright © The PHP Group and Contributors.                          |
6
   +----------------------------------------------------------------------+
7
   | This source file is subject to the Modified BSD License that is      |
8
   | bundled with this package in the file LICENSE, and is available      |
9
   | through the World Wide Web at <https://www.php.net/license/>.        |
10
   |                                                                      |
11
   | SPDX-License-Identifier: BSD-3-Clause                                |
12
   +----------------------------------------------------------------------+
13
   | Authors: Dmitry Stogov <dmitry@php.net>                              |
14
   +----------------------------------------------------------------------+
15
*/
16
17
#ifndef ZEND_INFERENCE_H
18
#define ZEND_INFERENCE_H
19
20
#include "zend_optimizer.h"
21
#include "zend_ssa.h"
22
#include "zend_bitset.h"
23
24
/* Bitmask for type inference (zend_ssa_var_info.type) */
25
#include "zend_type_info.h"
26
27
#include <stdint.h>
28
29
0
#define MAY_BE_PACKED_GUARD         (1<<27) /* needs packed array guard */
30
0
#define MAY_BE_CLASS_GUARD          (1<<27) /* needs class guard */
31
573k
#define MAY_BE_GUARD                (1<<28) /* needs type guard */
32
33
#define MAY_HAVE_DTOR \
34
2.86k
  (MAY_BE_OBJECT|MAY_BE_RESOURCE \
35
2.86k
  |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
152k
  { \
40
152k
    if (opline->opN##_type == IS_CONST) { \
41
17.6k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
17.6k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
134k
    } else { \
44
134k
      return (opline->opN##_type != IS_UNUSED && \
45
134k
            ssa->var_info && \
46
134k
            ssa_op->opN##_use >= 0 && \
47
134k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
134k
    } \
49
152k
    return 0; \
50
152k
  } \
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
89.0k
  { \
40
89.0k
    if (opline->opN##_type == IS_CONST) { \
41
7.38k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
7.38k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
81.6k
    } else { \
44
81.6k
      return (opline->opN##_type != IS_UNUSED && \
45
81.6k
            ssa->var_info && \
46
81.6k
            ssa_op->opN##_use >= 0 && \
47
81.6k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
81.6k
    } \
49
89.0k
    return 0; \
50
89.0k
  } \
zend_inference.c:_ssa_op2_has_range
Line
Count
Source
39
63.3k
  { \
40
63.3k
    if (opline->opN##_type == IS_CONST) { \
41
10.2k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
10.2k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
53.1k
    } else { \
44
53.1k
      return (opline->opN##_type != IS_UNUSED && \
45
53.1k
            ssa->var_info && \
46
53.1k
            ssa_op->opN##_use >= 0 && \
47
53.1k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
53.1k
    } \
49
63.3k
    return 0; \
50
63.3k
  } \
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
115k
  { \
55
115k
    if (opline->opN##_type == IS_CONST) { \
56
9.11k
      zval *zv = CRT_CONSTANT(opline->opN); \
57
9.11k
      if (Z_TYPE_P(zv) == IS_LONG) { \
58
9.11k
        return Z_LVAL_P(zv); \
59
9.11k
      } \
60
105k
    } else if (opline->opN##_type != IS_UNUSED && \
61
105k
        ssa->var_info && \
62
105k
        ssa_op->opN##_use >= 0 && \
63
105k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
64
105k
      return ssa->var_info[ssa_op->opN##_use].range.min; \
65
105k
    } \
66
115k
    return ZEND_LONG_MIN; \
67
115k
  } \
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
114k
  { \
72
114k
    if (opline->opN##_type == IS_CONST) { \
73
8.99k
      zval *zv = CRT_CONSTANT(opline->opN); \
74
8.99k
      if (Z_TYPE_P(zv) == IS_LONG) { \
75
8.99k
        return Z_LVAL_P(zv); \
76
8.99k
      } \
77
105k
    } else if (opline->opN##_type != IS_UNUSED && \
78
105k
        ssa->var_info && \
79
105k
        ssa_op->opN##_use >= 0 && \
80
105k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
81
105k
      return ssa->var_info[ssa_op->opN##_use].range.max; \
82
105k
    } \
83
114k
    return ZEND_LONG_MAX; \
84
114k
  } \
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
105k
  { \
89
105k
    if (opline->opN##_type == IS_CONST) { \
90
6.61k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
6.61k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
6.61k
        return 0; \
93
6.61k
      } \
94
98.8k
    } else if (opline->opN##_type != IS_UNUSED && \
95
98.8k
        ssa->var_info && \
96
98.8k
        ssa_op->opN##_use >= 0 && \
97
98.8k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
98.8k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
98.8k
    } \
100
105k
    return 1; \
101
105k
  } \
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
71.9k
  { \
89
71.9k
    if (opline->opN##_type == IS_CONST) { \
90
2.28k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
2.28k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
2.28k
        return 0; \
93
2.28k
      } \
94
69.6k
    } else if (opline->opN##_type != IS_UNUSED && \
95
69.6k
        ssa->var_info && \
96
69.6k
        ssa_op->opN##_use >= 0 && \
97
69.6k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
69.6k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
69.6k
    } \
100
71.9k
    return 1; \
101
71.9k
  } \
zend_inference.c:_ssa_op2_range_underflow
Line
Count
Source
88
33.5k
  { \
89
33.5k
    if (opline->opN##_type == IS_CONST) { \
90
4.32k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
4.32k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
4.32k
        return 0; \
93
4.32k
      } \
94
29.1k
    } else if (opline->opN##_type != IS_UNUSED && \
95
29.1k
        ssa->var_info && \
96
29.1k
        ssa_op->opN##_use >= 0 && \
97
29.1k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
29.1k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
29.1k
    } \
100
33.5k
    return 1; \
101
33.5k
  } \
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
92.8k
  { \
106
92.8k
    if (opline->opN##_type == IS_CONST) { \
107
6.35k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
6.35k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
6.35k
        return 0; \
110
6.35k
      } \
111
86.4k
    } else if (opline->opN##_type != IS_UNUSED && \
112
86.4k
        ssa->var_info && \
113
86.4k
        ssa_op->opN##_use >= 0 && \
114
86.4k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
86.4k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
86.4k
    } \
117
92.8k
    return 1; \
118
92.8k
  } \
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
60.6k
  { \
106
60.6k
    if (opline->opN##_type == IS_CONST) { \
107
2.03k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
2.03k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
2.03k
        return 0; \
110
2.03k
      } \
111
58.5k
    } else if (opline->opN##_type != IS_UNUSED && \
112
58.5k
        ssa->var_info && \
113
58.5k
        ssa_op->opN##_use >= 0 && \
114
58.5k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
58.5k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
58.5k
    } \
117
60.6k
    return 1; \
118
60.6k
  } \
zend_inference.c:_ssa_op2_range_overflow
Line
Count
Source
105
32.2k
  { \
106
32.2k
    if (opline->opN##_type == IS_CONST) { \
107
4.32k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
4.32k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
4.32k
        return 0; \
110
4.32k
      } \
111
27.9k
    } else if (opline->opN##_type != IS_UNUSED && \
112
27.9k
        ssa->var_info && \
113
27.9k
        ssa_op->opN##_use >= 0 && \
114
27.9k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
27.9k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
27.9k
    } \
117
32.2k
    return 1; \
118
32.2k
  } \
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
65.7k
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
65.7k
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
49.3k
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
49.2k
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
130k
#define OP1_HAS_RANGE()       (_ssa_op1_has_range (op_array, ssa, opline, ssa_op))
132
65.7k
#define OP1_MIN_RANGE()       (_ssa_op1_min_range (op_array, ssa, opline, ssa_op))
133
65.7k
#define OP1_MAX_RANGE()       (_ssa_op1_max_range (op_array, ssa, opline, ssa_op))
134
120k
#define OP1_RANGE_UNDERFLOW() (_ssa_op1_range_underflow (op_array, ssa, opline, ssa_op))
135
89.4k
#define OP1_RANGE_OVERFLOW()  (_ssa_op1_range_overflow (op_array, ssa, opline, ssa_op))
136
63.6k
#define OP2_HAS_RANGE()       (_ssa_op2_has_range (op_array, ssa, opline, ssa_op))
137
49.3k
#define OP2_MIN_RANGE()       (_ssa_op2_min_range (op_array, ssa, opline, ssa_op))
138
49.2k
#define OP2_MAX_RANGE()       (_ssa_op2_max_range (op_array, ssa, opline, ssa_op))
139
62.3k
#define OP2_RANGE_UNDERFLOW() (_ssa_op2_range_underflow (op_array, ssa, opline, ssa_op))
140
54.3k
#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
482k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
482k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
600
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
482k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
8.13k
    return zend_array_type_info(zv);
151
474k
  } else {
152
474k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
474k
    if (Z_REFCOUNTED_P(zv)) {
155
43.4k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
430k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
292k
      tmp |= MAY_BE_RCN;
158
292k
    }
159
474k
    return tmp;
160
474k
  }
161
482k
}
Unexecuted instantiation: zend_jit.c:_const_op_type
dce.c:_const_op_type
Line
Count
Source
146
34
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
34
  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
34
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
34
    return zend_array_type_info(zv);
151
34
  } 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
34
}
dfa_pass.c:_const_op_type
Line
Count
Source
146
1.63k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
1.63k
  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
1.63k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
0
    return zend_array_type_info(zv);
151
1.63k
  } else {
152
1.63k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
1.63k
    if (Z_REFCOUNTED_P(zv)) {
155
260
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
1.37k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
1.37k
      tmp |= MAY_BE_RCN;
158
1.37k
    }
159
1.63k
    return tmp;
160
1.63k
  }
161
1.63k
}
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
280
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
280
  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
280
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
0
    return zend_array_type_info(zv);
151
280
  } else {
152
280
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
280
    if (Z_REFCOUNTED_P(zv)) {
155
1
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
279
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
23
      tmp |= MAY_BE_RCN;
158
23
    }
159
280
    return tmp;
160
280
  }
161
280
}
zend_inference.c:_const_op_type
Line
Count
Source
146
231k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
231k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
340
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
231k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
3.91k
    return zend_array_type_info(zv);
151
227k
  } else {
152
227k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
227k
    if (Z_REFCOUNTED_P(zv)) {
155
23.8k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
203k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
133k
      tmp |= MAY_BE_RCN;
158
133k
    }
159
227k
    return tmp;
160
227k
  }
161
231k
}
zend_optimizer.c:_const_op_type
Line
Count
Source
146
249k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
249k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
260
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
249k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
4.17k
    return zend_array_type_info(zv);
151
244k
  } else {
152
244k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
244k
    if (Z_REFCOUNTED_P(zv)) {
155
19.3k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
225k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
157k
      tmp |= MAY_BE_RCN;
158
157k
    }
159
244k
    return tmp;
160
244k
  }
161
249k
}
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
2.15M
{
165
2.15M
  if (ssa->var_info && ssa_var_num >= 0) {
166
1.61M
    return ssa->var_info[ssa_var_num].type;
167
1.61M
  } else {
168
539k
    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
539k
  }
170
2.15M
}
Unexecuted instantiation: zend_jit.c:get_ssa_var_info
dce.c:get_ssa_var_info
Line
Count
Source
164
4.19k
{
165
4.19k
  if (ssa->var_info && ssa_var_num >= 0) {
166
4.19k
    return ssa->var_info[ssa_var_num].type;
167
4.19k
  } 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
4.19k
}
dfa_pass.c:get_ssa_var_info
Line
Count
Source
164
19.3k
{
165
19.3k
  if (ssa->var_info && ssa_var_num >= 0) {
166
19.3k
    return ssa->var_info[ssa_var_num].type;
167
19.3k
  } 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
19.3k
}
escape_analysis.c:get_ssa_var_info
Line
Count
Source
164
4.99k
{
165
4.99k
  if (ssa->var_info && ssa_var_num >= 0) {
166
4.99k
    return ssa->var_info[ssa_var_num].type;
167
4.99k
  } 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
4.99k
}
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
42
{
165
42
  if (ssa->var_info && ssa_var_num >= 0) {
166
42
    return ssa->var_info[ssa_var_num].type;
167
42
  } 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
42
}
zend_inference.c:get_ssa_var_info
Line
Count
Source
164
975k
{
165
975k
  if (ssa->var_info && ssa_var_num >= 0) {
166
698k
    return ssa->var_info[ssa_var_num].type;
167
698k
  } else {
168
276k
    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
276k
  }
170
975k
}
zend_optimizer.c:get_ssa_var_info
Line
Count
Source
164
1.14M
{
165
1.14M
  if (ssa->var_info && ssa_var_num >= 0) {
166
886k
    return ssa->var_info[ssa_var_num].type;
167
886k
  } else {
168
262k
    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
262k
  }
170
1.14M
}
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
2.10M
  {                                   \
175
2.10M
    if (opline->opN##_type == IS_CONST) {             \
176
482k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
1.61M
    } else { \
178
1.61M
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
1.61M
    } \
180
2.10M
  } \
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
1.54k
  {                                   \
175
1.54k
    if (opline->opN##_type == IS_CONST) {             \
176
34
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
1.50k
    } else { \
178
1.50k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
1.50k
    } \
180
1.54k
  } \
dce.c:_ssa_op2_info
Line
Count
Source
174
2.68k
  {                                   \
175
2.68k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
2.68k
    } else { \
178
2.68k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
2.68k
    } \
180
2.68k
  } \
Unexecuted instantiation: dce.c:_ssa_result_info
dfa_pass.c:_ssa_op2_info
Line
Count
Source
174
6.06k
  {                                   \
175
6.06k
    if (opline->opN##_type == IS_CONST) {             \
176
904
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
5.15k
    } else { \
178
5.15k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
5.15k
    } \
180
6.06k
  } \
dfa_pass.c:_ssa_op1_info
Line
Count
Source
174
14.9k
  {                                   \
175
14.9k
    if (opline->opN##_type == IS_CONST) {             \
176
734
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
14.2k
    } else { \
178
14.2k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
14.2k
    } \
180
14.9k
  } \
Unexecuted instantiation: dfa_pass.c:_ssa_result_info
escape_analysis.c:_ssa_op1_info
Line
Count
Source
174
4.58k
  {                                   \
175
4.58k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
4.58k
    } else { \
178
4.58k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
4.58k
    } \
180
4.58k
  } \
escape_analysis.c:_ssa_op2_info
Line
Count
Source
174
410
  {                                   \
175
410
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
410
    } else { \
178
410
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
410
    } \
180
410
  } \
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
322
  {                                   \
175
322
    if (opline->opN##_type == IS_CONST) {             \
176
280
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
280
    } else { \
178
42
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
42
    } \
180
322
  } \
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
19.2k
  {                                   \
175
19.2k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
19.2k
    } else { \
178
19.2k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
19.2k
    } \
180
19.2k
  } \
zend_inference.c:_ssa_op1_info
Line
Count
Source
174
539k
  {                                   \
175
539k
    if (opline->opN##_type == IS_CONST) {             \
176
69.7k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
470k
    } else { \
178
470k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
470k
    } \
180
539k
  } \
zend_inference.c:_ssa_op2_info
Line
Count
Source
174
485k
  {                                   \
175
485k
    if (opline->opN##_type == IS_CONST) {             \
176
161k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
323k
    } else { \
178
323k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
323k
    } \
180
485k
  } \
zend_optimizer.c:_ssa_op1_info
Line
Count
Source
174
512k
  {                                   \
175
512k
    if (opline->opN##_type == IS_CONST) {             \
176
110k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
401k
    } else { \
178
401k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
401k
    } \
180
512k
  } \
zend_optimizer.c:_ssa_op2_info
Line
Count
Source
174
512k
  {                                   \
175
512k
    if (opline->opN##_type == IS_CONST) {             \
176
138k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
373k
    } else { \
178
373k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
373k
    } \
180
512k
  } \
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
373k
  { \
185
373k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
373k
  } \
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
3.31k
  { \
185
3.31k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
3.31k
  } \
zend_optimizer.c:_ssa_result_def_info
Line
Count
Source
184
370k
  { \
185
370k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
370k
  } \
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
1.05M
#define OP1_INFO()           (_ssa_op1_info(op_array, ssa, opline, ssa_op))
197
1.00M
#define OP2_INFO()           (_ssa_op2_info(op_array, ssa, opline, ssa_op))
198
19.3k
#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
19.2k
#define RES_USE_INFO()       (_ssa_result_info(op_array, ssa, opline, ssa_op))
201
3.31k
#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
370k
#define RES_INFO()           (_ssa_result_def_info(op_array, ssa, opline, ssa_op))
206
207
4.55k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
4.55k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
4.08k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
4.55k
}
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
1.60k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
1.60k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
1.13k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
1.60k
}
Unexecuted instantiation: zend_optimizer.c:zend_add_will_overflow
zend_ssa.c:zend_add_will_overflow
Line
Count
Source
207
2.95k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
2.95k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
2.95k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
2.95k
}
211
4.57k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
4.57k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
4.23k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
4.57k
}
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
3.21k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
3.21k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
2.87k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
3.21k
}
Unexecuted instantiation: zend_optimizer.c:zend_sub_will_overflow
zend_ssa.c:zend_sub_will_overflow
Line
Count
Source
211
1.35k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
1.35k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
1.35k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
1.35k
}
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 */