debase-ruby_core_source 0.10.17 → 0.10.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/addr2line.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/builtin.h +121 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/ccan/list/list.h +789 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/ccan/str/str.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/constant.h +55 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/darray.h +179 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/debug_counter.h +468 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/dln.h +31 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/encindex.h +70 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/eval_intern.h +339 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/gc.h +147 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/hrtime.h +227 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/id.h +295 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/id_table.h +36 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/insns.inc +249 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/insns_info.inc +9061 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/array.h +163 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/bignum.h +246 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/bits.h +565 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/class.h +181 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/cmdlineopt.h +61 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/compar.h +49 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/compile.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/compilers.h +107 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/cont.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/dir.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/enc.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/encoding.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/enum.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/enumerator.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/error.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/eval.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/file.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/fixnum.h +184 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/gc.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/hash.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/imemo.h +242 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/inits.h +50 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/io.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/load.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/loadpath.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/math.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/missing.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/numeric.h +275 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/object.h +61 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/parse.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/proc.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/process.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/ractor.h +6 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/random.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/range.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/rational.h +72 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/re.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/sanitizers.h +190 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/serial.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/signal.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/static_assert.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/string.h +147 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/struct.h +153 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/symbol.h +42 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/thread.h +55 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/time.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/transcode.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/util.h +27 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/variable.h +88 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/vm.h +134 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/warnings.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal.h +113 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/iseq.h +329 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/known_errors.inc +791 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/method.h +254 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/mjit.h +132 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/mjit_compile_attr.inc +430 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/mjit_compiler.h +58 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/mjit_unit.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/node.h +511 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/node_name.inc +210 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/opt_sc.inc +109 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/parse.h +215 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/probes_helper.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/ractor_core.h +343 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/regenc.h +254 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/regint.h +984 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/regparse.h +370 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/revision.h +5 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/ruby_assert.h +14 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/ruby_atomic.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/shape.h +194 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/symbol.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/thread_none.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/thread_pthread.h +132 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/thread_win32.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/timev.h +57 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/transcode_data.h +138 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/transient_heap.h +65 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/variable.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/version.h +65 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vm.inc +5476 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vm_call_iseq_optimized.inc +244 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vm_callinfo.h +550 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vm_core.h +2137 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vm_debug.h +122 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vm_exec.h +197 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vm_insnhelper.h +266 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vm_opts.h +73 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vm_sync.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vmtc.inc +243 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/yjit.h +72 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +118 -3
@@ -0,0 +1,430 @@
|
|
1
|
+
static rb_snum_t
|
2
|
+
mjit_call_attribute_sp_inc(const int insn, const VALUE *operands)
|
3
|
+
{
|
4
|
+
switch (insn) {
|
5
|
+
case BIN(nop): {
|
6
|
+
return attr_sp_inc_nop();
|
7
|
+
}
|
8
|
+
case BIN(getlocal): {
|
9
|
+
MAYBE_UNUSED(lindex_t idx) = (lindex_t)operands[0];
|
10
|
+
MAYBE_UNUSED(rb_num_t level) = (rb_num_t)operands[1];
|
11
|
+
return attr_sp_inc_getlocal(idx, level);
|
12
|
+
}
|
13
|
+
case BIN(setlocal): {
|
14
|
+
MAYBE_UNUSED(lindex_t idx) = (lindex_t)operands[0];
|
15
|
+
MAYBE_UNUSED(rb_num_t level) = (rb_num_t)operands[1];
|
16
|
+
return attr_sp_inc_setlocal(idx, level);
|
17
|
+
}
|
18
|
+
case BIN(getblockparam): {
|
19
|
+
MAYBE_UNUSED(lindex_t idx) = (lindex_t)operands[0];
|
20
|
+
MAYBE_UNUSED(rb_num_t level) = (rb_num_t)operands[1];
|
21
|
+
return attr_sp_inc_getblockparam(idx, level);
|
22
|
+
}
|
23
|
+
case BIN(setblockparam): {
|
24
|
+
MAYBE_UNUSED(lindex_t idx) = (lindex_t)operands[0];
|
25
|
+
MAYBE_UNUSED(rb_num_t level) = (rb_num_t)operands[1];
|
26
|
+
return attr_sp_inc_setblockparam(idx, level);
|
27
|
+
}
|
28
|
+
case BIN(getblockparamproxy): {
|
29
|
+
MAYBE_UNUSED(lindex_t idx) = (lindex_t)operands[0];
|
30
|
+
MAYBE_UNUSED(rb_num_t level) = (rb_num_t)operands[1];
|
31
|
+
return attr_sp_inc_getblockparamproxy(idx, level);
|
32
|
+
}
|
33
|
+
case BIN(getspecial): {
|
34
|
+
MAYBE_UNUSED(rb_num_t key) = (rb_num_t)operands[0];
|
35
|
+
MAYBE_UNUSED(rb_num_t type) = (rb_num_t)operands[1];
|
36
|
+
return attr_sp_inc_getspecial(key, type);
|
37
|
+
}
|
38
|
+
case BIN(setspecial): {
|
39
|
+
MAYBE_UNUSED(rb_num_t key) = (rb_num_t)operands[0];
|
40
|
+
return attr_sp_inc_setspecial(key);
|
41
|
+
}
|
42
|
+
case BIN(getinstancevariable): {
|
43
|
+
MAYBE_UNUSED(ID id) = (ID)operands[0];
|
44
|
+
MAYBE_UNUSED(IVC ic) = (IVC)operands[1];
|
45
|
+
return attr_sp_inc_getinstancevariable(id, ic);
|
46
|
+
}
|
47
|
+
case BIN(setinstancevariable): {
|
48
|
+
MAYBE_UNUSED(ID id) = (ID)operands[0];
|
49
|
+
MAYBE_UNUSED(IVC ic) = (IVC)operands[1];
|
50
|
+
return attr_sp_inc_setinstancevariable(id, ic);
|
51
|
+
}
|
52
|
+
case BIN(getclassvariable): {
|
53
|
+
MAYBE_UNUSED(ID id) = (ID)operands[0];
|
54
|
+
MAYBE_UNUSED(ICVARC ic) = (ICVARC)operands[1];
|
55
|
+
return attr_sp_inc_getclassvariable(id, ic);
|
56
|
+
}
|
57
|
+
case BIN(setclassvariable): {
|
58
|
+
MAYBE_UNUSED(ID id) = (ID)operands[0];
|
59
|
+
MAYBE_UNUSED(ICVARC ic) = (ICVARC)operands[1];
|
60
|
+
return attr_sp_inc_setclassvariable(id, ic);
|
61
|
+
}
|
62
|
+
case BIN(opt_getconstant_path): {
|
63
|
+
MAYBE_UNUSED(IC ic) = (IC)operands[0];
|
64
|
+
return attr_sp_inc_opt_getconstant_path(ic);
|
65
|
+
}
|
66
|
+
case BIN(getconstant): {
|
67
|
+
MAYBE_UNUSED(ID id) = (ID)operands[0];
|
68
|
+
return attr_sp_inc_getconstant(id);
|
69
|
+
}
|
70
|
+
case BIN(setconstant): {
|
71
|
+
MAYBE_UNUSED(ID id) = (ID)operands[0];
|
72
|
+
return attr_sp_inc_setconstant(id);
|
73
|
+
}
|
74
|
+
case BIN(getglobal): {
|
75
|
+
MAYBE_UNUSED(ID gid) = (ID)operands[0];
|
76
|
+
return attr_sp_inc_getglobal(gid);
|
77
|
+
}
|
78
|
+
case BIN(setglobal): {
|
79
|
+
MAYBE_UNUSED(ID gid) = (ID)operands[0];
|
80
|
+
return attr_sp_inc_setglobal(gid);
|
81
|
+
}
|
82
|
+
case BIN(putnil): {
|
83
|
+
return attr_sp_inc_putnil();
|
84
|
+
}
|
85
|
+
case BIN(putself): {
|
86
|
+
return attr_sp_inc_putself();
|
87
|
+
}
|
88
|
+
case BIN(putobject): {
|
89
|
+
MAYBE_UNUSED(VALUE val) = (VALUE)operands[0];
|
90
|
+
return attr_sp_inc_putobject(val);
|
91
|
+
}
|
92
|
+
case BIN(putspecialobject): {
|
93
|
+
MAYBE_UNUSED(rb_num_t value_type) = (rb_num_t)operands[0];
|
94
|
+
return attr_sp_inc_putspecialobject(value_type);
|
95
|
+
}
|
96
|
+
case BIN(putstring): {
|
97
|
+
MAYBE_UNUSED(VALUE str) = (VALUE)operands[0];
|
98
|
+
return attr_sp_inc_putstring(str);
|
99
|
+
}
|
100
|
+
case BIN(concatstrings): {
|
101
|
+
MAYBE_UNUSED(rb_num_t num) = (rb_num_t)operands[0];
|
102
|
+
return attr_sp_inc_concatstrings(num);
|
103
|
+
}
|
104
|
+
case BIN(anytostring): {
|
105
|
+
return attr_sp_inc_anytostring();
|
106
|
+
}
|
107
|
+
case BIN(toregexp): {
|
108
|
+
MAYBE_UNUSED(rb_num_t opt) = (rb_num_t)operands[0];
|
109
|
+
MAYBE_UNUSED(rb_num_t cnt) = (rb_num_t)operands[1];
|
110
|
+
return attr_sp_inc_toregexp(opt, cnt);
|
111
|
+
}
|
112
|
+
case BIN(intern): {
|
113
|
+
return attr_sp_inc_intern();
|
114
|
+
}
|
115
|
+
case BIN(newarray): {
|
116
|
+
MAYBE_UNUSED(rb_num_t num) = (rb_num_t)operands[0];
|
117
|
+
return attr_sp_inc_newarray(num);
|
118
|
+
}
|
119
|
+
case BIN(newarraykwsplat): {
|
120
|
+
MAYBE_UNUSED(rb_num_t num) = (rb_num_t)operands[0];
|
121
|
+
return attr_sp_inc_newarraykwsplat(num);
|
122
|
+
}
|
123
|
+
case BIN(duparray): {
|
124
|
+
MAYBE_UNUSED(VALUE ary) = (VALUE)operands[0];
|
125
|
+
return attr_sp_inc_duparray(ary);
|
126
|
+
}
|
127
|
+
case BIN(duphash): {
|
128
|
+
MAYBE_UNUSED(VALUE hash) = (VALUE)operands[0];
|
129
|
+
return attr_sp_inc_duphash(hash);
|
130
|
+
}
|
131
|
+
case BIN(expandarray): {
|
132
|
+
MAYBE_UNUSED(rb_num_t num) = (rb_num_t)operands[0];
|
133
|
+
MAYBE_UNUSED(rb_num_t flag) = (rb_num_t)operands[1];
|
134
|
+
return attr_sp_inc_expandarray(num, flag);
|
135
|
+
}
|
136
|
+
case BIN(concatarray): {
|
137
|
+
return attr_sp_inc_concatarray();
|
138
|
+
}
|
139
|
+
case BIN(splatarray): {
|
140
|
+
MAYBE_UNUSED(VALUE flag) = (VALUE)operands[0];
|
141
|
+
return attr_sp_inc_splatarray(flag);
|
142
|
+
}
|
143
|
+
case BIN(newhash): {
|
144
|
+
MAYBE_UNUSED(rb_num_t num) = (rb_num_t)operands[0];
|
145
|
+
return attr_sp_inc_newhash(num);
|
146
|
+
}
|
147
|
+
case BIN(newrange): {
|
148
|
+
MAYBE_UNUSED(rb_num_t flag) = (rb_num_t)operands[0];
|
149
|
+
return attr_sp_inc_newrange(flag);
|
150
|
+
}
|
151
|
+
case BIN(pop): {
|
152
|
+
return attr_sp_inc_pop();
|
153
|
+
}
|
154
|
+
case BIN(dup): {
|
155
|
+
return attr_sp_inc_dup();
|
156
|
+
}
|
157
|
+
case BIN(dupn): {
|
158
|
+
MAYBE_UNUSED(rb_num_t n) = (rb_num_t)operands[0];
|
159
|
+
return attr_sp_inc_dupn(n);
|
160
|
+
}
|
161
|
+
case BIN(swap): {
|
162
|
+
return attr_sp_inc_swap();
|
163
|
+
}
|
164
|
+
case BIN(opt_reverse): {
|
165
|
+
MAYBE_UNUSED(rb_num_t n) = (rb_num_t)operands[0];
|
166
|
+
return attr_sp_inc_opt_reverse(n);
|
167
|
+
}
|
168
|
+
case BIN(topn): {
|
169
|
+
MAYBE_UNUSED(rb_num_t n) = (rb_num_t)operands[0];
|
170
|
+
return attr_sp_inc_topn(n);
|
171
|
+
}
|
172
|
+
case BIN(setn): {
|
173
|
+
MAYBE_UNUSED(rb_num_t n) = (rb_num_t)operands[0];
|
174
|
+
return attr_sp_inc_setn(n);
|
175
|
+
}
|
176
|
+
case BIN(adjuststack): {
|
177
|
+
MAYBE_UNUSED(rb_num_t n) = (rb_num_t)operands[0];
|
178
|
+
return attr_sp_inc_adjuststack(n);
|
179
|
+
}
|
180
|
+
case BIN(defined): {
|
181
|
+
MAYBE_UNUSED(rb_num_t op_type) = (rb_num_t)operands[0];
|
182
|
+
MAYBE_UNUSED(VALUE obj) = (VALUE)operands[1];
|
183
|
+
MAYBE_UNUSED(VALUE pushval) = (VALUE)operands[2];
|
184
|
+
return attr_sp_inc_defined(op_type, obj, pushval);
|
185
|
+
}
|
186
|
+
case BIN(checkmatch): {
|
187
|
+
MAYBE_UNUSED(rb_num_t flag) = (rb_num_t)operands[0];
|
188
|
+
return attr_sp_inc_checkmatch(flag);
|
189
|
+
}
|
190
|
+
case BIN(checkkeyword): {
|
191
|
+
MAYBE_UNUSED(lindex_t kw_bits_index) = (lindex_t)operands[0];
|
192
|
+
MAYBE_UNUSED(lindex_t keyword_index) = (lindex_t)operands[1];
|
193
|
+
return attr_sp_inc_checkkeyword(kw_bits_index, keyword_index);
|
194
|
+
}
|
195
|
+
case BIN(checktype): {
|
196
|
+
MAYBE_UNUSED(rb_num_t type) = (rb_num_t)operands[0];
|
197
|
+
return attr_sp_inc_checktype(type);
|
198
|
+
}
|
199
|
+
case BIN(defineclass): {
|
200
|
+
MAYBE_UNUSED(ID id) = (ID)operands[0];
|
201
|
+
MAYBE_UNUSED(ISEQ class_iseq) = (ISEQ)operands[1];
|
202
|
+
MAYBE_UNUSED(rb_num_t flags) = (rb_num_t)operands[2];
|
203
|
+
return attr_sp_inc_defineclass(id, class_iseq, flags);
|
204
|
+
}
|
205
|
+
case BIN(definemethod): {
|
206
|
+
MAYBE_UNUSED(ID id) = (ID)operands[0];
|
207
|
+
MAYBE_UNUSED(ISEQ iseq) = (ISEQ)operands[1];
|
208
|
+
return attr_sp_inc_definemethod(id, iseq);
|
209
|
+
}
|
210
|
+
case BIN(definesmethod): {
|
211
|
+
MAYBE_UNUSED(ID id) = (ID)operands[0];
|
212
|
+
MAYBE_UNUSED(ISEQ iseq) = (ISEQ)operands[1];
|
213
|
+
return attr_sp_inc_definesmethod(id, iseq);
|
214
|
+
}
|
215
|
+
case BIN(send): {
|
216
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
217
|
+
MAYBE_UNUSED(ISEQ blockiseq) = (ISEQ)operands[1];
|
218
|
+
return attr_sp_inc_send(cd, blockiseq);
|
219
|
+
}
|
220
|
+
case BIN(opt_send_without_block): {
|
221
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
222
|
+
return attr_sp_inc_opt_send_without_block(cd);
|
223
|
+
}
|
224
|
+
case BIN(objtostring): {
|
225
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
226
|
+
return attr_sp_inc_objtostring(cd);
|
227
|
+
}
|
228
|
+
case BIN(opt_str_freeze): {
|
229
|
+
MAYBE_UNUSED(VALUE str) = (VALUE)operands[0];
|
230
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[1];
|
231
|
+
return attr_sp_inc_opt_str_freeze(str, cd);
|
232
|
+
}
|
233
|
+
case BIN(opt_nil_p): {
|
234
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
235
|
+
return attr_sp_inc_opt_nil_p(cd);
|
236
|
+
}
|
237
|
+
case BIN(opt_str_uminus): {
|
238
|
+
MAYBE_UNUSED(VALUE str) = (VALUE)operands[0];
|
239
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[1];
|
240
|
+
return attr_sp_inc_opt_str_uminus(str, cd);
|
241
|
+
}
|
242
|
+
case BIN(opt_newarray_max): {
|
243
|
+
MAYBE_UNUSED(rb_num_t num) = (rb_num_t)operands[0];
|
244
|
+
return attr_sp_inc_opt_newarray_max(num);
|
245
|
+
}
|
246
|
+
case BIN(opt_newarray_min): {
|
247
|
+
MAYBE_UNUSED(rb_num_t num) = (rb_num_t)operands[0];
|
248
|
+
return attr_sp_inc_opt_newarray_min(num);
|
249
|
+
}
|
250
|
+
case BIN(invokesuper): {
|
251
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
252
|
+
MAYBE_UNUSED(ISEQ blockiseq) = (ISEQ)operands[1];
|
253
|
+
return attr_sp_inc_invokesuper(cd, blockiseq);
|
254
|
+
}
|
255
|
+
case BIN(invokeblock): {
|
256
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
257
|
+
return attr_sp_inc_invokeblock(cd);
|
258
|
+
}
|
259
|
+
case BIN(leave): {
|
260
|
+
return attr_sp_inc_leave();
|
261
|
+
}
|
262
|
+
case BIN(throw): {
|
263
|
+
MAYBE_UNUSED(rb_num_t throw_state) = (rb_num_t)operands[0];
|
264
|
+
return attr_sp_inc_throw(throw_state);
|
265
|
+
}
|
266
|
+
case BIN(jump): {
|
267
|
+
MAYBE_UNUSED(OFFSET dst) = (OFFSET)operands[0];
|
268
|
+
return attr_sp_inc_jump(dst);
|
269
|
+
}
|
270
|
+
case BIN(branchif): {
|
271
|
+
MAYBE_UNUSED(OFFSET dst) = (OFFSET)operands[0];
|
272
|
+
return attr_sp_inc_branchif(dst);
|
273
|
+
}
|
274
|
+
case BIN(branchunless): {
|
275
|
+
MAYBE_UNUSED(OFFSET dst) = (OFFSET)operands[0];
|
276
|
+
return attr_sp_inc_branchunless(dst);
|
277
|
+
}
|
278
|
+
case BIN(branchnil): {
|
279
|
+
MAYBE_UNUSED(OFFSET dst) = (OFFSET)operands[0];
|
280
|
+
return attr_sp_inc_branchnil(dst);
|
281
|
+
}
|
282
|
+
case BIN(once): {
|
283
|
+
MAYBE_UNUSED(ISEQ iseq) = (ISEQ)operands[0];
|
284
|
+
MAYBE_UNUSED(ISE ise) = (ISE)operands[1];
|
285
|
+
return attr_sp_inc_once(iseq, ise);
|
286
|
+
}
|
287
|
+
case BIN(opt_case_dispatch): {
|
288
|
+
MAYBE_UNUSED(CDHASH hash) = (CDHASH)operands[0];
|
289
|
+
MAYBE_UNUSED(OFFSET else_offset) = (OFFSET)operands[1];
|
290
|
+
return attr_sp_inc_opt_case_dispatch(hash, else_offset);
|
291
|
+
}
|
292
|
+
case BIN(opt_plus): {
|
293
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
294
|
+
return attr_sp_inc_opt_plus(cd);
|
295
|
+
}
|
296
|
+
case BIN(opt_minus): {
|
297
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
298
|
+
return attr_sp_inc_opt_minus(cd);
|
299
|
+
}
|
300
|
+
case BIN(opt_mult): {
|
301
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
302
|
+
return attr_sp_inc_opt_mult(cd);
|
303
|
+
}
|
304
|
+
case BIN(opt_div): {
|
305
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
306
|
+
return attr_sp_inc_opt_div(cd);
|
307
|
+
}
|
308
|
+
case BIN(opt_mod): {
|
309
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
310
|
+
return attr_sp_inc_opt_mod(cd);
|
311
|
+
}
|
312
|
+
case BIN(opt_eq): {
|
313
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
314
|
+
return attr_sp_inc_opt_eq(cd);
|
315
|
+
}
|
316
|
+
case BIN(opt_neq): {
|
317
|
+
MAYBE_UNUSED(CALL_DATA cd_eq) = (CALL_DATA)operands[0];
|
318
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[1];
|
319
|
+
return attr_sp_inc_opt_neq(cd_eq, cd);
|
320
|
+
}
|
321
|
+
case BIN(opt_lt): {
|
322
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
323
|
+
return attr_sp_inc_opt_lt(cd);
|
324
|
+
}
|
325
|
+
case BIN(opt_le): {
|
326
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
327
|
+
return attr_sp_inc_opt_le(cd);
|
328
|
+
}
|
329
|
+
case BIN(opt_gt): {
|
330
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
331
|
+
return attr_sp_inc_opt_gt(cd);
|
332
|
+
}
|
333
|
+
case BIN(opt_ge): {
|
334
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
335
|
+
return attr_sp_inc_opt_ge(cd);
|
336
|
+
}
|
337
|
+
case BIN(opt_ltlt): {
|
338
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
339
|
+
return attr_sp_inc_opt_ltlt(cd);
|
340
|
+
}
|
341
|
+
case BIN(opt_and): {
|
342
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
343
|
+
return attr_sp_inc_opt_and(cd);
|
344
|
+
}
|
345
|
+
case BIN(opt_or): {
|
346
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
347
|
+
return attr_sp_inc_opt_or(cd);
|
348
|
+
}
|
349
|
+
case BIN(opt_aref): {
|
350
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
351
|
+
return attr_sp_inc_opt_aref(cd);
|
352
|
+
}
|
353
|
+
case BIN(opt_aset): {
|
354
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
355
|
+
return attr_sp_inc_opt_aset(cd);
|
356
|
+
}
|
357
|
+
case BIN(opt_aset_with): {
|
358
|
+
MAYBE_UNUSED(VALUE key) = (VALUE)operands[0];
|
359
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[1];
|
360
|
+
return attr_sp_inc_opt_aset_with(key, cd);
|
361
|
+
}
|
362
|
+
case BIN(opt_aref_with): {
|
363
|
+
MAYBE_UNUSED(VALUE key) = (VALUE)operands[0];
|
364
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[1];
|
365
|
+
return attr_sp_inc_opt_aref_with(key, cd);
|
366
|
+
}
|
367
|
+
case BIN(opt_length): {
|
368
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
369
|
+
return attr_sp_inc_opt_length(cd);
|
370
|
+
}
|
371
|
+
case BIN(opt_size): {
|
372
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
373
|
+
return attr_sp_inc_opt_size(cd);
|
374
|
+
}
|
375
|
+
case BIN(opt_empty_p): {
|
376
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
377
|
+
return attr_sp_inc_opt_empty_p(cd);
|
378
|
+
}
|
379
|
+
case BIN(opt_succ): {
|
380
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
381
|
+
return attr_sp_inc_opt_succ(cd);
|
382
|
+
}
|
383
|
+
case BIN(opt_not): {
|
384
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
385
|
+
return attr_sp_inc_opt_not(cd);
|
386
|
+
}
|
387
|
+
case BIN(opt_regexpmatch2): {
|
388
|
+
MAYBE_UNUSED(CALL_DATA cd) = (CALL_DATA)operands[0];
|
389
|
+
return attr_sp_inc_opt_regexpmatch2(cd);
|
390
|
+
}
|
391
|
+
case BIN(invokebuiltin): {
|
392
|
+
MAYBE_UNUSED(RB_BUILTIN bf) = (RB_BUILTIN)operands[0];
|
393
|
+
return attr_sp_inc_invokebuiltin(bf);
|
394
|
+
}
|
395
|
+
case BIN(opt_invokebuiltin_delegate): {
|
396
|
+
MAYBE_UNUSED(RB_BUILTIN bf) = (RB_BUILTIN)operands[0];
|
397
|
+
MAYBE_UNUSED(rb_num_t index) = (rb_num_t)operands[1];
|
398
|
+
return attr_sp_inc_opt_invokebuiltin_delegate(bf, index);
|
399
|
+
}
|
400
|
+
case BIN(opt_invokebuiltin_delegate_leave): {
|
401
|
+
MAYBE_UNUSED(RB_BUILTIN bf) = (RB_BUILTIN)operands[0];
|
402
|
+
MAYBE_UNUSED(rb_num_t index) = (rb_num_t)operands[1];
|
403
|
+
return attr_sp_inc_opt_invokebuiltin_delegate_leave(bf, index);
|
404
|
+
}
|
405
|
+
case BIN(getlocal_WC_0): {
|
406
|
+
MAYBE_UNUSED(lindex_t idx) = (lindex_t)operands[0];
|
407
|
+
return attr_sp_inc_getlocal_WC_0(idx);
|
408
|
+
}
|
409
|
+
case BIN(getlocal_WC_1): {
|
410
|
+
MAYBE_UNUSED(lindex_t idx) = (lindex_t)operands[0];
|
411
|
+
return attr_sp_inc_getlocal_WC_1(idx);
|
412
|
+
}
|
413
|
+
case BIN(setlocal_WC_0): {
|
414
|
+
MAYBE_UNUSED(lindex_t idx) = (lindex_t)operands[0];
|
415
|
+
return attr_sp_inc_setlocal_WC_0(idx);
|
416
|
+
}
|
417
|
+
case BIN(setlocal_WC_1): {
|
418
|
+
MAYBE_UNUSED(lindex_t idx) = (lindex_t)operands[0];
|
419
|
+
return attr_sp_inc_setlocal_WC_1(idx);
|
420
|
+
}
|
421
|
+
case BIN(putobject_INT2FIX_0_): {
|
422
|
+
return attr_sp_inc_putobject_INT2FIX_0_();
|
423
|
+
}
|
424
|
+
case BIN(putobject_INT2FIX_1_): {
|
425
|
+
return attr_sp_inc_putobject_INT2FIX_1_();
|
426
|
+
}
|
427
|
+
default:
|
428
|
+
rb_bug("unexpected insn in mjit_call_attribute_sp_inc");
|
429
|
+
}
|
430
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
// This file is parsed by tool/mjit/generate.rb for MJIT's C/Ruby interop.
|
2
|
+
#ifndef MJIT_COMPILER_H
|
3
|
+
#define MJIT_COMPILER_H
|
4
|
+
|
5
|
+
#include "ruby/internal/config.h"
|
6
|
+
#include "vm_core.h"
|
7
|
+
#include "vm_callinfo.h"
|
8
|
+
#include "builtin.h"
|
9
|
+
#include "mjit.h"
|
10
|
+
#include "mjit_unit.h"
|
11
|
+
#include "shape.h"
|
12
|
+
|
13
|
+
// Macros to check if a position is already compiled using compile_status.stack_size_for_pos
|
14
|
+
#define NOT_COMPILED_STACK_SIZE -1
|
15
|
+
#define ALREADY_COMPILED_P(status, pos) (status->stack_size_for_pos[pos] != NOT_COMPILED_STACK_SIZE)
|
16
|
+
|
17
|
+
// Storage to keep data which is consistent in each conditional branch.
|
18
|
+
// This is created and used for one `compile_insns` call and its values
|
19
|
+
// should be copied for extra `compile_insns` call.
|
20
|
+
struct compile_branch {
|
21
|
+
unsigned int stack_size; // this simulates sp (stack pointer) of YARV
|
22
|
+
bool finish_p; // if true, compilation in this branch should stop and let another branch to be compiled
|
23
|
+
};
|
24
|
+
|
25
|
+
// For propagating information needed for lazily pushing a frame.
|
26
|
+
struct inlined_call_context {
|
27
|
+
int orig_argc; // ci->orig_argc
|
28
|
+
VALUE me; // vm_cc_cme(cc)
|
29
|
+
int param_size; // def_iseq_ptr(vm_cc_cme(cc)->def)->body->param.size
|
30
|
+
int local_size; // def_iseq_ptr(vm_cc_cme(cc)->def)->body->local_table_size
|
31
|
+
};
|
32
|
+
|
33
|
+
// Storage to keep compiler's status. This should have information
|
34
|
+
// which is global during one `mjit_compile` call. Ones conditional
|
35
|
+
// in each branch should be stored in `compile_branch`.
|
36
|
+
struct compile_status {
|
37
|
+
bool success; // has true if compilation has had no issue
|
38
|
+
int *stack_size_for_pos; // stack_size_for_pos[pos] has stack size for the position (otherwise -1)
|
39
|
+
// If true, JIT-ed code will use local variables to store pushed values instead of
|
40
|
+
// using VM's stack and moving stack pointer.
|
41
|
+
bool local_stack_p;
|
42
|
+
// Safely-accessible ivar cache entries copied from main thread.
|
43
|
+
union iseq_inline_storage_entry *is_entries;
|
44
|
+
// Index of call cache entries captured to compiled_iseq to be marked on GC
|
45
|
+
int cc_entries_index;
|
46
|
+
// A pointer to root (i.e. not inlined) iseq being compiled.
|
47
|
+
const struct rb_iseq_constant_body *compiled_iseq;
|
48
|
+
int compiled_id; // Just a copy of compiled_iseq->jit_unit->id
|
49
|
+
// Mutated optimization levels
|
50
|
+
struct rb_mjit_compile_info *compile_info;
|
51
|
+
bool merge_ivar_guards_p; // If true, merge guards of ivar accesses
|
52
|
+
size_t max_ivar_index; // Max IVC index in is_entries (used only when merge_ivar_guards_p)
|
53
|
+
// If `inlined_iseqs[pos]` is not NULL, `mjit_compile_body` tries to inline ISeq there.
|
54
|
+
const struct rb_iseq_constant_body **inlined_iseqs;
|
55
|
+
struct inlined_call_context inline_context;
|
56
|
+
};
|
57
|
+
|
58
|
+
#endif /* MJIT_COMPILER_H */
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#ifndef MJIT_UNIT_H
|
2
|
+
#define MJIT_UNIT_H
|
3
|
+
|
4
|
+
#include "ccan/list/list.h"
|
5
|
+
|
6
|
+
// The unit structure that holds metadata of ISeq for MJIT.
|
7
|
+
struct rb_mjit_unit {
|
8
|
+
struct ccan_list_node unode;
|
9
|
+
// Unique order number of unit.
|
10
|
+
int id;
|
11
|
+
// Dlopen handle of the loaded object file.
|
12
|
+
void *handle;
|
13
|
+
rb_iseq_t *iseq;
|
14
|
+
#if defined(_WIN32)
|
15
|
+
// DLL cannot be removed while loaded on Windows. If this is set, it'll be lazily deleted.
|
16
|
+
char *so_file;
|
17
|
+
#endif
|
18
|
+
// Only used by unload_units. Flag to check this unit is currently on stack or not.
|
19
|
+
bool used_code_p;
|
20
|
+
// True if it's a unit for JIT compaction
|
21
|
+
bool compact_p;
|
22
|
+
// mjit_compile's optimization switches
|
23
|
+
struct rb_mjit_compile_info compile_info;
|
24
|
+
// captured CC values, they should be marked with iseq.
|
25
|
+
const struct rb_callcache **cc_entries;
|
26
|
+
unsigned int cc_entries_size; // ISEQ_BODY(iseq)->ci_size + ones of inlined iseqs
|
27
|
+
};
|
28
|
+
|
29
|
+
#endif /* MJIT_UNIT_H */
|