Coverage Report

Created: 2026-06-13 07:01

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.13M
#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
293k
  { \
40
293k
    if (opline->opN##_type == IS_CONST) { \
41
38.0k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
38.0k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
255k
    } else { \
44
255k
      return (opline->opN##_type != IS_UNUSED && \
45
255k
            ssa->var_info && \
46
255k
            ssa_op->opN##_use >= 0 && \
47
255k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
255k
    } \
49
293k
    return 0; \
50
293k
  } \
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
166k
  { \
40
166k
    if (opline->opN##_type == IS_CONST) { \
41
15.2k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
15.2k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
150k
    } else { \
44
150k
      return (opline->opN##_type != IS_UNUSED && \
45
150k
            ssa->var_info && \
46
150k
            ssa_op->opN##_use >= 0 && \
47
150k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
150k
    } \
49
166k
    return 0; \
50
166k
  } \
zend_inference.c:_ssa_op2_has_range
Line
Count
Source
39
127k
  { \
40
127k
    if (opline->opN##_type == IS_CONST) { \
41
22.7k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
22.7k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
104k
    } else { \
44
104k
      return (opline->opN##_type != IS_UNUSED && \
45
104k
            ssa->var_info && \
46
104k
            ssa_op->opN##_use >= 0 && \
47
104k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
104k
    } \
49
127k
    return 0; \
50
127k
  } \
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
214k
  { \
55
214k
    if (opline->opN##_type == IS_CONST) { \
56
20.4k
      zval *zv = CRT_CONSTANT(opline->opN); \
57
20.4k
      if (Z_TYPE_P(zv) == IS_LONG) { \
58
20.4k
        return Z_LVAL_P(zv); \
59
20.4k
      } \
60
194k
    } else if (opline->opN##_type != IS_UNUSED && \
61
194k
        ssa->var_info && \
62
194k
        ssa_op->opN##_use >= 0 && \
63
194k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
64
194k
      return ssa->var_info[ssa_op->opN##_use].range.min; \
65
194k
    } \
66
214k
    return ZEND_LONG_MIN; \
67
214k
  } \
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
214k
  { \
72
214k
    if (opline->opN##_type == IS_CONST) { \
73
20.2k
      zval *zv = CRT_CONSTANT(opline->opN); \
74
20.2k
      if (Z_TYPE_P(zv) == IS_LONG) { \
75
20.2k
        return Z_LVAL_P(zv); \
76
20.2k
      } \
77
194k
    } else if (opline->opN##_type != IS_UNUSED && \
78
194k
        ssa->var_info && \
79
194k
        ssa_op->opN##_use >= 0 && \
80
194k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
81
194k
      return ssa->var_info[ssa_op->opN##_use].range.max; \
82
194k
    } \
83
214k
    return ZEND_LONG_MAX; \
84
214k
  } \
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
199k
  { \
89
199k
    if (opline->opN##_type == IS_CONST) { \
90
15.4k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
15.4k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
15.4k
        return 0; \
93
15.4k
      } \
94
183k
    } else if (opline->opN##_type != IS_UNUSED && \
95
183k
        ssa->var_info && \
96
183k
        ssa_op->opN##_use >= 0 && \
97
183k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
183k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
183k
    } \
100
199k
    return 1; \
101
199k
  } \
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
130k
  { \
89
130k
    if (opline->opN##_type == IS_CONST) { \
90
5.00k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
5.00k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
5.00k
        return 0; \
93
5.00k
      } \
94
125k
    } else if (opline->opN##_type != IS_UNUSED && \
95
125k
        ssa->var_info && \
96
125k
        ssa_op->opN##_use >= 0 && \
97
125k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
125k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
125k
    } \
100
130k
    return 1; \
101
130k
  } \
zend_inference.c:_ssa_op2_range_underflow
Line
Count
Source
88
68.7k
  { \
89
68.7k
    if (opline->opN##_type == IS_CONST) { \
90
10.4k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
10.4k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
10.4k
        return 0; \
93
10.4k
      } \
94
58.2k
    } else if (opline->opN##_type != IS_UNUSED && \
95
58.2k
        ssa->var_info && \
96
58.2k
        ssa_op->opN##_use >= 0 && \
97
58.2k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
58.2k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
58.2k
    } \
100
68.7k
    return 1; \
101
68.7k
  } \
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
172k
  { \
106
172k
    if (opline->opN##_type == IS_CONST) { \
107
14.9k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
14.9k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
14.9k
        return 0; \
110
14.9k
      } \
111
157k
    } else if (opline->opN##_type != IS_UNUSED && \
112
157k
        ssa->var_info && \
113
157k
        ssa_op->opN##_use >= 0 && \
114
157k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
157k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
157k
    } \
117
172k
    return 1; \
118
172k
  } \
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
106k
  { \
106
106k
    if (opline->opN##_type == IS_CONST) { \
107
4.54k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
4.54k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
4.54k
        return 0; \
110
4.54k
      } \
111
101k
    } else if (opline->opN##_type != IS_UNUSED && \
112
101k
        ssa->var_info && \
113
101k
        ssa_op->opN##_use >= 0 && \
114
101k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
101k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
101k
    } \
117
106k
    return 1; \
118
106k
  } \
zend_inference.c:_ssa_op2_range_overflow
Line
Count
Source
105
66.2k
  { \
106
66.2k
    if (opline->opN##_type == IS_CONST) { \
107
10.4k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
10.4k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
10.4k
        return 0; \
110
10.4k
      } \
111
55.8k
    } else if (opline->opN##_type != IS_UNUSED && \
112
55.8k
        ssa->var_info && \
113
55.8k
        ssa_op->opN##_use >= 0 && \
114
55.8k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
55.8k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
55.8k
    } \
117
66.2k
    return 1; \
118
66.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
117k
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
117k
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
97.4k
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
97.1k
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
249k
#define OP1_HAS_RANGE()       (_ssa_op1_has_range (op_array, ssa, opline, ssa_op))
132
117k
#define OP1_MIN_RANGE()       (_ssa_op1_min_range (op_array, ssa, opline, ssa_op))
133
117k
#define OP1_MAX_RANGE()       (_ssa_op1_max_range (op_array, ssa, opline, ssa_op))
134
208k
#define OP1_RANGE_UNDERFLOW() (_ssa_op1_range_underflow (op_array, ssa, opline, ssa_op))
135
163k
#define OP1_RANGE_OVERFLOW()  (_ssa_op1_range_overflow (op_array, ssa, opline, ssa_op))
136
128k
#define OP2_HAS_RANGE()       (_ssa_op2_has_range (op_array, ssa, opline, ssa_op))
137
97.4k
#define OP2_MIN_RANGE()       (_ssa_op2_min_range (op_array, ssa, opline, ssa_op))
138
97.1k
#define OP2_MAX_RANGE()       (_ssa_op2_max_range (op_array, ssa, opline, ssa_op))
139
126k
#define OP2_RANGE_UNDERFLOW() (_ssa_op2_range_underflow (op_array, ssa, opline, ssa_op))
140
108k
#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
975k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
975k
  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
974k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
16.7k
    return zend_array_type_info(zv);
151
957k
  } else {
152
957k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
957k
    if (Z_REFCOUNTED_P(zv)) {
155
90.9k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
866k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
581k
      tmp |= MAY_BE_RCN;
158
581k
    }
159
957k
    return tmp;
160
957k
  }
161
975k
}
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.61k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
3.61k
  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.61k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
0
    return zend_array_type_info(zv);
151
3.61k
  } else {
152
3.61k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
3.61k
    if (Z_REFCOUNTED_P(zv)) {
155
534
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
3.08k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
3.08k
      tmp |= MAY_BE_RCN;
158
3.08k
    }
159
3.61k
    return tmp;
160
3.61k
  }
161
3.61k
}
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
437
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
437
  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
437
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
0
    return zend_array_type_info(zv);
151
437
  } else {
152
437
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
437
    if (Z_REFCOUNTED_P(zv)) {
155
1
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
436
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
31
      tmp |= MAY_BE_RCN;
158
31
    }
159
437
    return tmp;
160
437
  }
161
437
}
zend_inference.c:_const_op_type
Line
Count
Source
146
464k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
464k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
822
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
463k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
7.90k
    return zend_array_type_info(zv);
151
455k
  } else {
152
455k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
455k
    if (Z_REFCOUNTED_P(zv)) {
155
47.9k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
407k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
262k
      tmp |= MAY_BE_RCN;
158
262k
    }
159
455k
    return tmp;
160
455k
  }
161
464k
}
zend_optimizer.c:_const_op_type
Line
Count
Source
146
507k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
507k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
434
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
506k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
8.76k
    return zend_array_type_info(zv);
151
497k
  } else {
152
497k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
497k
    if (Z_REFCOUNTED_P(zv)) {
155
42.4k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
455k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
316k
      tmp |= MAY_BE_RCN;
158
316k
    }
159
497k
    return tmp;
160
497k
  }
161
507k
}
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.29M
{
165
4.29M
  if (ssa->var_info && ssa_var_num >= 0) {
166
3.21M
    return ssa->var_info[ssa_var_num].type;
167
3.21M
  } else {
168
1.08M
    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.08M
  }
170
4.29M
}
Unexecuted instantiation: zend_jit.c:get_ssa_var_info
dce.c:get_ssa_var_info
Line
Count
Source
164
8.48k
{
165
8.48k
  if (ssa->var_info && ssa_var_num >= 0) {
166
8.48k
    return ssa->var_info[ssa_var_num].type;
167
8.48k
  } 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
8.48k
}
dfa_pass.c:get_ssa_var_info
Line
Count
Source
164
41.0k
{
165
41.0k
  if (ssa->var_info && ssa_var_num >= 0) {
166
41.0k
    return ssa->var_info[ssa_var_num].type;
167
41.0k
  } 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
41.0k
}
escape_analysis.c:get_ssa_var_info
Line
Count
Source
164
10.8k
{
165
10.8k
  if (ssa->var_info && ssa_var_num >= 0) {
166
10.8k
    return ssa->var_info[ssa_var_num].type;
167
10.8k
  } 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.8k
}
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
77
{
165
77
  if (ssa->var_info && ssa_var_num >= 0) {
166
77
    return ssa->var_info[ssa_var_num].type;
167
77
  } 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
77
}
zend_inference.c:get_ssa_var_info
Line
Count
Source
164
1.92M
{
165
1.92M
  if (ssa->var_info && ssa_var_num >= 0) {
166
1.36M
    return ssa->var_info[ssa_var_num].type;
167
1.36M
  } else {
168
558k
    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
558k
  }
170
1.92M
}
zend_optimizer.c:get_ssa_var_info
Line
Count
Source
164
2.31M
{
165
2.31M
  if (ssa->var_info && ssa_var_num >= 0) {
166
1.79M
    return ssa->var_info[ssa_var_num].type;
167
1.79M
  } else {
168
522k
    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
522k
  }
170
2.31M
}
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.23M
  {                                   \
175
4.23M
    if (opline->opN##_type == IS_CONST) {             \
176
975k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
3.25M
    } else { \
178
3.25M
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
3.25M
    } \
180
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_op1_info
Line
Count
Source
174
3.19k
  {                                   \
175
3.19k
    if (opline->opN##_type == IS_CONST) {             \
176
66
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
3.13k
    } else { \
178
3.13k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
3.13k
    } \
180
3.19k
  } \
dce.c:_ssa_op2_info
Line
Count
Source
174
5.35k
  {                                   \
175
5.35k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
5.35k
    } else { \
178
5.35k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
5.35k
    } \
180
5.35k
  } \
Unexecuted instantiation: dce.c:_ssa_result_info
dfa_pass.c:_ssa_op2_info
Line
Count
Source
174
11.7k
  {                                   \
175
11.7k
    if (opline->opN##_type == IS_CONST) {             \
176
2.11k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
9.66k
    } else { \
178
9.66k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
9.66k
    } \
180
11.7k
  } \
dfa_pass.c:_ssa_op1_info
Line
Count
Source
174
32.9k
  {                                   \
175
32.9k
    if (opline->opN##_type == IS_CONST) {             \
176
1.50k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
31.4k
    } else { \
178
31.4k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
31.4k
    } \
180
32.9k
  } \
Unexecuted instantiation: dfa_pass.c:_ssa_result_info
escape_analysis.c:_ssa_op1_info
Line
Count
Source
174
9.92k
  {                                   \
175
9.92k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
9.92k
    } else { \
178
9.92k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
9.92k
    } \
180
9.92k
  } \
escape_analysis.c:_ssa_op2_info
Line
Count
Source
174
952
  {                                   \
175
952
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
952
    } else { \
178
952
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
952
    } \
180
952
  } \
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
514
  {                                   \
175
514
    if (opline->opN##_type == IS_CONST) {             \
176
437
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
437
    } else { \
178
77
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
77
    } \
180
514
  } \
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
31.9k
  {                                   \
175
31.9k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
31.9k
    } else { \
178
31.9k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
31.9k
    } \
180
31.9k
  } \
zend_inference.c:_ssa_op1_info
Line
Count
Source
174
1.08M
  {                                   \
175
1.08M
    if (opline->opN##_type == IS_CONST) {             \
176
137k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
950k
    } else { \
178
950k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
950k
    } \
180
1.08M
  } \
zend_inference.c:_ssa_op2_info
Line
Count
Source
174
971k
  {                                   \
175
971k
    if (opline->opN##_type == IS_CONST) {             \
176
326k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
645k
    } else { \
178
645k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
645k
    } \
180
971k
  } \
zend_optimizer.c:_ssa_op1_info
Line
Count
Source
174
1.03M
  {                                   \
175
1.03M
    if (opline->opN##_type == IS_CONST) {             \
176
220k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
817k
    } else { \
178
817k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
817k
    } \
180
1.03M
  } \
zend_optimizer.c:_ssa_op2_info
Line
Count
Source
174
1.03M
  {                                   \
175
1.03M
    if (opline->opN##_type == IS_CONST) {             \
176
286k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
751k
    } else { \
178
751k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
751k
    } \
180
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
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
744k
  { \
185
744k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
744k
  } \
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.51k
  { \
185
7.51k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
7.51k
  } \
zend_optimizer.c:_ssa_result_def_info
Line
Count
Source
184
736k
  { \
185
736k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
736k
  } \
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.12M
#define OP1_INFO()           (_ssa_op1_info(op_array, ssa, opline, ssa_op))
197
2.02M
#define OP2_INFO()           (_ssa_op2_info(op_array, ssa, opline, ssa_op))
198
47.4k
#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
31.9k
#define RES_USE_INFO()       (_ssa_result_info(op_array, ssa, opline, ssa_op))
201
7.51k
#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
736k
#define RES_INFO()           (_ssa_result_def_info(op_array, ssa, opline, ssa_op))
206
207
10.2k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
10.2k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
9.27k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
10.2k
}
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.89k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
3.89k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
2.91k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
3.89k
}
Unexecuted instantiation: zend_optimizer.c:zend_add_will_overflow
zend_ssa.c:zend_add_will_overflow
Line
Count
Source
207
6.36k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
6.36k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
6.36k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
6.36k
}
211
11.4k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
11.4k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
10.7k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
11.4k
}
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
8.49k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
8.49k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
7.80k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
8.49k
}
Unexecuted instantiation: zend_optimizer.c:zend_sub_will_overflow
zend_ssa.c:zend_sub_will_overflow
Line
Count
Source
211
2.96k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
2.96k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
2.96k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
2.96k
}
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 */