Ruby: rjit_c.h Source File

Ruby 3.3.6p108 (2024-11-05 revision 75015d4c1f6965b5e85e96fb309f1f2129f933c0)

rjit_c.h
1// This file is parsed by tool/rjit/generate.rb to generate rjit_c.rb
2#ifndef RJIT_C_H
3#define RJIT_C_H
4
5#include "ruby/internal/config.h"
6#include "internal/string.h"
7#include "internal/struct.h"
8#include "internal/variable.h"
9#include "vm_core.h"
10#include "vm_callinfo.h"
11#include "builtin.h"
12#include "ccan/list/list.h"
13#include "rjit.h"
14#include "shape.h"
15
16extern uint8_t *rb_rjit_mem_block;
17
18#define RJIT_RUNTIME_COUNTERS(...) struct rb_rjit_runtime_counters { size_t __VA_ARGS__; };
19RJIT_RUNTIME_COUNTERS(
20 rjit_insns_count,
21
22 send_args_splat_kw_splat,
23 send_args_splat,
24 send_args_splat_not_array,
25 send_args_splat_length_not_equal,
26 send_args_splat_cfunc_var_args,
27 send_args_splat_arity_error,
28 send_args_splat_ruby2_hash,
29 send_args_splat_cfunc_zuper,
30 send_args_splat_cfunc_ruby2_keywords,
31 send_kw_splat,
32 send_kwarg,
33 send_klass_megamorphic,
34 send_missing_cme,
35 send_private,
36 send_protected_check_failed,
37 send_tailcall,
38 send_notimplemented,
39 send_missing,
40 send_bmethod,
41 send_alias,
42 send_undef,
43 send_zsuper,
44 send_refined,
45 send_stackoverflow,
46 send_arity,
47 send_c_tracing,
48 send_is_a_class_mismatch,
49 send_instance_of_class_mismatch,
50 send_keywords,
51
52 send_blockiseq,
53 send_block_handler,
54 send_block_setup,
55 send_block_not_nil,
56 send_block_not_proxy,
57 send_block_arg,
58
59 send_iseq_kwparam,
60 send_iseq_accepts_no_kwarg,
61 send_iseq_has_opt,
62 send_iseq_has_kwrest,
63 send_iseq_ruby2_keywords,
64 send_iseq_has_rest_and_captured,
65 send_iseq_has_rest_and_kw_supplied,
66 send_iseq_has_no_kw,
67 send_iseq_zsuper,
68 send_iseq_materialized_block,
69 send_iseq_has_rest,
70 send_iseq_block_arg0_splat,
71 send_iseq_kw_call,
72 send_iseq_splat,
73 send_iseq_has_rest_and_optional,
74 send_iseq_arity_error,
75 send_iseq_missing_optional_kw,
76 send_iseq_too_many_kwargs,
77 send_iseq_kwargs_mismatch,
78 send_iseq_splat_with_kw,
79 send_iseq_splat_arity_error,
80 send_iseq_has_rest_and_splat_not_equal,
81
82 send_cfunc_variadic,
83 send_cfunc_too_many_args,
84 send_cfunc_ruby_array_varg,
85 send_cfunc_splat_with_kw,
86 send_cfunc_tracing,
87 send_cfunc_argc_mismatch,
88 send_cfunc_toomany_args,
89
90 send_attrset_splat,
91 send_attrset_kwarg,
92 send_attrset_method,
93
94 send_ivar_splat,
95 send_ivar_opt_send,
96
97 send_optimized_send_no_args,
98 send_optimized_send_not_sym_or_str,
99 send_optimized_send_mid_class_changed,
100 send_optimized_send_mid_id_changed,
101 send_optimized_send_null_mid,
102 send_optimized_send_send,
103 send_optimized_call_block,
104 send_optimized_call_kwarg,
105 send_optimized_call_splat,
106 send_optimized_struct_aref_error,
107
108 send_optimized_block_call,
109 send_optimized_struct_aset,
110
111 send_bmethod_not_iseq,
112 send_bmethod_blockarg,
113
114 invokesuper_me_changed,
115 invokesuper_block,
116
117 invokeblock_none,
118 invokeblock_symbol,
119 invokeblock_proc,
120 invokeblock_tag_changed,
121 invokeblock_iseq_block_changed,
122 invokeblock_iseq_arity,
123 invokeblock_iseq_arg0_splat,
124 invokeblock_ifunc_args_splat,
125 invokeblock_ifunc_kw_splat,
126 invokeblock_iseq_arg0_args_splat,
127 invokeblock_iseq_arg0_has_kw,
128
129 getivar_megamorphic,
130 getivar_not_heap,
131 getivar_special_const,
132 getivar_too_complex,
133
134 optaref_arg_not_fixnum,
135 optaref_argc_not_one,
136 optaref_recv_not_array,
137 optaref_recv_not_hash,
138 optaref_send,
139
140 optgetconst_not_cached,
141 optgetconst_cref,
142 optgetconst_cache_miss,
143
144 setivar_frozen,
145 setivar_not_heap,
146 setivar_megamorphic,
147 setivar_too_complex,
148
149 expandarray_splat,
150 expandarray_postarg,
151 expandarray_not_array,
152 expandarray_rhs_too_small,
153
154 getblockpp_block_param_modified,
155 getblockpp_block_handler_none,
156 getblockpp_not_gc_guarded,
157 getblockpp_not_iseq_block,
158
159 compiled_block_count
160)
161#undef RJIT_RUNTIME_COUNTERS
162extern struct rb_rjit_runtime_counters rb_rjit_counters;
163
164#endif /* RJIT_C_H */