Coverage Report

Created: 2026-02-14 06:52

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
970k
#define MAY_BE_GUARD                (1<<28) /* needs type guard */
34
35
#define MAY_HAVE_DTOR \
36
4.21k
  (MAY_BE_OBJECT|MAY_BE_RESOURCE \
37
4.21k
  |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
222k
  { \
42
222k
    if (opline->opN##_type == IS_CONST) { \
43
28.0k
      zval *zv = CRT_CONSTANT(opline->opN); \
44
28.0k
      return (Z_TYPE_P(zv) == IS_LONG); \
45
194k
    } else { \
46
194k
      return (opline->opN##_type != IS_UNUSED && \
47
194k
            ssa->var_info && \
48
194k
            ssa_op->opN##_use >= 0 && \
49
194k
          ssa->var_info[ssa_op->opN##_use].has_range); \
50
194k
    } \
51
222k
    return 0; \
52
222k
  } \
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
128k
  { \
42
128k
    if (opline->opN##_type == IS_CONST) { \
43
12.1k
      zval *zv = CRT_CONSTANT(opline->opN); \
44
12.1k
      return (Z_TYPE_P(zv) == IS_LONG); \
45
116k
    } else { \
46
116k
      return (opline->opN##_type != IS_UNUSED && \
47
116k
            ssa->var_info && \
48
116k
            ssa_op->opN##_use >= 0 && \
49
116k
          ssa->var_info[ssa_op->opN##_use].has_range); \
50
116k
    } \
51
128k
    return 0; \
52
128k
  } \
zend_inference.c:_ssa_op2_has_range
Line
Count
Source
41
94.6k
  { \
42
94.6k
    if (opline->opN##_type == IS_CONST) { \
43
15.9k
      zval *zv = CRT_CONSTANT(opline->opN); \
44
15.9k
      return (Z_TYPE_P(zv) == IS_LONG); \
45
78.7k
    } else { \
46
78.7k
      return (opline->opN##_type != IS_UNUSED && \
47
78.7k
            ssa->var_info && \
48
78.7k
            ssa_op->opN##_use >= 0 && \
49
78.7k
          ssa->var_info[ssa_op->opN##_use].has_range); \
50
78.7k
    } \
51
94.6k
    return 0; \
52
94.6k
  } \
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
162k
  { \
57
162k
    if (opline->opN##_type == IS_CONST) { \
58
14.0k
      zval *zv = CRT_CONSTANT(opline->opN); \
59
14.0k
      if (Z_TYPE_P(zv) == IS_LONG) { \
60
14.0k
        return Z_LVAL_P(zv); \
61
14.0k
      } \
62
148k
    } else if (opline->opN##_type != IS_UNUSED && \
63
148k
        ssa->var_info && \
64
148k
        ssa_op->opN##_use >= 0 && \
65
148k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
66
148k
      return ssa->var_info[ssa_op->opN##_use].range.min; \
67
148k
    } \
68
162k
    return ZEND_LONG_MIN; \
69
162k
  } \
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
162k
  { \
74
162k
    if (opline->opN##_type == IS_CONST) { \
75
13.9k
      zval *zv = CRT_CONSTANT(opline->opN); \
76
13.9k
      if (Z_TYPE_P(zv) == IS_LONG) { \
77
13.9k
        return Z_LVAL_P(zv); \
78
13.9k
      } \
79
148k
    } else if (opline->opN##_type != IS_UNUSED && \
80
148k
        ssa->var_info && \
81
148k
        ssa_op->opN##_use >= 0 && \
82
148k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
83
148k
      return ssa->var_info[ssa_op->opN##_use].range.max; \
84
148k
    } \
85
162k
    return ZEND_LONG_MAX; \
86
162k
  } \
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
151k
  { \
91
151k
    if (opline->opN##_type == IS_CONST) { \
92
10.8k
      zval *zv = CRT_CONSTANT(opline->opN); \
93
10.8k
      if (Z_TYPE_P(zv) == IS_LONG) { \
94
10.8k
        return 0; \
95
10.8k
      } \
96
140k
    } else if (opline->opN##_type != IS_UNUSED && \
97
140k
        ssa->var_info && \
98
140k
        ssa_op->opN##_use >= 0 && \
99
140k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
100
140k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
101
140k
    } \
102
151k
    return 1; \
103
151k
  } \
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
100k
  { \
91
100k
    if (opline->opN##_type == IS_CONST) { \
92
3.52k
      zval *zv = CRT_CONSTANT(opline->opN); \
93
3.52k
      if (Z_TYPE_P(zv) == IS_LONG) { \
94
3.52k
        return 0; \
95
3.52k
      } \
96
96.6k
    } else if (opline->opN##_type != IS_UNUSED && \
97
96.6k
        ssa->var_info && \
98
96.6k
        ssa_op->opN##_use >= 0 && \
99
96.6k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
100
96.6k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
101
96.6k
    } \
102
100k
    return 1; \
103
100k
  } \
zend_inference.c:_ssa_op2_range_underflow
Line
Count
Source
90
50.9k
  { \
91
50.9k
    if (opline->opN##_type == IS_CONST) { \
92
7.28k
      zval *zv = CRT_CONSTANT(opline->opN); \
93
7.28k
      if (Z_TYPE_P(zv) == IS_LONG) { \
94
7.28k
        return 0; \
95
7.28k
      } \
96
43.6k
    } else if (opline->opN##_type != IS_UNUSED && \
97
43.6k
        ssa->var_info && \
98
43.6k
        ssa_op->opN##_use >= 0 && \
99
43.6k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
100
43.6k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
101
43.6k
    } \
102
50.9k
    return 1; \
103
50.9k
  } \
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
131k
  { \
108
131k
    if (opline->opN##_type == IS_CONST) { \
109
10.4k
      zval *zv = CRT_CONSTANT(opline->opN); \
110
10.4k
      if (Z_TYPE_P(zv) == IS_LONG) { \
111
10.4k
        return 0; \
112
10.4k
      } \
113
120k
    } else if (opline->opN##_type != IS_UNUSED && \
114
120k
        ssa->var_info && \
115
120k
        ssa_op->opN##_use >= 0 && \
116
120k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
117
120k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
118
120k
    } \
119
131k
    return 1; \
120
131k
  } \
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
82.3k
  { \
108
82.3k
    if (opline->opN##_type == IS_CONST) { \
109
3.25k
      zval *zv = CRT_CONSTANT(opline->opN); \
110
3.25k
      if (Z_TYPE_P(zv) == IS_LONG) { \
111
3.25k
        return 0; \
112
3.25k
      } \
113
79.1k
    } else if (opline->opN##_type != IS_UNUSED && \
114
79.1k
        ssa->var_info && \
115
79.1k
        ssa_op->opN##_use >= 0 && \
116
79.1k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
117
79.1k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
118
79.1k
    } \
119
82.3k
    return 1; \
120
82.3k
  } \
zend_inference.c:_ssa_op2_range_overflow
Line
Count
Source
107
48.8k
  { \
108
48.8k
    if (opline->opN##_type == IS_CONST) { \
109
7.24k
      zval *zv = CRT_CONSTANT(opline->opN); \
110
7.24k
      if (Z_TYPE_P(zv) == IS_LONG) { \
111
7.24k
        return 0; \
112
7.24k
      } \
113
41.6k
    } else if (opline->opN##_type != IS_UNUSED && \
114
41.6k
        ssa->var_info && \
115
41.6k
        ssa_op->opN##_use >= 0 && \
116
41.6k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
117
41.6k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
118
41.6k
    } \
119
48.8k
    return 1; \
120
48.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
90.1k
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
90.1k
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
72.1k
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
72.0k
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
189k
#define OP1_HAS_RANGE()       (_ssa_op1_has_range (op_array, ssa, opline, ssa_op))
134
90.1k
#define OP1_MIN_RANGE()       (_ssa_op1_min_range (op_array, ssa, opline, ssa_op))
135
90.1k
#define OP1_MAX_RANGE()       (_ssa_op1_max_range (op_array, ssa, opline, ssa_op))
136
161k
#define OP1_RANGE_UNDERFLOW() (_ssa_op1_range_underflow (op_array, ssa, opline, ssa_op))
137
123k
#define OP1_RANGE_OVERFLOW()  (_ssa_op1_range_overflow (op_array, ssa, opline, ssa_op))
138
95.1k
#define OP2_HAS_RANGE()       (_ssa_op2_has_range (op_array, ssa, opline, ssa_op))
139
72.1k
#define OP2_MIN_RANGE()       (_ssa_op2_min_range (op_array, ssa, opline, ssa_op))
140
72.0k
#define OP2_MAX_RANGE()       (_ssa_op2_max_range (op_array, ssa, opline, ssa_op))
141
91.9k
#define OP2_RANGE_UNDERFLOW() (_ssa_op2_range_underflow (op_array, ssa, opline, ssa_op))
142
79.5k
#define OP2_RANGE_OVERFLOW()  (_ssa_op2_range_overflow (op_array, ssa, opline, ssa_op))
143
144
BEGIN_EXTERN_C()
145
ZEND_API uint32_t ZEND_FASTCALL zend_array_type_info(const zval *zv);
146
END_EXTERN_C()
147
148
831k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
831k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
1.08k
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
830k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
12.4k
    return zend_array_type_info(zv);
153
818k
  } else {
154
818k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
818k
    if (Z_REFCOUNTED_P(zv)) {
157
82.7k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
735k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
510k
      tmp |= MAY_BE_RCN;
160
510k
    }
161
818k
    return tmp;
162
818k
  }
163
831k
}
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
2.89k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
2.89k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
0
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
2.89k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
0
    return zend_array_type_info(zv);
153
2.89k
  } else {
154
2.89k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
2.89k
    if (Z_REFCOUNTED_P(zv)) {
157
500
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
2.39k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
2.39k
      tmp |= MAY_BE_RCN;
160
2.39k
    }
161
2.89k
    return tmp;
162
2.89k
  }
163
2.89k
}
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
351
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
351
  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
351
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
0
    return zend_array_type_info(zv);
153
351
  } else {
154
351
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
351
    if (Z_REFCOUNTED_P(zv)) {
157
0
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
351
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
20
      tmp |= MAY_BE_RCN;
160
20
    }
161
351
    return tmp;
162
351
  }
163
351
}
zend_inference.c:_const_op_type
Line
Count
Source
148
394k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
394k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
678
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
393k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
5.82k
    return zend_array_type_info(zv);
153
388k
  } else {
154
388k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
388k
    if (Z_REFCOUNTED_P(zv)) {
157
43.6k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
344k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
230k
      tmp |= MAY_BE_RCN;
160
230k
    }
161
388k
    return tmp;
162
388k
  }
163
394k
}
zend_optimizer.c:_const_op_type
Line
Count
Source
148
433k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
433k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
404
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
433k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
6.59k
    return zend_array_type_info(zv);
153
426k
  } else {
154
426k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
426k
    if (Z_REFCOUNTED_P(zv)) {
157
38.5k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
388k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
277k
      tmp |= MAY_BE_RCN;
160
277k
    }
161
426k
    return tmp;
162
426k
  }
163
433k
}
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
3.67M
{
167
3.67M
  if (ssa->var_info && ssa_var_num >= 0) {
168
2.75M
    return ssa->var_info[ssa_var_num].type;
169
2.75M
  } else {
170
918k
    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
918k
  }
172
3.67M
}
Unexecuted instantiation: zend_jit.c:get_ssa_var_info
dce.c:get_ssa_var_info
Line
Count
Source
166
6.03k
{
167
6.03k
  if (ssa->var_info && ssa_var_num >= 0) {
168
6.03k
    return ssa->var_info[ssa_var_num].type;
169
6.03k
  } 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.03k
}
dfa_pass.c:get_ssa_var_info
Line
Count
Source
166
29.8k
{
167
29.8k
  if (ssa->var_info && ssa_var_num >= 0) {
168
29.8k
    return ssa->var_info[ssa_var_num].type;
169
29.8k
  } 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
29.8k
}
escape_analysis.c:get_ssa_var_info
Line
Count
Source
166
8.07k
{
167
8.07k
  if (ssa->var_info && ssa_var_num >= 0) {
168
8.07k
    return ssa->var_info[ssa_var_num].type;
169
8.07k
  } 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.07k
}
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
41
{
167
41
  if (ssa->var_info && ssa_var_num >= 0) {
168
41
    return ssa->var_info[ssa_var_num].type;
169
41
  } 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
41
}
zend_inference.c:get_ssa_var_info
Line
Count
Source
166
1.63M
{
167
1.63M
  if (ssa->var_info && ssa_var_num >= 0) {
168
1.15M
    return ssa->var_info[ssa_var_num].type;
169
1.15M
  } else {
170
476k
    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
476k
  }
172
1.63M
}
zend_optimizer.c:get_ssa_var_info
Line
Count
Source
166
1.99M
{
167
1.99M
  if (ssa->var_info && ssa_var_num >= 0) {
168
1.55M
    return ssa->var_info[ssa_var_num].type;
169
1.55M
  } else {
170
441k
    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
441k
  }
172
1.99M
}
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.58M
  {                                   \
177
3.58M
    if (opline->opN##_type == IS_CONST) {             \
178
831k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
2.75M
    } else { \
180
2.75M
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
2.75M
    } \
182
3.58M
  } \
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.18k
  {                                   \
177
2.18k
    if (opline->opN##_type == IS_CONST) {             \
178
54
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
2.13k
    } else { \
180
2.13k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
2.13k
    } \
182
2.18k
  } \
dce.c:_ssa_op2_info
Line
Count
Source
176
3.90k
  {                                   \
177
3.90k
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
3.90k
    } else { \
180
3.90k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
3.90k
    } \
182
3.90k
  } \
Unexecuted instantiation: dce.c:_ssa_result_info
dfa_pass.c:_ssa_op2_info
Line
Count
Source
176
8.91k
  {                                   \
177
8.91k
    if (opline->opN##_type == IS_CONST) {             \
178
1.59k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
7.31k
    } else { \
180
7.31k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
7.31k
    } \
182
8.91k
  } \
dfa_pass.c:_ssa_op1_info
Line
Count
Source
176
23.8k
  {                                   \
177
23.8k
    if (opline->opN##_type == IS_CONST) {             \
178
1.30k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
22.5k
    } else { \
180
22.5k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
22.5k
    } \
182
23.8k
  } \
Unexecuted instantiation: dfa_pass.c:_ssa_result_info
escape_analysis.c:_ssa_op1_info
Line
Count
Source
176
7.44k
  {                                   \
177
7.44k
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
7.44k
    } else { \
180
7.44k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
7.44k
    } \
182
7.44k
  } \
escape_analysis.c:_ssa_op2_info
Line
Count
Source
176
629
  {                                   \
177
629
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
629
    } else { \
180
629
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
629
    } \
182
629
  } \
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
392
  {                                   \
177
392
    if (opline->opN##_type == IS_CONST) {             \
178
351
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
351
    } else { \
180
41
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
41
    } \
182
392
  } \
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
28.5k
  {                                   \
177
28.5k
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
28.5k
    } else { \
180
28.5k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
28.5k
    } \
182
28.5k
  } \
zend_inference.c:_ssa_op1_info
Line
Count
Source
176
910k
  {                                   \
177
910k
    if (opline->opN##_type == IS_CONST) {             \
178
114k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
795k
    } else { \
180
795k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
795k
    } \
182
910k
  } \
zend_inference.c:_ssa_op2_info
Line
Count
Source
176
823k
  {                                   \
177
823k
    if (opline->opN##_type == IS_CONST) {             \
178
279k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
543k
    } else { \
180
543k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
543k
    } \
182
823k
  } \
zend_optimizer.c:_ssa_op1_info
Line
Count
Source
176
889k
  {                                   \
177
889k
    if (opline->opN##_type == IS_CONST) {             \
178
183k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
705k
    } else { \
180
705k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
705k
    } \
182
889k
  } \
zend_optimizer.c:_ssa_op2_info
Line
Count
Source
176
889k
  {                                   \
177
889k
    if (opline->opN##_type == IS_CONST) {             \
178
250k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
639k
    } else { \
180
639k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
639k
    } \
182
889k
  } \
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
652k
  { \
187
652k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
188
652k
  } \
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.40k
  { \
187
5.40k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
188
5.40k
  } \
zend_optimizer.c:_ssa_result_def_info
Line
Count
Source
186
647k
  { \
187
647k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
188
647k
  } \
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.80M
#define OP1_INFO()           (_ssa_op1_info(op_array, ssa, opline, ssa_op))
199
1.72M
#define OP2_INFO()           (_ssa_op2_info(op_array, ssa, opline, ssa_op))
200
28.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
28.5k
#define RES_USE_INFO()       (_ssa_result_info(op_array, ssa, opline, ssa_op))
203
5.40k
#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
647k
#define RES_INFO()           (_ssa_result_def_info(op_array, ssa, opline, ssa_op))
208
209
7.64k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
210
7.64k
  return (b > 0 && a > ZEND_LONG_MAX - b)
211
7.12k
    || (b < 0 && a < ZEND_LONG_MIN - b);
212
7.64k
}
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.36k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
210
2.36k
  return (b > 0 && a > ZEND_LONG_MAX - b)
211
1.83k
    || (b < 0 && a < ZEND_LONG_MIN - b);
212
2.36k
}
Unexecuted instantiation: zend_optimizer.c:zend_add_will_overflow
zend_ssa.c:zend_add_will_overflow
Line
Count
Source
209
5.28k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
210
5.28k
  return (b > 0 && a > ZEND_LONG_MAX - b)
211
5.28k
    || (b < 0 && a < ZEND_LONG_MIN - b);
212
5.28k
}
213
7.45k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
214
7.45k
  return (b > 0 && a < ZEND_LONG_MIN + b)
215
7.01k
    || (b < 0 && a > ZEND_LONG_MAX + b);
216
7.45k
}
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
5.39k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
214
5.39k
  return (b > 0 && a < ZEND_LONG_MIN + b)
215
4.95k
    || (b < 0 && a > ZEND_LONG_MAX + b);
216
5.39k
}
Unexecuted instantiation: zend_optimizer.c:zend_sub_will_overflow
zend_ssa.c:zend_sub_will_overflow
Line
Count
Source
213
2.05k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
214
2.05k
  return (b > 0 && a < ZEND_LONG_MIN + b)
215
2.05k
    || (b < 0 && a > ZEND_LONG_MAX + b);
216
2.05k
}
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 */