Coverage Report

Created: 2026-02-09 07:07

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.07M
#define MAY_BE_GUARD                (1<<28) /* needs type guard */
34
35
#define MAY_HAVE_DTOR \
36
4.49k
  (MAY_BE_OBJECT|MAY_BE_RESOURCE \
37
4.49k
  |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
242k
  { \
42
242k
    if (opline->opN##_type == IS_CONST) { \
43
31.0k
      zval *zv = CRT_CONSTANT(opline->opN); \
44
31.0k
      return (Z_TYPE_P(zv) == IS_LONG); \
45
211k
    } else { \
46
211k
      return (opline->opN##_type != IS_UNUSED && \
47
211k
            ssa->var_info && \
48
211k
            ssa_op->opN##_use >= 0 && \
49
211k
          ssa->var_info[ssa_op->opN##_use].has_range); \
50
211k
    } \
51
242k
    return 0; \
52
242k
  } \
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
137k
  { \
42
137k
    if (opline->opN##_type == IS_CONST) { \
43
13.2k
      zval *zv = CRT_CONSTANT(opline->opN); \
44
13.2k
      return (Z_TYPE_P(zv) == IS_LONG); \
45
124k
    } else { \
46
124k
      return (opline->opN##_type != IS_UNUSED && \
47
124k
            ssa->var_info && \
48
124k
            ssa_op->opN##_use >= 0 && \
49
124k
          ssa->var_info[ssa_op->opN##_use].has_range); \
50
124k
    } \
51
137k
    return 0; \
52
137k
  } \
zend_inference.c:_ssa_op2_has_range
Line
Count
Source
41
104k
  { \
42
104k
    if (opline->opN##_type == IS_CONST) { \
43
17.8k
      zval *zv = CRT_CONSTANT(opline->opN); \
44
17.8k
      return (Z_TYPE_P(zv) == IS_LONG); \
45
86.4k
    } else { \
46
86.4k
      return (opline->opN##_type != IS_UNUSED && \
47
86.4k
            ssa->var_info && \
48
86.4k
            ssa_op->opN##_use >= 0 && \
49
86.4k
          ssa->var_info[ssa_op->opN##_use].has_range); \
50
86.4k
    } \
51
104k
    return 0; \
52
104k
  } \
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
176k
  { \
57
176k
    if (opline->opN##_type == IS_CONST) { \
58
15.6k
      zval *zv = CRT_CONSTANT(opline->opN); \
59
15.6k
      if (Z_TYPE_P(zv) == IS_LONG) { \
60
15.6k
        return Z_LVAL_P(zv); \
61
15.6k
      } \
62
160k
    } else if (opline->opN##_type != IS_UNUSED && \
63
160k
        ssa->var_info && \
64
160k
        ssa_op->opN##_use >= 0 && \
65
160k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
66
160k
      return ssa->var_info[ssa_op->opN##_use].range.min; \
67
160k
    } \
68
176k
    return ZEND_LONG_MIN; \
69
176k
  } \
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
176k
  { \
74
176k
    if (opline->opN##_type == IS_CONST) { \
75
15.5k
      zval *zv = CRT_CONSTANT(opline->opN); \
76
15.5k
      if (Z_TYPE_P(zv) == IS_LONG) { \
77
15.5k
        return Z_LVAL_P(zv); \
78
15.5k
      } \
79
160k
    } else if (opline->opN##_type != IS_UNUSED && \
80
160k
        ssa->var_info && \
81
160k
        ssa_op->opN##_use >= 0 && \
82
160k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
83
160k
      return ssa->var_info[ssa_op->opN##_use].range.max; \
84
160k
    } \
85
176k
    return ZEND_LONG_MAX; \
86
176k
  } \
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
164k
  { \
91
164k
    if (opline->opN##_type == IS_CONST) { \
92
12.0k
      zval *zv = CRT_CONSTANT(opline->opN); \
93
12.0k
      if (Z_TYPE_P(zv) == IS_LONG) { \
94
12.0k
        return 0; \
95
12.0k
      } \
96
152k
    } else if (opline->opN##_type != IS_UNUSED && \
97
152k
        ssa->var_info && \
98
152k
        ssa_op->opN##_use >= 0 && \
99
152k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
100
152k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
101
152k
    } \
102
164k
    return 1; \
103
164k
  } \
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
107k
  { \
91
107k
    if (opline->opN##_type == IS_CONST) { \
92
3.87k
      zval *zv = CRT_CONSTANT(opline->opN); \
93
3.87k
      if (Z_TYPE_P(zv) == IS_LONG) { \
94
3.87k
        return 0; \
95
3.87k
      } \
96
103k
    } else if (opline->opN##_type != IS_UNUSED && \
97
103k
        ssa->var_info && \
98
103k
        ssa_op->opN##_use >= 0 && \
99
103k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
100
103k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
101
103k
    } \
102
107k
    return 1; \
103
107k
  } \
zend_inference.c:_ssa_op2_range_underflow
Line
Count
Source
90
56.8k
  { \
91
56.8k
    if (opline->opN##_type == IS_CONST) { \
92
8.13k
      zval *zv = CRT_CONSTANT(opline->opN); \
93
8.13k
      if (Z_TYPE_P(zv) == IS_LONG) { \
94
8.13k
        return 0; \
95
8.13k
      } \
96
48.7k
    } else if (opline->opN##_type != IS_UNUSED && \
97
48.7k
        ssa->var_info && \
98
48.7k
        ssa_op->opN##_use >= 0 && \
99
48.7k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
100
48.7k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
101
48.7k
    } \
102
56.8k
    return 1; \
103
56.8k
  } \
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
142k
  { \
108
142k
    if (opline->opN##_type == IS_CONST) { \
109
11.6k
      zval *zv = CRT_CONSTANT(opline->opN); \
110
11.6k
      if (Z_TYPE_P(zv) == IS_LONG) { \
111
11.6k
        return 0; \
112
11.6k
      } \
113
131k
    } else if (opline->opN##_type != IS_UNUSED && \
114
131k
        ssa->var_info && \
115
131k
        ssa_op->opN##_use >= 0 && \
116
131k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
117
131k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
118
131k
    } \
119
142k
    return 1; \
120
142k
  } \
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
87.9k
  { \
108
87.9k
    if (opline->opN##_type == IS_CONST) { \
109
3.57k
      zval *zv = CRT_CONSTANT(opline->opN); \
110
3.57k
      if (Z_TYPE_P(zv) == IS_LONG) { \
111
3.57k
        return 0; \
112
3.57k
      } \
113
84.3k
    } else if (opline->opN##_type != IS_UNUSED && \
114
84.3k
        ssa->var_info && \
115
84.3k
        ssa_op->opN##_use >= 0 && \
116
84.3k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
117
84.3k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
118
84.3k
    } \
119
87.9k
    return 1; \
120
87.9k
  } \
zend_inference.c:_ssa_op2_range_overflow
Line
Count
Source
107
54.8k
  { \
108
54.8k
    if (opline->opN##_type == IS_CONST) { \
109
8.07k
      zval *zv = CRT_CONSTANT(opline->opN); \
110
8.07k
      if (Z_TYPE_P(zv) == IS_LONG) { \
111
8.07k
        return 0; \
112
8.07k
      } \
113
46.8k
    } else if (opline->opN##_type != IS_UNUSED && \
114
46.8k
        ssa->var_info && \
115
46.8k
        ssa_op->opN##_use >= 0 && \
116
46.8k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
117
46.8k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
118
46.8k
    } \
119
54.8k
    return 1; \
120
54.8k
  } \
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
96.4k
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
96.4k
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
79.7k
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
79.6k
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
204k
#define OP1_HAS_RANGE()       (_ssa_op1_has_range (op_array, ssa, opline, ssa_op))
134
96.4k
#define OP1_MIN_RANGE()       (_ssa_op1_min_range (op_array, ssa, opline, ssa_op))
135
96.4k
#define OP1_MAX_RANGE()       (_ssa_op1_max_range (op_array, ssa, opline, ssa_op))
136
171k
#define OP1_RANGE_UNDERFLOW() (_ssa_op1_range_underflow (op_array, ssa, opline, ssa_op))
137
132k
#define OP1_RANGE_OVERFLOW()  (_ssa_op1_range_overflow (op_array, ssa, opline, ssa_op))
138
104k
#define OP2_HAS_RANGE()       (_ssa_op2_has_range (op_array, ssa, opline, ssa_op))
139
79.7k
#define OP2_MIN_RANGE()       (_ssa_op2_min_range (op_array, ssa, opline, ssa_op))
140
79.6k
#define OP2_MAX_RANGE()       (_ssa_op2_max_range (op_array, ssa, opline, ssa_op))
141
101k
#define OP2_RANGE_UNDERFLOW() (_ssa_op2_range_underflow (op_array, ssa, opline, ssa_op))
142
88.0k
#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
927k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
927k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
1.09k
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
926k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
13.2k
    return zend_array_type_info(zv);
153
913k
  } else {
154
913k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
913k
    if (Z_REFCOUNTED_P(zv)) {
157
97.6k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
815k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
569k
      tmp |= MAY_BE_RCN;
160
569k
    }
161
913k
    return tmp;
162
913k
  }
163
927k
}
Unexecuted instantiation: zend_jit.c:_const_op_type
dce.c:_const_op_type
Line
Count
Source
148
54
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
54
  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
54
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
54
    return zend_array_type_info(zv);
153
54
  } else {
154
0
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
0
    if (Z_REFCOUNTED_P(zv)) {
157
0
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
0
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
0
      tmp |= MAY_BE_RCN;
160
0
    }
161
0
    return tmp;
162
0
  }
163
54
}
dfa_pass.c:_const_op_type
Line
Count
Source
148
3.17k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
3.17k
  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
3.17k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
0
    return zend_array_type_info(zv);
153
3.17k
  } else {
154
3.17k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
3.17k
    if (Z_REFCOUNTED_P(zv)) {
157
591
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
2.58k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
2.58k
      tmp |= MAY_BE_RCN;
160
2.58k
    }
161
3.17k
    return tmp;
162
3.17k
  }
163
3.17k
}
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
363
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
363
  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
363
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
0
    return zend_array_type_info(zv);
153
363
  } else {
154
363
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
363
    if (Z_REFCOUNTED_P(zv)) {
157
0
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
363
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
20
      tmp |= MAY_BE_RCN;
160
20
    }
161
363
    return tmp;
162
363
  }
163
363
}
zend_inference.c:_const_op_type
Line
Count
Source
148
440k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
440k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
672
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
440k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
6.18k
    return zend_array_type_info(zv);
153
434k
  } else {
154
434k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
434k
    if (Z_REFCOUNTED_P(zv)) {
157
50.9k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
383k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
258k
      tmp |= MAY_BE_RCN;
160
258k
    }
161
434k
    return tmp;
162
434k
  }
163
440k
}
zend_optimizer.c:_const_op_type
Line
Count
Source
148
483k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
483k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
418
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
482k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
6.96k
    return zend_array_type_info(zv);
153
475k
  } else {
154
475k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
475k
    if (Z_REFCOUNTED_P(zv)) {
157
46.1k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
429k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
308k
      tmp |= MAY_BE_RCN;
160
308k
    }
161
475k
    return tmp;
162
475k
  }
163
483k
}
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.03M
{
167
4.03M
  if (ssa->var_info && ssa_var_num >= 0) {
168
3.06M
    return ssa->var_info[ssa_var_num].type;
169
3.06M
  } else {
170
973k
    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
973k
  }
172
4.03M
}
Unexecuted instantiation: zend_jit.c:get_ssa_var_info
dce.c:get_ssa_var_info
Line
Count
Source
166
6.40k
{
167
6.40k
  if (ssa->var_info && ssa_var_num >= 0) {
168
6.40k
    return ssa->var_info[ssa_var_num].type;
169
6.40k
  } 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
6.40k
}
dfa_pass.c:get_ssa_var_info
Line
Count
Source
166
32.6k
{
167
32.6k
  if (ssa->var_info && ssa_var_num >= 0) {
168
32.6k
    return ssa->var_info[ssa_var_num].type;
169
32.6k
  } 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
32.6k
}
escape_analysis.c:get_ssa_var_info
Line
Count
Source
166
8.57k
{
167
8.57k
  if (ssa->var_info && ssa_var_num >= 0) {
168
8.57k
    return ssa->var_info[ssa_var_num].type;
169
8.57k
  } 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.57k
}
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
47
{
167
47
  if (ssa->var_info && ssa_var_num >= 0) {
168
47
    return ssa->var_info[ssa_var_num].type;
169
47
  } 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
47
}
zend_inference.c:get_ssa_var_info
Line
Count
Source
166
1.79M
{
167
1.79M
  if (ssa->var_info && ssa_var_num >= 0) {
168
1.28M
    return ssa->var_info[ssa_var_num].type;
169
1.28M
  } else {
170
502k
    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
502k
  }
172
1.79M
}
zend_optimizer.c:get_ssa_var_info
Line
Count
Source
166
2.19M
{
167
2.19M
  if (ssa->var_info && ssa_var_num >= 0) {
168
1.72M
    return ssa->var_info[ssa_var_num].type;
169
1.72M
  } else {
170
471k
    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
471k
  }
172
2.19M
}
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
3.94M
  {                                   \
177
3.94M
    if (opline->opN##_type == IS_CONST) {             \
178
927k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
3.02M
    } else { \
180
3.02M
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
3.02M
    } \
182
3.94M
  } \
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
176
2.29k
  {                                   \
177
2.29k
    if (opline->opN##_type == IS_CONST) {             \
178
54
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
2.23k
    } else { \
180
2.23k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
2.23k
    } \
182
2.29k
  } \
dce.c:_ssa_op2_info
Line
Count
Source
176
4.16k
  {                                   \
177
4.16k
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
4.16k
    } else { \
180
4.16k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
4.16k
    } \
182
4.16k
  } \
Unexecuted instantiation: dce.c:_ssa_result_info
dfa_pass.c:_ssa_op2_info
Line
Count
Source
176
9.57k
  {                                   \
177
9.57k
    if (opline->opN##_type == IS_CONST) {             \
178
1.72k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
7.84k
    } else { \
180
7.84k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
7.84k
    } \
182
9.57k
  } \
dfa_pass.c:_ssa_op1_info
Line
Count
Source
176
26.2k
  {                                   \
177
26.2k
    if (opline->opN##_type == IS_CONST) {             \
178
1.44k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
24.7k
    } else { \
180
24.7k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
24.7k
    } \
182
26.2k
  } \
Unexecuted instantiation: dfa_pass.c:_ssa_result_info
escape_analysis.c:_ssa_op1_info
Line
Count
Source
176
7.92k
  {                                   \
177
7.92k
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
7.92k
    } else { \
180
7.92k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
7.92k
    } \
182
7.92k
  } \
escape_analysis.c:_ssa_op2_info
Line
Count
Source
176
657
  {                                   \
177
657
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
657
    } else { \
180
657
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
657
    } \
182
657
  } \
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
410
  {                                   \
177
410
    if (opline->opN##_type == IS_CONST) {             \
178
363
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
363
    } else { \
180
47
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
47
    } \
182
410
  } \
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
32.1k
  {                                   \
177
32.1k
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
32.1k
    } else { \
180
32.1k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
32.1k
    } \
182
32.1k
  } \
zend_inference.c:_ssa_op1_info
Line
Count
Source
176
1.00M
  {                                   \
177
1.00M
    if (opline->opN##_type == IS_CONST) {             \
178
125k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
875k
    } else { \
180
875k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
875k
    } \
182
1.00M
  } \
zend_inference.c:_ssa_op2_info
Line
Count
Source
176
907k
  {                                   \
177
907k
    if (opline->opN##_type == IS_CONST) {             \
178
315k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
591k
    } else { \
180
591k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
591k
    } \
182
907k
  } \
zend_optimizer.c:_ssa_op1_info
Line
Count
Source
176
978k
  {                                   \
177
978k
    if (opline->opN##_type == IS_CONST) {             \
178
199k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
778k
    } else { \
180
778k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
778k
    } \
182
978k
  } \
zend_optimizer.c:_ssa_op2_info
Line
Count
Source
176
978k
  {                                   \
177
978k
    if (opline->opN##_type == IS_CONST) {             \
178
283k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
694k
    } else { \
180
694k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
694k
    } \
182
978k
  } \
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
722k
  { \
187
722k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
188
722k
  } \
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.93k
  { \
187
5.93k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
188
5.93k
  } \
zend_optimizer.c:_ssa_result_def_info
Line
Count
Source
186
716k
  { \
187
716k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
188
716k
  } \
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
1.98M
#define OP1_INFO()           (_ssa_op1_info(op_array, ssa, opline, ssa_op))
199
1.89M
#define OP2_INFO()           (_ssa_op2_info(op_array, ssa, opline, ssa_op))
200
30.1k
#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
32.1k
#define RES_USE_INFO()       (_ssa_result_info(op_array, ssa, opline, ssa_op))
203
5.93k
#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
716k
#define RES_INFO()           (_ssa_result_def_info(op_array, ssa, opline, ssa_op))
208
209
8.51k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
210
8.51k
  return (b > 0 && a > ZEND_LONG_MAX - b)
211
7.87k
    || (b < 0 && a < ZEND_LONG_MIN - b);
212
8.51k
}
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.91k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
210
2.91k
  return (b > 0 && a > ZEND_LONG_MAX - b)
211
2.26k
    || (b < 0 && a < ZEND_LONG_MIN - b);
212
2.91k
}
Unexecuted instantiation: zend_optimizer.c:zend_add_will_overflow
zend_ssa.c:zend_add_will_overflow
Line
Count
Source
209
5.60k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
210
5.60k
  return (b > 0 && a > ZEND_LONG_MAX - b)
211
5.60k
    || (b < 0 && a < ZEND_LONG_MIN - b);
212
5.60k
}
213
8.47k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
214
8.47k
  return (b > 0 && a < ZEND_LONG_MIN + b)
215
8.01k
    || (b < 0 && a > ZEND_LONG_MAX + b);
216
8.47k
}
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
6.26k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
214
6.26k
  return (b > 0 && a < ZEND_LONG_MIN + b)
215
5.79k
    || (b < 0 && a > ZEND_LONG_MAX + b);
216
6.26k
}
Unexecuted instantiation: zend_optimizer.c:zend_sub_will_overflow
zend_ssa.c:zend_sub_will_overflow
Line
Count
Source
213
2.21k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
214
2.21k
  return (b > 0 && a < ZEND_LONG_MIN + b)
215
2.21k
    || (b < 0 && a > ZEND_LONG_MAX + b);
216
2.21k
}
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 */