Coverage Report

Created: 2026-10-28 06:20

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/php-src/Zend/Optimizer/zend_inference.h
Line
Count
Source
1
/*
2
   +----------------------------------------------------------------------+
3
   | Zend Engine, e-SSA based Type & Range Inference                      |
4
   +----------------------------------------------------------------------+
5
   | Copyright © The PHP Group and Contributors.                          |
6
   +----------------------------------------------------------------------+
7
   | This source file is subject to the Modified BSD License that is      |
8
   | bundled with this package in the file LICENSE, and is available      |
9
   | through the World Wide Web at <https://www.php.net/license/>.        |
10
   |                                                                      |
11
   | SPDX-License-Identifier: BSD-3-Clause                                |
12
   +----------------------------------------------------------------------+
13
   | Authors: Dmitry Stogov <dmitry@php.net>                              |
14
   +----------------------------------------------------------------------+
15
*/
16
17
#ifndef ZEND_INFERENCE_H
18
#define ZEND_INFERENCE_H
19
20
#include "zend_optimizer.h"
21
#include "zend_ssa.h"
22
#include "zend_bitset.h"
23
24
/* Bitmask for type inference (zend_ssa_var_info.type) */
25
#include "zend_type_info.h"
26
27
#include <stdint.h>
28
29
1.95k
#define MAY_BE_PACKED_GUARD         (1<<27) /* needs packed array guard */
30
0
#define MAY_BE_CLASS_GUARD          (1<<27) /* needs class guard */
31
198k
#define MAY_BE_GUARD                (1<<28) /* needs type guard */
32
33
#define MAY_HAVE_DTOR \
34
415
  (MAY_BE_OBJECT|MAY_BE_RESOURCE \
35
415
  |MAY_BE_ARRAY_OF_ARRAY|MAY_BE_ARRAY_OF_OBJECT|MAY_BE_ARRAY_OF_RESOURCE)
36
37
#define DEFINE_SSA_OP_HAS_RANGE(opN) \
38
  static zend_always_inline bool _ssa_##opN##_has_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
39
59.4k
  { \
40
59.4k
    if (opline->opN##_type == IS_CONST) { \
41
23.2k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
23.2k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
36.2k
    } else { \
44
36.2k
      return (opline->opN##_type != IS_UNUSED && \
45
36.2k
            ssa->var_info && \
46
36.2k
            ssa_op->opN##_use >= 0 && \
47
36.2k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
36.2k
    } \
49
59.4k
    return 0; \
50
59.4k
  } \
zend_jit.c:_ssa_op1_has_range
Line
Count
Source
39
210
  { \
40
210
    if (opline->opN##_type == IS_CONST) { \
41
58
      zval *zv = CRT_CONSTANT(opline->opN); \
42
58
      return (Z_TYPE_P(zv) == IS_LONG); \
43
152
    } else { \
44
152
      return (opline->opN##_type != IS_UNUSED && \
45
152
            ssa->var_info && \
46
152
            ssa_op->opN##_use >= 0 && \
47
152
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
152
    } \
49
210
    return 0; \
50
210
  } \
zend_jit.c:_ssa_op2_has_range
Line
Count
Source
39
73
  { \
40
73
    if (opline->opN##_type == IS_CONST) { \
41
5
      zval *zv = CRT_CONSTANT(opline->opN); \
42
5
      return (Z_TYPE_P(zv) == IS_LONG); \
43
68
    } else { \
44
68
      return (opline->opN##_type != IS_UNUSED && \
45
68
            ssa->var_info && \
46
68
            ssa_op->opN##_use >= 0 && \
47
68
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
68
    } \
49
73
    return 0; \
50
73
  } \
Unexecuted instantiation: dce.c:_ssa_op1_has_range
Unexecuted instantiation: dce.c:_ssa_op2_has_range
Unexecuted instantiation: dfa_pass.c:_ssa_op1_has_range
Unexecuted instantiation: dfa_pass.c:_ssa_op2_has_range
Unexecuted instantiation: escape_analysis.c:_ssa_op1_has_range
Unexecuted instantiation: escape_analysis.c:_ssa_op2_has_range
Unexecuted instantiation: sccp.c:_ssa_op1_has_range
Unexecuted instantiation: sccp.c:_ssa_op2_has_range
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_has_range
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_has_range
Unexecuted instantiation: zend_dump.c:_ssa_op1_has_range
Unexecuted instantiation: zend_dump.c:_ssa_op2_has_range
Unexecuted instantiation: zend_func_info.c:_ssa_op1_has_range
Unexecuted instantiation: zend_func_info.c:_ssa_op2_has_range
zend_inference.c:_ssa_op1_has_range
Line
Count
Source
39
33.4k
  { \
40
33.4k
    if (opline->opN##_type == IS_CONST) { \
41
6.80k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
6.80k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
26.6k
    } else { \
44
26.6k
      return (opline->opN##_type != IS_UNUSED && \
45
26.6k
            ssa->var_info && \
46
26.6k
            ssa_op->opN##_use >= 0 && \
47
26.6k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
26.6k
    } \
49
33.4k
    return 0; \
50
33.4k
  } \
zend_inference.c:_ssa_op2_has_range
Line
Count
Source
39
25.7k
  { \
40
25.7k
    if (opline->opN##_type == IS_CONST) { \
41
16.3k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
16.3k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
16.3k
    } else { \
44
9.43k
      return (opline->opN##_type != IS_UNUSED && \
45
9.43k
            ssa->var_info && \
46
9.43k
            ssa_op->opN##_use >= 0 && \
47
9.43k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
9.43k
    } \
49
25.7k
    return 0; \
50
25.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
51
52
#define DEFINE_SSA_OP_MIN_RANGE(opN) \
53
  static zend_always_inline zend_long _ssa_##opN##_min_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
54
31.0k
  { \
55
31.0k
    if (opline->opN##_type == IS_CONST) { \
56
12.6k
      zval *zv = CRT_CONSTANT(opline->opN); \
57
12.6k
      if (Z_TYPE_P(zv) == IS_LONG) { \
58
12.6k
        return Z_LVAL_P(zv); \
59
12.6k
      } \
60
18.3k
    } else if (opline->opN##_type != IS_UNUSED && \
61
18.3k
        ssa->var_info && \
62
18.3k
        ssa_op->opN##_use >= 0 && \
63
18.3k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
64
18.3k
      return ssa->var_info[ssa_op->opN##_use].range.min; \
65
18.3k
    } \
66
31.0k
    return ZEND_LONG_MIN; \
67
31.0k
  } \
Unexecuted instantiation: dce.c:_ssa_op1_min_range
Unexecuted instantiation: dce.c:_ssa_op2_min_range
Unexecuted instantiation: dfa_pass.c:_ssa_op1_min_range
Unexecuted instantiation: dfa_pass.c:_ssa_op2_min_range
Unexecuted instantiation: escape_analysis.c:_ssa_op1_min_range
Unexecuted instantiation: escape_analysis.c:_ssa_op2_min_range
Unexecuted instantiation: sccp.c:_ssa_op1_min_range
Unexecuted instantiation: sccp.c:_ssa_op2_min_range
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_min_range
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_min_range
Unexecuted instantiation: zend_dump.c:_ssa_op1_min_range
Unexecuted instantiation: zend_dump.c:_ssa_op2_min_range
Unexecuted instantiation: zend_func_info.c:_ssa_op1_min_range
Unexecuted instantiation: zend_func_info.c:_ssa_op2_min_range
Unexecuted instantiation: zend_optimizer.c:_ssa_op1_min_range
Unexecuted instantiation: zend_optimizer.c:_ssa_op2_min_range
Unexecuted instantiation: zend_ssa.c:_ssa_op1_min_range
Unexecuted instantiation: zend_ssa.c:_ssa_op2_min_range
68
69
#define DEFINE_SSA_OP_MAX_RANGE(opN) \
70
  static zend_always_inline zend_long _ssa_##opN##_max_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
71
29.6k
  { \
72
29.6k
    if (opline->opN##_type == IS_CONST) { \
73
11.2k
      zval *zv = CRT_CONSTANT(opline->opN); \
74
11.2k
      if (Z_TYPE_P(zv) == IS_LONG) { \
75
11.2k
        return Z_LVAL_P(zv); \
76
11.2k
      } \
77
18.3k
    } else if (opline->opN##_type != IS_UNUSED && \
78
18.3k
        ssa->var_info && \
79
18.3k
        ssa_op->opN##_use >= 0 && \
80
18.3k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
81
18.3k
      return ssa->var_info[ssa_op->opN##_use].range.max; \
82
18.3k
    } \
83
29.6k
    return ZEND_LONG_MAX; \
84
29.6k
  } \
Unexecuted instantiation: dce.c:_ssa_op1_max_range
Unexecuted instantiation: dce.c:_ssa_op2_max_range
Unexecuted instantiation: dfa_pass.c:_ssa_op1_max_range
Unexecuted instantiation: dfa_pass.c:_ssa_op2_max_range
Unexecuted instantiation: escape_analysis.c:_ssa_op1_max_range
Unexecuted instantiation: escape_analysis.c:_ssa_op2_max_range
Unexecuted instantiation: sccp.c:_ssa_op1_max_range
Unexecuted instantiation: sccp.c:_ssa_op2_max_range
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_max_range
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_max_range
Unexecuted instantiation: zend_dump.c:_ssa_op1_max_range
Unexecuted instantiation: zend_dump.c:_ssa_op2_max_range
Unexecuted instantiation: zend_func_info.c:_ssa_op1_max_range
Unexecuted instantiation: zend_func_info.c:_ssa_op2_max_range
Unexecuted instantiation: zend_optimizer.c:_ssa_op1_max_range
Unexecuted instantiation: zend_optimizer.c:_ssa_op2_max_range
Unexecuted instantiation: zend_ssa.c:_ssa_op1_max_range
Unexecuted instantiation: zend_ssa.c:_ssa_op2_max_range
85
86
#define DEFINE_SSA_OP_RANGE_UNDERFLOW(opN) \
87
  static zend_always_inline char _ssa_##opN##_range_underflow(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
88
31.3k
  { \
89
31.3k
    if (opline->opN##_type == IS_CONST) { \
90
8.49k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
8.49k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
8.49k
        return 0; \
93
8.49k
      } \
94
22.9k
    } else if (opline->opN##_type != IS_UNUSED && \
95
22.9k
        ssa->var_info && \
96
22.9k
        ssa_op->opN##_use >= 0 && \
97
22.9k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
22.9k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
22.9k
    } \
100
31.3k
    return 1; \
101
31.3k
  } \
Unexecuted instantiation: zend_jit.c:_ssa_op1_range_underflow
Unexecuted instantiation: zend_jit.c:_ssa_op2_range_underflow
Unexecuted instantiation: dce.c:_ssa_op1_range_underflow
Unexecuted instantiation: dce.c:_ssa_op2_range_underflow
Unexecuted instantiation: dfa_pass.c:_ssa_op1_range_underflow
Unexecuted instantiation: dfa_pass.c:_ssa_op2_range_underflow
Unexecuted instantiation: escape_analysis.c:_ssa_op1_range_underflow
Unexecuted instantiation: escape_analysis.c:_ssa_op2_range_underflow
Unexecuted instantiation: sccp.c:_ssa_op1_range_underflow
Unexecuted instantiation: sccp.c:_ssa_op2_range_underflow
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_range_underflow
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_range_underflow
Unexecuted instantiation: zend_dump.c:_ssa_op1_range_underflow
Unexecuted instantiation: zend_dump.c:_ssa_op2_range_underflow
Unexecuted instantiation: zend_func_info.c:_ssa_op1_range_underflow
Unexecuted instantiation: zend_func_info.c:_ssa_op2_range_underflow
zend_inference.c:_ssa_op1_range_underflow
Line
Count
Source
88
22.4k
  { \
89
22.4k
    if (opline->opN##_type == IS_CONST) { \
90
2.57k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
2.57k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
2.57k
        return 0; \
93
2.57k
      } \
94
19.9k
    } else if (opline->opN##_type != IS_UNUSED && \
95
19.9k
        ssa->var_info && \
96
19.9k
        ssa_op->opN##_use >= 0 && \
97
19.9k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
19.9k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
19.9k
    } \
100
22.4k
    return 1; \
101
22.4k
  } \
zend_inference.c:_ssa_op2_range_underflow
Line
Count
Source
88
8.90k
  { \
89
8.90k
    if (opline->opN##_type == IS_CONST) { \
90
5.91k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
5.91k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
5.91k
        return 0; \
93
5.91k
      } \
94
5.91k
    } else if (opline->opN##_type != IS_UNUSED && \
95
2.99k
        ssa->var_info && \
96
2.99k
        ssa_op->opN##_use >= 0 && \
97
2.99k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
2.99k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
2.99k
    } \
100
8.90k
    return 1; \
101
8.90k
  } \
Unexecuted instantiation: zend_optimizer.c:_ssa_op1_range_underflow
Unexecuted instantiation: zend_optimizer.c:_ssa_op2_range_underflow
Unexecuted instantiation: zend_ssa.c:_ssa_op1_range_underflow
Unexecuted instantiation: zend_ssa.c:_ssa_op2_range_underflow
102
103
#define DEFINE_SSA_OP_RANGE_OVERFLOW(opN) \
104
  static zend_always_inline char _ssa_##opN##_range_overflow(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
105
20.1k
  { \
106
20.1k
    if (opline->opN##_type == IS_CONST) { \
107
7.77k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
7.77k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
7.77k
        return 0; \
110
7.77k
      } \
111
12.3k
    } else if (opline->opN##_type != IS_UNUSED && \
112
12.3k
        ssa->var_info && \
113
12.3k
        ssa_op->opN##_use >= 0 && \
114
12.3k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
12.3k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
12.3k
    } \
117
20.1k
    return 1; \
118
20.1k
  } \
Unexecuted instantiation: zend_jit.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_jit.c:_ssa_op2_range_overflow
Unexecuted instantiation: dce.c:_ssa_op1_range_overflow
Unexecuted instantiation: dce.c:_ssa_op2_range_overflow
Unexecuted instantiation: dfa_pass.c:_ssa_op1_range_overflow
Unexecuted instantiation: dfa_pass.c:_ssa_op2_range_overflow
Unexecuted instantiation: escape_analysis.c:_ssa_op1_range_overflow
Unexecuted instantiation: escape_analysis.c:_ssa_op2_range_overflow
Unexecuted instantiation: sccp.c:_ssa_op1_range_overflow
Unexecuted instantiation: sccp.c:_ssa_op2_range_overflow
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_range_overflow
Unexecuted instantiation: zend_dump.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_dump.c:_ssa_op2_range_overflow
Unexecuted instantiation: zend_func_info.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_func_info.c:_ssa_op2_range_overflow
zend_inference.c:_ssa_op1_range_overflow
Line
Count
Source
105
12.8k
  { \
106
12.8k
    if (opline->opN##_type == IS_CONST) { \
107
1.95k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
1.95k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
1.95k
        return 0; \
110
1.95k
      } \
111
10.8k
    } else if (opline->opN##_type != IS_UNUSED && \
112
10.8k
        ssa->var_info && \
113
10.8k
        ssa_op->opN##_use >= 0 && \
114
10.8k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
10.8k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
10.8k
    } \
117
12.8k
    return 1; \
118
12.8k
  } \
zend_inference.c:_ssa_op2_range_overflow
Line
Count
Source
105
7.27k
  { \
106
7.27k
    if (opline->opN##_type == IS_CONST) { \
107
5.82k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
5.82k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
5.82k
        return 0; \
110
5.82k
      } \
111
5.82k
    } else if (opline->opN##_type != IS_UNUSED && \
112
1.45k
        ssa->var_info && \
113
1.45k
        ssa_op->opN##_use >= 0 && \
114
1.45k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
1.45k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
1.45k
    } \
117
7.27k
    return 1; \
118
7.27k
  } \
Unexecuted instantiation: zend_optimizer.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_optimizer.c:_ssa_op2_range_overflow
Unexecuted instantiation: zend_ssa.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_ssa.c:_ssa_op2_range_overflow
119
120
DEFINE_SSA_OP_HAS_RANGE(op1)
121
15.7k
DEFINE_SSA_OP_MIN_RANGE(op1)
Unexecuted instantiation: zend_jit.c:_ssa_op1_min_range
Unexecuted instantiation: zend_inference.c:_ssa_op1_min_range
122
15.7k
DEFINE_SSA_OP_MAX_RANGE(op1)
Unexecuted instantiation: zend_jit.c:_ssa_op1_max_range
Unexecuted instantiation: zend_inference.c:_ssa_op1_max_range
123
DEFINE_SSA_OP_RANGE_UNDERFLOW(op1)
124
DEFINE_SSA_OP_RANGE_OVERFLOW(op1)
125
DEFINE_SSA_OP_HAS_RANGE(op2)
126
15.3k
DEFINE_SSA_OP_MIN_RANGE(op2)
Unexecuted instantiation: zend_jit.c:_ssa_op2_min_range
Unexecuted instantiation: zend_inference.c:_ssa_op2_min_range
127
13.8k
DEFINE_SSA_OP_MAX_RANGE(op2)
Unexecuted instantiation: zend_jit.c:_ssa_op2_max_range
Unexecuted instantiation: zend_inference.c:_ssa_op2_max_range
128
DEFINE_SSA_OP_RANGE_UNDERFLOW(op2)
129
DEFINE_SSA_OP_RANGE_OVERFLOW(op2)
130
131
62.3k
#define OP1_HAS_RANGE()       (_ssa_op1_has_range (op_array, ssa, opline, ssa_op))
132
15.7k
#define OP1_MIN_RANGE()       (_ssa_op1_min_range (op_array, ssa, opline, ssa_op))
133
15.7k
#define OP1_MAX_RANGE()       (_ssa_op1_max_range (op_array, ssa, opline, ssa_op))
134
42.8k
#define OP1_RANGE_UNDERFLOW() (_ssa_op1_range_underflow (op_array, ssa, opline, ssa_op))
135
31.9k
#define OP1_RANGE_OVERFLOW()  (_ssa_op1_range_overflow (op_array, ssa, opline, ssa_op))
136
30.2k
#define OP2_HAS_RANGE()       (_ssa_op2_has_range (op_array, ssa, opline, ssa_op))
137
15.3k
#define OP2_MIN_RANGE()       (_ssa_op2_min_range (op_array, ssa, opline, ssa_op))
138
13.8k
#define OP2_MAX_RANGE()       (_ssa_op2_max_range (op_array, ssa, opline, ssa_op))
139
28.0k
#define OP2_RANGE_UNDERFLOW() (_ssa_op2_range_underflow (op_array, ssa, opline, ssa_op))
140
16.4k
#define OP2_RANGE_OVERFLOW()  (_ssa_op2_range_overflow (op_array, ssa, opline, ssa_op))
141
142
BEGIN_EXTERN_C()
143
ZEND_API uint32_t ZEND_FASTCALL zend_array_type_info(const zval *zv);
144
END_EXTERN_C()
145
146
227k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
227k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
332
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
227k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
1.32k
    return zend_array_type_info(zv);
151
225k
  } else {
152
225k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
225k
    if (Z_REFCOUNTED_P(zv)) {
155
14.4k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
211k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
74.5k
      tmp |= MAY_BE_RCN;
158
74.5k
    }
159
225k
    return tmp;
160
225k
  }
161
227k
}
zend_jit.c:_const_op_type
Line
Count
Source
146
32.7k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
32.7k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
5
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
32.6k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
185
    return zend_array_type_info(zv);
151
32.5k
  } else {
152
32.5k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
32.5k
    if (Z_REFCOUNTED_P(zv)) {
155
0
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
32.5k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
10.2k
      tmp |= MAY_BE_RCN;
158
10.2k
    }
159
32.5k
    return tmp;
160
32.5k
  }
161
32.7k
}
Unexecuted instantiation: dce.c:_const_op_type
dfa_pass.c:_const_op_type
Line
Count
Source
146
138
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
138
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
0
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
138
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
0
    return zend_array_type_info(zv);
151
138
  } else {
152
138
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
138
    if (Z_REFCOUNTED_P(zv)) {
155
38
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
100
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
100
      tmp |= MAY_BE_RCN;
158
100
    }
159
138
    return tmp;
160
138
  }
161
138
}
Unexecuted instantiation: escape_analysis.c:_const_op_type
Unexecuted instantiation: sccp.c:_const_op_type
Unexecuted instantiation: zend_call_graph.c:_const_op_type
Unexecuted instantiation: zend_dump.c:_const_op_type
zend_func_info.c:_const_op_type
Line
Count
Source
146
156
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
156
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
0
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
156
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
0
    return zend_array_type_info(zv);
151
156
  } else {
152
156
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
156
    if (Z_REFCOUNTED_P(zv)) {
155
0
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
156
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
0
      tmp |= MAY_BE_RCN;
158
0
    }
159
156
    return tmp;
160
156
  }
161
156
}
zend_inference.c:_const_op_type
Line
Count
Source
146
98.3k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
98.3k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
123
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
98.2k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
682
    return zend_array_type_info(zv);
151
97.5k
  } else {
152
97.5k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
97.5k
    if (Z_REFCOUNTED_P(zv)) {
155
4.84k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
92.7k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
25.6k
      tmp |= MAY_BE_RCN;
158
25.6k
    }
159
97.5k
    return tmp;
160
97.5k
  }
161
98.3k
}
zend_optimizer.c:_const_op_type
Line
Count
Source
146
95.9k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
95.9k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
204
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
95.7k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
457
    return zend_array_type_info(zv);
151
95.3k
  } else {
152
95.3k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
95.3k
    if (Z_REFCOUNTED_P(zv)) {
155
9.58k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
85.7k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
38.6k
      tmp |= MAY_BE_RCN;
158
38.6k
    }
159
95.3k
    return tmp;
160
95.3k
  }
161
95.9k
}
Unexecuted instantiation: zend_ssa.c:_const_op_type
162
163
static zend_always_inline uint32_t get_ssa_var_info(const zend_ssa *ssa, int ssa_var_num)
164
360k
{
165
360k
  if (ssa->var_info && ssa_var_num >= 0) {
166
248k
    return ssa->var_info[ssa_var_num].type;
167
248k
  } else {
168
112k
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
169
112k
  }
170
360k
}
zend_jit.c:get_ssa_var_info
Line
Count
Source
164
33.0k
{
165
33.0k
  if (ssa->var_info && ssa_var_num >= 0) {
166
9.72k
    return ssa->var_info[ssa_var_num].type;
167
23.3k
  } else {
168
23.3k
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
169
23.3k
  }
170
33.0k
}
dce.c:get_ssa_var_info
Line
Count
Source
164
151
{
165
151
  if (ssa->var_info && ssa_var_num >= 0) {
166
151
    return ssa->var_info[ssa_var_num].type;
167
151
  } else {
168
0
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
169
0
  }
170
151
}
dfa_pass.c:get_ssa_var_info
Line
Count
Source
164
14.4k
{
165
14.4k
  if (ssa->var_info && ssa_var_num >= 0) {
166
14.4k
    return ssa->var_info[ssa_var_num].type;
167
14.4k
  } else {
168
0
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
169
0
  }
170
14.4k
}
escape_analysis.c:get_ssa_var_info
Line
Count
Source
164
1.32k
{
165
1.32k
  if (ssa->var_info && ssa_var_num >= 0) {
166
1.32k
    return ssa->var_info[ssa_var_num].type;
167
1.32k
  } else {
168
0
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
169
0
  }
170
1.32k
}
Unexecuted instantiation: sccp.c:get_ssa_var_info
Unexecuted instantiation: zend_call_graph.c:get_ssa_var_info
Unexecuted instantiation: zend_dump.c:get_ssa_var_info
zend_func_info.c:get_ssa_var_info
Line
Count
Source
164
24
{
165
24
  if (ssa->var_info && ssa_var_num >= 0) {
166
24
    return ssa->var_info[ssa_var_num].type;
167
24
  } else {
168
0
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
169
0
  }
170
24
}
zend_inference.c:get_ssa_var_info
Line
Count
Source
164
182k
{
165
182k
  if (ssa->var_info && ssa_var_num >= 0) {
166
93.4k
    return ssa->var_info[ssa_var_num].type;
167
93.4k
  } else {
168
88.9k
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
169
88.9k
  }
170
182k
}
zend_optimizer.c:get_ssa_var_info
Line
Count
Source
164
129k
{
165
129k
  if (ssa->var_info && ssa_var_num >= 0) {
166
129k
    return ssa->var_info[ssa_var_num].type;
167
129k
  } else {
168
6
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
169
6
  }
170
129k
}
Unexecuted instantiation: zend_ssa.c:get_ssa_var_info
171
172
#define DEFINE_SSA_OP_INFO(opN) \
173
  static zend_always_inline uint32_t _ssa_##opN##_info(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
174
510k
  {                                   \
175
510k
    if (opline->opN##_type == IS_CONST) {             \
176
224k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
285k
    } else { \
178
285k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
285k
    } \
180
510k
  } \
zend_jit.c:_ssa_op1_info
Line
Count
Source
174
40.5k
  {                                   \
175
40.5k
    if (opline->opN##_type == IS_CONST) {             \
176
22.7k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
22.7k
    } else { \
178
17.8k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
17.8k
    } \
180
40.5k
  } \
zend_jit.c:_ssa_op2_info
Line
Count
Source
174
14.3k
  {                                   \
175
14.3k
    if (opline->opN##_type == IS_CONST) {             \
176
7.55k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
7.55k
    } else { \
178
6.79k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
6.79k
    } \
180
14.3k
  } \
zend_jit.c:_ssa_result_info
Line
Count
Source
174
2
  {                                   \
175
2
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
2
    } else { \
178
2
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
2
    } \
180
2
  } \
dce.c:_ssa_op1_info
Line
Count
Source
174
63
  {                                   \
175
63
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
63
    } else { \
178
63
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
63
    } \
180
63
  } \
dce.c:_ssa_op2_info
Line
Count
Source
174
88
  {                                   \
175
88
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
88
    } else { \
178
88
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
88
    } \
180
88
  } \
Unexecuted instantiation: dce.c:_ssa_result_info
dfa_pass.c:_ssa_op2_info
Line
Count
Source
174
2.44k
  {                                   \
175
2.44k
    if (opline->opN##_type == IS_CONST) {             \
176
60
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
2.38k
    } else { \
178
2.38k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
2.38k
    } \
180
2.44k
  } \
dfa_pass.c:_ssa_op1_info
Line
Count
Source
174
12.1k
  {                                   \
175
12.1k
    if (opline->opN##_type == IS_CONST) {             \
176
78
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
12.0k
    } else { \
178
12.0k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
12.0k
    } \
180
12.1k
  } \
Unexecuted instantiation: dfa_pass.c:_ssa_result_info
escape_analysis.c:_ssa_op1_info
Line
Count
Source
174
1.12k
  {                                   \
175
1.12k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
1.12k
    } else { \
178
1.12k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
1.12k
    } \
180
1.12k
  } \
escape_analysis.c:_ssa_op2_info
Line
Count
Source
174
199
  {                                   \
175
199
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
199
    } else { \
178
199
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
199
    } \
180
199
  } \
Unexecuted instantiation: escape_analysis.c:_ssa_result_info
Unexecuted instantiation: sccp.c:_ssa_op1_info
Unexecuted instantiation: sccp.c:_ssa_op2_info
Unexecuted instantiation: sccp.c:_ssa_result_info
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_info
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_info
Unexecuted instantiation: zend_call_graph.c:_ssa_result_info
Unexecuted instantiation: zend_dump.c:_ssa_op1_info
Unexecuted instantiation: zend_dump.c:_ssa_op2_info
Unexecuted instantiation: zend_dump.c:_ssa_result_info
zend_func_info.c:_ssa_op1_info
Line
Count
Source
174
180
  {                                   \
175
180
    if (opline->opN##_type == IS_CONST) {             \
176
156
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
156
    } else { \
178
24
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
24
    } \
180
180
  } \
Unexecuted instantiation: zend_func_info.c:_ssa_op2_info
Unexecuted instantiation: zend_func_info.c:_ssa_result_info
zend_inference.c:_ssa_op1_info
Line
Count
Source
174
151k
  {                                   \
175
151k
    if (opline->opN##_type == IS_CONST) {             \
176
50.5k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
101k
    } else { \
178
101k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
101k
    } \
180
151k
  } \
zend_inference.c:_ssa_result_info
Line
Count
Source
174
684
  {                                   \
175
684
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
684
    } else { \
178
684
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
684
    } \
180
684
  } \
zend_inference.c:_ssa_op2_info
Line
Count
Source
174
123k
  {                                   \
175
123k
    if (opline->opN##_type == IS_CONST) {             \
176
47.8k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
75.4k
    } else { \
178
75.4k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
75.4k
    } \
180
123k
  } \
zend_optimizer.c:_ssa_op1_info
Line
Count
Source
174
110k
  {                                   \
175
110k
    if (opline->opN##_type == IS_CONST) {             \
176
57.7k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
57.7k
    } else { \
178
53.0k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
53.0k
    } \
180
110k
  } \
zend_optimizer.c:_ssa_op2_info
Line
Count
Source
174
52.9k
  {                                   \
175
52.9k
    if (opline->opN##_type == IS_CONST) {             \
176
38.2k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
38.2k
    } else { \
178
14.7k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
14.7k
    } \
180
52.9k
  } \
Unexecuted instantiation: zend_optimizer.c:_ssa_result_info
Unexecuted instantiation: zend_ssa.c:_ssa_op1_info
Unexecuted instantiation: zend_ssa.c:_ssa_op2_info
Unexecuted instantiation: zend_ssa.c:_ssa_result_info
181
182
#define DEFINE_SSA_OP_DEF_INFO(opN) \
183
  static zend_always_inline uint32_t _ssa_##opN##_def_info(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
184
69.6k
  { \
185
69.6k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
69.6k
  } \
zend_jit.c:_ssa_result_def_info
Line
Count
Source
184
7.75k
  { \
185
7.75k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
7.75k
  } \
zend_jit.c:_ssa_op1_def_info
Line
Count
Source
184
686
  { \
185
686
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
686
  } \
Unexecuted instantiation: zend_jit.c:_ssa_op2_def_info
Unexecuted instantiation: dce.c:_ssa_op1_def_info
Unexecuted instantiation: dce.c:_ssa_op2_def_info
Unexecuted instantiation: dce.c:_ssa_result_def_info
Unexecuted instantiation: dfa_pass.c:_ssa_op1_def_info
Unexecuted instantiation: dfa_pass.c:_ssa_op2_def_info
Unexecuted instantiation: dfa_pass.c:_ssa_result_def_info
Unexecuted instantiation: escape_analysis.c:_ssa_op1_def_info
Unexecuted instantiation: escape_analysis.c:_ssa_op2_def_info
Unexecuted instantiation: escape_analysis.c:_ssa_result_def_info
Unexecuted instantiation: sccp.c:_ssa_op1_def_info
Unexecuted instantiation: sccp.c:_ssa_op2_def_info
Unexecuted instantiation: sccp.c:_ssa_result_def_info
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_def_info
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_def_info
Unexecuted instantiation: zend_call_graph.c:_ssa_result_def_info
Unexecuted instantiation: zend_dump.c:_ssa_op1_def_info
Unexecuted instantiation: zend_dump.c:_ssa_op2_def_info
Unexecuted instantiation: zend_dump.c:_ssa_result_def_info
Unexecuted instantiation: zend_func_info.c:_ssa_op1_def_info
Unexecuted instantiation: zend_func_info.c:_ssa_op2_def_info
Unexecuted instantiation: zend_func_info.c:_ssa_result_def_info
Unexecuted instantiation: zend_inference.c:_ssa_op1_def_info
Unexecuted instantiation: zend_inference.c:_ssa_op2_def_info
Unexecuted instantiation: zend_inference.c:_ssa_result_def_info
zend_optimizer.c:_ssa_op1_def_info
Line
Count
Source
184
319
  { \
185
319
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
319
  } \
zend_optimizer.c:_ssa_result_def_info
Line
Count
Source
184
60.9k
  { \
185
60.9k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
60.9k
  } \
Unexecuted instantiation: zend_optimizer.c:_ssa_op2_def_info
Unexecuted instantiation: zend_ssa.c:_ssa_op1_def_info
Unexecuted instantiation: zend_ssa.c:_ssa_op2_def_info
Unexecuted instantiation: zend_ssa.c:_ssa_result_def_info
187
188
189
DEFINE_SSA_OP_INFO(op1)
190
DEFINE_SSA_OP_INFO(op2)
191
DEFINE_SSA_OP_INFO(result)
192
DEFINE_SSA_OP_DEF_INFO(op1)
193
DEFINE_SSA_OP_DEF_INFO(op2)
194
DEFINE_SSA_OP_DEF_INFO(result)
195
196
311k
#define OP1_INFO()           (_ssa_op1_info(op_array, ssa, opline, ssa_op))
197
193k
#define OP2_INFO()           (_ssa_op2_info(op_array, ssa, opline, ssa_op))
198
4.69k
#define OP1_DATA_INFO()      (_ssa_op1_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
199
#define OP2_DATA_INFO()      (_ssa_op2_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
200
686
#define RES_USE_INFO()       (_ssa_result_info(op_array, ssa, opline, ssa_op))
201
1.00k
#define OP1_DEF_INFO()       (_ssa_op1_def_info(op_array, ssa, opline, ssa_op))
202
#define OP2_DEF_INFO()       (_ssa_op2_def_info(op_array, ssa, opline, ssa_op))
203
#define OP1_DATA_DEF_INFO()  (_ssa_op1_def_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
204
#define OP2_DATA_DEF_INFO()  (_ssa_op2_def_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
205
68.6k
#define RES_INFO()           (_ssa_result_def_info(op_array, ssa, opline, ssa_op))
206
207
1.71k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
1.71k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
1.50k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
1.71k
}
zend_jit.c:zend_add_will_overflow
Line
Count
Source
207
14
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
14
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
11
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
14
}
Unexecuted instantiation: dce.c:zend_add_will_overflow
Unexecuted instantiation: dfa_pass.c:zend_add_will_overflow
Unexecuted instantiation: escape_analysis.c:zend_add_will_overflow
Unexecuted instantiation: sccp.c:zend_add_will_overflow
Unexecuted instantiation: zend_call_graph.c:zend_add_will_overflow
Unexecuted instantiation: zend_dump.c:zend_add_will_overflow
Unexecuted instantiation: zend_func_info.c:zend_add_will_overflow
zend_inference.c:zend_add_will_overflow
Line
Count
Source
207
1.54k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
1.54k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
1.33k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
1.54k
}
Unexecuted instantiation: zend_optimizer.c:zend_add_will_overflow
zend_ssa.c:zend_add_will_overflow
Line
Count
Source
207
156
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
156
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
156
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
156
}
211
1.45k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
1.45k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
1.29k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
1.45k
}
zend_jit.c:zend_sub_will_overflow
Line
Count
Source
211
9
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
9
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
3
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
9
}
Unexecuted instantiation: dce.c:zend_sub_will_overflow
Unexecuted instantiation: dfa_pass.c:zend_sub_will_overflow
Unexecuted instantiation: escape_analysis.c:zend_sub_will_overflow
Unexecuted instantiation: sccp.c:zend_sub_will_overflow
Unexecuted instantiation: zend_call_graph.c:zend_sub_will_overflow
Unexecuted instantiation: zend_dump.c:zend_sub_will_overflow
Unexecuted instantiation: zend_func_info.c:zend_sub_will_overflow
zend_inference.c:zend_sub_will_overflow
Line
Count
Source
211
1.42k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
1.42k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
1.27k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
1.42k
}
Unexecuted instantiation: zend_optimizer.c:zend_sub_will_overflow
zend_ssa.c:zend_sub_will_overflow
Line
Count
Source
211
20
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
20
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
20
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
20
}
215
216
BEGIN_EXTERN_C()
217
218
ZEND_API void zend_ssa_find_false_dependencies(const zend_op_array *op_array, const zend_ssa *ssa);
219
ZEND_API void zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa);
220
ZEND_API zend_result zend_ssa_inference(zend_arena **raena, const zend_op_array *op_array, const zend_script *script, zend_ssa *ssa, zend_long optimization_level);
221
222
ZEND_API uint32_t zend_array_element_type(uint32_t t1, uint8_t op_type, bool write, bool insert);
223
224
ZEND_API bool zend_inference_propagate_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op* ssa_op, int var, zend_ssa_range *tmp);
225
226
ZEND_API uint32_t zend_fetch_arg_info_type(
227
  const zend_script *script, const zend_arg_info *arg_info, zend_class_entry **pce);
228
ZEND_API void zend_init_func_return_info(
229
  const zend_op_array *op_array, const zend_script *script, zend_ssa_var_info *ret);
230
uint32_t zend_get_return_info_from_signature_only(
231
    const zend_function *func, const zend_script *script,
232
    zend_class_entry **ce, bool *ce_is_instanceof, bool use_tentative_return_info);
233
234
ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, const zend_ssa *ssa, uint32_t t1, uint32_t t2);
235
ZEND_API bool zend_may_throw(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, const zend_ssa *ssa);
236
237
ZEND_API zend_result zend_update_type_info(
238
  const zend_op_array *op_array, zend_ssa *ssa, const zend_script *script,
239
  const zend_op *opline, zend_ssa_op *ssa_op, const zend_op **ssa_opcodes,
240
  zend_long optimization_level);
241
242
END_EXTERN_C()
243
244
#endif /* ZEND_INFERENCE_H */