Coverage Report

Created: 2025-12-14 06:09

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
663k
#define MAY_BE_GUARD                (1<<28) /* needs type guard */
34
35
#define MAY_HAVE_DTOR \
36
2.53k
  (MAY_BE_OBJECT|MAY_BE_RESOURCE \
37
2.53k
  |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
154k
  { \
42
154k
    if (opline->opN##_type == IS_CONST) { \
43
18.3k
      zval *zv = CRT_CONSTANT(opline->opN); \
44
18.3k
      return (Z_TYPE_P(zv) == IS_LONG); \
45
136k
    } else { \
46
136k
      return (opline->opN##_type != IS_UNUSED && \
47
136k
            ssa->var_info && \
48
136k
            ssa_op->opN##_use >= 0 && \
49
136k
          ssa->var_info[ssa_op->opN##_use].has_range); \
50
136k
    } \
51
154k
    return 0; \
52
154k
  } \
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
91.7k
  { \
42
91.7k
    if (opline->opN##_type == IS_CONST) { \
43
8.74k
      zval *zv = CRT_CONSTANT(opline->opN); \
44
8.74k
      return (Z_TYPE_P(zv) == IS_LONG); \
45
82.9k
    } else { \
46
82.9k
      return (opline->opN##_type != IS_UNUSED && \
47
82.9k
            ssa->var_info && \
48
82.9k
            ssa_op->opN##_use >= 0 && \
49
82.9k
          ssa->var_info[ssa_op->opN##_use].has_range); \
50
82.9k
    } \
51
91.7k
    return 0; \
52
91.7k
  } \
zend_inference.c:_ssa_op2_has_range
Line
Count
Source
41
62.7k
  { \
42
62.7k
    if (opline->opN##_type == IS_CONST) { \
43
9.64k
      zval *zv = CRT_CONSTANT(opline->opN); \
44
9.64k
      return (Z_TYPE_P(zv) == IS_LONG); \
45
53.0k
    } else { \
46
53.0k
      return (opline->opN##_type != IS_UNUSED && \
47
53.0k
            ssa->var_info && \
48
53.0k
            ssa_op->opN##_use >= 0 && \
49
53.0k
          ssa->var_info[ssa_op->opN##_use].has_range); \
50
53.0k
    } \
51
62.7k
    return 0; \
52
62.7k
  } \
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
118k
  { \
57
118k
    if (opline->opN##_type == IS_CONST) { \
58
8.64k
      zval *zv = CRT_CONSTANT(opline->opN); \
59
8.64k
      if (Z_TYPE_P(zv) == IS_LONG) { \
60
8.64k
        return Z_LVAL_P(zv); \
61
8.64k
      } \
62
110k
    } else if (opline->opN##_type != IS_UNUSED && \
63
110k
        ssa->var_info && \
64
110k
        ssa_op->opN##_use >= 0 && \
65
110k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
66
110k
      return ssa->var_info[ssa_op->opN##_use].range.min; \
67
110k
    } \
68
118k
    return ZEND_LONG_MIN; \
69
118k
  } \
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
118k
  { \
74
118k
    if (opline->opN##_type == IS_CONST) { \
75
8.52k
      zval *zv = CRT_CONSTANT(opline->opN); \
76
8.52k
      if (Z_TYPE_P(zv) == IS_LONG) { \
77
8.52k
        return Z_LVAL_P(zv); \
78
8.52k
      } \
79
110k
    } else if (opline->opN##_type != IS_UNUSED && \
80
110k
        ssa->var_info && \
81
110k
        ssa_op->opN##_use >= 0 && \
82
110k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
83
110k
      return ssa->var_info[ssa_op->opN##_use].range.max; \
84
110k
    } \
85
118k
    return ZEND_LONG_MAX; \
86
118k
  } \
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
103k
  { \
91
103k
    if (opline->opN##_type == IS_CONST) { \
92
5.84k
      zval *zv = CRT_CONSTANT(opline->opN); \
93
5.84k
      if (Z_TYPE_P(zv) == IS_LONG) { \
94
5.84k
        return 0; \
95
5.84k
      } \
96
98.0k
    } else if (opline->opN##_type != IS_UNUSED && \
97
98.0k
        ssa->var_info && \
98
98.0k
        ssa_op->opN##_use >= 0 && \
99
98.0k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
100
98.0k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
101
98.0k
    } \
102
103k
    return 1; \
103
103k
  } \
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
74.1k
  { \
91
74.1k
    if (opline->opN##_type == IS_CONST) { \
92
2.46k
      zval *zv = CRT_CONSTANT(opline->opN); \
93
2.46k
      if (Z_TYPE_P(zv) == IS_LONG) { \
94
2.46k
        return 0; \
95
2.46k
      } \
96
71.6k
    } else if (opline->opN##_type != IS_UNUSED && \
97
71.6k
        ssa->var_info && \
98
71.6k
        ssa_op->opN##_use >= 0 && \
99
71.6k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
100
71.6k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
101
71.6k
    } \
102
74.1k
    return 1; \
103
74.1k
  } \
zend_inference.c:_ssa_op2_range_underflow
Line
Count
Source
90
29.8k
  { \
91
29.8k
    if (opline->opN##_type == IS_CONST) { \
92
3.38k
      zval *zv = CRT_CONSTANT(opline->opN); \
93
3.38k
      if (Z_TYPE_P(zv) == IS_LONG) { \
94
3.38k
        return 0; \
95
3.38k
      } \
96
26.4k
    } else if (opline->opN##_type != IS_UNUSED && \
97
26.4k
        ssa->var_info && \
98
26.4k
        ssa_op->opN##_use >= 0 && \
99
26.4k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
100
26.4k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
101
26.4k
    } \
102
29.8k
    return 1; \
103
29.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
90.2k
  { \
108
90.2k
    if (opline->opN##_type == IS_CONST) { \
109
5.64k
      zval *zv = CRT_CONSTANT(opline->opN); \
110
5.64k
      if (Z_TYPE_P(zv) == IS_LONG) { \
111
5.64k
        return 0; \
112
5.64k
      } \
113
84.6k
    } else if (opline->opN##_type != IS_UNUSED && \
114
84.6k
        ssa->var_info && \
115
84.6k
        ssa_op->opN##_use >= 0 && \
116
84.6k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
117
84.6k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
118
84.6k
    } \
119
90.2k
    return 1; \
120
90.2k
  } \
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
61.1k
  { \
108
61.1k
    if (opline->opN##_type == IS_CONST) { \
109
2.27k
      zval *zv = CRT_CONSTANT(opline->opN); \
110
2.27k
      if (Z_TYPE_P(zv) == IS_LONG) { \
111
2.27k
        return 0; \
112
2.27k
      } \
113
58.8k
    } else if (opline->opN##_type != IS_UNUSED && \
114
58.8k
        ssa->var_info && \
115
58.8k
        ssa_op->opN##_use >= 0 && \
116
58.8k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
117
58.8k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
118
58.8k
    } \
119
61.1k
    return 1; \
120
61.1k
  } \
zend_inference.c:_ssa_op2_range_overflow
Line
Count
Source
107
29.1k
  { \
108
29.1k
    if (opline->opN##_type == IS_CONST) { \
109
3.36k
      zval *zv = CRT_CONSTANT(opline->opN); \
110
3.36k
      if (Z_TYPE_P(zv) == IS_LONG) { \
111
3.36k
        return 0; \
112
3.36k
      } \
113
25.7k
    } else if (opline->opN##_type != IS_UNUSED && \
114
25.7k
        ssa->var_info && \
115
25.7k
        ssa_op->opN##_use >= 0 && \
116
25.7k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
117
25.7k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
118
25.7k
    } \
119
29.1k
    return 1; \
120
29.1k
  } \
Unexecuted instantiation: zend_optimizer.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_optimizer.c:_ssa_op2_range_overflow
Unexecuted instantiation: zend_ssa.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_ssa.c:_ssa_op2_range_overflow
121
122
DEFINE_SSA_OP_HAS_RANGE(op1)
123
68.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
68.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
50.2k
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
50.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
130
DEFINE_SSA_OP_RANGE_UNDERFLOW(op2)
131
DEFINE_SSA_OP_RANGE_OVERFLOW(op2)
132
133
134k
#define OP1_HAS_RANGE()       (_ssa_op1_has_range (op_array, ssa, opline, ssa_op))
134
68.4k
#define OP1_MIN_RANGE()       (_ssa_op1_min_range (op_array, ssa, opline, ssa_op))
135
68.4k
#define OP1_MAX_RANGE()       (_ssa_op1_max_range (op_array, ssa, opline, ssa_op))
136
126k
#define OP1_RANGE_UNDERFLOW() (_ssa_op1_range_underflow (op_array, ssa, opline, ssa_op))
137
91.7k
#define OP1_RANGE_OVERFLOW()  (_ssa_op1_range_overflow (op_array, ssa, opline, ssa_op))
138
63.0k
#define OP2_HAS_RANGE()       (_ssa_op2_has_range (op_array, ssa, opline, ssa_op))
139
50.2k
#define OP2_MIN_RANGE()       (_ssa_op2_min_range (op_array, ssa, opline, ssa_op))
140
50.1k
#define OP2_MAX_RANGE()       (_ssa_op2_max_range (op_array, ssa, opline, ssa_op))
141
60.4k
#define OP2_RANGE_UNDERFLOW() (_ssa_op2_range_underflow (op_array, ssa, opline, ssa_op))
142
54.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
551k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
551k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
670
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
551k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
7.38k
    return zend_array_type_info(zv);
153
543k
  } else {
154
543k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
543k
    if (Z_REFCOUNTED_P(zv)) {
157
57.2k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
486k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
349k
      tmp |= MAY_BE_RCN;
160
349k
    }
161
543k
    return tmp;
162
543k
  }
163
551k
}
Unexecuted instantiation: zend_jit.c:_const_op_type
Unexecuted instantiation: dce.c:_const_op_type
dfa_pass.c:_const_op_type
Line
Count
Source
148
1.40k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
1.40k
  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
1.40k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
0
    return zend_array_type_info(zv);
153
1.40k
  } else {
154
1.40k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
1.40k
    if (Z_REFCOUNTED_P(zv)) {
157
219
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
1.19k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
1.19k
      tmp |= MAY_BE_RCN;
160
1.19k
    }
161
1.40k
    return tmp;
162
1.40k
  }
163
1.40k
}
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
256
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
256
  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
256
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
0
    return zend_array_type_info(zv);
153
256
  } else {
154
256
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
256
    if (Z_REFCOUNTED_P(zv)) {
157
0
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
256
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
24
      tmp |= MAY_BE_RCN;
160
24
    }
161
256
    return tmp;
162
256
  }
163
256
}
zend_inference.c:_const_op_type
Line
Count
Source
148
271k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
271k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
306
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
271k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
3.47k
    return zend_array_type_info(zv);
153
268k
  } else {
154
268k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
268k
    if (Z_REFCOUNTED_P(zv)) {
157
33.1k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
234k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
164k
      tmp |= MAY_BE_RCN;
160
164k
    }
161
268k
    return tmp;
162
268k
  }
163
271k
}
zend_optimizer.c:_const_op_type
Line
Count
Source
148
278k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
278k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
364
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
278k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
3.90k
    return zend_array_type_info(zv);
153
274k
  } else {
154
274k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
274k
    if (Z_REFCOUNTED_P(zv)) {
157
23.8k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
250k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
183k
      tmp |= MAY_BE_RCN;
160
183k
    }
161
274k
    return tmp;
162
274k
  }
163
278k
}
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
2.51M
{
167
2.51M
  if (ssa->var_info && ssa_var_num >= 0) {
168
1.88M
    return ssa->var_info[ssa_var_num].type;
169
1.88M
  } else {
170
634k
    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
634k
  }
172
2.51M
}
Unexecuted instantiation: zend_jit.c:get_ssa_var_info
dce.c:get_ssa_var_info
Line
Count
Source
166
3.54k
{
167
3.54k
  if (ssa->var_info && ssa_var_num >= 0) {
168
3.54k
    return ssa->var_info[ssa_var_num].type;
169
3.54k
  } 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
3.54k
}
dfa_pass.c:get_ssa_var_info
Line
Count
Source
166
20.6k
{
167
20.6k
  if (ssa->var_info && ssa_var_num >= 0) {
168
20.6k
    return ssa->var_info[ssa_var_num].type;
169
20.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
20.6k
}
escape_analysis.c:get_ssa_var_info
Line
Count
Source
166
4.36k
{
167
4.36k
  if (ssa->var_info && ssa_var_num >= 0) {
168
4.36k
    return ssa->var_info[ssa_var_num].type;
169
4.36k
  } 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
4.36k
}
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
16
{
167
16
  if (ssa->var_info && ssa_var_num >= 0) {
168
16
    return ssa->var_info[ssa_var_num].type;
169
16
  } 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
16
}
zend_inference.c:get_ssa_var_info
Line
Count
Source
166
1.13M
{
167
1.13M
  if (ssa->var_info && ssa_var_num >= 0) {
168
786k
    return ssa->var_info[ssa_var_num].type;
169
786k
  } else {
170
344k
    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
344k
  }
172
1.13M
}
zend_optimizer.c:get_ssa_var_info
Line
Count
Source
166
1.35M
{
167
1.35M
  if (ssa->var_info && ssa_var_num >= 0) {
168
1.06M
    return ssa->var_info[ssa_var_num].type;
169
1.06M
  } else {
170
290k
    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
290k
  }
172
1.35M
}
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
2.42M
  {                                   \
177
2.42M
    if (opline->opN##_type == IS_CONST) {             \
178
551k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
1.87M
    } else { \
180
1.87M
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
1.87M
    } \
182
2.42M
  } \
Unexecuted instantiation: zend_jit.c:_ssa_op1_info
Unexecuted instantiation: zend_jit.c:_ssa_op2_info
Unexecuted instantiation: zend_jit.c:_ssa_result_info
dce.c:_ssa_op2_info
Line
Count
Source
176
2.39k
  {                                   \
177
2.39k
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
2.39k
    } else { \
180
2.39k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
2.39k
    } \
182
2.39k
  } \
dce.c:_ssa_op1_info
Line
Count
Source
176
1.14k
  {                                   \
177
1.14k
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
1.14k
    } else { \
180
1.14k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
1.14k
    } \
182
1.14k
  } \
Unexecuted instantiation: dce.c:_ssa_result_info
dfa_pass.c:_ssa_op2_info
Line
Count
Source
176
7.01k
  {                                   \
177
7.01k
    if (opline->opN##_type == IS_CONST) {             \
178
782
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
6.23k
    } else { \
180
6.23k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
6.23k
    } \
182
7.01k
  } \
dfa_pass.c:_ssa_op1_info
Line
Count
Source
176
14.9k
  {                                   \
177
14.9k
    if (opline->opN##_type == IS_CONST) {             \
178
627
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
14.3k
    } else { \
180
14.3k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
14.3k
    } \
182
14.9k
  } \
Unexecuted instantiation: dfa_pass.c:_ssa_result_info
escape_analysis.c:_ssa_op1_info
Line
Count
Source
176
4.06k
  {                                   \
177
4.06k
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
4.06k
    } else { \
180
4.06k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
4.06k
    } \
182
4.06k
  } \
escape_analysis.c:_ssa_op2_info
Line
Count
Source
176
308
  {                                   \
177
308
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
308
    } else { \
180
308
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
308
    } \
182
308
  } \
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
272
  {                                   \
177
272
    if (opline->opN##_type == IS_CONST) {             \
178
256
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
256
    } else { \
180
16
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
16
    } \
182
272
  } \
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
17.0k
  {                                   \
177
17.0k
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
17.0k
    } else { \
180
17.0k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
17.0k
    } \
182
17.0k
  } \
zend_inference.c:_ssa_op1_info
Line
Count
Source
176
629k
  {                                   \
177
629k
    if (opline->opN##_type == IS_CONST) {             \
178
70.6k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
558k
    } else { \
180
558k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
558k
    } \
182
629k
  } \
zend_inference.c:_ssa_op2_info
Line
Count
Source
176
576k
  {                                   \
177
576k
    if (opline->opN##_type == IS_CONST) {             \
178
201k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
375k
    } else { \
180
375k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
375k
    } \
182
576k
  } \
zend_optimizer.c:_ssa_op1_info
Line
Count
Source
176
587k
  {                                   \
177
587k
    if (opline->opN##_type == IS_CONST) {             \
178
113k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
474k
    } else { \
180
474k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
474k
    } \
182
587k
  } \
zend_optimizer.c:_ssa_op2_info
Line
Count
Source
176
587k
  {                                   \
177
587k
    if (opline->opN##_type == IS_CONST) {             \
178
165k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
422k
    } else { \
180
422k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
422k
    } \
182
587k
  } \
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
459k
  { \
187
459k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
188
459k
  } \
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
2.80k
  { \
187
2.80k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
188
2.80k
  } \
zend_optimizer.c:_ssa_result_def_info
Line
Count
Source
186
457k
  { \
187
457k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
188
457k
  } \
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.21M
#define OP1_INFO()           (_ssa_op1_info(op_array, ssa, opline, ssa_op))
199
1.17M
#define OP2_INFO()           (_ssa_op2_info(op_array, ssa, opline, ssa_op))
200
17.6k
#define OP1_DATA_INFO()      (_ssa_op1_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
201
#define OP2_DATA_INFO()      (_ssa_op2_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
202
17.0k
#define RES_USE_INFO()       (_ssa_result_info(op_array, ssa, opline, ssa_op))
203
2.80k
#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
457k
#define RES_INFO()           (_ssa_result_def_info(op_array, ssa, opline, ssa_op))
208
209
3.47k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
210
3.47k
  return (b > 0 && a > ZEND_LONG_MAX - b)
211
3.21k
    || (b < 0 && a < ZEND_LONG_MIN - b);
212
3.47k
}
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
1.08k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
210
1.08k
  return (b > 0 && a > ZEND_LONG_MAX - b)
211
825
    || (b < 0 && a < ZEND_LONG_MIN - b);
212
1.08k
}
Unexecuted instantiation: zend_optimizer.c:zend_add_will_overflow
zend_ssa.c:zend_add_will_overflow
Line
Count
Source
209
2.38k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
210
2.38k
  return (b > 0 && a > ZEND_LONG_MAX - b)
211
2.38k
    || (b < 0 && a < ZEND_LONG_MIN - b);
212
2.38k
}
213
2.69k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
214
2.69k
  return (b > 0 && a < ZEND_LONG_MIN + b)
215
2.56k
    || (b < 0 && a > ZEND_LONG_MAX + b);
216
2.69k
}
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
1.72k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
214
1.72k
  return (b > 0 && a < ZEND_LONG_MIN + b)
215
1.59k
    || (b < 0 && a > ZEND_LONG_MAX + b);
216
1.72k
}
Unexecuted instantiation: zend_optimizer.c:zend_sub_will_overflow
zend_ssa.c:zend_sub_will_overflow
Line
Count
Source
213
974
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
214
974
  return (b > 0 && a < ZEND_LONG_MIN + b)
215
974
    || (b < 0 && a > ZEND_LONG_MAX + b);
216
974
}
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 */