debugger-ruby_core_source 1.2.4 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +3 -0
- data/debugger-ruby_core_source.gemspec +1 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/addr2line.h +21 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/constant.h +36 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/dln.h +51 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/encdb.h +170 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/eval_intern.h +260 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/gc.h +101 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/id.h +171 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/insns.inc +189 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/insns_info.inc +731 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/internal.h +889 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/iseq.h +136 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/known_errors.inc +731 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/method.h +142 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/node.h +543 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/node_name.inc +212 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/opt_sc.inc +710 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/optinsn.inc +83 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/optunifs.inc +121 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/parse.h +183 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/probes_helper.h +67 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/regenc.h +223 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/regint.h +911 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/regparse.h +363 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/revision.h +1 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/ruby_atomic.h +165 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/siphash.h +48 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/thread_native.h +23 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/thread_pthread.h +56 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/thread_win32.h +45 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/timev.h +42 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/transcode_data.h +123 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/transdb.h +193 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/version.h +52 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/vm.inc +3243 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/vm_core.h +1043 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/vm_debug.h +37 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/vm_exec.h +182 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/vm_insnhelper.h +273 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/vm_opts.h +56 -0
- data/lib/debugger/ruby_core_source/ruby-2.1.0/vmtc.inc +102 -0
- data/lib/debugger/ruby_core_source/version.rb +1 -1
- metadata +44 -3
@@ -0,0 +1,52 @@
|
|
1
|
+
#define RUBY_VERSION "2.1.0"
|
2
|
+
#define RUBY_RELEASE_DATE "2013-12-25"
|
3
|
+
#define RUBY_PATCHLEVEL 0
|
4
|
+
|
5
|
+
#define RUBY_RELEASE_YEAR 2013
|
6
|
+
#define RUBY_RELEASE_MONTH 12
|
7
|
+
#define RUBY_RELEASE_DAY 25
|
8
|
+
|
9
|
+
#include "ruby/version.h"
|
10
|
+
|
11
|
+
#if !defined RUBY_LIB_VERSION && defined RUBY_LIB_VERSION_STYLE
|
12
|
+
# if RUBY_LIB_VERSION_STYLE == 3
|
13
|
+
# define RUBY_LIB_VERSION STRINGIZE(RUBY_API_VERSION_MAJOR)"."STRINGIZE(RUBY_API_VERSION_MINOR)"."STRINGIZE(RUBY_API_VERSION_TEENY)
|
14
|
+
# elif RUBY_LIB_VERSION_STYLE == 2
|
15
|
+
# define RUBY_LIB_VERSION STRINGIZE(RUBY_API_VERSION_MAJOR)"."STRINGIZE(RUBY_API_VERSION_MINOR)
|
16
|
+
# endif
|
17
|
+
#endif
|
18
|
+
|
19
|
+
#if RUBY_PATCHLEVEL == -1
|
20
|
+
#define RUBY_PATCHLEVEL_STR "dev"
|
21
|
+
#else
|
22
|
+
#define RUBY_PATCHLEVEL_STR "p"STRINGIZE(RUBY_PATCHLEVEL)
|
23
|
+
#endif
|
24
|
+
|
25
|
+
#ifndef RUBY_REVISION
|
26
|
+
# include "revision.h"
|
27
|
+
#endif
|
28
|
+
#ifndef RUBY_REVISION
|
29
|
+
# define RUBY_REVISION 0
|
30
|
+
#endif
|
31
|
+
|
32
|
+
#if RUBY_REVISION
|
33
|
+
# ifdef RUBY_BRANCH_NAME
|
34
|
+
# define RUBY_REVISION_STR " "RUBY_BRANCH_NAME" "STRINGIZE(RUBY_REVISION)
|
35
|
+
# else
|
36
|
+
# define RUBY_REVISION_STR " revision "STRINGIZE(RUBY_REVISION)
|
37
|
+
# endif
|
38
|
+
#else
|
39
|
+
# define RUBY_REVISION_STR ""
|
40
|
+
#endif
|
41
|
+
|
42
|
+
# define RUBY_DESCRIPTION \
|
43
|
+
"ruby "RUBY_VERSION \
|
44
|
+
RUBY_PATCHLEVEL_STR \
|
45
|
+
" ("RUBY_RELEASE_DATE \
|
46
|
+
RUBY_REVISION_STR") " \
|
47
|
+
"["RUBY_PLATFORM"]"
|
48
|
+
# define RUBY_COPYRIGHT \
|
49
|
+
"ruby - Copyright (C) " \
|
50
|
+
STRINGIZE(RUBY_BIRTH_YEAR)"-" \
|
51
|
+
STRINGIZE(RUBY_RELEASE_YEAR)" " \
|
52
|
+
RUBY_AUTHOR
|
@@ -0,0 +1,3243 @@
|
|
1
|
+
/* -*-c-*- *********************************************************/
|
2
|
+
/*******************************************************************/
|
3
|
+
/*******************************************************************/
|
4
|
+
/**
|
5
|
+
This file is VM main loop.
|
6
|
+
|
7
|
+
----
|
8
|
+
This file is auto generated by insns2vm.rb
|
9
|
+
DO NOT TOUCH!
|
10
|
+
|
11
|
+
If you want to fix something, you must edit 'insns.c'
|
12
|
+
*/
|
13
|
+
|
14
|
+
|
15
|
+
INSN_ENTRY(nop){
|
16
|
+
{
|
17
|
+
|
18
|
+
|
19
|
+
DEBUG_ENTER_INSN("nop");
|
20
|
+
ADD_PC(1+0);
|
21
|
+
PREFETCH(GET_PC());
|
22
|
+
#define CURRENT_INSN_nop 1
|
23
|
+
#define INSN_IS_SC() 0
|
24
|
+
#define INSN_LABEL(lab) LABEL_nop_##lab
|
25
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
26
|
+
COLLECT_USAGE_INSN(BIN(nop));
|
27
|
+
{
|
28
|
+
#line 40 "insns.def"
|
29
|
+
/* none */
|
30
|
+
|
31
|
+
#line 32 "vm.inc"
|
32
|
+
#undef CURRENT_INSN_nop
|
33
|
+
#undef INSN_IS_SC
|
34
|
+
#undef INSN_LABEL
|
35
|
+
#undef LABEL_IS_SC
|
36
|
+
END_INSN(nop);}}}
|
37
|
+
INSN_ENTRY(getlocal){
|
38
|
+
{
|
39
|
+
VALUE val;
|
40
|
+
rb_num_t level = (rb_num_t)GET_OPERAND(2);
|
41
|
+
lindex_t idx = (lindex_t)GET_OPERAND(1);
|
42
|
+
|
43
|
+
DEBUG_ENTER_INSN("getlocal");
|
44
|
+
ADD_PC(1+2);
|
45
|
+
PREFETCH(GET_PC());
|
46
|
+
#define CURRENT_INSN_getlocal 1
|
47
|
+
#define INSN_IS_SC() 0
|
48
|
+
#define INSN_LABEL(lab) LABEL_getlocal_##lab
|
49
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
50
|
+
COLLECT_USAGE_INSN(BIN(getlocal));
|
51
|
+
COLLECT_USAGE_OPERAND(BIN(getlocal), 0, idx);
|
52
|
+
COLLECT_USAGE_OPERAND(BIN(getlocal), 1, level);
|
53
|
+
{
|
54
|
+
#line 60 "insns.def"
|
55
|
+
int i, lev = (int)level;
|
56
|
+
VALUE *ep = GET_EP();
|
57
|
+
|
58
|
+
for (i = 0; i < lev; i++) {
|
59
|
+
ep = GET_PREV_EP(ep);
|
60
|
+
}
|
61
|
+
val = *(ep - idx);
|
62
|
+
|
63
|
+
#line 64 "vm.inc"
|
64
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
65
|
+
PUSH(val);
|
66
|
+
#undef CURRENT_INSN_getlocal
|
67
|
+
#undef INSN_IS_SC
|
68
|
+
#undef INSN_LABEL
|
69
|
+
#undef LABEL_IS_SC
|
70
|
+
END_INSN(getlocal);}}}
|
71
|
+
INSN_ENTRY(setlocal){
|
72
|
+
{
|
73
|
+
rb_num_t level = (rb_num_t)GET_OPERAND(2);
|
74
|
+
lindex_t idx = (lindex_t)GET_OPERAND(1);
|
75
|
+
VALUE val = TOPN(0);
|
76
|
+
DEBUG_ENTER_INSN("setlocal");
|
77
|
+
ADD_PC(1+2);
|
78
|
+
PREFETCH(GET_PC());
|
79
|
+
POPN(1);
|
80
|
+
#define CURRENT_INSN_setlocal 1
|
81
|
+
#define INSN_IS_SC() 0
|
82
|
+
#define INSN_LABEL(lab) LABEL_setlocal_##lab
|
83
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
84
|
+
COLLECT_USAGE_INSN(BIN(setlocal));
|
85
|
+
COLLECT_USAGE_OPERAND(BIN(setlocal), 0, idx);
|
86
|
+
COLLECT_USAGE_OPERAND(BIN(setlocal), 1, level);
|
87
|
+
{
|
88
|
+
#line 82 "insns.def"
|
89
|
+
int i, lev = (int)level;
|
90
|
+
VALUE *ep = GET_EP();
|
91
|
+
|
92
|
+
for (i = 0; i < lev; i++) {
|
93
|
+
ep = GET_PREV_EP(ep);
|
94
|
+
}
|
95
|
+
*(ep - idx) = val;
|
96
|
+
|
97
|
+
#line 98 "vm.inc"
|
98
|
+
#undef CURRENT_INSN_setlocal
|
99
|
+
#undef INSN_IS_SC
|
100
|
+
#undef INSN_LABEL
|
101
|
+
#undef LABEL_IS_SC
|
102
|
+
END_INSN(setlocal);}}}
|
103
|
+
INSN_ENTRY(getspecial){
|
104
|
+
{
|
105
|
+
VALUE val;
|
106
|
+
rb_num_t type = (rb_num_t)GET_OPERAND(2);
|
107
|
+
rb_num_t key = (rb_num_t)GET_OPERAND(1);
|
108
|
+
|
109
|
+
DEBUG_ENTER_INSN("getspecial");
|
110
|
+
ADD_PC(1+2);
|
111
|
+
PREFETCH(GET_PC());
|
112
|
+
#define CURRENT_INSN_getspecial 1
|
113
|
+
#define INSN_IS_SC() 0
|
114
|
+
#define INSN_LABEL(lab) LABEL_getspecial_##lab
|
115
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
116
|
+
COLLECT_USAGE_INSN(BIN(getspecial));
|
117
|
+
COLLECT_USAGE_OPERAND(BIN(getspecial), 0, key);
|
118
|
+
COLLECT_USAGE_OPERAND(BIN(getspecial), 1, type);
|
119
|
+
{
|
120
|
+
#line 102 "insns.def"
|
121
|
+
val = vm_getspecial(th, GET_LEP(), key, type);
|
122
|
+
|
123
|
+
#line 124 "vm.inc"
|
124
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
125
|
+
PUSH(val);
|
126
|
+
#undef CURRENT_INSN_getspecial
|
127
|
+
#undef INSN_IS_SC
|
128
|
+
#undef INSN_LABEL
|
129
|
+
#undef LABEL_IS_SC
|
130
|
+
END_INSN(getspecial);}}}
|
131
|
+
INSN_ENTRY(setspecial){
|
132
|
+
{
|
133
|
+
rb_num_t key = (rb_num_t)GET_OPERAND(1);
|
134
|
+
VALUE obj = TOPN(0);
|
135
|
+
DEBUG_ENTER_INSN("setspecial");
|
136
|
+
ADD_PC(1+1);
|
137
|
+
PREFETCH(GET_PC());
|
138
|
+
POPN(1);
|
139
|
+
#define CURRENT_INSN_setspecial 1
|
140
|
+
#define INSN_IS_SC() 0
|
141
|
+
#define INSN_LABEL(lab) LABEL_setspecial_##lab
|
142
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
143
|
+
COLLECT_USAGE_INSN(BIN(setspecial));
|
144
|
+
COLLECT_USAGE_OPERAND(BIN(setspecial), 0, key);
|
145
|
+
{
|
146
|
+
#line 116 "insns.def"
|
147
|
+
lep_svar_set(th, GET_LEP(), key, obj);
|
148
|
+
|
149
|
+
#line 150 "vm.inc"
|
150
|
+
#undef CURRENT_INSN_setspecial
|
151
|
+
#undef INSN_IS_SC
|
152
|
+
#undef INSN_LABEL
|
153
|
+
#undef LABEL_IS_SC
|
154
|
+
END_INSN(setspecial);}}}
|
155
|
+
INSN_ENTRY(getinstancevariable){
|
156
|
+
{
|
157
|
+
VALUE val;
|
158
|
+
IC ic = (IC)GET_OPERAND(2);
|
159
|
+
ID id = (ID)GET_OPERAND(1);
|
160
|
+
|
161
|
+
DEBUG_ENTER_INSN("getinstancevariable");
|
162
|
+
ADD_PC(1+2);
|
163
|
+
PREFETCH(GET_PC());
|
164
|
+
#define CURRENT_INSN_getinstancevariable 1
|
165
|
+
#define INSN_IS_SC() 0
|
166
|
+
#define INSN_LABEL(lab) LABEL_getinstancevariable_##lab
|
167
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
168
|
+
COLLECT_USAGE_INSN(BIN(getinstancevariable));
|
169
|
+
COLLECT_USAGE_OPERAND(BIN(getinstancevariable), 0, id);
|
170
|
+
COLLECT_USAGE_OPERAND(BIN(getinstancevariable), 1, ic);
|
171
|
+
{
|
172
|
+
#line 131 "insns.def"
|
173
|
+
val = vm_getinstancevariable(GET_SELF(), id, ic);
|
174
|
+
|
175
|
+
#line 176 "vm.inc"
|
176
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
177
|
+
PUSH(val);
|
178
|
+
#undef CURRENT_INSN_getinstancevariable
|
179
|
+
#undef INSN_IS_SC
|
180
|
+
#undef INSN_LABEL
|
181
|
+
#undef LABEL_IS_SC
|
182
|
+
END_INSN(getinstancevariable);}}}
|
183
|
+
INSN_ENTRY(setinstancevariable){
|
184
|
+
{
|
185
|
+
IC ic = (IC)GET_OPERAND(2);
|
186
|
+
ID id = (ID)GET_OPERAND(1);
|
187
|
+
VALUE val = TOPN(0);
|
188
|
+
DEBUG_ENTER_INSN("setinstancevariable");
|
189
|
+
ADD_PC(1+2);
|
190
|
+
PREFETCH(GET_PC());
|
191
|
+
POPN(1);
|
192
|
+
#define CURRENT_INSN_setinstancevariable 1
|
193
|
+
#define INSN_IS_SC() 0
|
194
|
+
#define INSN_LABEL(lab) LABEL_setinstancevariable_##lab
|
195
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
196
|
+
COLLECT_USAGE_INSN(BIN(setinstancevariable));
|
197
|
+
COLLECT_USAGE_OPERAND(BIN(setinstancevariable), 0, id);
|
198
|
+
COLLECT_USAGE_OPERAND(BIN(setinstancevariable), 1, ic);
|
199
|
+
{
|
200
|
+
#line 146 "insns.def"
|
201
|
+
vm_setinstancevariable(GET_SELF(), id, val, ic);
|
202
|
+
|
203
|
+
#line 204 "vm.inc"
|
204
|
+
#undef CURRENT_INSN_setinstancevariable
|
205
|
+
#undef INSN_IS_SC
|
206
|
+
#undef INSN_LABEL
|
207
|
+
#undef LABEL_IS_SC
|
208
|
+
END_INSN(setinstancevariable);}}}
|
209
|
+
INSN_ENTRY(getclassvariable){
|
210
|
+
{
|
211
|
+
VALUE val;
|
212
|
+
ID id = (ID)GET_OPERAND(1);
|
213
|
+
|
214
|
+
DEBUG_ENTER_INSN("getclassvariable");
|
215
|
+
ADD_PC(1+1);
|
216
|
+
PREFETCH(GET_PC());
|
217
|
+
#define CURRENT_INSN_getclassvariable 1
|
218
|
+
#define INSN_IS_SC() 0
|
219
|
+
#define INSN_LABEL(lab) LABEL_getclassvariable_##lab
|
220
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
221
|
+
COLLECT_USAGE_INSN(BIN(getclassvariable));
|
222
|
+
COLLECT_USAGE_OPERAND(BIN(getclassvariable), 0, id);
|
223
|
+
{
|
224
|
+
#line 160 "insns.def"
|
225
|
+
NODE *cref = rb_vm_get_cref(GET_ISEQ(), GET_EP());
|
226
|
+
val = rb_cvar_get(vm_get_cvar_base(cref, GET_CFP()), id);
|
227
|
+
|
228
|
+
#line 229 "vm.inc"
|
229
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
230
|
+
PUSH(val);
|
231
|
+
#undef CURRENT_INSN_getclassvariable
|
232
|
+
#undef INSN_IS_SC
|
233
|
+
#undef INSN_LABEL
|
234
|
+
#undef LABEL_IS_SC
|
235
|
+
END_INSN(getclassvariable);}}}
|
236
|
+
INSN_ENTRY(setclassvariable){
|
237
|
+
{
|
238
|
+
ID id = (ID)GET_OPERAND(1);
|
239
|
+
VALUE val = TOPN(0);
|
240
|
+
DEBUG_ENTER_INSN("setclassvariable");
|
241
|
+
ADD_PC(1+1);
|
242
|
+
PREFETCH(GET_PC());
|
243
|
+
POPN(1);
|
244
|
+
#define CURRENT_INSN_setclassvariable 1
|
245
|
+
#define INSN_IS_SC() 0
|
246
|
+
#define INSN_LABEL(lab) LABEL_setclassvariable_##lab
|
247
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
248
|
+
COLLECT_USAGE_INSN(BIN(setclassvariable));
|
249
|
+
COLLECT_USAGE_OPERAND(BIN(setclassvariable), 0, id);
|
250
|
+
{
|
251
|
+
#line 175 "insns.def"
|
252
|
+
NODE *cref = rb_vm_get_cref(GET_ISEQ(), GET_EP());
|
253
|
+
rb_cvar_set(vm_get_cvar_base(cref, GET_CFP()), id, val);
|
254
|
+
|
255
|
+
#line 256 "vm.inc"
|
256
|
+
#undef CURRENT_INSN_setclassvariable
|
257
|
+
#undef INSN_IS_SC
|
258
|
+
#undef INSN_LABEL
|
259
|
+
#undef LABEL_IS_SC
|
260
|
+
END_INSN(setclassvariable);}}}
|
261
|
+
INSN_ENTRY(getconstant){
|
262
|
+
{
|
263
|
+
VALUE val;
|
264
|
+
ID id = (ID)GET_OPERAND(1);
|
265
|
+
VALUE klass = TOPN(0);
|
266
|
+
DEBUG_ENTER_INSN("getconstant");
|
267
|
+
ADD_PC(1+1);
|
268
|
+
PREFETCH(GET_PC());
|
269
|
+
POPN(1);
|
270
|
+
#define CURRENT_INSN_getconstant 1
|
271
|
+
#define INSN_IS_SC() 0
|
272
|
+
#define INSN_LABEL(lab) LABEL_getconstant_##lab
|
273
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
274
|
+
COLLECT_USAGE_INSN(BIN(getconstant));
|
275
|
+
COLLECT_USAGE_OPERAND(BIN(getconstant), 0, id);
|
276
|
+
{
|
277
|
+
#line 197 "insns.def"
|
278
|
+
val = vm_get_ev_const(th, GET_ISEQ(), klass, id, 0);
|
279
|
+
|
280
|
+
#line 281 "vm.inc"
|
281
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
282
|
+
PUSH(val);
|
283
|
+
#undef CURRENT_INSN_getconstant
|
284
|
+
#undef INSN_IS_SC
|
285
|
+
#undef INSN_LABEL
|
286
|
+
#undef LABEL_IS_SC
|
287
|
+
END_INSN(getconstant);}}}
|
288
|
+
INSN_ENTRY(setconstant){
|
289
|
+
{
|
290
|
+
ID id = (ID)GET_OPERAND(1);
|
291
|
+
VALUE val = TOPN(1);
|
292
|
+
VALUE cbase = TOPN(0);
|
293
|
+
DEBUG_ENTER_INSN("setconstant");
|
294
|
+
ADD_PC(1+1);
|
295
|
+
PREFETCH(GET_PC());
|
296
|
+
POPN(2);
|
297
|
+
#define CURRENT_INSN_setconstant 1
|
298
|
+
#define INSN_IS_SC() 0
|
299
|
+
#define INSN_LABEL(lab) LABEL_setconstant_##lab
|
300
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
301
|
+
COLLECT_USAGE_INSN(BIN(setconstant));
|
302
|
+
COLLECT_USAGE_OPERAND(BIN(setconstant), 0, id);
|
303
|
+
{
|
304
|
+
#line 219 "insns.def"
|
305
|
+
vm_check_if_namespace(cbase);
|
306
|
+
rb_const_set(cbase, id, val);
|
307
|
+
|
308
|
+
#line 309 "vm.inc"
|
309
|
+
#undef CURRENT_INSN_setconstant
|
310
|
+
#undef INSN_IS_SC
|
311
|
+
#undef INSN_LABEL
|
312
|
+
#undef LABEL_IS_SC
|
313
|
+
END_INSN(setconstant);}}}
|
314
|
+
INSN_ENTRY(getglobal){
|
315
|
+
{
|
316
|
+
VALUE val;
|
317
|
+
GENTRY entry = (GENTRY)GET_OPERAND(1);
|
318
|
+
|
319
|
+
DEBUG_ENTER_INSN("getglobal");
|
320
|
+
ADD_PC(1+1);
|
321
|
+
PREFETCH(GET_PC());
|
322
|
+
#define CURRENT_INSN_getglobal 1
|
323
|
+
#define INSN_IS_SC() 0
|
324
|
+
#define INSN_LABEL(lab) LABEL_getglobal_##lab
|
325
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
326
|
+
COLLECT_USAGE_INSN(BIN(getglobal));
|
327
|
+
COLLECT_USAGE_OPERAND(BIN(getglobal), 0, entry);
|
328
|
+
{
|
329
|
+
#line 234 "insns.def"
|
330
|
+
val = GET_GLOBAL((VALUE)entry);
|
331
|
+
|
332
|
+
#line 333 "vm.inc"
|
333
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
334
|
+
PUSH(val);
|
335
|
+
#undef CURRENT_INSN_getglobal
|
336
|
+
#undef INSN_IS_SC
|
337
|
+
#undef INSN_LABEL
|
338
|
+
#undef LABEL_IS_SC
|
339
|
+
END_INSN(getglobal);}}}
|
340
|
+
INSN_ENTRY(setglobal){
|
341
|
+
{
|
342
|
+
GENTRY entry = (GENTRY)GET_OPERAND(1);
|
343
|
+
VALUE val = TOPN(0);
|
344
|
+
DEBUG_ENTER_INSN("setglobal");
|
345
|
+
ADD_PC(1+1);
|
346
|
+
PREFETCH(GET_PC());
|
347
|
+
POPN(1);
|
348
|
+
#define CURRENT_INSN_setglobal 1
|
349
|
+
#define INSN_IS_SC() 0
|
350
|
+
#define INSN_LABEL(lab) LABEL_setglobal_##lab
|
351
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
352
|
+
COLLECT_USAGE_INSN(BIN(setglobal));
|
353
|
+
COLLECT_USAGE_OPERAND(BIN(setglobal), 0, entry);
|
354
|
+
{
|
355
|
+
#line 248 "insns.def"
|
356
|
+
SET_GLOBAL((VALUE)entry, val);
|
357
|
+
|
358
|
+
#line 359 "vm.inc"
|
359
|
+
#undef CURRENT_INSN_setglobal
|
360
|
+
#undef INSN_IS_SC
|
361
|
+
#undef INSN_LABEL
|
362
|
+
#undef LABEL_IS_SC
|
363
|
+
END_INSN(setglobal);}}}
|
364
|
+
INSN_ENTRY(putnil){
|
365
|
+
{
|
366
|
+
VALUE val;
|
367
|
+
|
368
|
+
|
369
|
+
DEBUG_ENTER_INSN("putnil");
|
370
|
+
ADD_PC(1+0);
|
371
|
+
PREFETCH(GET_PC());
|
372
|
+
#define CURRENT_INSN_putnil 1
|
373
|
+
#define INSN_IS_SC() 0
|
374
|
+
#define INSN_LABEL(lab) LABEL_putnil_##lab
|
375
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
376
|
+
COLLECT_USAGE_INSN(BIN(putnil));
|
377
|
+
{
|
378
|
+
#line 267 "insns.def"
|
379
|
+
val = Qnil;
|
380
|
+
|
381
|
+
#line 382 "vm.inc"
|
382
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
383
|
+
PUSH(val);
|
384
|
+
#undef CURRENT_INSN_putnil
|
385
|
+
#undef INSN_IS_SC
|
386
|
+
#undef INSN_LABEL
|
387
|
+
#undef LABEL_IS_SC
|
388
|
+
END_INSN(putnil);}}}
|
389
|
+
INSN_ENTRY(putself){
|
390
|
+
{
|
391
|
+
VALUE val;
|
392
|
+
|
393
|
+
|
394
|
+
DEBUG_ENTER_INSN("putself");
|
395
|
+
ADD_PC(1+0);
|
396
|
+
PREFETCH(GET_PC());
|
397
|
+
#define CURRENT_INSN_putself 1
|
398
|
+
#define INSN_IS_SC() 0
|
399
|
+
#define INSN_LABEL(lab) LABEL_putself_##lab
|
400
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
401
|
+
COLLECT_USAGE_INSN(BIN(putself));
|
402
|
+
{
|
403
|
+
#line 281 "insns.def"
|
404
|
+
val = GET_SELF();
|
405
|
+
|
406
|
+
#line 407 "vm.inc"
|
407
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
408
|
+
PUSH(val);
|
409
|
+
#undef CURRENT_INSN_putself
|
410
|
+
#undef INSN_IS_SC
|
411
|
+
#undef INSN_LABEL
|
412
|
+
#undef LABEL_IS_SC
|
413
|
+
END_INSN(putself);}}}
|
414
|
+
INSN_ENTRY(putobject){
|
415
|
+
{
|
416
|
+
VALUE val = (VALUE)GET_OPERAND(1);
|
417
|
+
|
418
|
+
DEBUG_ENTER_INSN("putobject");
|
419
|
+
ADD_PC(1+1);
|
420
|
+
PREFETCH(GET_PC());
|
421
|
+
#define CURRENT_INSN_putobject 1
|
422
|
+
#define INSN_IS_SC() 0
|
423
|
+
#define INSN_LABEL(lab) LABEL_putobject_##lab
|
424
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
425
|
+
COLLECT_USAGE_INSN(BIN(putobject));
|
426
|
+
COLLECT_USAGE_OPERAND(BIN(putobject), 0, val);
|
427
|
+
{
|
428
|
+
#line 297 "insns.def"
|
429
|
+
/* */
|
430
|
+
|
431
|
+
#line 432 "vm.inc"
|
432
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
433
|
+
PUSH(val);
|
434
|
+
#undef CURRENT_INSN_putobject
|
435
|
+
#undef INSN_IS_SC
|
436
|
+
#undef INSN_LABEL
|
437
|
+
#undef LABEL_IS_SC
|
438
|
+
END_INSN(putobject);}}}
|
439
|
+
INSN_ENTRY(putspecialobject){
|
440
|
+
{
|
441
|
+
VALUE val;
|
442
|
+
rb_num_t value_type = (rb_num_t)GET_OPERAND(1);
|
443
|
+
|
444
|
+
DEBUG_ENTER_INSN("putspecialobject");
|
445
|
+
ADD_PC(1+1);
|
446
|
+
PREFETCH(GET_PC());
|
447
|
+
#define CURRENT_INSN_putspecialobject 1
|
448
|
+
#define INSN_IS_SC() 0
|
449
|
+
#define INSN_LABEL(lab) LABEL_putspecialobject_##lab
|
450
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
451
|
+
COLLECT_USAGE_INSN(BIN(putspecialobject));
|
452
|
+
COLLECT_USAGE_OPERAND(BIN(putspecialobject), 0, value_type);
|
453
|
+
{
|
454
|
+
#line 312 "insns.def"
|
455
|
+
enum vm_special_object_type type = (enum vm_special_object_type)value_type;
|
456
|
+
|
457
|
+
switch (type) {
|
458
|
+
case VM_SPECIAL_OBJECT_VMCORE:
|
459
|
+
val = rb_mRubyVMFrozenCore;
|
460
|
+
break;
|
461
|
+
case VM_SPECIAL_OBJECT_CBASE:
|
462
|
+
val = vm_get_cbase(GET_ISEQ(), GET_EP());
|
463
|
+
break;
|
464
|
+
case VM_SPECIAL_OBJECT_CONST_BASE:
|
465
|
+
val = vm_get_const_base(GET_ISEQ(), GET_EP());
|
466
|
+
break;
|
467
|
+
default:
|
468
|
+
rb_bug("putspecialobject insn: unknown value_type");
|
469
|
+
}
|
470
|
+
|
471
|
+
#line 472 "vm.inc"
|
472
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
473
|
+
PUSH(val);
|
474
|
+
#undef CURRENT_INSN_putspecialobject
|
475
|
+
#undef INSN_IS_SC
|
476
|
+
#undef INSN_LABEL
|
477
|
+
#undef LABEL_IS_SC
|
478
|
+
END_INSN(putspecialobject);}}}
|
479
|
+
INSN_ENTRY(putiseq){
|
480
|
+
{
|
481
|
+
VALUE ret;
|
482
|
+
ISEQ iseq = (ISEQ)GET_OPERAND(1);
|
483
|
+
|
484
|
+
DEBUG_ENTER_INSN("putiseq");
|
485
|
+
ADD_PC(1+1);
|
486
|
+
PREFETCH(GET_PC());
|
487
|
+
#define CURRENT_INSN_putiseq 1
|
488
|
+
#define INSN_IS_SC() 0
|
489
|
+
#define INSN_LABEL(lab) LABEL_putiseq_##lab
|
490
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
491
|
+
COLLECT_USAGE_INSN(BIN(putiseq));
|
492
|
+
COLLECT_USAGE_OPERAND(BIN(putiseq), 0, iseq);
|
493
|
+
{
|
494
|
+
#line 340 "insns.def"
|
495
|
+
ret = iseq->self;
|
496
|
+
|
497
|
+
#line 498 "vm.inc"
|
498
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
499
|
+
PUSH(ret);
|
500
|
+
#undef CURRENT_INSN_putiseq
|
501
|
+
#undef INSN_IS_SC
|
502
|
+
#undef INSN_LABEL
|
503
|
+
#undef LABEL_IS_SC
|
504
|
+
END_INSN(putiseq);}}}
|
505
|
+
INSN_ENTRY(putstring){
|
506
|
+
{
|
507
|
+
VALUE val;
|
508
|
+
VALUE str = (VALUE)GET_OPERAND(1);
|
509
|
+
|
510
|
+
DEBUG_ENTER_INSN("putstring");
|
511
|
+
ADD_PC(1+1);
|
512
|
+
PREFETCH(GET_PC());
|
513
|
+
#define CURRENT_INSN_putstring 1
|
514
|
+
#define INSN_IS_SC() 0
|
515
|
+
#define INSN_LABEL(lab) LABEL_putstring_##lab
|
516
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
517
|
+
COLLECT_USAGE_INSN(BIN(putstring));
|
518
|
+
COLLECT_USAGE_OPERAND(BIN(putstring), 0, str);
|
519
|
+
{
|
520
|
+
#line 354 "insns.def"
|
521
|
+
val = rb_str_resurrect(str);
|
522
|
+
|
523
|
+
#line 524 "vm.inc"
|
524
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
525
|
+
PUSH(val);
|
526
|
+
#undef CURRENT_INSN_putstring
|
527
|
+
#undef INSN_IS_SC
|
528
|
+
#undef INSN_LABEL
|
529
|
+
#undef LABEL_IS_SC
|
530
|
+
END_INSN(putstring);}}}
|
531
|
+
INSN_ENTRY(concatstrings){
|
532
|
+
{
|
533
|
+
VALUE val;
|
534
|
+
rb_num_t num = (rb_num_t)GET_OPERAND(1);
|
535
|
+
|
536
|
+
DEBUG_ENTER_INSN("concatstrings");
|
537
|
+
ADD_PC(1+1);
|
538
|
+
PREFETCH(GET_PC());
|
539
|
+
#define CURRENT_INSN_concatstrings 1
|
540
|
+
#define INSN_IS_SC() 0
|
541
|
+
#define INSN_LABEL(lab) LABEL_concatstrings_##lab
|
542
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
543
|
+
COLLECT_USAGE_INSN(BIN(concatstrings));
|
544
|
+
COLLECT_USAGE_OPERAND(BIN(concatstrings), 0, num);
|
545
|
+
{
|
546
|
+
#line 368 "insns.def"
|
547
|
+
rb_num_t i = num - 1;
|
548
|
+
|
549
|
+
val = rb_str_resurrect(TOPN(i));
|
550
|
+
while (i-- > 0) {
|
551
|
+
const VALUE v = TOPN(i);
|
552
|
+
rb_str_append(val, v);
|
553
|
+
}
|
554
|
+
POPN(num);
|
555
|
+
|
556
|
+
#line 557 "vm.inc"
|
557
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
558
|
+
PUSH(val);
|
559
|
+
#undef CURRENT_INSN_concatstrings
|
560
|
+
#undef INSN_IS_SC
|
561
|
+
#undef INSN_LABEL
|
562
|
+
#undef LABEL_IS_SC
|
563
|
+
END_INSN(concatstrings);}}}
|
564
|
+
INSN_ENTRY(tostring){
|
565
|
+
{
|
566
|
+
|
567
|
+
VALUE val = TOPN(0);
|
568
|
+
DEBUG_ENTER_INSN("tostring");
|
569
|
+
ADD_PC(1+0);
|
570
|
+
PREFETCH(GET_PC());
|
571
|
+
POPN(1);
|
572
|
+
#define CURRENT_INSN_tostring 1
|
573
|
+
#define INSN_IS_SC() 0
|
574
|
+
#define INSN_LABEL(lab) LABEL_tostring_##lab
|
575
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
576
|
+
COLLECT_USAGE_INSN(BIN(tostring));
|
577
|
+
{
|
578
|
+
#line 389 "insns.def"
|
579
|
+
val = rb_obj_as_string(val);
|
580
|
+
|
581
|
+
#line 582 "vm.inc"
|
582
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
583
|
+
PUSH(val);
|
584
|
+
#undef CURRENT_INSN_tostring
|
585
|
+
#undef INSN_IS_SC
|
586
|
+
#undef INSN_LABEL
|
587
|
+
#undef LABEL_IS_SC
|
588
|
+
END_INSN(tostring);}}}
|
589
|
+
INSN_ENTRY(toregexp){
|
590
|
+
{
|
591
|
+
VALUE val;
|
592
|
+
rb_num_t cnt = (rb_num_t)GET_OPERAND(2);
|
593
|
+
rb_num_t opt = (rb_num_t)GET_OPERAND(1);
|
594
|
+
|
595
|
+
DEBUG_ENTER_INSN("toregexp");
|
596
|
+
ADD_PC(1+2);
|
597
|
+
PREFETCH(GET_PC());
|
598
|
+
#define CURRENT_INSN_toregexp 1
|
599
|
+
#define INSN_IS_SC() 0
|
600
|
+
#define INSN_LABEL(lab) LABEL_toregexp_##lab
|
601
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
602
|
+
COLLECT_USAGE_INSN(BIN(toregexp));
|
603
|
+
COLLECT_USAGE_OPERAND(BIN(toregexp), 0, opt);
|
604
|
+
COLLECT_USAGE_OPERAND(BIN(toregexp), 1, cnt);
|
605
|
+
{
|
606
|
+
#line 404 "insns.def"
|
607
|
+
VALUE rb_reg_new_ary(VALUE ary, int options);
|
608
|
+
rb_num_t i;
|
609
|
+
const VALUE ary = rb_ary_tmp_new(cnt);
|
610
|
+
for (i = 0; i < cnt; i++) {
|
611
|
+
rb_ary_store(ary, cnt-i-1, TOPN(i));
|
612
|
+
}
|
613
|
+
POPN(cnt);
|
614
|
+
val = rb_reg_new_ary(ary, (int)opt);
|
615
|
+
rb_ary_clear(ary);
|
616
|
+
|
617
|
+
#line 618 "vm.inc"
|
618
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
619
|
+
PUSH(val);
|
620
|
+
#undef CURRENT_INSN_toregexp
|
621
|
+
#undef INSN_IS_SC
|
622
|
+
#undef INSN_LABEL
|
623
|
+
#undef LABEL_IS_SC
|
624
|
+
END_INSN(toregexp);}}}
|
625
|
+
INSN_ENTRY(newarray){
|
626
|
+
{
|
627
|
+
VALUE val;
|
628
|
+
rb_num_t num = (rb_num_t)GET_OPERAND(1);
|
629
|
+
|
630
|
+
DEBUG_ENTER_INSN("newarray");
|
631
|
+
ADD_PC(1+1);
|
632
|
+
PREFETCH(GET_PC());
|
633
|
+
#define CURRENT_INSN_newarray 1
|
634
|
+
#define INSN_IS_SC() 0
|
635
|
+
#define INSN_LABEL(lab) LABEL_newarray_##lab
|
636
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
637
|
+
COLLECT_USAGE_INSN(BIN(newarray));
|
638
|
+
COLLECT_USAGE_OPERAND(BIN(newarray), 0, num);
|
639
|
+
{
|
640
|
+
#line 426 "insns.def"
|
641
|
+
val = rb_ary_new4((long)num, STACK_ADDR_FROM_TOP(num));
|
642
|
+
POPN(num);
|
643
|
+
|
644
|
+
#line 645 "vm.inc"
|
645
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
646
|
+
PUSH(val);
|
647
|
+
#undef CURRENT_INSN_newarray
|
648
|
+
#undef INSN_IS_SC
|
649
|
+
#undef INSN_LABEL
|
650
|
+
#undef LABEL_IS_SC
|
651
|
+
END_INSN(newarray);}}}
|
652
|
+
INSN_ENTRY(duparray){
|
653
|
+
{
|
654
|
+
VALUE val;
|
655
|
+
VALUE ary = (VALUE)GET_OPERAND(1);
|
656
|
+
|
657
|
+
DEBUG_ENTER_INSN("duparray");
|
658
|
+
ADD_PC(1+1);
|
659
|
+
PREFETCH(GET_PC());
|
660
|
+
#define CURRENT_INSN_duparray 1
|
661
|
+
#define INSN_IS_SC() 0
|
662
|
+
#define INSN_LABEL(lab) LABEL_duparray_##lab
|
663
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
664
|
+
COLLECT_USAGE_INSN(BIN(duparray));
|
665
|
+
COLLECT_USAGE_OPERAND(BIN(duparray), 0, ary);
|
666
|
+
{
|
667
|
+
#line 441 "insns.def"
|
668
|
+
val = rb_ary_resurrect(ary);
|
669
|
+
|
670
|
+
#line 671 "vm.inc"
|
671
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
672
|
+
PUSH(val);
|
673
|
+
#undef CURRENT_INSN_duparray
|
674
|
+
#undef INSN_IS_SC
|
675
|
+
#undef INSN_LABEL
|
676
|
+
#undef LABEL_IS_SC
|
677
|
+
END_INSN(duparray);}}}
|
678
|
+
INSN_ENTRY(expandarray){
|
679
|
+
{
|
680
|
+
rb_num_t flag = (rb_num_t)GET_OPERAND(2);
|
681
|
+
rb_num_t num = (rb_num_t)GET_OPERAND(1);
|
682
|
+
VALUE ary = TOPN(0);
|
683
|
+
DEBUG_ENTER_INSN("expandarray");
|
684
|
+
ADD_PC(1+2);
|
685
|
+
PREFETCH(GET_PC());
|
686
|
+
POPN(1);
|
687
|
+
#define CURRENT_INSN_expandarray 1
|
688
|
+
#define INSN_IS_SC() 0
|
689
|
+
#define INSN_LABEL(lab) LABEL_expandarray_##lab
|
690
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
691
|
+
COLLECT_USAGE_INSN(BIN(expandarray));
|
692
|
+
COLLECT_USAGE_OPERAND(BIN(expandarray), 0, num);
|
693
|
+
COLLECT_USAGE_OPERAND(BIN(expandarray), 1, flag);
|
694
|
+
{
|
695
|
+
#line 462 "insns.def"
|
696
|
+
vm_expandarray(GET_CFP(), ary, num, (int)flag);
|
697
|
+
|
698
|
+
#line 699 "vm.inc"
|
699
|
+
#undef CURRENT_INSN_expandarray
|
700
|
+
#undef INSN_IS_SC
|
701
|
+
#undef INSN_LABEL
|
702
|
+
#undef LABEL_IS_SC
|
703
|
+
END_INSN(expandarray);}}}
|
704
|
+
INSN_ENTRY(concatarray){
|
705
|
+
{
|
706
|
+
VALUE ary;
|
707
|
+
|
708
|
+
VALUE ary1 = TOPN(1);
|
709
|
+
VALUE ary2st = TOPN(0);
|
710
|
+
DEBUG_ENTER_INSN("concatarray");
|
711
|
+
ADD_PC(1+0);
|
712
|
+
PREFETCH(GET_PC());
|
713
|
+
POPN(2);
|
714
|
+
#define CURRENT_INSN_concatarray 1
|
715
|
+
#define INSN_IS_SC() 0
|
716
|
+
#define INSN_LABEL(lab) LABEL_concatarray_##lab
|
717
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
718
|
+
COLLECT_USAGE_INSN(BIN(concatarray));
|
719
|
+
{
|
720
|
+
#line 476 "insns.def"
|
721
|
+
const VALUE ary2 = ary2st;
|
722
|
+
VALUE tmp1 = rb_check_convert_type(ary1, T_ARRAY, "Array", "to_a");
|
723
|
+
VALUE tmp2 = rb_check_convert_type(ary2, T_ARRAY, "Array", "to_a");
|
724
|
+
|
725
|
+
if (NIL_P(tmp1)) {
|
726
|
+
tmp1 = rb_ary_new3(1, ary1);
|
727
|
+
}
|
728
|
+
|
729
|
+
if (NIL_P(tmp2)) {
|
730
|
+
tmp2 = rb_ary_new3(1, ary2);
|
731
|
+
}
|
732
|
+
|
733
|
+
if (tmp1 == ary1) {
|
734
|
+
tmp1 = rb_ary_dup(ary1);
|
735
|
+
}
|
736
|
+
ary = rb_ary_concat(tmp1, tmp2);
|
737
|
+
|
738
|
+
#line 739 "vm.inc"
|
739
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
740
|
+
PUSH(ary);
|
741
|
+
#undef CURRENT_INSN_concatarray
|
742
|
+
#undef INSN_IS_SC
|
743
|
+
#undef INSN_LABEL
|
744
|
+
#undef LABEL_IS_SC
|
745
|
+
END_INSN(concatarray);}}}
|
746
|
+
INSN_ENTRY(splatarray){
|
747
|
+
{
|
748
|
+
VALUE obj;
|
749
|
+
VALUE flag = (VALUE)GET_OPERAND(1);
|
750
|
+
VALUE ary = TOPN(0);
|
751
|
+
DEBUG_ENTER_INSN("splatarray");
|
752
|
+
ADD_PC(1+1);
|
753
|
+
PREFETCH(GET_PC());
|
754
|
+
POPN(1);
|
755
|
+
#define CURRENT_INSN_splatarray 1
|
756
|
+
#define INSN_IS_SC() 0
|
757
|
+
#define INSN_LABEL(lab) LABEL_splatarray_##lab
|
758
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
759
|
+
COLLECT_USAGE_INSN(BIN(splatarray));
|
760
|
+
COLLECT_USAGE_OPERAND(BIN(splatarray), 0, flag);
|
761
|
+
{
|
762
|
+
#line 505 "insns.def"
|
763
|
+
VALUE tmp = rb_check_convert_type(ary, T_ARRAY, "Array", "to_a");
|
764
|
+
if (NIL_P(tmp)) {
|
765
|
+
tmp = rb_ary_new3(1, ary);
|
766
|
+
}
|
767
|
+
else if (RTEST(flag)) {
|
768
|
+
tmp = rb_ary_dup(tmp);
|
769
|
+
}
|
770
|
+
obj = tmp;
|
771
|
+
|
772
|
+
#line 773 "vm.inc"
|
773
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
774
|
+
PUSH(obj);
|
775
|
+
#undef CURRENT_INSN_splatarray
|
776
|
+
#undef INSN_IS_SC
|
777
|
+
#undef INSN_LABEL
|
778
|
+
#undef LABEL_IS_SC
|
779
|
+
END_INSN(splatarray);}}}
|
780
|
+
INSN_ENTRY(newhash){
|
781
|
+
{
|
782
|
+
VALUE val;
|
783
|
+
rb_num_t num = (rb_num_t)GET_OPERAND(1);
|
784
|
+
|
785
|
+
DEBUG_ENTER_INSN("newhash");
|
786
|
+
ADD_PC(1+1);
|
787
|
+
PREFETCH(GET_PC());
|
788
|
+
#define CURRENT_INSN_newhash 1
|
789
|
+
#define INSN_IS_SC() 0
|
790
|
+
#define INSN_LABEL(lab) LABEL_newhash_##lab
|
791
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
792
|
+
COLLECT_USAGE_INSN(BIN(newhash));
|
793
|
+
COLLECT_USAGE_OPERAND(BIN(newhash), 0, num);
|
794
|
+
{
|
795
|
+
#line 527 "insns.def"
|
796
|
+
rb_num_t i;
|
797
|
+
|
798
|
+
if(RUBY_DTRACE_HASH_CREATE_ENABLED()) {
|
799
|
+
RUBY_DTRACE_HASH_CREATE(num, rb_sourcefile(), rb_sourceline());
|
800
|
+
}
|
801
|
+
|
802
|
+
val = rb_hash_new();
|
803
|
+
|
804
|
+
for (i = num; i > 0; i -= 2) {
|
805
|
+
const VALUE v = TOPN(i - 2);
|
806
|
+
const VALUE k = TOPN(i - 1);
|
807
|
+
rb_hash_aset(val, k, v);
|
808
|
+
}
|
809
|
+
POPN(num);
|
810
|
+
|
811
|
+
#line 812 "vm.inc"
|
812
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
813
|
+
PUSH(val);
|
814
|
+
#undef CURRENT_INSN_newhash
|
815
|
+
#undef INSN_IS_SC
|
816
|
+
#undef INSN_LABEL
|
817
|
+
#undef LABEL_IS_SC
|
818
|
+
END_INSN(newhash);}}}
|
819
|
+
INSN_ENTRY(newrange){
|
820
|
+
{
|
821
|
+
VALUE val;
|
822
|
+
rb_num_t flag = (rb_num_t)GET_OPERAND(1);
|
823
|
+
VALUE low = TOPN(1);
|
824
|
+
VALUE high = TOPN(0);
|
825
|
+
DEBUG_ENTER_INSN("newrange");
|
826
|
+
ADD_PC(1+1);
|
827
|
+
PREFETCH(GET_PC());
|
828
|
+
POPN(2);
|
829
|
+
#define CURRENT_INSN_newrange 1
|
830
|
+
#define INSN_IS_SC() 0
|
831
|
+
#define INSN_LABEL(lab) LABEL_newrange_##lab
|
832
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
833
|
+
COLLECT_USAGE_INSN(BIN(newrange));
|
834
|
+
COLLECT_USAGE_OPERAND(BIN(newrange), 0, flag);
|
835
|
+
{
|
836
|
+
#line 554 "insns.def"
|
837
|
+
val = rb_range_new(low, high, (int)flag);
|
838
|
+
|
839
|
+
#line 840 "vm.inc"
|
840
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
841
|
+
PUSH(val);
|
842
|
+
#undef CURRENT_INSN_newrange
|
843
|
+
#undef INSN_IS_SC
|
844
|
+
#undef INSN_LABEL
|
845
|
+
#undef LABEL_IS_SC
|
846
|
+
END_INSN(newrange);}}}
|
847
|
+
INSN_ENTRY(pop){
|
848
|
+
{
|
849
|
+
|
850
|
+
VALUE val = TOPN(0);
|
851
|
+
DEBUG_ENTER_INSN("pop");
|
852
|
+
ADD_PC(1+0);
|
853
|
+
PREFETCH(GET_PC());
|
854
|
+
POPN(1);
|
855
|
+
#define CURRENT_INSN_pop 1
|
856
|
+
#define INSN_IS_SC() 0
|
857
|
+
#define INSN_LABEL(lab) LABEL_pop_##lab
|
858
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
859
|
+
COLLECT_USAGE_INSN(BIN(pop));
|
860
|
+
{
|
861
|
+
#line 572 "insns.def"
|
862
|
+
(void)val;
|
863
|
+
/* none */
|
864
|
+
|
865
|
+
#line 866 "vm.inc"
|
866
|
+
#undef CURRENT_INSN_pop
|
867
|
+
#undef INSN_IS_SC
|
868
|
+
#undef INSN_LABEL
|
869
|
+
#undef LABEL_IS_SC
|
870
|
+
END_INSN(pop);}}}
|
871
|
+
INSN_ENTRY(dup){
|
872
|
+
{
|
873
|
+
VALUE val2;
|
874
|
+
VALUE val1;
|
875
|
+
|
876
|
+
VALUE val = TOPN(0);
|
877
|
+
DEBUG_ENTER_INSN("dup");
|
878
|
+
ADD_PC(1+0);
|
879
|
+
PREFETCH(GET_PC());
|
880
|
+
POPN(1);
|
881
|
+
#define CURRENT_INSN_dup 1
|
882
|
+
#define INSN_IS_SC() 0
|
883
|
+
#define INSN_LABEL(lab) LABEL_dup_##lab
|
884
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
885
|
+
COLLECT_USAGE_INSN(BIN(dup));
|
886
|
+
{
|
887
|
+
#line 587 "insns.def"
|
888
|
+
val1 = val2 = val;
|
889
|
+
|
890
|
+
#line 891 "vm.inc"
|
891
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 2);
|
892
|
+
PUSH(val1);
|
893
|
+
PUSH(val2);
|
894
|
+
#undef CURRENT_INSN_dup
|
895
|
+
#undef INSN_IS_SC
|
896
|
+
#undef INSN_LABEL
|
897
|
+
#undef LABEL_IS_SC
|
898
|
+
END_INSN(dup);}}}
|
899
|
+
INSN_ENTRY(dupn){
|
900
|
+
{
|
901
|
+
rb_num_t n = (rb_num_t)GET_OPERAND(1);
|
902
|
+
|
903
|
+
DEBUG_ENTER_INSN("dupn");
|
904
|
+
ADD_PC(1+1);
|
905
|
+
PREFETCH(GET_PC());
|
906
|
+
#define CURRENT_INSN_dupn 1
|
907
|
+
#define INSN_IS_SC() 0
|
908
|
+
#define INSN_LABEL(lab) LABEL_dupn_##lab
|
909
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
910
|
+
COLLECT_USAGE_INSN(BIN(dupn));
|
911
|
+
COLLECT_USAGE_OPERAND(BIN(dupn), 0, n);
|
912
|
+
{
|
913
|
+
#line 601 "insns.def"
|
914
|
+
rb_num_t i;
|
915
|
+
VALUE *sp = STACK_ADDR_FROM_TOP(n);
|
916
|
+
for (i = 0; i < n; i++) {
|
917
|
+
GET_SP()[i] = sp[i];
|
918
|
+
}
|
919
|
+
INC_SP(n);
|
920
|
+
|
921
|
+
#line 922 "vm.inc"
|
922
|
+
#undef CURRENT_INSN_dupn
|
923
|
+
#undef INSN_IS_SC
|
924
|
+
#undef INSN_LABEL
|
925
|
+
#undef LABEL_IS_SC
|
926
|
+
END_INSN(dupn);}}}
|
927
|
+
INSN_ENTRY(swap){
|
928
|
+
{
|
929
|
+
|
930
|
+
VALUE val = TOPN(1);
|
931
|
+
VALUE obj = TOPN(0);
|
932
|
+
DEBUG_ENTER_INSN("swap");
|
933
|
+
ADD_PC(1+0);
|
934
|
+
PREFETCH(GET_PC());
|
935
|
+
POPN(2);
|
936
|
+
#define CURRENT_INSN_swap 1
|
937
|
+
#define INSN_IS_SC() 0
|
938
|
+
#define INSN_LABEL(lab) LABEL_swap_##lab
|
939
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
940
|
+
COLLECT_USAGE_INSN(BIN(swap));
|
941
|
+
{
|
942
|
+
#line 621 "insns.def"
|
943
|
+
/* none */
|
944
|
+
|
945
|
+
#line 946 "vm.inc"
|
946
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 2);
|
947
|
+
PUSH(obj);
|
948
|
+
PUSH(val);
|
949
|
+
#undef CURRENT_INSN_swap
|
950
|
+
#undef INSN_IS_SC
|
951
|
+
#undef INSN_LABEL
|
952
|
+
#undef LABEL_IS_SC
|
953
|
+
END_INSN(swap);}}}
|
954
|
+
INSN_ENTRY(reput){
|
955
|
+
{
|
956
|
+
|
957
|
+
VALUE val = TOPN(0);
|
958
|
+
DEBUG_ENTER_INSN("reput");
|
959
|
+
ADD_PC(1+0);
|
960
|
+
PREFETCH(GET_PC());
|
961
|
+
POPN(1);
|
962
|
+
#define CURRENT_INSN_reput 1
|
963
|
+
#define INSN_IS_SC() 0
|
964
|
+
#define INSN_LABEL(lab) LABEL_reput_##lab
|
965
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
966
|
+
COLLECT_USAGE_INSN(BIN(reput));
|
967
|
+
{
|
968
|
+
#line 635 "insns.def"
|
969
|
+
/* none */
|
970
|
+
|
971
|
+
#line 972 "vm.inc"
|
972
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
973
|
+
PUSH(val);
|
974
|
+
#undef CURRENT_INSN_reput
|
975
|
+
#undef INSN_IS_SC
|
976
|
+
#undef INSN_LABEL
|
977
|
+
#undef LABEL_IS_SC
|
978
|
+
END_INSN(reput);}}}
|
979
|
+
INSN_ENTRY(topn){
|
980
|
+
{
|
981
|
+
VALUE val;
|
982
|
+
rb_num_t n = (rb_num_t)GET_OPERAND(1);
|
983
|
+
|
984
|
+
DEBUG_ENTER_INSN("topn");
|
985
|
+
ADD_PC(1+1);
|
986
|
+
PREFETCH(GET_PC());
|
987
|
+
#define CURRENT_INSN_topn 1
|
988
|
+
#define INSN_IS_SC() 0
|
989
|
+
#define INSN_LABEL(lab) LABEL_topn_##lab
|
990
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
991
|
+
COLLECT_USAGE_INSN(BIN(topn));
|
992
|
+
COLLECT_USAGE_OPERAND(BIN(topn), 0, n);
|
993
|
+
{
|
994
|
+
#line 649 "insns.def"
|
995
|
+
val = TOPN(n);
|
996
|
+
|
997
|
+
#line 998 "vm.inc"
|
998
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
999
|
+
PUSH(val);
|
1000
|
+
#undef CURRENT_INSN_topn
|
1001
|
+
#undef INSN_IS_SC
|
1002
|
+
#undef INSN_LABEL
|
1003
|
+
#undef LABEL_IS_SC
|
1004
|
+
END_INSN(topn);}}}
|
1005
|
+
INSN_ENTRY(setn){
|
1006
|
+
{
|
1007
|
+
rb_num_t n = (rb_num_t)GET_OPERAND(1);
|
1008
|
+
VALUE val = TOPN(0);
|
1009
|
+
DEBUG_ENTER_INSN("setn");
|
1010
|
+
ADD_PC(1+1);
|
1011
|
+
PREFETCH(GET_PC());
|
1012
|
+
POPN(1);
|
1013
|
+
#define CURRENT_INSN_setn 1
|
1014
|
+
#define INSN_IS_SC() 0
|
1015
|
+
#define INSN_LABEL(lab) LABEL_setn_##lab
|
1016
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1017
|
+
COLLECT_USAGE_INSN(BIN(setn));
|
1018
|
+
COLLECT_USAGE_OPERAND(BIN(setn), 0, n);
|
1019
|
+
{
|
1020
|
+
#line 663 "insns.def"
|
1021
|
+
TOPN(n-1) = val;
|
1022
|
+
|
1023
|
+
#line 1024 "vm.inc"
|
1024
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1025
|
+
PUSH(val);
|
1026
|
+
#undef CURRENT_INSN_setn
|
1027
|
+
#undef INSN_IS_SC
|
1028
|
+
#undef INSN_LABEL
|
1029
|
+
#undef LABEL_IS_SC
|
1030
|
+
END_INSN(setn);}}}
|
1031
|
+
INSN_ENTRY(adjuststack){
|
1032
|
+
{
|
1033
|
+
rb_num_t n = (rb_num_t)GET_OPERAND(1);
|
1034
|
+
|
1035
|
+
DEBUG_ENTER_INSN("adjuststack");
|
1036
|
+
ADD_PC(1+1);
|
1037
|
+
PREFETCH(GET_PC());
|
1038
|
+
#define CURRENT_INSN_adjuststack 1
|
1039
|
+
#define INSN_IS_SC() 0
|
1040
|
+
#define INSN_LABEL(lab) LABEL_adjuststack_##lab
|
1041
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1042
|
+
COLLECT_USAGE_INSN(BIN(adjuststack));
|
1043
|
+
COLLECT_USAGE_OPERAND(BIN(adjuststack), 0, n);
|
1044
|
+
{
|
1045
|
+
#line 677 "insns.def"
|
1046
|
+
DEC_SP(n);
|
1047
|
+
|
1048
|
+
#line 1049 "vm.inc"
|
1049
|
+
#undef CURRENT_INSN_adjuststack
|
1050
|
+
#undef INSN_IS_SC
|
1051
|
+
#undef INSN_LABEL
|
1052
|
+
#undef LABEL_IS_SC
|
1053
|
+
END_INSN(adjuststack);}}}
|
1054
|
+
INSN_ENTRY(defined){
|
1055
|
+
{
|
1056
|
+
VALUE val;
|
1057
|
+
VALUE needstr = (VALUE)GET_OPERAND(3);
|
1058
|
+
VALUE obj = (VALUE)GET_OPERAND(2);
|
1059
|
+
rb_num_t op_type = (rb_num_t)GET_OPERAND(1);
|
1060
|
+
VALUE v = TOPN(0);
|
1061
|
+
DEBUG_ENTER_INSN("defined");
|
1062
|
+
ADD_PC(1+3);
|
1063
|
+
PREFETCH(GET_PC());
|
1064
|
+
POPN(1);
|
1065
|
+
#define CURRENT_INSN_defined 1
|
1066
|
+
#define INSN_IS_SC() 0
|
1067
|
+
#define INSN_LABEL(lab) LABEL_defined_##lab
|
1068
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1069
|
+
COLLECT_USAGE_INSN(BIN(defined));
|
1070
|
+
COLLECT_USAGE_OPERAND(BIN(defined), 0, op_type);
|
1071
|
+
COLLECT_USAGE_OPERAND(BIN(defined), 1, obj);
|
1072
|
+
COLLECT_USAGE_OPERAND(BIN(defined), 2, needstr);
|
1073
|
+
{
|
1074
|
+
#line 696 "insns.def"
|
1075
|
+
VALUE klass;
|
1076
|
+
enum defined_type expr_type = 0;
|
1077
|
+
enum defined_type type = (enum defined_type)op_type;
|
1078
|
+
|
1079
|
+
val = Qnil;
|
1080
|
+
|
1081
|
+
switch (type) {
|
1082
|
+
case DEFINED_IVAR:
|
1083
|
+
if (rb_ivar_defined(GET_SELF(), SYM2ID(obj))) {
|
1084
|
+
expr_type = DEFINED_IVAR;
|
1085
|
+
}
|
1086
|
+
break;
|
1087
|
+
case DEFINED_IVAR2:
|
1088
|
+
klass = vm_get_cbase(GET_ISEQ(), GET_EP());
|
1089
|
+
break;
|
1090
|
+
case DEFINED_GVAR:
|
1091
|
+
if (rb_gvar_defined(rb_global_entry(SYM2ID(obj)))) {
|
1092
|
+
expr_type = DEFINED_GVAR;
|
1093
|
+
}
|
1094
|
+
break;
|
1095
|
+
case DEFINED_CVAR: {
|
1096
|
+
NODE *cref = rb_vm_get_cref(GET_ISEQ(), GET_EP());
|
1097
|
+
klass = vm_get_cvar_base(cref, GET_CFP());
|
1098
|
+
if (rb_cvar_defined(klass, SYM2ID(obj))) {
|
1099
|
+
expr_type = DEFINED_CVAR;
|
1100
|
+
}
|
1101
|
+
break;
|
1102
|
+
}
|
1103
|
+
case DEFINED_CONST:
|
1104
|
+
klass = v;
|
1105
|
+
if (vm_get_ev_const(th, GET_ISEQ(), klass, SYM2ID(obj), 1)) {
|
1106
|
+
expr_type = DEFINED_CONST;
|
1107
|
+
}
|
1108
|
+
break;
|
1109
|
+
case DEFINED_FUNC:
|
1110
|
+
klass = CLASS_OF(v);
|
1111
|
+
if (rb_method_boundp(klass, SYM2ID(obj), 0)) {
|
1112
|
+
expr_type = DEFINED_METHOD;
|
1113
|
+
}
|
1114
|
+
break;
|
1115
|
+
case DEFINED_METHOD:{
|
1116
|
+
VALUE klass = CLASS_OF(v);
|
1117
|
+
const rb_method_entry_t *me = rb_method_entry(klass, SYM2ID(obj), 0);
|
1118
|
+
|
1119
|
+
if (me) {
|
1120
|
+
if (!(me->flag & NOEX_PRIVATE)) {
|
1121
|
+
if (!((me->flag & NOEX_PROTECTED) &&
|
1122
|
+
!rb_obj_is_kind_of(GET_SELF(),
|
1123
|
+
rb_class_real(klass)))) {
|
1124
|
+
expr_type = DEFINED_METHOD;
|
1125
|
+
}
|
1126
|
+
}
|
1127
|
+
}
|
1128
|
+
{
|
1129
|
+
VALUE args[2];
|
1130
|
+
VALUE r;
|
1131
|
+
|
1132
|
+
args[0] = obj; args[1] = Qfalse;
|
1133
|
+
r = rb_check_funcall(v, idRespond_to_missing, 2, args);
|
1134
|
+
if (r != Qundef && RTEST(r))
|
1135
|
+
expr_type = DEFINED_METHOD;
|
1136
|
+
}
|
1137
|
+
break;
|
1138
|
+
}
|
1139
|
+
case DEFINED_YIELD:
|
1140
|
+
if (GET_BLOCK_PTR()) {
|
1141
|
+
expr_type = DEFINED_YIELD;
|
1142
|
+
}
|
1143
|
+
break;
|
1144
|
+
case DEFINED_ZSUPER:{
|
1145
|
+
rb_call_info_t cit;
|
1146
|
+
if (vm_search_superclass(GET_CFP(), GET_ISEQ(), Qnil, &cit) == 0) {
|
1147
|
+
VALUE klass = cit.klass;
|
1148
|
+
ID id = cit.mid;
|
1149
|
+
if (rb_method_boundp(klass, id, 0)) {
|
1150
|
+
expr_type = DEFINED_ZSUPER;
|
1151
|
+
}
|
1152
|
+
}
|
1153
|
+
break;
|
1154
|
+
}
|
1155
|
+
case DEFINED_REF:{
|
1156
|
+
val = vm_getspecial(th, GET_LEP(), Qfalse, FIX2INT(obj));
|
1157
|
+
if (val != Qnil) {
|
1158
|
+
expr_type = DEFINED_GVAR;
|
1159
|
+
}
|
1160
|
+
break;
|
1161
|
+
}
|
1162
|
+
default:
|
1163
|
+
rb_bug("unimplemented defined? type (VM)");
|
1164
|
+
break;
|
1165
|
+
}
|
1166
|
+
if (expr_type != 0) {
|
1167
|
+
if (needstr != Qfalse) {
|
1168
|
+
val = rb_iseq_defined_string(expr_type);
|
1169
|
+
}
|
1170
|
+
else {
|
1171
|
+
val = Qtrue;
|
1172
|
+
}
|
1173
|
+
}
|
1174
|
+
|
1175
|
+
#line 1176 "vm.inc"
|
1176
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1177
|
+
PUSH(val);
|
1178
|
+
#undef CURRENT_INSN_defined
|
1179
|
+
#undef INSN_IS_SC
|
1180
|
+
#undef INSN_LABEL
|
1181
|
+
#undef LABEL_IS_SC
|
1182
|
+
END_INSN(defined);}}}
|
1183
|
+
INSN_ENTRY(checkmatch){
|
1184
|
+
{
|
1185
|
+
VALUE result;
|
1186
|
+
rb_num_t flag = (rb_num_t)GET_OPERAND(1);
|
1187
|
+
VALUE target = TOPN(1);
|
1188
|
+
VALUE pattern = TOPN(0);
|
1189
|
+
DEBUG_ENTER_INSN("checkmatch");
|
1190
|
+
ADD_PC(1+1);
|
1191
|
+
PREFETCH(GET_PC());
|
1192
|
+
POPN(2);
|
1193
|
+
#define CURRENT_INSN_checkmatch 1
|
1194
|
+
#define INSN_IS_SC() 0
|
1195
|
+
#define INSN_LABEL(lab) LABEL_checkmatch_##lab
|
1196
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1197
|
+
COLLECT_USAGE_INSN(BIN(checkmatch));
|
1198
|
+
COLLECT_USAGE_OPERAND(BIN(checkmatch), 0, flag);
|
1199
|
+
{
|
1200
|
+
#line 813 "insns.def"
|
1201
|
+
enum vm_check_match_type checkmatch_type =
|
1202
|
+
(enum vm_check_match_type)(flag & VM_CHECKMATCH_TYPE_MASK);
|
1203
|
+
result = Qfalse;
|
1204
|
+
|
1205
|
+
if (flag & VM_CHECKMATCH_ARRAY) {
|
1206
|
+
int i;
|
1207
|
+
for (i = 0; i < RARRAY_LEN(pattern); i++) {
|
1208
|
+
if (RTEST(check_match(RARRAY_AREF(pattern, i), target, checkmatch_type))) {
|
1209
|
+
result = Qtrue;
|
1210
|
+
break;
|
1211
|
+
}
|
1212
|
+
}
|
1213
|
+
}
|
1214
|
+
else {
|
1215
|
+
if (RTEST(check_match(pattern, target, checkmatch_type))) {
|
1216
|
+
result = Qtrue;
|
1217
|
+
}
|
1218
|
+
}
|
1219
|
+
|
1220
|
+
#line 1221 "vm.inc"
|
1221
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1222
|
+
PUSH(result);
|
1223
|
+
#undef CURRENT_INSN_checkmatch
|
1224
|
+
#undef INSN_IS_SC
|
1225
|
+
#undef INSN_LABEL
|
1226
|
+
#undef LABEL_IS_SC
|
1227
|
+
END_INSN(checkmatch);}}}
|
1228
|
+
INSN_ENTRY(trace){
|
1229
|
+
{
|
1230
|
+
rb_num_t nf = (rb_num_t)GET_OPERAND(1);
|
1231
|
+
|
1232
|
+
DEBUG_ENTER_INSN("trace");
|
1233
|
+
ADD_PC(1+1);
|
1234
|
+
PREFETCH(GET_PC());
|
1235
|
+
#define CURRENT_INSN_trace 1
|
1236
|
+
#define INSN_IS_SC() 0
|
1237
|
+
#define INSN_LABEL(lab) LABEL_trace_##lab
|
1238
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1239
|
+
COLLECT_USAGE_INSN(BIN(trace));
|
1240
|
+
COLLECT_USAGE_OPERAND(BIN(trace), 0, nf);
|
1241
|
+
{
|
1242
|
+
#line 844 "insns.def"
|
1243
|
+
rb_event_flag_t flag = (rb_event_flag_t)nf;
|
1244
|
+
|
1245
|
+
if (RUBY_DTRACE_METHOD_ENTRY_ENABLED() ||
|
1246
|
+
RUBY_DTRACE_METHOD_RETURN_ENABLED() ||
|
1247
|
+
RUBY_DTRACE_CMETHOD_ENTRY_ENABLED() ||
|
1248
|
+
RUBY_DTRACE_CMETHOD_RETURN_ENABLED()) {
|
1249
|
+
|
1250
|
+
switch(flag) {
|
1251
|
+
case RUBY_EVENT_CALL:
|
1252
|
+
RUBY_DTRACE_METHOD_ENTRY_HOOK(th, 0, 0);
|
1253
|
+
break;
|
1254
|
+
case RUBY_EVENT_C_CALL:
|
1255
|
+
RUBY_DTRACE_CMETHOD_ENTRY_HOOK(th, 0, 0);
|
1256
|
+
break;
|
1257
|
+
case RUBY_EVENT_RETURN:
|
1258
|
+
RUBY_DTRACE_METHOD_RETURN_HOOK(th, 0, 0);
|
1259
|
+
break;
|
1260
|
+
case RUBY_EVENT_C_RETURN:
|
1261
|
+
RUBY_DTRACE_CMETHOD_RETURN_HOOK(th, 0, 0);
|
1262
|
+
break;
|
1263
|
+
}
|
1264
|
+
}
|
1265
|
+
|
1266
|
+
EXEC_EVENT_HOOK(th, flag, GET_SELF(), 0, 0 /* id and klass are resolved at callee */,
|
1267
|
+
(flag & (RUBY_EVENT_RETURN | RUBY_EVENT_B_RETURN)) ? TOPN(0) : Qundef);
|
1268
|
+
|
1269
|
+
#line 1270 "vm.inc"
|
1270
|
+
#undef CURRENT_INSN_trace
|
1271
|
+
#undef INSN_IS_SC
|
1272
|
+
#undef INSN_LABEL
|
1273
|
+
#undef LABEL_IS_SC
|
1274
|
+
END_INSN(trace);}}}
|
1275
|
+
INSN_ENTRY(defineclass){
|
1276
|
+
{
|
1277
|
+
VALUE val;
|
1278
|
+
rb_num_t flags = (rb_num_t)GET_OPERAND(3);
|
1279
|
+
ISEQ class_iseq = (ISEQ)GET_OPERAND(2);
|
1280
|
+
ID id = (ID)GET_OPERAND(1);
|
1281
|
+
VALUE cbase = TOPN(1);
|
1282
|
+
VALUE super = TOPN(0);
|
1283
|
+
DEBUG_ENTER_INSN("defineclass");
|
1284
|
+
ADD_PC(1+3);
|
1285
|
+
PREFETCH(GET_PC());
|
1286
|
+
POPN(2);
|
1287
|
+
#define CURRENT_INSN_defineclass 1
|
1288
|
+
#define INSN_IS_SC() 0
|
1289
|
+
#define INSN_LABEL(lab) LABEL_defineclass_##lab
|
1290
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1291
|
+
COLLECT_USAGE_INSN(BIN(defineclass));
|
1292
|
+
COLLECT_USAGE_OPERAND(BIN(defineclass), 0, id);
|
1293
|
+
COLLECT_USAGE_OPERAND(BIN(defineclass), 1, class_iseq);
|
1294
|
+
COLLECT_USAGE_OPERAND(BIN(defineclass), 2, flags);
|
1295
|
+
{
|
1296
|
+
#line 890 "insns.def"
|
1297
|
+
VALUE klass;
|
1298
|
+
rb_vm_defineclass_type_t type = VM_DEFINECLASS_TYPE(flags);
|
1299
|
+
|
1300
|
+
switch (type) {
|
1301
|
+
case VM_DEFINECLASS_TYPE_CLASS:
|
1302
|
+
/* val is dummy. classdef returns class scope value */
|
1303
|
+
|
1304
|
+
if (VM_DEFINECLASS_HAS_SUPERCLASS_P(flags) &&
|
1305
|
+
!RB_TYPE_P(super, T_CLASS)) {
|
1306
|
+
rb_raise(rb_eTypeError, "superclass must be a Class (%s given)",
|
1307
|
+
rb_obj_classname(super));
|
1308
|
+
}
|
1309
|
+
|
1310
|
+
if (super == Qnil) {
|
1311
|
+
super = rb_cObject;
|
1312
|
+
}
|
1313
|
+
|
1314
|
+
vm_check_if_namespace(cbase);
|
1315
|
+
|
1316
|
+
/* find klass */
|
1317
|
+
rb_autoload_load(cbase, id);
|
1318
|
+
if ((klass = vm_search_const_defined_class(cbase, id)) != 0) {
|
1319
|
+
/* already exist */
|
1320
|
+
klass = VM_DEFINECLASS_SCOPED_P(flags) ?
|
1321
|
+
rb_public_const_get_at(klass, id) : rb_const_get_at(klass, id);
|
1322
|
+
if (!RB_TYPE_P(klass, T_CLASS)) {
|
1323
|
+
rb_raise(rb_eTypeError, "%s is not a class", rb_id2name(id));
|
1324
|
+
}
|
1325
|
+
|
1326
|
+
if (super != rb_cObject) {
|
1327
|
+
VALUE tmp;
|
1328
|
+
tmp = rb_class_real(RCLASS_SUPER(klass));
|
1329
|
+
|
1330
|
+
if (tmp != super) {
|
1331
|
+
rb_raise(rb_eTypeError, "superclass mismatch for class %s",
|
1332
|
+
rb_id2name(id));
|
1333
|
+
}
|
1334
|
+
}
|
1335
|
+
}
|
1336
|
+
else {
|
1337
|
+
/* new class declaration */
|
1338
|
+
klass = rb_define_class_id(id, super);
|
1339
|
+
rb_set_class_path_string(klass, cbase, rb_id2str(id));
|
1340
|
+
rb_const_set(cbase, id, klass);
|
1341
|
+
rb_class_inherited(super, klass);
|
1342
|
+
}
|
1343
|
+
break;
|
1344
|
+
case VM_DEFINECLASS_TYPE_SINGLETON_CLASS:
|
1345
|
+
/* val is dummy. classdef returns class scope value */
|
1346
|
+
/* super is dummy */
|
1347
|
+
klass = rb_singleton_class(cbase);
|
1348
|
+
break;
|
1349
|
+
case VM_DEFINECLASS_TYPE_MODULE:
|
1350
|
+
/* val is dummy. classdef returns class scope value */
|
1351
|
+
/* super is dummy */
|
1352
|
+
|
1353
|
+
vm_check_if_namespace(cbase);
|
1354
|
+
|
1355
|
+
/* find klass */
|
1356
|
+
if ((klass = vm_search_const_defined_class(cbase, id)) != 0) {
|
1357
|
+
klass = VM_DEFINECLASS_SCOPED_P(flags) ?
|
1358
|
+
rb_public_const_get_at(klass, id) : rb_const_get_at(klass, id);
|
1359
|
+
/* already exist */
|
1360
|
+
if (!RB_TYPE_P(klass, T_MODULE)) {
|
1361
|
+
rb_raise(rb_eTypeError, "%s is not a module", rb_id2name(id));
|
1362
|
+
}
|
1363
|
+
}
|
1364
|
+
else {
|
1365
|
+
/* new module declaration */
|
1366
|
+
klass = rb_define_module_id(id);
|
1367
|
+
rb_set_class_path_string(klass, cbase, rb_id2str(id));
|
1368
|
+
rb_const_set(cbase, id, klass);
|
1369
|
+
}
|
1370
|
+
break;
|
1371
|
+
default:
|
1372
|
+
rb_bug("unknown defineclass type: %d", (int)type);
|
1373
|
+
}
|
1374
|
+
|
1375
|
+
COPY_CREF(class_iseq->cref_stack, vm_cref_push(th, klass, NOEX_PUBLIC, NULL));
|
1376
|
+
|
1377
|
+
/* enter scope */
|
1378
|
+
vm_push_frame(th, class_iseq, VM_FRAME_MAGIC_CLASS,
|
1379
|
+
klass, 0, VM_ENVVAL_BLOCK_PTR(GET_BLOCK_PTR()),
|
1380
|
+
class_iseq->iseq_encoded, GET_SP(),
|
1381
|
+
class_iseq->local_size, 0, class_iseq->stack_max);
|
1382
|
+
RESTORE_REGS();
|
1383
|
+
NEXT_INSN();
|
1384
|
+
|
1385
|
+
#line 1386 "vm.inc"
|
1386
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1387
|
+
PUSH(val);
|
1388
|
+
#undef CURRENT_INSN_defineclass
|
1389
|
+
#undef INSN_IS_SC
|
1390
|
+
#undef INSN_LABEL
|
1391
|
+
#undef LABEL_IS_SC
|
1392
|
+
END_INSN(defineclass);}}}
|
1393
|
+
INSN_ENTRY(send){
|
1394
|
+
{
|
1395
|
+
VALUE val;
|
1396
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
1397
|
+
|
1398
|
+
DEBUG_ENTER_INSN("send");
|
1399
|
+
ADD_PC(1+1);
|
1400
|
+
PREFETCH(GET_PC());
|
1401
|
+
#define CURRENT_INSN_send 1
|
1402
|
+
#define INSN_IS_SC() 0
|
1403
|
+
#define INSN_LABEL(lab) LABEL_send_##lab
|
1404
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1405
|
+
COLLECT_USAGE_INSN(BIN(send));
|
1406
|
+
COLLECT_USAGE_OPERAND(BIN(send), 0, ci);
|
1407
|
+
{
|
1408
|
+
#line 995 "insns.def"
|
1409
|
+
ci->argc = ci->orig_argc;
|
1410
|
+
ci->blockptr = 0;
|
1411
|
+
vm_caller_setup_args(th, reg_cfp, ci);
|
1412
|
+
vm_search_method(ci, ci->recv = TOPN(ci->argc));
|
1413
|
+
CALL_METHOD(ci);
|
1414
|
+
|
1415
|
+
#line 1416 "vm.inc"
|
1416
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1417
|
+
PUSH(val);
|
1418
|
+
#undef CURRENT_INSN_send
|
1419
|
+
#undef INSN_IS_SC
|
1420
|
+
#undef INSN_LABEL
|
1421
|
+
#undef LABEL_IS_SC
|
1422
|
+
END_INSN(send);}}}
|
1423
|
+
INSN_ENTRY(opt_str_freeze){
|
1424
|
+
{
|
1425
|
+
VALUE val;
|
1426
|
+
VALUE str = (VALUE)GET_OPERAND(1);
|
1427
|
+
|
1428
|
+
DEBUG_ENTER_INSN("opt_str_freeze");
|
1429
|
+
ADD_PC(1+1);
|
1430
|
+
PREFETCH(GET_PC());
|
1431
|
+
#define CURRENT_INSN_opt_str_freeze 1
|
1432
|
+
#define INSN_IS_SC() 0
|
1433
|
+
#define INSN_LABEL(lab) LABEL_opt_str_freeze_##lab
|
1434
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1435
|
+
COLLECT_USAGE_INSN(BIN(opt_str_freeze));
|
1436
|
+
COLLECT_USAGE_OPERAND(BIN(opt_str_freeze), 0, str);
|
1437
|
+
{
|
1438
|
+
#line 1008 "insns.def"
|
1439
|
+
if (BASIC_OP_UNREDEFINED_P(BOP_FREEZE, STRING_REDEFINED_OP_FLAG)) {
|
1440
|
+
val = str;
|
1441
|
+
}
|
1442
|
+
else {
|
1443
|
+
val = rb_funcall(rb_str_resurrect(str), idFreeze, 0);
|
1444
|
+
}
|
1445
|
+
|
1446
|
+
#line 1447 "vm.inc"
|
1447
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1448
|
+
PUSH(val);
|
1449
|
+
#undef CURRENT_INSN_opt_str_freeze
|
1450
|
+
#undef INSN_IS_SC
|
1451
|
+
#undef INSN_LABEL
|
1452
|
+
#undef LABEL_IS_SC
|
1453
|
+
END_INSN(opt_str_freeze);}}}
|
1454
|
+
INSN_ENTRY(opt_send_simple){
|
1455
|
+
{
|
1456
|
+
VALUE val;
|
1457
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
1458
|
+
|
1459
|
+
DEBUG_ENTER_INSN("opt_send_simple");
|
1460
|
+
ADD_PC(1+1);
|
1461
|
+
PREFETCH(GET_PC());
|
1462
|
+
#define CURRENT_INSN_opt_send_simple 1
|
1463
|
+
#define INSN_IS_SC() 0
|
1464
|
+
#define INSN_LABEL(lab) LABEL_opt_send_simple_##lab
|
1465
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1466
|
+
COLLECT_USAGE_INSN(BIN(opt_send_simple));
|
1467
|
+
COLLECT_USAGE_OPERAND(BIN(opt_send_simple), 0, ci);
|
1468
|
+
{
|
1469
|
+
#line 1027 "insns.def"
|
1470
|
+
vm_search_method(ci, ci->recv = TOPN(ci->argc));
|
1471
|
+
CALL_METHOD(ci);
|
1472
|
+
|
1473
|
+
#line 1474 "vm.inc"
|
1474
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1475
|
+
PUSH(val);
|
1476
|
+
#undef CURRENT_INSN_opt_send_simple
|
1477
|
+
#undef INSN_IS_SC
|
1478
|
+
#undef INSN_LABEL
|
1479
|
+
#undef LABEL_IS_SC
|
1480
|
+
END_INSN(opt_send_simple);}}}
|
1481
|
+
INSN_ENTRY(invokesuper){
|
1482
|
+
{
|
1483
|
+
VALUE val;
|
1484
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
1485
|
+
|
1486
|
+
DEBUG_ENTER_INSN("invokesuper");
|
1487
|
+
ADD_PC(1+1);
|
1488
|
+
PREFETCH(GET_PC());
|
1489
|
+
#define CURRENT_INSN_invokesuper 1
|
1490
|
+
#define INSN_IS_SC() 0
|
1491
|
+
#define INSN_LABEL(lab) LABEL_invokesuper_##lab
|
1492
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1493
|
+
COLLECT_USAGE_INSN(BIN(invokesuper));
|
1494
|
+
COLLECT_USAGE_OPERAND(BIN(invokesuper), 0, ci);
|
1495
|
+
{
|
1496
|
+
#line 1042 "insns.def"
|
1497
|
+
ci->argc = ci->orig_argc;
|
1498
|
+
ci->blockptr = !(ci->flag & VM_CALL_ARGS_BLOCKARG) ? GET_BLOCK_PTR() : 0;
|
1499
|
+
|
1500
|
+
if (UNLIKELY(!(ci->flag & VM_CALL_ARGS_SKIP_SETUP))) {
|
1501
|
+
vm_caller_setup_args(th, reg_cfp, ci);
|
1502
|
+
}
|
1503
|
+
ci->recv = GET_SELF();
|
1504
|
+
vm_search_super_method(th, GET_CFP(), ci);
|
1505
|
+
CALL_METHOD(ci);
|
1506
|
+
|
1507
|
+
#line 1508 "vm.inc"
|
1508
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1509
|
+
PUSH(val);
|
1510
|
+
#undef CURRENT_INSN_invokesuper
|
1511
|
+
#undef INSN_IS_SC
|
1512
|
+
#undef INSN_LABEL
|
1513
|
+
#undef LABEL_IS_SC
|
1514
|
+
END_INSN(invokesuper);}}}
|
1515
|
+
INSN_ENTRY(invokeblock){
|
1516
|
+
{
|
1517
|
+
VALUE val;
|
1518
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
1519
|
+
|
1520
|
+
DEBUG_ENTER_INSN("invokeblock");
|
1521
|
+
ADD_PC(1+1);
|
1522
|
+
PREFETCH(GET_PC());
|
1523
|
+
#define CURRENT_INSN_invokeblock 1
|
1524
|
+
#define INSN_IS_SC() 0
|
1525
|
+
#define INSN_LABEL(lab) LABEL_invokeblock_##lab
|
1526
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1527
|
+
COLLECT_USAGE_INSN(BIN(invokeblock));
|
1528
|
+
COLLECT_USAGE_OPERAND(BIN(invokeblock), 0, ci);
|
1529
|
+
{
|
1530
|
+
#line 1064 "insns.def"
|
1531
|
+
ci->argc = ci->orig_argc;
|
1532
|
+
ci->blockptr = 0;
|
1533
|
+
ci->recv = GET_SELF();
|
1534
|
+
val = vm_invoke_block(th, GET_CFP(), ci);
|
1535
|
+
if (val == Qundef) {
|
1536
|
+
RESTORE_REGS();
|
1537
|
+
NEXT_INSN();
|
1538
|
+
}
|
1539
|
+
|
1540
|
+
#line 1541 "vm.inc"
|
1541
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1542
|
+
PUSH(val);
|
1543
|
+
#undef CURRENT_INSN_invokeblock
|
1544
|
+
#undef INSN_IS_SC
|
1545
|
+
#undef INSN_LABEL
|
1546
|
+
#undef LABEL_IS_SC
|
1547
|
+
END_INSN(invokeblock);}}}
|
1548
|
+
INSN_ENTRY(leave){
|
1549
|
+
{
|
1550
|
+
|
1551
|
+
VALUE val = TOPN(0);
|
1552
|
+
DEBUG_ENTER_INSN("leave");
|
1553
|
+
ADD_PC(1+0);
|
1554
|
+
PREFETCH(GET_PC());
|
1555
|
+
POPN(1);
|
1556
|
+
#define CURRENT_INSN_leave 1
|
1557
|
+
#define INSN_IS_SC() 0
|
1558
|
+
#define INSN_LABEL(lab) LABEL_leave_##lab
|
1559
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1560
|
+
COLLECT_USAGE_INSN(BIN(leave));
|
1561
|
+
{
|
1562
|
+
#line 1085 "insns.def"
|
1563
|
+
if (OPT_CHECKED_RUN) {
|
1564
|
+
if (reg_cfp->sp != vm_base_ptr(reg_cfp)) {
|
1565
|
+
rb_bug("Stack consistency error (sp: %"PRIdPTRDIFF", bp: %"PRIdPTRDIFF")",
|
1566
|
+
VM_SP_CNT(th, reg_cfp->sp), VM_SP_CNT(th, vm_base_ptr(reg_cfp)));
|
1567
|
+
}
|
1568
|
+
}
|
1569
|
+
|
1570
|
+
RUBY_VM_CHECK_INTS(th);
|
1571
|
+
|
1572
|
+
if (UNLIKELY(VM_FRAME_TYPE_FINISH_P(GET_CFP()))) {
|
1573
|
+
vm_pop_frame(th);
|
1574
|
+
|
1575
|
+
#if OPT_CALL_THREADED_CODE
|
1576
|
+
th->retval = val;
|
1577
|
+
return 0;
|
1578
|
+
#else
|
1579
|
+
return val;
|
1580
|
+
#endif
|
1581
|
+
}
|
1582
|
+
else {
|
1583
|
+
vm_pop_frame(th);
|
1584
|
+
RESTORE_REGS();
|
1585
|
+
}
|
1586
|
+
|
1587
|
+
#line 1588 "vm.inc"
|
1588
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1589
|
+
PUSH(val);
|
1590
|
+
#undef CURRENT_INSN_leave
|
1591
|
+
#undef INSN_IS_SC
|
1592
|
+
#undef INSN_LABEL
|
1593
|
+
#undef LABEL_IS_SC
|
1594
|
+
END_INSN(leave);}}}
|
1595
|
+
INSN_ENTRY(throw){
|
1596
|
+
{
|
1597
|
+
VALUE val;
|
1598
|
+
rb_num_t throw_state = (rb_num_t)GET_OPERAND(1);
|
1599
|
+
VALUE throwobj = TOPN(0);
|
1600
|
+
DEBUG_ENTER_INSN("throw");
|
1601
|
+
ADD_PC(1+1);
|
1602
|
+
PREFETCH(GET_PC());
|
1603
|
+
POPN(1);
|
1604
|
+
#define CURRENT_INSN_throw 1
|
1605
|
+
#define INSN_IS_SC() 0
|
1606
|
+
#define INSN_LABEL(lab) LABEL_throw_##lab
|
1607
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1608
|
+
COLLECT_USAGE_INSN(BIN(throw));
|
1609
|
+
COLLECT_USAGE_OPERAND(BIN(throw), 0, throw_state);
|
1610
|
+
{
|
1611
|
+
#line 1125 "insns.def"
|
1612
|
+
RUBY_VM_CHECK_INTS(th);
|
1613
|
+
val = vm_throw(th, GET_CFP(), throw_state, throwobj);
|
1614
|
+
THROW_EXCEPTION(val);
|
1615
|
+
/* unreachable */
|
1616
|
+
|
1617
|
+
#line 1618 "vm.inc"
|
1618
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1619
|
+
PUSH(val);
|
1620
|
+
#undef CURRENT_INSN_throw
|
1621
|
+
#undef INSN_IS_SC
|
1622
|
+
#undef INSN_LABEL
|
1623
|
+
#undef LABEL_IS_SC
|
1624
|
+
END_INSN(throw);}}}
|
1625
|
+
INSN_ENTRY(jump){
|
1626
|
+
{
|
1627
|
+
OFFSET dst = (OFFSET)GET_OPERAND(1);
|
1628
|
+
|
1629
|
+
DEBUG_ENTER_INSN("jump");
|
1630
|
+
ADD_PC(1+1);
|
1631
|
+
PREFETCH(GET_PC());
|
1632
|
+
#define CURRENT_INSN_jump 1
|
1633
|
+
#define INSN_IS_SC() 0
|
1634
|
+
#define INSN_LABEL(lab) LABEL_jump_##lab
|
1635
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1636
|
+
COLLECT_USAGE_INSN(BIN(jump));
|
1637
|
+
COLLECT_USAGE_OPERAND(BIN(jump), 0, dst);
|
1638
|
+
{
|
1639
|
+
#line 1146 "insns.def"
|
1640
|
+
RUBY_VM_CHECK_INTS(th);
|
1641
|
+
JUMP(dst);
|
1642
|
+
|
1643
|
+
#line 1644 "vm.inc"
|
1644
|
+
#undef CURRENT_INSN_jump
|
1645
|
+
#undef INSN_IS_SC
|
1646
|
+
#undef INSN_LABEL
|
1647
|
+
#undef LABEL_IS_SC
|
1648
|
+
END_INSN(jump);}}}
|
1649
|
+
INSN_ENTRY(branchif){
|
1650
|
+
{
|
1651
|
+
OFFSET dst = (OFFSET)GET_OPERAND(1);
|
1652
|
+
VALUE val = TOPN(0);
|
1653
|
+
DEBUG_ENTER_INSN("branchif");
|
1654
|
+
ADD_PC(1+1);
|
1655
|
+
PREFETCH(GET_PC());
|
1656
|
+
POPN(1);
|
1657
|
+
#define CURRENT_INSN_branchif 1
|
1658
|
+
#define INSN_IS_SC() 0
|
1659
|
+
#define INSN_LABEL(lab) LABEL_branchif_##lab
|
1660
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1661
|
+
COLLECT_USAGE_INSN(BIN(branchif));
|
1662
|
+
COLLECT_USAGE_OPERAND(BIN(branchif), 0, dst);
|
1663
|
+
{
|
1664
|
+
#line 1161 "insns.def"
|
1665
|
+
if (RTEST(val)) {
|
1666
|
+
RUBY_VM_CHECK_INTS(th);
|
1667
|
+
JUMP(dst);
|
1668
|
+
}
|
1669
|
+
|
1670
|
+
#line 1671 "vm.inc"
|
1671
|
+
#undef CURRENT_INSN_branchif
|
1672
|
+
#undef INSN_IS_SC
|
1673
|
+
#undef INSN_LABEL
|
1674
|
+
#undef LABEL_IS_SC
|
1675
|
+
END_INSN(branchif);}}}
|
1676
|
+
INSN_ENTRY(branchunless){
|
1677
|
+
{
|
1678
|
+
OFFSET dst = (OFFSET)GET_OPERAND(1);
|
1679
|
+
VALUE val = TOPN(0);
|
1680
|
+
DEBUG_ENTER_INSN("branchunless");
|
1681
|
+
ADD_PC(1+1);
|
1682
|
+
PREFETCH(GET_PC());
|
1683
|
+
POPN(1);
|
1684
|
+
#define CURRENT_INSN_branchunless 1
|
1685
|
+
#define INSN_IS_SC() 0
|
1686
|
+
#define INSN_LABEL(lab) LABEL_branchunless_##lab
|
1687
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1688
|
+
COLLECT_USAGE_INSN(BIN(branchunless));
|
1689
|
+
COLLECT_USAGE_OPERAND(BIN(branchunless), 0, dst);
|
1690
|
+
{
|
1691
|
+
#line 1178 "insns.def"
|
1692
|
+
if (!RTEST(val)) {
|
1693
|
+
RUBY_VM_CHECK_INTS(th);
|
1694
|
+
JUMP(dst);
|
1695
|
+
}
|
1696
|
+
|
1697
|
+
#line 1698 "vm.inc"
|
1698
|
+
#undef CURRENT_INSN_branchunless
|
1699
|
+
#undef INSN_IS_SC
|
1700
|
+
#undef INSN_LABEL
|
1701
|
+
#undef LABEL_IS_SC
|
1702
|
+
END_INSN(branchunless);}}}
|
1703
|
+
INSN_ENTRY(getinlinecache){
|
1704
|
+
{
|
1705
|
+
VALUE val;
|
1706
|
+
IC ic = (IC)GET_OPERAND(2);
|
1707
|
+
OFFSET dst = (OFFSET)GET_OPERAND(1);
|
1708
|
+
|
1709
|
+
DEBUG_ENTER_INSN("getinlinecache");
|
1710
|
+
ADD_PC(1+2);
|
1711
|
+
PREFETCH(GET_PC());
|
1712
|
+
#define CURRENT_INSN_getinlinecache 1
|
1713
|
+
#define INSN_IS_SC() 0
|
1714
|
+
#define INSN_LABEL(lab) LABEL_getinlinecache_##lab
|
1715
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1716
|
+
COLLECT_USAGE_INSN(BIN(getinlinecache));
|
1717
|
+
COLLECT_USAGE_OPERAND(BIN(getinlinecache), 0, dst);
|
1718
|
+
COLLECT_USAGE_OPERAND(BIN(getinlinecache), 1, ic);
|
1719
|
+
{
|
1720
|
+
#line 1200 "insns.def"
|
1721
|
+
if (ic->ic_serial == GET_GLOBAL_CONSTANT_STATE()) {
|
1722
|
+
val = ic->ic_value.value;
|
1723
|
+
JUMP(dst);
|
1724
|
+
}
|
1725
|
+
else {
|
1726
|
+
/* none */
|
1727
|
+
val = Qnil;
|
1728
|
+
}
|
1729
|
+
|
1730
|
+
#line 1731 "vm.inc"
|
1731
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1732
|
+
PUSH(val);
|
1733
|
+
#undef CURRENT_INSN_getinlinecache
|
1734
|
+
#undef INSN_IS_SC
|
1735
|
+
#undef INSN_LABEL
|
1736
|
+
#undef LABEL_IS_SC
|
1737
|
+
END_INSN(getinlinecache);}}}
|
1738
|
+
INSN_ENTRY(setinlinecache){
|
1739
|
+
{
|
1740
|
+
IC ic = (IC)GET_OPERAND(1);
|
1741
|
+
VALUE val = TOPN(0);
|
1742
|
+
DEBUG_ENTER_INSN("setinlinecache");
|
1743
|
+
ADD_PC(1+1);
|
1744
|
+
PREFETCH(GET_PC());
|
1745
|
+
POPN(1);
|
1746
|
+
#define CURRENT_INSN_setinlinecache 1
|
1747
|
+
#define INSN_IS_SC() 0
|
1748
|
+
#define INSN_LABEL(lab) LABEL_setinlinecache_##lab
|
1749
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1750
|
+
COLLECT_USAGE_INSN(BIN(setinlinecache));
|
1751
|
+
COLLECT_USAGE_OPERAND(BIN(setinlinecache), 0, ic);
|
1752
|
+
{
|
1753
|
+
#line 1221 "insns.def"
|
1754
|
+
if (ic->ic_value.value == Qundef) {
|
1755
|
+
rb_iseq_add_mark_object(GET_ISEQ(), val);
|
1756
|
+
}
|
1757
|
+
ic->ic_value.value = val;
|
1758
|
+
ic->ic_serial = GET_GLOBAL_CONSTANT_STATE() - ruby_vm_const_missing_count;
|
1759
|
+
ruby_vm_const_missing_count = 0;
|
1760
|
+
|
1761
|
+
#line 1762 "vm.inc"
|
1762
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1763
|
+
PUSH(val);
|
1764
|
+
#undef CURRENT_INSN_setinlinecache
|
1765
|
+
#undef INSN_IS_SC
|
1766
|
+
#undef INSN_LABEL
|
1767
|
+
#undef LABEL_IS_SC
|
1768
|
+
END_INSN(setinlinecache);}}}
|
1769
|
+
INSN_ENTRY(once){
|
1770
|
+
{
|
1771
|
+
VALUE val;
|
1772
|
+
IC ic = (IC)GET_OPERAND(2);
|
1773
|
+
ISEQ iseq = (ISEQ)GET_OPERAND(1);
|
1774
|
+
|
1775
|
+
DEBUG_ENTER_INSN("once");
|
1776
|
+
ADD_PC(1+2);
|
1777
|
+
PREFETCH(GET_PC());
|
1778
|
+
#define CURRENT_INSN_once 1
|
1779
|
+
#define INSN_IS_SC() 0
|
1780
|
+
#define INSN_LABEL(lab) LABEL_once_##lab
|
1781
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1782
|
+
COLLECT_USAGE_INSN(BIN(once));
|
1783
|
+
COLLECT_USAGE_OPERAND(BIN(once), 0, iseq);
|
1784
|
+
COLLECT_USAGE_OPERAND(BIN(once), 1, ic);
|
1785
|
+
{
|
1786
|
+
#line 1240 "insns.def"
|
1787
|
+
union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)ic;
|
1788
|
+
|
1789
|
+
retry:
|
1790
|
+
if (is->once.done == Qfalse) {
|
1791
|
+
if (is->once.running_thread == NULL) {
|
1792
|
+
is->once.running_thread = th;
|
1793
|
+
val = is->once.value = rb_ensure(vm_once_exec, (VALUE)iseq, vm_once_clear, (VALUE)is);
|
1794
|
+
/* is->once.running_thread is cleared by vm_once_clear() */
|
1795
|
+
is->once.done = Qtrue;
|
1796
|
+
rb_iseq_add_mark_object(GET_ISEQ(), val);
|
1797
|
+
}
|
1798
|
+
else if (is->once.running_thread == th) {
|
1799
|
+
/* recursive once */
|
1800
|
+
val = vm_once_exec(iseq);
|
1801
|
+
}
|
1802
|
+
else {
|
1803
|
+
/* waiting for finish */
|
1804
|
+
RUBY_VM_CHECK_INTS(th);
|
1805
|
+
rb_thread_schedule();
|
1806
|
+
goto retry;
|
1807
|
+
}
|
1808
|
+
}
|
1809
|
+
else {
|
1810
|
+
val = is->once.value;
|
1811
|
+
}
|
1812
|
+
|
1813
|
+
#line 1814 "vm.inc"
|
1814
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1815
|
+
PUSH(val);
|
1816
|
+
#undef CURRENT_INSN_once
|
1817
|
+
#undef INSN_IS_SC
|
1818
|
+
#undef INSN_LABEL
|
1819
|
+
#undef LABEL_IS_SC
|
1820
|
+
END_INSN(once);}}}
|
1821
|
+
INSN_ENTRY(opt_case_dispatch){
|
1822
|
+
{
|
1823
|
+
OFFSET else_offset = (OFFSET)GET_OPERAND(2);
|
1824
|
+
CDHASH hash = (CDHASH)GET_OPERAND(1);
|
1825
|
+
VALUE key = TOPN(0);
|
1826
|
+
DEBUG_ENTER_INSN("opt_case_dispatch");
|
1827
|
+
ADD_PC(1+2);
|
1828
|
+
PREFETCH(GET_PC());
|
1829
|
+
POPN(1);
|
1830
|
+
#define CURRENT_INSN_opt_case_dispatch 1
|
1831
|
+
#define INSN_IS_SC() 0
|
1832
|
+
#define INSN_LABEL(lab) LABEL_opt_case_dispatch_##lab
|
1833
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1834
|
+
COLLECT_USAGE_INSN(BIN(opt_case_dispatch));
|
1835
|
+
COLLECT_USAGE_OPERAND(BIN(opt_case_dispatch), 0, hash);
|
1836
|
+
COLLECT_USAGE_OPERAND(BIN(opt_case_dispatch), 1, else_offset);
|
1837
|
+
{
|
1838
|
+
#line 1278 "insns.def"
|
1839
|
+
switch(TYPE(key)) {
|
1840
|
+
case T_FLOAT: {
|
1841
|
+
double ival;
|
1842
|
+
if (modf(RFLOAT_VALUE(key), &ival) == 0.0) {
|
1843
|
+
key = FIXABLE(ival) ? LONG2FIX((long)ival) : rb_dbl2big(ival);
|
1844
|
+
}
|
1845
|
+
}
|
1846
|
+
case T_SYMBOL: /* fall through */
|
1847
|
+
case T_FIXNUM:
|
1848
|
+
case T_BIGNUM:
|
1849
|
+
case T_STRING:
|
1850
|
+
if (BASIC_OP_UNREDEFINED_P(BOP_EQQ,
|
1851
|
+
SYMBOL_REDEFINED_OP_FLAG |
|
1852
|
+
FIXNUM_REDEFINED_OP_FLAG |
|
1853
|
+
BIGNUM_REDEFINED_OP_FLAG |
|
1854
|
+
STRING_REDEFINED_OP_FLAG)) {
|
1855
|
+
st_data_t val;
|
1856
|
+
if (st_lookup(RHASH_TBL_RAW(hash), key, &val)) {
|
1857
|
+
JUMP(FIX2INT((VALUE)val));
|
1858
|
+
}
|
1859
|
+
else {
|
1860
|
+
JUMP(else_offset);
|
1861
|
+
}
|
1862
|
+
break;
|
1863
|
+
}
|
1864
|
+
default:
|
1865
|
+
break;
|
1866
|
+
}
|
1867
|
+
|
1868
|
+
#line 1869 "vm.inc"
|
1869
|
+
#undef CURRENT_INSN_opt_case_dispatch
|
1870
|
+
#undef INSN_IS_SC
|
1871
|
+
#undef INSN_LABEL
|
1872
|
+
#undef LABEL_IS_SC
|
1873
|
+
END_INSN(opt_case_dispatch);}}}
|
1874
|
+
INSN_ENTRY(opt_plus){
|
1875
|
+
{
|
1876
|
+
VALUE val;
|
1877
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
1878
|
+
VALUE recv = TOPN(1);
|
1879
|
+
VALUE obj = TOPN(0);
|
1880
|
+
DEBUG_ENTER_INSN("opt_plus");
|
1881
|
+
ADD_PC(1+1);
|
1882
|
+
PREFETCH(GET_PC());
|
1883
|
+
POPN(2);
|
1884
|
+
#define CURRENT_INSN_opt_plus 1
|
1885
|
+
#define INSN_IS_SC() 0
|
1886
|
+
#define INSN_LABEL(lab) LABEL_opt_plus_##lab
|
1887
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1888
|
+
COLLECT_USAGE_INSN(BIN(opt_plus));
|
1889
|
+
COLLECT_USAGE_OPERAND(BIN(opt_plus), 0, ci);
|
1890
|
+
{
|
1891
|
+
#line 1321 "insns.def"
|
1892
|
+
if (FIXNUM_2_P(recv, obj) &&
|
1893
|
+
BASIC_OP_UNREDEFINED_P(BOP_PLUS,FIXNUM_REDEFINED_OP_FLAG)) {
|
1894
|
+
/* fixnum + fixnum */
|
1895
|
+
#ifndef LONG_LONG_VALUE
|
1896
|
+
val = (recv + (obj & (~1)));
|
1897
|
+
if ((~(recv ^ obj) & (recv ^ val)) &
|
1898
|
+
((VALUE)0x01 << ((sizeof(VALUE) * CHAR_BIT) - 1))) {
|
1899
|
+
val = rb_big_plus(rb_int2big(FIX2LONG(recv)),
|
1900
|
+
rb_int2big(FIX2LONG(obj)));
|
1901
|
+
}
|
1902
|
+
#else
|
1903
|
+
long a, b, c;
|
1904
|
+
a = FIX2LONG(recv);
|
1905
|
+
b = FIX2LONG(obj);
|
1906
|
+
c = a + b;
|
1907
|
+
if (FIXABLE(c)) {
|
1908
|
+
val = LONG2FIX(c);
|
1909
|
+
}
|
1910
|
+
else {
|
1911
|
+
val = rb_big_plus(rb_int2big(a), rb_int2big(b));
|
1912
|
+
}
|
1913
|
+
#endif
|
1914
|
+
}
|
1915
|
+
else if (FLONUM_2_P(recv, obj) &&
|
1916
|
+
BASIC_OP_UNREDEFINED_P(BOP_PLUS, FLOAT_REDEFINED_OP_FLAG)) {
|
1917
|
+
val = DBL2NUM(RFLOAT_VALUE(recv) + RFLOAT_VALUE(obj));
|
1918
|
+
}
|
1919
|
+
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
1920
|
+
if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
|
1921
|
+
BASIC_OP_UNREDEFINED_P(BOP_PLUS, FLOAT_REDEFINED_OP_FLAG)) {
|
1922
|
+
val = DBL2NUM(RFLOAT_VALUE(recv) + RFLOAT_VALUE(obj));
|
1923
|
+
}
|
1924
|
+
else if (RBASIC_CLASS(recv) == rb_cString && RBASIC_CLASS(obj) == rb_cString &&
|
1925
|
+
BASIC_OP_UNREDEFINED_P(BOP_PLUS, STRING_REDEFINED_OP_FLAG)) {
|
1926
|
+
val = rb_str_plus(recv, obj);
|
1927
|
+
}
|
1928
|
+
else if (RBASIC_CLASS(recv) == rb_cArray &&
|
1929
|
+
BASIC_OP_UNREDEFINED_P(BOP_PLUS, ARRAY_REDEFINED_OP_FLAG)) {
|
1930
|
+
val = rb_ary_plus(recv, obj);
|
1931
|
+
}
|
1932
|
+
else {
|
1933
|
+
goto INSN_LABEL(normal_dispatch);
|
1934
|
+
}
|
1935
|
+
}
|
1936
|
+
else {
|
1937
|
+
INSN_LABEL(normal_dispatch):
|
1938
|
+
PUSH(recv);
|
1939
|
+
PUSH(obj);
|
1940
|
+
CALL_SIMPLE_METHOD(recv);
|
1941
|
+
}
|
1942
|
+
|
1943
|
+
#line 1944 "vm.inc"
|
1944
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1945
|
+
PUSH(val);
|
1946
|
+
#undef CURRENT_INSN_opt_plus
|
1947
|
+
#undef INSN_IS_SC
|
1948
|
+
#undef INSN_LABEL
|
1949
|
+
#undef LABEL_IS_SC
|
1950
|
+
END_INSN(opt_plus);}}}
|
1951
|
+
INSN_ENTRY(opt_minus){
|
1952
|
+
{
|
1953
|
+
VALUE val;
|
1954
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
1955
|
+
VALUE recv = TOPN(1);
|
1956
|
+
VALUE obj = TOPN(0);
|
1957
|
+
DEBUG_ENTER_INSN("opt_minus");
|
1958
|
+
ADD_PC(1+1);
|
1959
|
+
PREFETCH(GET_PC());
|
1960
|
+
POPN(2);
|
1961
|
+
#define CURRENT_INSN_opt_minus 1
|
1962
|
+
#define INSN_IS_SC() 0
|
1963
|
+
#define INSN_LABEL(lab) LABEL_opt_minus_##lab
|
1964
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1965
|
+
COLLECT_USAGE_INSN(BIN(opt_minus));
|
1966
|
+
COLLECT_USAGE_OPERAND(BIN(opt_minus), 0, ci);
|
1967
|
+
{
|
1968
|
+
#line 1384 "insns.def"
|
1969
|
+
if (FIXNUM_2_P(recv, obj) &&
|
1970
|
+
BASIC_OP_UNREDEFINED_P(BOP_MINUS, FIXNUM_REDEFINED_OP_FLAG)) {
|
1971
|
+
long a, b, c;
|
1972
|
+
|
1973
|
+
a = FIX2LONG(recv);
|
1974
|
+
b = FIX2LONG(obj);
|
1975
|
+
c = a - b;
|
1976
|
+
|
1977
|
+
if (FIXABLE(c)) {
|
1978
|
+
val = LONG2FIX(c);
|
1979
|
+
}
|
1980
|
+
else {
|
1981
|
+
val = rb_big_minus(rb_int2big(a), rb_int2big(b));
|
1982
|
+
}
|
1983
|
+
}
|
1984
|
+
else if (FLONUM_2_P(recv, obj) &&
|
1985
|
+
BASIC_OP_UNREDEFINED_P(BOP_MINUS, FLOAT_REDEFINED_OP_FLAG)) {
|
1986
|
+
val = DBL2NUM(RFLOAT_VALUE(recv) - RFLOAT_VALUE(obj));
|
1987
|
+
}
|
1988
|
+
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
1989
|
+
if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
|
1990
|
+
BASIC_OP_UNREDEFINED_P(BOP_MINUS, FLOAT_REDEFINED_OP_FLAG)) {
|
1991
|
+
val = DBL2NUM(RFLOAT_VALUE(recv) - RFLOAT_VALUE(obj));
|
1992
|
+
}
|
1993
|
+
else {
|
1994
|
+
goto INSN_LABEL(normal_dispatch);
|
1995
|
+
}
|
1996
|
+
}
|
1997
|
+
else {
|
1998
|
+
/* other */
|
1999
|
+
INSN_LABEL(normal_dispatch):
|
2000
|
+
PUSH(recv);
|
2001
|
+
PUSH(obj);
|
2002
|
+
CALL_SIMPLE_METHOD(recv);
|
2003
|
+
}
|
2004
|
+
|
2005
|
+
#line 2006 "vm.inc"
|
2006
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2007
|
+
PUSH(val);
|
2008
|
+
#undef CURRENT_INSN_opt_minus
|
2009
|
+
#undef INSN_IS_SC
|
2010
|
+
#undef INSN_LABEL
|
2011
|
+
#undef LABEL_IS_SC
|
2012
|
+
END_INSN(opt_minus);}}}
|
2013
|
+
INSN_ENTRY(opt_mult){
|
2014
|
+
{
|
2015
|
+
VALUE val;
|
2016
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2017
|
+
VALUE recv = TOPN(1);
|
2018
|
+
VALUE obj = TOPN(0);
|
2019
|
+
DEBUG_ENTER_INSN("opt_mult");
|
2020
|
+
ADD_PC(1+1);
|
2021
|
+
PREFETCH(GET_PC());
|
2022
|
+
POPN(2);
|
2023
|
+
#define CURRENT_INSN_opt_mult 1
|
2024
|
+
#define INSN_IS_SC() 0
|
2025
|
+
#define INSN_LABEL(lab) LABEL_opt_mult_##lab
|
2026
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2027
|
+
COLLECT_USAGE_INSN(BIN(opt_mult));
|
2028
|
+
COLLECT_USAGE_OPERAND(BIN(opt_mult), 0, ci);
|
2029
|
+
{
|
2030
|
+
#line 1432 "insns.def"
|
2031
|
+
if (FIXNUM_2_P(recv, obj) &&
|
2032
|
+
BASIC_OP_UNREDEFINED_P(BOP_MULT, FIXNUM_REDEFINED_OP_FLAG)) {
|
2033
|
+
long a, b;
|
2034
|
+
|
2035
|
+
a = FIX2LONG(recv);
|
2036
|
+
if (a == 0) {
|
2037
|
+
val = recv;
|
2038
|
+
}
|
2039
|
+
else {
|
2040
|
+
b = FIX2LONG(obj);
|
2041
|
+
if (MUL_OVERFLOW_FIXNUM_P(a, b)) {
|
2042
|
+
val = rb_big_mul(rb_int2big(a), rb_int2big(b));
|
2043
|
+
}
|
2044
|
+
else {
|
2045
|
+
val = LONG2FIX(a * b);
|
2046
|
+
}
|
2047
|
+
}
|
2048
|
+
}
|
2049
|
+
else if (FLONUM_2_P(recv, obj) &&
|
2050
|
+
BASIC_OP_UNREDEFINED_P(BOP_MULT, FLOAT_REDEFINED_OP_FLAG)) {
|
2051
|
+
val = DBL2NUM(RFLOAT_VALUE(recv) * RFLOAT_VALUE(obj));
|
2052
|
+
}
|
2053
|
+
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
2054
|
+
if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
|
2055
|
+
BASIC_OP_UNREDEFINED_P(BOP_MULT, FLOAT_REDEFINED_OP_FLAG)) {
|
2056
|
+
val = DBL2NUM(RFLOAT_VALUE(recv) * RFLOAT_VALUE(obj));
|
2057
|
+
}
|
2058
|
+
else {
|
2059
|
+
goto INSN_LABEL(normal_dispatch);
|
2060
|
+
}
|
2061
|
+
}
|
2062
|
+
else {
|
2063
|
+
INSN_LABEL(normal_dispatch):
|
2064
|
+
PUSH(recv);
|
2065
|
+
PUSH(obj);
|
2066
|
+
CALL_SIMPLE_METHOD(recv);
|
2067
|
+
}
|
2068
|
+
|
2069
|
+
#line 2070 "vm.inc"
|
2070
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2071
|
+
PUSH(val);
|
2072
|
+
#undef CURRENT_INSN_opt_mult
|
2073
|
+
#undef INSN_IS_SC
|
2074
|
+
#undef INSN_LABEL
|
2075
|
+
#undef LABEL_IS_SC
|
2076
|
+
END_INSN(opt_mult);}}}
|
2077
|
+
INSN_ENTRY(opt_div){
|
2078
|
+
{
|
2079
|
+
VALUE val;
|
2080
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2081
|
+
VALUE recv = TOPN(1);
|
2082
|
+
VALUE obj = TOPN(0);
|
2083
|
+
DEBUG_ENTER_INSN("opt_div");
|
2084
|
+
ADD_PC(1+1);
|
2085
|
+
PREFETCH(GET_PC());
|
2086
|
+
POPN(2);
|
2087
|
+
#define CURRENT_INSN_opt_div 1
|
2088
|
+
#define INSN_IS_SC() 0
|
2089
|
+
#define INSN_LABEL(lab) LABEL_opt_div_##lab
|
2090
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2091
|
+
COLLECT_USAGE_INSN(BIN(opt_div));
|
2092
|
+
COLLECT_USAGE_OPERAND(BIN(opt_div), 0, ci);
|
2093
|
+
{
|
2094
|
+
#line 1482 "insns.def"
|
2095
|
+
if (FIXNUM_2_P(recv, obj) &&
|
2096
|
+
BASIC_OP_UNREDEFINED_P(BOP_DIV, FIXNUM_REDEFINED_OP_FLAG)) {
|
2097
|
+
long x, y, div;
|
2098
|
+
|
2099
|
+
x = FIX2LONG(recv);
|
2100
|
+
y = FIX2LONG(obj);
|
2101
|
+
{
|
2102
|
+
/* copied from numeric.c#fixdivmod */
|
2103
|
+
long mod;
|
2104
|
+
if (y == 0)
|
2105
|
+
goto INSN_LABEL(normal_dispatch);
|
2106
|
+
if (y < 0) {
|
2107
|
+
if (x < 0)
|
2108
|
+
div = -x / -y;
|
2109
|
+
else
|
2110
|
+
div = -(x / -y);
|
2111
|
+
}
|
2112
|
+
else {
|
2113
|
+
if (x < 0)
|
2114
|
+
div = -(-x / y);
|
2115
|
+
else
|
2116
|
+
div = x / y;
|
2117
|
+
}
|
2118
|
+
mod = x - div * y;
|
2119
|
+
if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) {
|
2120
|
+
mod += y;
|
2121
|
+
div -= 1;
|
2122
|
+
}
|
2123
|
+
}
|
2124
|
+
val = LONG2NUM(div);
|
2125
|
+
}
|
2126
|
+
else if (FLONUM_2_P(recv, obj) &&
|
2127
|
+
BASIC_OP_UNREDEFINED_P(BOP_DIV, FLOAT_REDEFINED_OP_FLAG)) {
|
2128
|
+
val = DBL2NUM(RFLOAT_VALUE(recv) / RFLOAT_VALUE(obj));
|
2129
|
+
}
|
2130
|
+
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
2131
|
+
if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
|
2132
|
+
BASIC_OP_UNREDEFINED_P(BOP_DIV, FLOAT_REDEFINED_OP_FLAG)) {
|
2133
|
+
val = DBL2NUM(RFLOAT_VALUE(recv) / RFLOAT_VALUE(obj));
|
2134
|
+
}
|
2135
|
+
else {
|
2136
|
+
goto INSN_LABEL(normal_dispatch);
|
2137
|
+
}
|
2138
|
+
}
|
2139
|
+
else {
|
2140
|
+
INSN_LABEL(normal_dispatch):
|
2141
|
+
PUSH(recv);
|
2142
|
+
PUSH(obj);
|
2143
|
+
CALL_SIMPLE_METHOD(recv);
|
2144
|
+
}
|
2145
|
+
|
2146
|
+
#line 2147 "vm.inc"
|
2147
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2148
|
+
PUSH(val);
|
2149
|
+
#undef CURRENT_INSN_opt_div
|
2150
|
+
#undef INSN_IS_SC
|
2151
|
+
#undef INSN_LABEL
|
2152
|
+
#undef LABEL_IS_SC
|
2153
|
+
END_INSN(opt_div);}}}
|
2154
|
+
INSN_ENTRY(opt_mod){
|
2155
|
+
{
|
2156
|
+
VALUE val;
|
2157
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2158
|
+
VALUE recv = TOPN(1);
|
2159
|
+
VALUE obj = TOPN(0);
|
2160
|
+
DEBUG_ENTER_INSN("opt_mod");
|
2161
|
+
ADD_PC(1+1);
|
2162
|
+
PREFETCH(GET_PC());
|
2163
|
+
POPN(2);
|
2164
|
+
#define CURRENT_INSN_opt_mod 1
|
2165
|
+
#define INSN_IS_SC() 0
|
2166
|
+
#define INSN_LABEL(lab) LABEL_opt_mod_##lab
|
2167
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2168
|
+
COLLECT_USAGE_INSN(BIN(opt_mod));
|
2169
|
+
COLLECT_USAGE_OPERAND(BIN(opt_mod), 0, ci);
|
2170
|
+
{
|
2171
|
+
#line 1545 "insns.def"
|
2172
|
+
if (FIXNUM_2_P(recv, obj) &&
|
2173
|
+
BASIC_OP_UNREDEFINED_P(BOP_MOD, FIXNUM_REDEFINED_OP_FLAG )) {
|
2174
|
+
long x, y;
|
2175
|
+
|
2176
|
+
x = FIX2LONG(recv);
|
2177
|
+
y = FIX2LONG(obj);
|
2178
|
+
if (x > 0 && y > 0) {
|
2179
|
+
val = LONG2FIX(x % y);
|
2180
|
+
} else {
|
2181
|
+
/* copied from numeric.c#fixdivmod */
|
2182
|
+
long div, mod;
|
2183
|
+
|
2184
|
+
if (y == 0)
|
2185
|
+
rb_num_zerodiv();
|
2186
|
+
if (y < 0) {
|
2187
|
+
if (x < 0)
|
2188
|
+
div = -x / -y;
|
2189
|
+
else
|
2190
|
+
div = -(x / -y);
|
2191
|
+
}
|
2192
|
+
else {
|
2193
|
+
if (x < 0)
|
2194
|
+
div = -(-x / y);
|
2195
|
+
else
|
2196
|
+
div = x / y;
|
2197
|
+
}
|
2198
|
+
mod = x - div * y;
|
2199
|
+
if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) {
|
2200
|
+
mod += y;
|
2201
|
+
div -= 1;
|
2202
|
+
}
|
2203
|
+
val = LONG2FIX(mod);
|
2204
|
+
}
|
2205
|
+
}
|
2206
|
+
else if (FLONUM_2_P(recv, obj) &&
|
2207
|
+
BASIC_OP_UNREDEFINED_P(BOP_MOD, FLOAT_REDEFINED_OP_FLAG)) {
|
2208
|
+
val = DBL2NUM(ruby_float_mod(RFLOAT_VALUE(recv), RFLOAT_VALUE(obj)));
|
2209
|
+
}
|
2210
|
+
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
2211
|
+
if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
|
2212
|
+
BASIC_OP_UNREDEFINED_P(BOP_MOD, FLOAT_REDEFINED_OP_FLAG)) {
|
2213
|
+
val = DBL2NUM(ruby_float_mod(RFLOAT_VALUE(recv), RFLOAT_VALUE(obj)));
|
2214
|
+
}
|
2215
|
+
else {
|
2216
|
+
goto INSN_LABEL(normal_dispatch);
|
2217
|
+
}
|
2218
|
+
}
|
2219
|
+
else {
|
2220
|
+
INSN_LABEL(normal_dispatch):
|
2221
|
+
PUSH(recv);
|
2222
|
+
PUSH(obj);
|
2223
|
+
CALL_SIMPLE_METHOD(recv);
|
2224
|
+
}
|
2225
|
+
|
2226
|
+
#line 2227 "vm.inc"
|
2227
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2228
|
+
PUSH(val);
|
2229
|
+
#undef CURRENT_INSN_opt_mod
|
2230
|
+
#undef INSN_IS_SC
|
2231
|
+
#undef INSN_LABEL
|
2232
|
+
#undef LABEL_IS_SC
|
2233
|
+
END_INSN(opt_mod);}}}
|
2234
|
+
INSN_ENTRY(opt_eq){
|
2235
|
+
{
|
2236
|
+
VALUE val;
|
2237
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2238
|
+
VALUE recv = TOPN(1);
|
2239
|
+
VALUE obj = TOPN(0);
|
2240
|
+
DEBUG_ENTER_INSN("opt_eq");
|
2241
|
+
ADD_PC(1+1);
|
2242
|
+
PREFETCH(GET_PC());
|
2243
|
+
POPN(2);
|
2244
|
+
#define CURRENT_INSN_opt_eq 1
|
2245
|
+
#define INSN_IS_SC() 0
|
2246
|
+
#define INSN_LABEL(lab) LABEL_opt_eq_##lab
|
2247
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2248
|
+
COLLECT_USAGE_INSN(BIN(opt_eq));
|
2249
|
+
COLLECT_USAGE_OPERAND(BIN(opt_eq), 0, ci);
|
2250
|
+
{
|
2251
|
+
#line 1611 "insns.def"
|
2252
|
+
val = opt_eq_func(recv, obj, ci);
|
2253
|
+
|
2254
|
+
if (val == Qundef) {
|
2255
|
+
/* other */
|
2256
|
+
PUSH(recv);
|
2257
|
+
PUSH(obj);
|
2258
|
+
CALL_SIMPLE_METHOD(recv);
|
2259
|
+
}
|
2260
|
+
|
2261
|
+
#line 2262 "vm.inc"
|
2262
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2263
|
+
PUSH(val);
|
2264
|
+
#undef CURRENT_INSN_opt_eq
|
2265
|
+
#undef INSN_IS_SC
|
2266
|
+
#undef INSN_LABEL
|
2267
|
+
#undef LABEL_IS_SC
|
2268
|
+
END_INSN(opt_eq);}}}
|
2269
|
+
INSN_ENTRY(opt_neq){
|
2270
|
+
{
|
2271
|
+
VALUE val;
|
2272
|
+
CALL_INFO ci_eq = (CALL_INFO)GET_OPERAND(2);
|
2273
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2274
|
+
VALUE recv = TOPN(1);
|
2275
|
+
VALUE obj = TOPN(0);
|
2276
|
+
DEBUG_ENTER_INSN("opt_neq");
|
2277
|
+
ADD_PC(1+2);
|
2278
|
+
PREFETCH(GET_PC());
|
2279
|
+
POPN(2);
|
2280
|
+
#define CURRENT_INSN_opt_neq 1
|
2281
|
+
#define INSN_IS_SC() 0
|
2282
|
+
#define INSN_LABEL(lab) LABEL_opt_neq_##lab
|
2283
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2284
|
+
COLLECT_USAGE_INSN(BIN(opt_neq));
|
2285
|
+
COLLECT_USAGE_OPERAND(BIN(opt_neq), 0, ci);
|
2286
|
+
COLLECT_USAGE_OPERAND(BIN(opt_neq), 1, ci_eq);
|
2287
|
+
{
|
2288
|
+
#line 1632 "insns.def"
|
2289
|
+
extern VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2);
|
2290
|
+
vm_search_method(ci, recv);
|
2291
|
+
val = Qundef;
|
2292
|
+
|
2293
|
+
if (check_cfunc(ci->me, rb_obj_not_equal)) {
|
2294
|
+
val = opt_eq_func(recv, obj, ci_eq);
|
2295
|
+
|
2296
|
+
if (val != Qundef) {
|
2297
|
+
val = RTEST(val) ? Qfalse : Qtrue;
|
2298
|
+
}
|
2299
|
+
}
|
2300
|
+
|
2301
|
+
if (val == Qundef) {
|
2302
|
+
/* other */
|
2303
|
+
PUSH(recv);
|
2304
|
+
PUSH(obj);
|
2305
|
+
CALL_SIMPLE_METHOD(recv);
|
2306
|
+
}
|
2307
|
+
|
2308
|
+
#line 2309 "vm.inc"
|
2309
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2310
|
+
PUSH(val);
|
2311
|
+
#undef CURRENT_INSN_opt_neq
|
2312
|
+
#undef INSN_IS_SC
|
2313
|
+
#undef INSN_LABEL
|
2314
|
+
#undef LABEL_IS_SC
|
2315
|
+
END_INSN(opt_neq);}}}
|
2316
|
+
INSN_ENTRY(opt_lt){
|
2317
|
+
{
|
2318
|
+
VALUE val;
|
2319
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2320
|
+
VALUE recv = TOPN(1);
|
2321
|
+
VALUE obj = TOPN(0);
|
2322
|
+
DEBUG_ENTER_INSN("opt_lt");
|
2323
|
+
ADD_PC(1+1);
|
2324
|
+
PREFETCH(GET_PC());
|
2325
|
+
POPN(2);
|
2326
|
+
#define CURRENT_INSN_opt_lt 1
|
2327
|
+
#define INSN_IS_SC() 0
|
2328
|
+
#define INSN_LABEL(lab) LABEL_opt_lt_##lab
|
2329
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2330
|
+
COLLECT_USAGE_INSN(BIN(opt_lt));
|
2331
|
+
COLLECT_USAGE_OPERAND(BIN(opt_lt), 0, ci);
|
2332
|
+
{
|
2333
|
+
#line 1663 "insns.def"
|
2334
|
+
if (FIXNUM_2_P(recv, obj) &&
|
2335
|
+
BASIC_OP_UNREDEFINED_P(BOP_LT, FIXNUM_REDEFINED_OP_FLAG)) {
|
2336
|
+
SIGNED_VALUE a = recv, b = obj;
|
2337
|
+
|
2338
|
+
if (a < b) {
|
2339
|
+
val = Qtrue;
|
2340
|
+
}
|
2341
|
+
else {
|
2342
|
+
val = Qfalse;
|
2343
|
+
}
|
2344
|
+
}
|
2345
|
+
else if (FLONUM_2_P(recv, obj) &&
|
2346
|
+
BASIC_OP_UNREDEFINED_P(BOP_LT, FLOAT_REDEFINED_OP_FLAG)) {
|
2347
|
+
/* flonum is not NaN */
|
2348
|
+
val = RFLOAT_VALUE(recv) < RFLOAT_VALUE(obj) ? Qtrue : Qfalse;
|
2349
|
+
}
|
2350
|
+
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
2351
|
+
if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
|
2352
|
+
BASIC_OP_UNREDEFINED_P(BOP_LT, FLOAT_REDEFINED_OP_FLAG)) {
|
2353
|
+
val = double_cmp_lt(RFLOAT_VALUE(recv), RFLOAT_VALUE(obj));
|
2354
|
+
}
|
2355
|
+
else {
|
2356
|
+
goto INSN_LABEL(normal_dispatch);
|
2357
|
+
}
|
2358
|
+
}
|
2359
|
+
else {
|
2360
|
+
INSN_LABEL(normal_dispatch):
|
2361
|
+
PUSH(recv);
|
2362
|
+
PUSH(obj);
|
2363
|
+
CALL_SIMPLE_METHOD(recv);
|
2364
|
+
}
|
2365
|
+
|
2366
|
+
#line 2367 "vm.inc"
|
2367
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2368
|
+
PUSH(val);
|
2369
|
+
#undef CURRENT_INSN_opt_lt
|
2370
|
+
#undef INSN_IS_SC
|
2371
|
+
#undef INSN_LABEL
|
2372
|
+
#undef LABEL_IS_SC
|
2373
|
+
END_INSN(opt_lt);}}}
|
2374
|
+
INSN_ENTRY(opt_le){
|
2375
|
+
{
|
2376
|
+
VALUE val;
|
2377
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2378
|
+
VALUE recv = TOPN(1);
|
2379
|
+
VALUE obj = TOPN(0);
|
2380
|
+
DEBUG_ENTER_INSN("opt_le");
|
2381
|
+
ADD_PC(1+1);
|
2382
|
+
PREFETCH(GET_PC());
|
2383
|
+
POPN(2);
|
2384
|
+
#define CURRENT_INSN_opt_le 1
|
2385
|
+
#define INSN_IS_SC() 0
|
2386
|
+
#define INSN_LABEL(lab) LABEL_opt_le_##lab
|
2387
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2388
|
+
COLLECT_USAGE_INSN(BIN(opt_le));
|
2389
|
+
COLLECT_USAGE_OPERAND(BIN(opt_le), 0, ci);
|
2390
|
+
{
|
2391
|
+
#line 1707 "insns.def"
|
2392
|
+
if (FIXNUM_2_P(recv, obj) &&
|
2393
|
+
BASIC_OP_UNREDEFINED_P(BOP_LE, FIXNUM_REDEFINED_OP_FLAG)) {
|
2394
|
+
SIGNED_VALUE a = recv, b = obj;
|
2395
|
+
|
2396
|
+
if (a <= b) {
|
2397
|
+
val = Qtrue;
|
2398
|
+
}
|
2399
|
+
else {
|
2400
|
+
val = Qfalse;
|
2401
|
+
}
|
2402
|
+
}
|
2403
|
+
else if (FLONUM_2_P(recv, obj) &&
|
2404
|
+
BASIC_OP_UNREDEFINED_P(BOP_LE, FLOAT_REDEFINED_OP_FLAG)) {
|
2405
|
+
/* flonum is not NaN */
|
2406
|
+
val = RFLOAT_VALUE(recv) <= RFLOAT_VALUE(obj) ? Qtrue : Qfalse;
|
2407
|
+
}
|
2408
|
+
else {
|
2409
|
+
/* other */
|
2410
|
+
PUSH(recv);
|
2411
|
+
PUSH(obj);
|
2412
|
+
CALL_SIMPLE_METHOD(recv);
|
2413
|
+
}
|
2414
|
+
|
2415
|
+
#line 2416 "vm.inc"
|
2416
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2417
|
+
PUSH(val);
|
2418
|
+
#undef CURRENT_INSN_opt_le
|
2419
|
+
#undef INSN_IS_SC
|
2420
|
+
#undef INSN_LABEL
|
2421
|
+
#undef LABEL_IS_SC
|
2422
|
+
END_INSN(opt_le);}}}
|
2423
|
+
INSN_ENTRY(opt_gt){
|
2424
|
+
{
|
2425
|
+
VALUE val;
|
2426
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2427
|
+
VALUE recv = TOPN(1);
|
2428
|
+
VALUE obj = TOPN(0);
|
2429
|
+
DEBUG_ENTER_INSN("opt_gt");
|
2430
|
+
ADD_PC(1+1);
|
2431
|
+
PREFETCH(GET_PC());
|
2432
|
+
POPN(2);
|
2433
|
+
#define CURRENT_INSN_opt_gt 1
|
2434
|
+
#define INSN_IS_SC() 0
|
2435
|
+
#define INSN_LABEL(lab) LABEL_opt_gt_##lab
|
2436
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2437
|
+
COLLECT_USAGE_INSN(BIN(opt_gt));
|
2438
|
+
COLLECT_USAGE_OPERAND(BIN(opt_gt), 0, ci);
|
2439
|
+
{
|
2440
|
+
#line 1742 "insns.def"
|
2441
|
+
if (FIXNUM_2_P(recv, obj) &&
|
2442
|
+
BASIC_OP_UNREDEFINED_P(BOP_GT, FIXNUM_REDEFINED_OP_FLAG)) {
|
2443
|
+
SIGNED_VALUE a = recv, b = obj;
|
2444
|
+
|
2445
|
+
if (a > b) {
|
2446
|
+
val = Qtrue;
|
2447
|
+
}
|
2448
|
+
else {
|
2449
|
+
val = Qfalse;
|
2450
|
+
}
|
2451
|
+
}
|
2452
|
+
else if (FLONUM_2_P(recv, obj) &&
|
2453
|
+
BASIC_OP_UNREDEFINED_P(BOP_GT, FLOAT_REDEFINED_OP_FLAG)) {
|
2454
|
+
/* flonum is not NaN */
|
2455
|
+
val = RFLOAT_VALUE(recv) > RFLOAT_VALUE(obj) ? Qtrue : Qfalse;
|
2456
|
+
}
|
2457
|
+
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
2458
|
+
if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
|
2459
|
+
BASIC_OP_UNREDEFINED_P(BOP_GT, FLOAT_REDEFINED_OP_FLAG)) {
|
2460
|
+
val = double_cmp_gt(RFLOAT_VALUE(recv), RFLOAT_VALUE(obj));
|
2461
|
+
}
|
2462
|
+
else {
|
2463
|
+
goto INSN_LABEL(normal_dispatch);
|
2464
|
+
}
|
2465
|
+
}
|
2466
|
+
else {
|
2467
|
+
INSN_LABEL(normal_dispatch):
|
2468
|
+
PUSH(recv);
|
2469
|
+
PUSH(obj);
|
2470
|
+
CALL_SIMPLE_METHOD(recv);
|
2471
|
+
}
|
2472
|
+
|
2473
|
+
#line 2474 "vm.inc"
|
2474
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2475
|
+
PUSH(val);
|
2476
|
+
#undef CURRENT_INSN_opt_gt
|
2477
|
+
#undef INSN_IS_SC
|
2478
|
+
#undef INSN_LABEL
|
2479
|
+
#undef LABEL_IS_SC
|
2480
|
+
END_INSN(opt_gt);}}}
|
2481
|
+
INSN_ENTRY(opt_ge){
|
2482
|
+
{
|
2483
|
+
VALUE val;
|
2484
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2485
|
+
VALUE recv = TOPN(1);
|
2486
|
+
VALUE obj = TOPN(0);
|
2487
|
+
DEBUG_ENTER_INSN("opt_ge");
|
2488
|
+
ADD_PC(1+1);
|
2489
|
+
PREFETCH(GET_PC());
|
2490
|
+
POPN(2);
|
2491
|
+
#define CURRENT_INSN_opt_ge 1
|
2492
|
+
#define INSN_IS_SC() 0
|
2493
|
+
#define INSN_LABEL(lab) LABEL_opt_ge_##lab
|
2494
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2495
|
+
COLLECT_USAGE_INSN(BIN(opt_ge));
|
2496
|
+
COLLECT_USAGE_OPERAND(BIN(opt_ge), 0, ci);
|
2497
|
+
{
|
2498
|
+
#line 1786 "insns.def"
|
2499
|
+
if (FIXNUM_2_P(recv, obj) &&
|
2500
|
+
BASIC_OP_UNREDEFINED_P(BOP_GE, FIXNUM_REDEFINED_OP_FLAG)) {
|
2501
|
+
SIGNED_VALUE a = recv, b = obj;
|
2502
|
+
|
2503
|
+
if (a >= b) {
|
2504
|
+
val = Qtrue;
|
2505
|
+
}
|
2506
|
+
else {
|
2507
|
+
val = Qfalse;
|
2508
|
+
}
|
2509
|
+
}
|
2510
|
+
else if (FLONUM_2_P(recv, obj) &&
|
2511
|
+
BASIC_OP_UNREDEFINED_P(BOP_GE, FLOAT_REDEFINED_OP_FLAG)) {
|
2512
|
+
/* flonum is not NaN */
|
2513
|
+
val = RFLOAT_VALUE(recv) >= RFLOAT_VALUE(obj) ? Qtrue : Qfalse;
|
2514
|
+
}
|
2515
|
+
else {
|
2516
|
+
PUSH(recv);
|
2517
|
+
PUSH(obj);
|
2518
|
+
CALL_SIMPLE_METHOD(recv);
|
2519
|
+
}
|
2520
|
+
|
2521
|
+
#line 2522 "vm.inc"
|
2522
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2523
|
+
PUSH(val);
|
2524
|
+
#undef CURRENT_INSN_opt_ge
|
2525
|
+
#undef INSN_IS_SC
|
2526
|
+
#undef INSN_LABEL
|
2527
|
+
#undef LABEL_IS_SC
|
2528
|
+
END_INSN(opt_ge);}}}
|
2529
|
+
INSN_ENTRY(opt_ltlt){
|
2530
|
+
{
|
2531
|
+
VALUE val;
|
2532
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2533
|
+
VALUE recv = TOPN(1);
|
2534
|
+
VALUE obj = TOPN(0);
|
2535
|
+
DEBUG_ENTER_INSN("opt_ltlt");
|
2536
|
+
ADD_PC(1+1);
|
2537
|
+
PREFETCH(GET_PC());
|
2538
|
+
POPN(2);
|
2539
|
+
#define CURRENT_INSN_opt_ltlt 1
|
2540
|
+
#define INSN_IS_SC() 0
|
2541
|
+
#define INSN_LABEL(lab) LABEL_opt_ltlt_##lab
|
2542
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2543
|
+
COLLECT_USAGE_INSN(BIN(opt_ltlt));
|
2544
|
+
COLLECT_USAGE_OPERAND(BIN(opt_ltlt), 0, ci);
|
2545
|
+
{
|
2546
|
+
#line 1820 "insns.def"
|
2547
|
+
if (!SPECIAL_CONST_P(recv)) {
|
2548
|
+
if (RBASIC_CLASS(recv) == rb_cString &&
|
2549
|
+
BASIC_OP_UNREDEFINED_P(BOP_LTLT, STRING_REDEFINED_OP_FLAG)) {
|
2550
|
+
val = rb_str_concat(recv, obj);
|
2551
|
+
}
|
2552
|
+
else if (RBASIC_CLASS(recv) == rb_cArray &&
|
2553
|
+
BASIC_OP_UNREDEFINED_P(BOP_LTLT, ARRAY_REDEFINED_OP_FLAG)) {
|
2554
|
+
val = rb_ary_push(recv, obj);
|
2555
|
+
}
|
2556
|
+
else {
|
2557
|
+
goto INSN_LABEL(normal_dispatch);
|
2558
|
+
}
|
2559
|
+
}
|
2560
|
+
else {
|
2561
|
+
INSN_LABEL(normal_dispatch):
|
2562
|
+
PUSH(recv);
|
2563
|
+
PUSH(obj);
|
2564
|
+
CALL_SIMPLE_METHOD(recv);
|
2565
|
+
}
|
2566
|
+
|
2567
|
+
#line 2568 "vm.inc"
|
2568
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2569
|
+
PUSH(val);
|
2570
|
+
#undef CURRENT_INSN_opt_ltlt
|
2571
|
+
#undef INSN_IS_SC
|
2572
|
+
#undef INSN_LABEL
|
2573
|
+
#undef LABEL_IS_SC
|
2574
|
+
END_INSN(opt_ltlt);}}}
|
2575
|
+
INSN_ENTRY(opt_aref){
|
2576
|
+
{
|
2577
|
+
VALUE val;
|
2578
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2579
|
+
VALUE recv = TOPN(1);
|
2580
|
+
VALUE obj = TOPN(0);
|
2581
|
+
DEBUG_ENTER_INSN("opt_aref");
|
2582
|
+
ADD_PC(1+1);
|
2583
|
+
PREFETCH(GET_PC());
|
2584
|
+
POPN(2);
|
2585
|
+
#define CURRENT_INSN_opt_aref 1
|
2586
|
+
#define INSN_IS_SC() 0
|
2587
|
+
#define INSN_LABEL(lab) LABEL_opt_aref_##lab
|
2588
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2589
|
+
COLLECT_USAGE_INSN(BIN(opt_aref));
|
2590
|
+
COLLECT_USAGE_OPERAND(BIN(opt_aref), 0, ci);
|
2591
|
+
{
|
2592
|
+
#line 1852 "insns.def"
|
2593
|
+
if (!SPECIAL_CONST_P(recv)) {
|
2594
|
+
if (RBASIC_CLASS(recv) == rb_cArray && BASIC_OP_UNREDEFINED_P(BOP_AREF, ARRAY_REDEFINED_OP_FLAG) && FIXNUM_P(obj)) {
|
2595
|
+
val = rb_ary_entry(recv, FIX2LONG(obj));
|
2596
|
+
}
|
2597
|
+
else if (RBASIC_CLASS(recv) == rb_cHash && BASIC_OP_UNREDEFINED_P(BOP_AREF, HASH_REDEFINED_OP_FLAG)) {
|
2598
|
+
val = rb_hash_aref(recv, obj);
|
2599
|
+
}
|
2600
|
+
else {
|
2601
|
+
goto INSN_LABEL(normal_dispatch);
|
2602
|
+
}
|
2603
|
+
}
|
2604
|
+
else {
|
2605
|
+
INSN_LABEL(normal_dispatch):
|
2606
|
+
PUSH(recv);
|
2607
|
+
PUSH(obj);
|
2608
|
+
CALL_SIMPLE_METHOD(recv);
|
2609
|
+
}
|
2610
|
+
|
2611
|
+
#line 2612 "vm.inc"
|
2612
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2613
|
+
PUSH(val);
|
2614
|
+
#undef CURRENT_INSN_opt_aref
|
2615
|
+
#undef INSN_IS_SC
|
2616
|
+
#undef INSN_LABEL
|
2617
|
+
#undef LABEL_IS_SC
|
2618
|
+
END_INSN(opt_aref);}}}
|
2619
|
+
INSN_ENTRY(opt_aset){
|
2620
|
+
{
|
2621
|
+
VALUE val;
|
2622
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2623
|
+
VALUE recv = TOPN(2);
|
2624
|
+
VALUE obj = TOPN(1);
|
2625
|
+
VALUE set = TOPN(0);
|
2626
|
+
DEBUG_ENTER_INSN("opt_aset");
|
2627
|
+
ADD_PC(1+1);
|
2628
|
+
PREFETCH(GET_PC());
|
2629
|
+
POPN(3);
|
2630
|
+
#define CURRENT_INSN_opt_aset 1
|
2631
|
+
#define INSN_IS_SC() 0
|
2632
|
+
#define INSN_LABEL(lab) LABEL_opt_aset_##lab
|
2633
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2634
|
+
COLLECT_USAGE_INSN(BIN(opt_aset));
|
2635
|
+
COLLECT_USAGE_OPERAND(BIN(opt_aset), 0, ci);
|
2636
|
+
{
|
2637
|
+
#line 1882 "insns.def"
|
2638
|
+
if (!SPECIAL_CONST_P(recv)) {
|
2639
|
+
if (RBASIC_CLASS(recv) == rb_cArray && BASIC_OP_UNREDEFINED_P(BOP_ASET, ARRAY_REDEFINED_OP_FLAG) && FIXNUM_P(obj)) {
|
2640
|
+
rb_ary_store(recv, FIX2LONG(obj), set);
|
2641
|
+
val = set;
|
2642
|
+
}
|
2643
|
+
else if (RBASIC_CLASS(recv) == rb_cHash && BASIC_OP_UNREDEFINED_P(BOP_ASET, HASH_REDEFINED_OP_FLAG)) {
|
2644
|
+
rb_hash_aset(recv, obj, set);
|
2645
|
+
val = set;
|
2646
|
+
}
|
2647
|
+
else {
|
2648
|
+
goto INSN_LABEL(normal_dispatch);
|
2649
|
+
}
|
2650
|
+
}
|
2651
|
+
else {
|
2652
|
+
INSN_LABEL(normal_dispatch):
|
2653
|
+
PUSH(recv);
|
2654
|
+
PUSH(obj);
|
2655
|
+
PUSH(set);
|
2656
|
+
CALL_SIMPLE_METHOD(recv);
|
2657
|
+
}
|
2658
|
+
|
2659
|
+
#line 2660 "vm.inc"
|
2660
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2661
|
+
PUSH(val);
|
2662
|
+
#undef CURRENT_INSN_opt_aset
|
2663
|
+
#undef INSN_IS_SC
|
2664
|
+
#undef INSN_LABEL
|
2665
|
+
#undef LABEL_IS_SC
|
2666
|
+
END_INSN(opt_aset);}}}
|
2667
|
+
INSN_ENTRY(opt_length){
|
2668
|
+
{
|
2669
|
+
VALUE val;
|
2670
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2671
|
+
VALUE recv = TOPN(0);
|
2672
|
+
DEBUG_ENTER_INSN("opt_length");
|
2673
|
+
ADD_PC(1+1);
|
2674
|
+
PREFETCH(GET_PC());
|
2675
|
+
POPN(1);
|
2676
|
+
#define CURRENT_INSN_opt_length 1
|
2677
|
+
#define INSN_IS_SC() 0
|
2678
|
+
#define INSN_LABEL(lab) LABEL_opt_length_##lab
|
2679
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2680
|
+
COLLECT_USAGE_INSN(BIN(opt_length));
|
2681
|
+
COLLECT_USAGE_OPERAND(BIN(opt_length), 0, ci);
|
2682
|
+
{
|
2683
|
+
#line 1915 "insns.def"
|
2684
|
+
if (!SPECIAL_CONST_P(recv)) {
|
2685
|
+
if (RBASIC_CLASS(recv) == rb_cString &&
|
2686
|
+
BASIC_OP_UNREDEFINED_P(BOP_LENGTH, STRING_REDEFINED_OP_FLAG)) {
|
2687
|
+
val = rb_str_length(recv);
|
2688
|
+
}
|
2689
|
+
else if (RBASIC_CLASS(recv) == rb_cArray &&
|
2690
|
+
BASIC_OP_UNREDEFINED_P(BOP_LENGTH, ARRAY_REDEFINED_OP_FLAG)) {
|
2691
|
+
val = LONG2NUM(RARRAY_LEN(recv));
|
2692
|
+
}
|
2693
|
+
else if (RBASIC_CLASS(recv) == rb_cHash &&
|
2694
|
+
BASIC_OP_UNREDEFINED_P(BOP_LENGTH, HASH_REDEFINED_OP_FLAG)) {
|
2695
|
+
val = INT2FIX(RHASH_SIZE(recv));
|
2696
|
+
}
|
2697
|
+
else {
|
2698
|
+
goto INSN_LABEL(normal_dispatch);
|
2699
|
+
}
|
2700
|
+
}
|
2701
|
+
else {
|
2702
|
+
INSN_LABEL(normal_dispatch):
|
2703
|
+
PUSH(recv);
|
2704
|
+
CALL_SIMPLE_METHOD(recv);
|
2705
|
+
}
|
2706
|
+
|
2707
|
+
#line 2708 "vm.inc"
|
2708
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2709
|
+
PUSH(val);
|
2710
|
+
#undef CURRENT_INSN_opt_length
|
2711
|
+
#undef INSN_IS_SC
|
2712
|
+
#undef INSN_LABEL
|
2713
|
+
#undef LABEL_IS_SC
|
2714
|
+
END_INSN(opt_length);}}}
|
2715
|
+
INSN_ENTRY(opt_size){
|
2716
|
+
{
|
2717
|
+
VALUE val;
|
2718
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2719
|
+
VALUE recv = TOPN(0);
|
2720
|
+
DEBUG_ENTER_INSN("opt_size");
|
2721
|
+
ADD_PC(1+1);
|
2722
|
+
PREFETCH(GET_PC());
|
2723
|
+
POPN(1);
|
2724
|
+
#define CURRENT_INSN_opt_size 1
|
2725
|
+
#define INSN_IS_SC() 0
|
2726
|
+
#define INSN_LABEL(lab) LABEL_opt_size_##lab
|
2727
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2728
|
+
COLLECT_USAGE_INSN(BIN(opt_size));
|
2729
|
+
COLLECT_USAGE_OPERAND(BIN(opt_size), 0, ci);
|
2730
|
+
{
|
2731
|
+
#line 1950 "insns.def"
|
2732
|
+
if (!SPECIAL_CONST_P(recv)) {
|
2733
|
+
if (RBASIC_CLASS(recv) == rb_cString &&
|
2734
|
+
BASIC_OP_UNREDEFINED_P(BOP_SIZE, STRING_REDEFINED_OP_FLAG)) {
|
2735
|
+
val = rb_str_length(recv);
|
2736
|
+
}
|
2737
|
+
else if (RBASIC_CLASS(recv) == rb_cArray &&
|
2738
|
+
BASIC_OP_UNREDEFINED_P(BOP_SIZE, ARRAY_REDEFINED_OP_FLAG)) {
|
2739
|
+
val = LONG2NUM(RARRAY_LEN(recv));
|
2740
|
+
}
|
2741
|
+
else if (RBASIC_CLASS(recv) == rb_cHash &&
|
2742
|
+
BASIC_OP_UNREDEFINED_P(BOP_SIZE, HASH_REDEFINED_OP_FLAG)) {
|
2743
|
+
val = INT2FIX(RHASH_SIZE(recv));
|
2744
|
+
}
|
2745
|
+
else {
|
2746
|
+
goto INSN_LABEL(normal_dispatch);
|
2747
|
+
}
|
2748
|
+
}
|
2749
|
+
else {
|
2750
|
+
INSN_LABEL(normal_dispatch):
|
2751
|
+
PUSH(recv);
|
2752
|
+
CALL_SIMPLE_METHOD(recv);
|
2753
|
+
}
|
2754
|
+
|
2755
|
+
#line 2756 "vm.inc"
|
2756
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2757
|
+
PUSH(val);
|
2758
|
+
#undef CURRENT_INSN_opt_size
|
2759
|
+
#undef INSN_IS_SC
|
2760
|
+
#undef INSN_LABEL
|
2761
|
+
#undef LABEL_IS_SC
|
2762
|
+
END_INSN(opt_size);}}}
|
2763
|
+
INSN_ENTRY(opt_empty_p){
|
2764
|
+
{
|
2765
|
+
VALUE val;
|
2766
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2767
|
+
VALUE recv = TOPN(0);
|
2768
|
+
DEBUG_ENTER_INSN("opt_empty_p");
|
2769
|
+
ADD_PC(1+1);
|
2770
|
+
PREFETCH(GET_PC());
|
2771
|
+
POPN(1);
|
2772
|
+
#define CURRENT_INSN_opt_empty_p 1
|
2773
|
+
#define INSN_IS_SC() 0
|
2774
|
+
#define INSN_LABEL(lab) LABEL_opt_empty_p_##lab
|
2775
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2776
|
+
COLLECT_USAGE_INSN(BIN(opt_empty_p));
|
2777
|
+
COLLECT_USAGE_OPERAND(BIN(opt_empty_p), 0, ci);
|
2778
|
+
{
|
2779
|
+
#line 1985 "insns.def"
|
2780
|
+
if (!SPECIAL_CONST_P(recv)) {
|
2781
|
+
if (RBASIC_CLASS(recv) == rb_cString &&
|
2782
|
+
BASIC_OP_UNREDEFINED_P(BOP_EMPTY_P, STRING_REDEFINED_OP_FLAG)) {
|
2783
|
+
if (RSTRING_LEN(recv) == 0) val = Qtrue;
|
2784
|
+
else val = Qfalse;
|
2785
|
+
}
|
2786
|
+
else if (RBASIC_CLASS(recv) == rb_cArray &&
|
2787
|
+
BASIC_OP_UNREDEFINED_P(BOP_EMPTY_P, ARRAY_REDEFINED_OP_FLAG)) {
|
2788
|
+
if (RARRAY_LEN(recv) == 0) val = Qtrue;
|
2789
|
+
else val = Qfalse;
|
2790
|
+
}
|
2791
|
+
else if (RBASIC_CLASS(recv) == rb_cHash &&
|
2792
|
+
BASIC_OP_UNREDEFINED_P(BOP_EMPTY_P, HASH_REDEFINED_OP_FLAG)) {
|
2793
|
+
if (RHASH_EMPTY_P(recv)) val = Qtrue;
|
2794
|
+
else val = Qfalse;
|
2795
|
+
}
|
2796
|
+
else {
|
2797
|
+
goto INSN_LABEL(normal_dispatch);
|
2798
|
+
}
|
2799
|
+
}
|
2800
|
+
else {
|
2801
|
+
INSN_LABEL(normal_dispatch):
|
2802
|
+
PUSH(recv);
|
2803
|
+
CALL_SIMPLE_METHOD(recv);
|
2804
|
+
}
|
2805
|
+
|
2806
|
+
#line 2807 "vm.inc"
|
2807
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2808
|
+
PUSH(val);
|
2809
|
+
#undef CURRENT_INSN_opt_empty_p
|
2810
|
+
#undef INSN_IS_SC
|
2811
|
+
#undef INSN_LABEL
|
2812
|
+
#undef LABEL_IS_SC
|
2813
|
+
END_INSN(opt_empty_p);}}}
|
2814
|
+
INSN_ENTRY(opt_succ){
|
2815
|
+
{
|
2816
|
+
VALUE val;
|
2817
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2818
|
+
VALUE recv = TOPN(0);
|
2819
|
+
DEBUG_ENTER_INSN("opt_succ");
|
2820
|
+
ADD_PC(1+1);
|
2821
|
+
PREFETCH(GET_PC());
|
2822
|
+
POPN(1);
|
2823
|
+
#define CURRENT_INSN_opt_succ 1
|
2824
|
+
#define INSN_IS_SC() 0
|
2825
|
+
#define INSN_LABEL(lab) LABEL_opt_succ_##lab
|
2826
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2827
|
+
COLLECT_USAGE_INSN(BIN(opt_succ));
|
2828
|
+
COLLECT_USAGE_OPERAND(BIN(opt_succ), 0, ci);
|
2829
|
+
{
|
2830
|
+
#line 2023 "insns.def"
|
2831
|
+
if (SPECIAL_CONST_P(recv)) {
|
2832
|
+
if (FIXNUM_P(recv) &&
|
2833
|
+
BASIC_OP_UNREDEFINED_P(BOP_SUCC, FIXNUM_REDEFINED_OP_FLAG)) {
|
2834
|
+
const VALUE obj = INT2FIX(1);
|
2835
|
+
/* fixnum + INT2FIX(1) */
|
2836
|
+
val = (recv + (obj & (~1)));
|
2837
|
+
if ((~(recv ^ obj) & (recv ^ val)) & ((unsigned long)LONG_MAX + 1)) {
|
2838
|
+
val = rb_big_plus(rb_int2big(FIX2LONG(recv)),
|
2839
|
+
rb_int2big(FIX2LONG(obj)));
|
2840
|
+
}
|
2841
|
+
}
|
2842
|
+
else {
|
2843
|
+
goto INSN_LABEL(normal_dispatch);
|
2844
|
+
}
|
2845
|
+
}
|
2846
|
+
else {
|
2847
|
+
if (RBASIC_CLASS(recv) == rb_cString &&
|
2848
|
+
BASIC_OP_UNREDEFINED_P(BOP_SUCC, STRING_REDEFINED_OP_FLAG)) {
|
2849
|
+
val = rb_str_succ(recv);
|
2850
|
+
}
|
2851
|
+
else if (RBASIC_CLASS(recv) == rb_cTime &&
|
2852
|
+
BASIC_OP_UNREDEFINED_P(BOP_SUCC, TIME_REDEFINED_OP_FLAG)) {
|
2853
|
+
val = rb_time_succ(recv);
|
2854
|
+
}
|
2855
|
+
else
|
2856
|
+
{
|
2857
|
+
goto INSN_LABEL(normal_dispatch);
|
2858
|
+
}
|
2859
|
+
}
|
2860
|
+
if (0) {
|
2861
|
+
INSN_LABEL(normal_dispatch):
|
2862
|
+
PUSH(recv);
|
2863
|
+
CALL_SIMPLE_METHOD(recv);
|
2864
|
+
}
|
2865
|
+
|
2866
|
+
#line 2867 "vm.inc"
|
2867
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2868
|
+
PUSH(val);
|
2869
|
+
#undef CURRENT_INSN_opt_succ
|
2870
|
+
#undef INSN_IS_SC
|
2871
|
+
#undef INSN_LABEL
|
2872
|
+
#undef LABEL_IS_SC
|
2873
|
+
END_INSN(opt_succ);}}}
|
2874
|
+
INSN_ENTRY(opt_not){
|
2875
|
+
{
|
2876
|
+
VALUE val;
|
2877
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2878
|
+
VALUE recv = TOPN(0);
|
2879
|
+
DEBUG_ENTER_INSN("opt_not");
|
2880
|
+
ADD_PC(1+1);
|
2881
|
+
PREFETCH(GET_PC());
|
2882
|
+
POPN(1);
|
2883
|
+
#define CURRENT_INSN_opt_not 1
|
2884
|
+
#define INSN_IS_SC() 0
|
2885
|
+
#define INSN_LABEL(lab) LABEL_opt_not_##lab
|
2886
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2887
|
+
COLLECT_USAGE_INSN(BIN(opt_not));
|
2888
|
+
COLLECT_USAGE_OPERAND(BIN(opt_not), 0, ci);
|
2889
|
+
{
|
2890
|
+
#line 2070 "insns.def"
|
2891
|
+
extern VALUE rb_obj_not(VALUE obj);
|
2892
|
+
vm_search_method(ci, recv);
|
2893
|
+
|
2894
|
+
if (check_cfunc(ci->me, rb_obj_not)) {
|
2895
|
+
val = RTEST(recv) ? Qfalse : Qtrue;
|
2896
|
+
}
|
2897
|
+
else {
|
2898
|
+
PUSH(recv);
|
2899
|
+
CALL_SIMPLE_METHOD(recv);
|
2900
|
+
}
|
2901
|
+
|
2902
|
+
#line 2903 "vm.inc"
|
2903
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2904
|
+
PUSH(val);
|
2905
|
+
#undef CURRENT_INSN_opt_not
|
2906
|
+
#undef INSN_IS_SC
|
2907
|
+
#undef INSN_LABEL
|
2908
|
+
#undef LABEL_IS_SC
|
2909
|
+
END_INSN(opt_not);}}}
|
2910
|
+
INSN_ENTRY(opt_regexpmatch1){
|
2911
|
+
{
|
2912
|
+
VALUE val;
|
2913
|
+
VALUE r = (VALUE)GET_OPERAND(1);
|
2914
|
+
VALUE obj = TOPN(0);
|
2915
|
+
DEBUG_ENTER_INSN("opt_regexpmatch1");
|
2916
|
+
ADD_PC(1+1);
|
2917
|
+
PREFETCH(GET_PC());
|
2918
|
+
POPN(1);
|
2919
|
+
#define CURRENT_INSN_opt_regexpmatch1 1
|
2920
|
+
#define INSN_IS_SC() 0
|
2921
|
+
#define INSN_LABEL(lab) LABEL_opt_regexpmatch1_##lab
|
2922
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2923
|
+
COLLECT_USAGE_INSN(BIN(opt_regexpmatch1));
|
2924
|
+
COLLECT_USAGE_OPERAND(BIN(opt_regexpmatch1), 0, r);
|
2925
|
+
{
|
2926
|
+
#line 2094 "insns.def"
|
2927
|
+
if (BASIC_OP_UNREDEFINED_P(BOP_MATCH, REGEXP_REDEFINED_OP_FLAG)) {
|
2928
|
+
val = rb_reg_match(r, obj);
|
2929
|
+
} else {
|
2930
|
+
val = rb_funcall(r, idEqTilde, 1, obj);
|
2931
|
+
}
|
2932
|
+
|
2933
|
+
#line 2934 "vm.inc"
|
2934
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2935
|
+
PUSH(val);
|
2936
|
+
#undef CURRENT_INSN_opt_regexpmatch1
|
2937
|
+
#undef INSN_IS_SC
|
2938
|
+
#undef INSN_LABEL
|
2939
|
+
#undef LABEL_IS_SC
|
2940
|
+
END_INSN(opt_regexpmatch1);}}}
|
2941
|
+
INSN_ENTRY(opt_regexpmatch2){
|
2942
|
+
{
|
2943
|
+
VALUE val;
|
2944
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2945
|
+
VALUE obj2 = TOPN(1);
|
2946
|
+
VALUE obj1 = TOPN(0);
|
2947
|
+
DEBUG_ENTER_INSN("opt_regexpmatch2");
|
2948
|
+
ADD_PC(1+1);
|
2949
|
+
PREFETCH(GET_PC());
|
2950
|
+
POPN(2);
|
2951
|
+
#define CURRENT_INSN_opt_regexpmatch2 1
|
2952
|
+
#define INSN_IS_SC() 0
|
2953
|
+
#define INSN_LABEL(lab) LABEL_opt_regexpmatch2_##lab
|
2954
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2955
|
+
COLLECT_USAGE_INSN(BIN(opt_regexpmatch2));
|
2956
|
+
COLLECT_USAGE_OPERAND(BIN(opt_regexpmatch2), 0, ci);
|
2957
|
+
{
|
2958
|
+
#line 2112 "insns.def"
|
2959
|
+
if (RB_TYPE_P(obj2, T_STRING) &&
|
2960
|
+
BASIC_OP_UNREDEFINED_P(BOP_MATCH, STRING_REDEFINED_OP_FLAG)) {
|
2961
|
+
val = rb_reg_match(obj1, obj2);
|
2962
|
+
}
|
2963
|
+
else {
|
2964
|
+
PUSH(obj2);
|
2965
|
+
PUSH(obj1);
|
2966
|
+
CALL_SIMPLE_METHOD(obj2);
|
2967
|
+
}
|
2968
|
+
|
2969
|
+
#line 2970 "vm.inc"
|
2970
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2971
|
+
PUSH(val);
|
2972
|
+
#undef CURRENT_INSN_opt_regexpmatch2
|
2973
|
+
#undef INSN_IS_SC
|
2974
|
+
#undef INSN_LABEL
|
2975
|
+
#undef LABEL_IS_SC
|
2976
|
+
END_INSN(opt_regexpmatch2);}}}
|
2977
|
+
INSN_ENTRY(opt_call_c_function){
|
2978
|
+
{
|
2979
|
+
rb_insn_func_t funcptr = (rb_insn_func_t)GET_OPERAND(1);
|
2980
|
+
|
2981
|
+
DEBUG_ENTER_INSN("opt_call_c_function");
|
2982
|
+
ADD_PC(1+1);
|
2983
|
+
PREFETCH(GET_PC());
|
2984
|
+
#define CURRENT_INSN_opt_call_c_function 1
|
2985
|
+
#define INSN_IS_SC() 0
|
2986
|
+
#define INSN_LABEL(lab) LABEL_opt_call_c_function_##lab
|
2987
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2988
|
+
COLLECT_USAGE_INSN(BIN(opt_call_c_function));
|
2989
|
+
COLLECT_USAGE_OPERAND(BIN(opt_call_c_function), 0, funcptr);
|
2990
|
+
{
|
2991
|
+
#line 2134 "insns.def"
|
2992
|
+
reg_cfp = (funcptr)(th, reg_cfp);
|
2993
|
+
|
2994
|
+
if (reg_cfp == 0) {
|
2995
|
+
VALUE err = th->errinfo;
|
2996
|
+
th->errinfo = Qnil;
|
2997
|
+
THROW_EXCEPTION(err);
|
2998
|
+
}
|
2999
|
+
|
3000
|
+
RESTORE_REGS();
|
3001
|
+
NEXT_INSN();
|
3002
|
+
|
3003
|
+
#line 3004 "vm.inc"
|
3004
|
+
#undef CURRENT_INSN_opt_call_c_function
|
3005
|
+
#undef INSN_IS_SC
|
3006
|
+
#undef INSN_LABEL
|
3007
|
+
#undef LABEL_IS_SC
|
3008
|
+
END_INSN(opt_call_c_function);}}}
|
3009
|
+
INSN_ENTRY(bitblt){
|
3010
|
+
{
|
3011
|
+
VALUE ret;
|
3012
|
+
|
3013
|
+
|
3014
|
+
DEBUG_ENTER_INSN("bitblt");
|
3015
|
+
ADD_PC(1+0);
|
3016
|
+
PREFETCH(GET_PC());
|
3017
|
+
#define CURRENT_INSN_bitblt 1
|
3018
|
+
#define INSN_IS_SC() 0
|
3019
|
+
#define INSN_LABEL(lab) LABEL_bitblt_##lab
|
3020
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3021
|
+
COLLECT_USAGE_INSN(BIN(bitblt));
|
3022
|
+
{
|
3023
|
+
#line 2157 "insns.def"
|
3024
|
+
ret = rb_str_new2("a bit of bacon, lettuce and tomato");
|
3025
|
+
|
3026
|
+
#line 3027 "vm.inc"
|
3027
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3028
|
+
PUSH(ret);
|
3029
|
+
#undef CURRENT_INSN_bitblt
|
3030
|
+
#undef INSN_IS_SC
|
3031
|
+
#undef INSN_LABEL
|
3032
|
+
#undef LABEL_IS_SC
|
3033
|
+
END_INSN(bitblt);}}}
|
3034
|
+
INSN_ENTRY(answer){
|
3035
|
+
{
|
3036
|
+
VALUE ret;
|
3037
|
+
|
3038
|
+
|
3039
|
+
DEBUG_ENTER_INSN("answer");
|
3040
|
+
ADD_PC(1+0);
|
3041
|
+
PREFETCH(GET_PC());
|
3042
|
+
#define CURRENT_INSN_answer 1
|
3043
|
+
#define INSN_IS_SC() 0
|
3044
|
+
#define INSN_LABEL(lab) LABEL_answer_##lab
|
3045
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3046
|
+
COLLECT_USAGE_INSN(BIN(answer));
|
3047
|
+
{
|
3048
|
+
#line 2171 "insns.def"
|
3049
|
+
ret = INT2FIX(42);
|
3050
|
+
|
3051
|
+
#line 3052 "vm.inc"
|
3052
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3053
|
+
PUSH(ret);
|
3054
|
+
#undef CURRENT_INSN_answer
|
3055
|
+
#undef INSN_IS_SC
|
3056
|
+
#undef INSN_LABEL
|
3057
|
+
#undef LABEL_IS_SC
|
3058
|
+
END_INSN(answer);}}}
|
3059
|
+
INSN_ENTRY(getlocal_OP__WC__0){
|
3060
|
+
{
|
3061
|
+
VALUE val;
|
3062
|
+
#define level 0
|
3063
|
+
lindex_t idx = (lindex_t)GET_OPERAND(1);
|
3064
|
+
|
3065
|
+
DEBUG_ENTER_INSN("getlocal_OP__WC__0");
|
3066
|
+
ADD_PC(1+1);
|
3067
|
+
PREFETCH(GET_PC());
|
3068
|
+
#define CURRENT_INSN_getlocal_OP__WC__0 1
|
3069
|
+
#define INSN_IS_SC() 0
|
3070
|
+
#define INSN_LABEL(lab) LABEL_getlocal_OP__WC__0_##lab
|
3071
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3072
|
+
COLLECT_USAGE_INSN(BIN(getlocal_OP__WC__0));
|
3073
|
+
COLLECT_USAGE_OPERAND(BIN(getlocal_OP__WC__0), 0, idx);
|
3074
|
+
{
|
3075
|
+
#line 60 "insns.def"
|
3076
|
+
int i, lev = (int)level;
|
3077
|
+
VALUE *ep = GET_EP();
|
3078
|
+
|
3079
|
+
for (i = 0; i < lev; i++) {
|
3080
|
+
ep = GET_PREV_EP(ep);
|
3081
|
+
}
|
3082
|
+
val = *(ep - idx);
|
3083
|
+
|
3084
|
+
#line 3085 "vm.inc"
|
3085
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3086
|
+
PUSH(val);
|
3087
|
+
#undef level
|
3088
|
+
#undef CURRENT_INSN_getlocal_OP__WC__0
|
3089
|
+
#undef INSN_IS_SC
|
3090
|
+
#undef INSN_LABEL
|
3091
|
+
#undef LABEL_IS_SC
|
3092
|
+
END_INSN(getlocal_OP__WC__0);}}}
|
3093
|
+
INSN_ENTRY(getlocal_OP__WC__1){
|
3094
|
+
{
|
3095
|
+
VALUE val;
|
3096
|
+
#define level 1
|
3097
|
+
lindex_t idx = (lindex_t)GET_OPERAND(1);
|
3098
|
+
|
3099
|
+
DEBUG_ENTER_INSN("getlocal_OP__WC__1");
|
3100
|
+
ADD_PC(1+1);
|
3101
|
+
PREFETCH(GET_PC());
|
3102
|
+
#define CURRENT_INSN_getlocal_OP__WC__1 1
|
3103
|
+
#define INSN_IS_SC() 0
|
3104
|
+
#define INSN_LABEL(lab) LABEL_getlocal_OP__WC__1_##lab
|
3105
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3106
|
+
COLLECT_USAGE_INSN(BIN(getlocal_OP__WC__1));
|
3107
|
+
COLLECT_USAGE_OPERAND(BIN(getlocal_OP__WC__1), 0, idx);
|
3108
|
+
{
|
3109
|
+
#line 60 "insns.def"
|
3110
|
+
int i, lev = (int)level;
|
3111
|
+
VALUE *ep = GET_EP();
|
3112
|
+
|
3113
|
+
for (i = 0; i < lev; i++) {
|
3114
|
+
ep = GET_PREV_EP(ep);
|
3115
|
+
}
|
3116
|
+
val = *(ep - idx);
|
3117
|
+
|
3118
|
+
#line 3119 "vm.inc"
|
3119
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3120
|
+
PUSH(val);
|
3121
|
+
#undef level
|
3122
|
+
#undef CURRENT_INSN_getlocal_OP__WC__1
|
3123
|
+
#undef INSN_IS_SC
|
3124
|
+
#undef INSN_LABEL
|
3125
|
+
#undef LABEL_IS_SC
|
3126
|
+
END_INSN(getlocal_OP__WC__1);}}}
|
3127
|
+
INSN_ENTRY(setlocal_OP__WC__0){
|
3128
|
+
{
|
3129
|
+
#define level 0
|
3130
|
+
lindex_t idx = (lindex_t)GET_OPERAND(1);
|
3131
|
+
VALUE val = TOPN(0);
|
3132
|
+
DEBUG_ENTER_INSN("setlocal_OP__WC__0");
|
3133
|
+
ADD_PC(1+1);
|
3134
|
+
PREFETCH(GET_PC());
|
3135
|
+
POPN(1);
|
3136
|
+
#define CURRENT_INSN_setlocal_OP__WC__0 1
|
3137
|
+
#define INSN_IS_SC() 0
|
3138
|
+
#define INSN_LABEL(lab) LABEL_setlocal_OP__WC__0_##lab
|
3139
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3140
|
+
COLLECT_USAGE_INSN(BIN(setlocal_OP__WC__0));
|
3141
|
+
COLLECT_USAGE_OPERAND(BIN(setlocal_OP__WC__0), 0, idx);
|
3142
|
+
{
|
3143
|
+
#line 82 "insns.def"
|
3144
|
+
int i, lev = (int)level;
|
3145
|
+
VALUE *ep = GET_EP();
|
3146
|
+
|
3147
|
+
for (i = 0; i < lev; i++) {
|
3148
|
+
ep = GET_PREV_EP(ep);
|
3149
|
+
}
|
3150
|
+
*(ep - idx) = val;
|
3151
|
+
|
3152
|
+
#line 3153 "vm.inc"
|
3153
|
+
#undef level
|
3154
|
+
#undef CURRENT_INSN_setlocal_OP__WC__0
|
3155
|
+
#undef INSN_IS_SC
|
3156
|
+
#undef INSN_LABEL
|
3157
|
+
#undef LABEL_IS_SC
|
3158
|
+
END_INSN(setlocal_OP__WC__0);}}}
|
3159
|
+
INSN_ENTRY(setlocal_OP__WC__1){
|
3160
|
+
{
|
3161
|
+
#define level 1
|
3162
|
+
lindex_t idx = (lindex_t)GET_OPERAND(1);
|
3163
|
+
VALUE val = TOPN(0);
|
3164
|
+
DEBUG_ENTER_INSN("setlocal_OP__WC__1");
|
3165
|
+
ADD_PC(1+1);
|
3166
|
+
PREFETCH(GET_PC());
|
3167
|
+
POPN(1);
|
3168
|
+
#define CURRENT_INSN_setlocal_OP__WC__1 1
|
3169
|
+
#define INSN_IS_SC() 0
|
3170
|
+
#define INSN_LABEL(lab) LABEL_setlocal_OP__WC__1_##lab
|
3171
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3172
|
+
COLLECT_USAGE_INSN(BIN(setlocal_OP__WC__1));
|
3173
|
+
COLLECT_USAGE_OPERAND(BIN(setlocal_OP__WC__1), 0, idx);
|
3174
|
+
{
|
3175
|
+
#line 82 "insns.def"
|
3176
|
+
int i, lev = (int)level;
|
3177
|
+
VALUE *ep = GET_EP();
|
3178
|
+
|
3179
|
+
for (i = 0; i < lev; i++) {
|
3180
|
+
ep = GET_PREV_EP(ep);
|
3181
|
+
}
|
3182
|
+
*(ep - idx) = val;
|
3183
|
+
|
3184
|
+
#line 3185 "vm.inc"
|
3185
|
+
#undef level
|
3186
|
+
#undef CURRENT_INSN_setlocal_OP__WC__1
|
3187
|
+
#undef INSN_IS_SC
|
3188
|
+
#undef INSN_LABEL
|
3189
|
+
#undef LABEL_IS_SC
|
3190
|
+
END_INSN(setlocal_OP__WC__1);}}}
|
3191
|
+
INSN_ENTRY(putobject_OP_INT2FIX_O_0_C_){
|
3192
|
+
{
|
3193
|
+
#define val INT2FIX(0)
|
3194
|
+
|
3195
|
+
|
3196
|
+
DEBUG_ENTER_INSN("putobject_OP_INT2FIX_O_0_C_");
|
3197
|
+
ADD_PC(1+0);
|
3198
|
+
PREFETCH(GET_PC());
|
3199
|
+
#define CURRENT_INSN_putobject_OP_INT2FIX_O_0_C_ 1
|
3200
|
+
#define INSN_IS_SC() 0
|
3201
|
+
#define INSN_LABEL(lab) LABEL_putobject_OP_INT2FIX_O_0_C__##lab
|
3202
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3203
|
+
COLLECT_USAGE_INSN(BIN(putobject_OP_INT2FIX_O_0_C_));
|
3204
|
+
{
|
3205
|
+
#line 297 "insns.def"
|
3206
|
+
/* */
|
3207
|
+
|
3208
|
+
#line 3209 "vm.inc"
|
3209
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3210
|
+
PUSH(val);
|
3211
|
+
#undef val
|
3212
|
+
#undef CURRENT_INSN_putobject_OP_INT2FIX_O_0_C_
|
3213
|
+
#undef INSN_IS_SC
|
3214
|
+
#undef INSN_LABEL
|
3215
|
+
#undef LABEL_IS_SC
|
3216
|
+
END_INSN(putobject_OP_INT2FIX_O_0_C_);}}}
|
3217
|
+
INSN_ENTRY(putobject_OP_INT2FIX_O_1_C_){
|
3218
|
+
{
|
3219
|
+
#define val INT2FIX(1)
|
3220
|
+
|
3221
|
+
|
3222
|
+
DEBUG_ENTER_INSN("putobject_OP_INT2FIX_O_1_C_");
|
3223
|
+
ADD_PC(1+0);
|
3224
|
+
PREFETCH(GET_PC());
|
3225
|
+
#define CURRENT_INSN_putobject_OP_INT2FIX_O_1_C_ 1
|
3226
|
+
#define INSN_IS_SC() 0
|
3227
|
+
#define INSN_LABEL(lab) LABEL_putobject_OP_INT2FIX_O_1_C__##lab
|
3228
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3229
|
+
COLLECT_USAGE_INSN(BIN(putobject_OP_INT2FIX_O_1_C_));
|
3230
|
+
{
|
3231
|
+
#line 297 "insns.def"
|
3232
|
+
/* */
|
3233
|
+
|
3234
|
+
#line 3235 "vm.inc"
|
3235
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3236
|
+
PUSH(val);
|
3237
|
+
#undef val
|
3238
|
+
#undef CURRENT_INSN_putobject_OP_INT2FIX_O_1_C_
|
3239
|
+
#undef INSN_IS_SC
|
3240
|
+
#undef INSN_LABEL
|
3241
|
+
#undef LABEL_IS_SC
|
3242
|
+
END_INSN(putobject_OP_INT2FIX_O_1_C_);}}}
|
3243
|
+
|