debase-ruby_core_source 0.8.5 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/addr2line.h +21 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/constant.h +36 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/dln.h +51 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/encdb.h +170 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/eval_intern.h +270 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/gc.h +101 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/id.h +171 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/insns.inc +189 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/insns_info.inc +731 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/internal.h +896 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/iseq.h +136 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/known_errors.inc +731 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/method.h +145 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/node.h +543 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/node_name.inc +212 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/opt_sc.inc +710 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/optinsn.inc +83 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/optunifs.inc +121 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/parse.h +183 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/probes_helper.h +67 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/regenc.h +223 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/regint.h +911 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/regparse.h +363 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/revision.h +1 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/ruby_atomic.h +170 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/thread_native.h +23 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/thread_pthread.h +56 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/thread_win32.h +45 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/timev.h +42 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/transcode_data.h +123 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/transdb.h +190 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/version.h +52 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/vm.inc +3241 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/vm_core.h +1057 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/vm_debug.h +37 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/vm_exec.h +182 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/vm_insnhelper.h +273 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/vm_opts.h +56 -0
- data/lib/debase/ruby_core_source/ruby-2.1.10-p492/vmtc.inc +102 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +42 -2
@@ -0,0 +1,52 @@
|
|
1
|
+
#define RUBY_VERSION "2.1.10"
|
2
|
+
#define RUBY_RELEASE_DATE "2016-04-01"
|
3
|
+
#define RUBY_PATCHLEVEL 492
|
4
|
+
|
5
|
+
#define RUBY_RELEASE_YEAR 2016
|
6
|
+
#define RUBY_RELEASE_MONTH 4
|
7
|
+
#define RUBY_RELEASE_DAY 1
|
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,3241 @@
|
|
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
|
+
!((me->flag & NOEX_PROTECTED) && !rb_obj_is_kind_of(GET_SELF(), rb_class_real(klass)))) {
|
1122
|
+
expr_type = DEFINED_METHOD;
|
1123
|
+
}
|
1124
|
+
}
|
1125
|
+
else {
|
1126
|
+
VALUE args[2];
|
1127
|
+
VALUE r;
|
1128
|
+
|
1129
|
+
args[0] = obj; args[1] = Qfalse;
|
1130
|
+
r = rb_check_funcall(v, idRespond_to_missing, 2, args);
|
1131
|
+
if (r != Qundef && RTEST(r))
|
1132
|
+
expr_type = DEFINED_METHOD;
|
1133
|
+
}
|
1134
|
+
break;
|
1135
|
+
}
|
1136
|
+
case DEFINED_YIELD:
|
1137
|
+
if (GET_BLOCK_PTR()) {
|
1138
|
+
expr_type = DEFINED_YIELD;
|
1139
|
+
}
|
1140
|
+
break;
|
1141
|
+
case DEFINED_ZSUPER:{
|
1142
|
+
rb_call_info_t cit;
|
1143
|
+
if (vm_search_superclass(GET_CFP(), GET_ISEQ(), Qnil, &cit) == 0) {
|
1144
|
+
VALUE klass = cit.klass;
|
1145
|
+
ID id = cit.mid;
|
1146
|
+
if (rb_method_boundp(klass, id, 0)) {
|
1147
|
+
expr_type = DEFINED_ZSUPER;
|
1148
|
+
}
|
1149
|
+
}
|
1150
|
+
break;
|
1151
|
+
}
|
1152
|
+
case DEFINED_REF:{
|
1153
|
+
val = vm_getspecial(th, GET_LEP(), Qfalse, FIX2INT(obj));
|
1154
|
+
if (val != Qnil) {
|
1155
|
+
expr_type = DEFINED_GVAR;
|
1156
|
+
}
|
1157
|
+
break;
|
1158
|
+
}
|
1159
|
+
default:
|
1160
|
+
rb_bug("unimplemented defined? type (VM)");
|
1161
|
+
break;
|
1162
|
+
}
|
1163
|
+
if (expr_type != 0) {
|
1164
|
+
if (needstr != Qfalse) {
|
1165
|
+
val = rb_iseq_defined_string(expr_type);
|
1166
|
+
}
|
1167
|
+
else {
|
1168
|
+
val = Qtrue;
|
1169
|
+
}
|
1170
|
+
}
|
1171
|
+
|
1172
|
+
#line 1173 "vm.inc"
|
1173
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1174
|
+
PUSH(val);
|
1175
|
+
#undef CURRENT_INSN_defined
|
1176
|
+
#undef INSN_IS_SC
|
1177
|
+
#undef INSN_LABEL
|
1178
|
+
#undef LABEL_IS_SC
|
1179
|
+
END_INSN(defined);}}}
|
1180
|
+
INSN_ENTRY(checkmatch){
|
1181
|
+
{
|
1182
|
+
VALUE result;
|
1183
|
+
rb_num_t flag = (rb_num_t)GET_OPERAND(1);
|
1184
|
+
VALUE target = TOPN(1);
|
1185
|
+
VALUE pattern = TOPN(0);
|
1186
|
+
DEBUG_ENTER_INSN("checkmatch");
|
1187
|
+
ADD_PC(1+1);
|
1188
|
+
PREFETCH(GET_PC());
|
1189
|
+
POPN(2);
|
1190
|
+
#define CURRENT_INSN_checkmatch 1
|
1191
|
+
#define INSN_IS_SC() 0
|
1192
|
+
#define INSN_LABEL(lab) LABEL_checkmatch_##lab
|
1193
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1194
|
+
COLLECT_USAGE_INSN(BIN(checkmatch));
|
1195
|
+
COLLECT_USAGE_OPERAND(BIN(checkmatch), 0, flag);
|
1196
|
+
{
|
1197
|
+
#line 810 "insns.def"
|
1198
|
+
enum vm_check_match_type checkmatch_type =
|
1199
|
+
(enum vm_check_match_type)(flag & VM_CHECKMATCH_TYPE_MASK);
|
1200
|
+
result = Qfalse;
|
1201
|
+
|
1202
|
+
if (flag & VM_CHECKMATCH_ARRAY) {
|
1203
|
+
int i;
|
1204
|
+
for (i = 0; i < RARRAY_LEN(pattern); i++) {
|
1205
|
+
if (RTEST(check_match(RARRAY_AREF(pattern, i), target, checkmatch_type))) {
|
1206
|
+
result = Qtrue;
|
1207
|
+
break;
|
1208
|
+
}
|
1209
|
+
}
|
1210
|
+
}
|
1211
|
+
else {
|
1212
|
+
if (RTEST(check_match(pattern, target, checkmatch_type))) {
|
1213
|
+
result = Qtrue;
|
1214
|
+
}
|
1215
|
+
}
|
1216
|
+
|
1217
|
+
#line 1218 "vm.inc"
|
1218
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1219
|
+
PUSH(result);
|
1220
|
+
#undef CURRENT_INSN_checkmatch
|
1221
|
+
#undef INSN_IS_SC
|
1222
|
+
#undef INSN_LABEL
|
1223
|
+
#undef LABEL_IS_SC
|
1224
|
+
END_INSN(checkmatch);}}}
|
1225
|
+
INSN_ENTRY(trace){
|
1226
|
+
{
|
1227
|
+
rb_num_t nf = (rb_num_t)GET_OPERAND(1);
|
1228
|
+
|
1229
|
+
DEBUG_ENTER_INSN("trace");
|
1230
|
+
ADD_PC(1+1);
|
1231
|
+
PREFETCH(GET_PC());
|
1232
|
+
#define CURRENT_INSN_trace 1
|
1233
|
+
#define INSN_IS_SC() 0
|
1234
|
+
#define INSN_LABEL(lab) LABEL_trace_##lab
|
1235
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1236
|
+
COLLECT_USAGE_INSN(BIN(trace));
|
1237
|
+
COLLECT_USAGE_OPERAND(BIN(trace), 0, nf);
|
1238
|
+
{
|
1239
|
+
#line 841 "insns.def"
|
1240
|
+
rb_event_flag_t flag = (rb_event_flag_t)nf;
|
1241
|
+
|
1242
|
+
if (RUBY_DTRACE_METHOD_ENTRY_ENABLED() ||
|
1243
|
+
RUBY_DTRACE_METHOD_RETURN_ENABLED() ||
|
1244
|
+
RUBY_DTRACE_CMETHOD_ENTRY_ENABLED() ||
|
1245
|
+
RUBY_DTRACE_CMETHOD_RETURN_ENABLED()) {
|
1246
|
+
|
1247
|
+
switch(flag) {
|
1248
|
+
case RUBY_EVENT_CALL:
|
1249
|
+
RUBY_DTRACE_METHOD_ENTRY_HOOK(th, 0, 0);
|
1250
|
+
break;
|
1251
|
+
case RUBY_EVENT_C_CALL:
|
1252
|
+
RUBY_DTRACE_CMETHOD_ENTRY_HOOK(th, 0, 0);
|
1253
|
+
break;
|
1254
|
+
case RUBY_EVENT_RETURN:
|
1255
|
+
RUBY_DTRACE_METHOD_RETURN_HOOK(th, 0, 0);
|
1256
|
+
break;
|
1257
|
+
case RUBY_EVENT_C_RETURN:
|
1258
|
+
RUBY_DTRACE_CMETHOD_RETURN_HOOK(th, 0, 0);
|
1259
|
+
break;
|
1260
|
+
}
|
1261
|
+
}
|
1262
|
+
|
1263
|
+
EXEC_EVENT_HOOK(th, flag, GET_SELF(), 0, 0 /* id and klass are resolved at callee */,
|
1264
|
+
(flag & (RUBY_EVENT_RETURN | RUBY_EVENT_B_RETURN)) ? TOPN(0) : Qundef);
|
1265
|
+
|
1266
|
+
#line 1267 "vm.inc"
|
1267
|
+
#undef CURRENT_INSN_trace
|
1268
|
+
#undef INSN_IS_SC
|
1269
|
+
#undef INSN_LABEL
|
1270
|
+
#undef LABEL_IS_SC
|
1271
|
+
END_INSN(trace);}}}
|
1272
|
+
INSN_ENTRY(defineclass){
|
1273
|
+
{
|
1274
|
+
VALUE val;
|
1275
|
+
rb_num_t flags = (rb_num_t)GET_OPERAND(3);
|
1276
|
+
ISEQ class_iseq = (ISEQ)GET_OPERAND(2);
|
1277
|
+
ID id = (ID)GET_OPERAND(1);
|
1278
|
+
VALUE cbase = TOPN(1);
|
1279
|
+
VALUE super = TOPN(0);
|
1280
|
+
DEBUG_ENTER_INSN("defineclass");
|
1281
|
+
ADD_PC(1+3);
|
1282
|
+
PREFETCH(GET_PC());
|
1283
|
+
POPN(2);
|
1284
|
+
#define CURRENT_INSN_defineclass 1
|
1285
|
+
#define INSN_IS_SC() 0
|
1286
|
+
#define INSN_LABEL(lab) LABEL_defineclass_##lab
|
1287
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1288
|
+
COLLECT_USAGE_INSN(BIN(defineclass));
|
1289
|
+
COLLECT_USAGE_OPERAND(BIN(defineclass), 0, id);
|
1290
|
+
COLLECT_USAGE_OPERAND(BIN(defineclass), 1, class_iseq);
|
1291
|
+
COLLECT_USAGE_OPERAND(BIN(defineclass), 2, flags);
|
1292
|
+
{
|
1293
|
+
#line 887 "insns.def"
|
1294
|
+
VALUE klass;
|
1295
|
+
rb_vm_defineclass_type_t type = VM_DEFINECLASS_TYPE(flags);
|
1296
|
+
|
1297
|
+
switch (type) {
|
1298
|
+
case VM_DEFINECLASS_TYPE_CLASS:
|
1299
|
+
/* val is dummy. classdef returns class scope value */
|
1300
|
+
|
1301
|
+
if (VM_DEFINECLASS_HAS_SUPERCLASS_P(flags) &&
|
1302
|
+
!RB_TYPE_P(super, T_CLASS)) {
|
1303
|
+
rb_raise(rb_eTypeError, "superclass must be a Class (%s given)",
|
1304
|
+
rb_obj_classname(super));
|
1305
|
+
}
|
1306
|
+
|
1307
|
+
if (super == Qnil) {
|
1308
|
+
super = rb_cObject;
|
1309
|
+
}
|
1310
|
+
|
1311
|
+
vm_check_if_namespace(cbase);
|
1312
|
+
|
1313
|
+
/* find klass */
|
1314
|
+
rb_autoload_load(cbase, id);
|
1315
|
+
if ((klass = vm_search_const_defined_class(cbase, id)) != 0) {
|
1316
|
+
/* already exist */
|
1317
|
+
klass = VM_DEFINECLASS_SCOPED_P(flags) ?
|
1318
|
+
rb_public_const_get_at(klass, id) : rb_const_get_at(klass, id);
|
1319
|
+
if (!RB_TYPE_P(klass, T_CLASS)) {
|
1320
|
+
rb_raise(rb_eTypeError, "%s is not a class", rb_id2name(id));
|
1321
|
+
}
|
1322
|
+
|
1323
|
+
if (super != rb_cObject) {
|
1324
|
+
VALUE tmp;
|
1325
|
+
tmp = rb_class_real(RCLASS_SUPER(klass));
|
1326
|
+
|
1327
|
+
if (tmp != super) {
|
1328
|
+
rb_raise(rb_eTypeError, "superclass mismatch for class %s",
|
1329
|
+
rb_id2name(id));
|
1330
|
+
}
|
1331
|
+
}
|
1332
|
+
}
|
1333
|
+
else {
|
1334
|
+
/* new class declaration */
|
1335
|
+
klass = rb_define_class_id(id, super);
|
1336
|
+
rb_set_class_path_string(klass, cbase, rb_id2str(id));
|
1337
|
+
rb_const_set(cbase, id, klass);
|
1338
|
+
rb_class_inherited(super, klass);
|
1339
|
+
}
|
1340
|
+
break;
|
1341
|
+
case VM_DEFINECLASS_TYPE_SINGLETON_CLASS:
|
1342
|
+
/* val is dummy. classdef returns class scope value */
|
1343
|
+
/* super is dummy */
|
1344
|
+
klass = rb_singleton_class(cbase);
|
1345
|
+
break;
|
1346
|
+
case VM_DEFINECLASS_TYPE_MODULE:
|
1347
|
+
/* val is dummy. classdef returns class scope value */
|
1348
|
+
/* super is dummy */
|
1349
|
+
|
1350
|
+
vm_check_if_namespace(cbase);
|
1351
|
+
|
1352
|
+
/* find klass */
|
1353
|
+
if ((klass = vm_search_const_defined_class(cbase, id)) != 0) {
|
1354
|
+
klass = VM_DEFINECLASS_SCOPED_P(flags) ?
|
1355
|
+
rb_public_const_get_at(klass, id) : rb_const_get_at(klass, id);
|
1356
|
+
/* already exist */
|
1357
|
+
if (!RB_TYPE_P(klass, T_MODULE)) {
|
1358
|
+
rb_raise(rb_eTypeError, "%s is not a module", rb_id2name(id));
|
1359
|
+
}
|
1360
|
+
}
|
1361
|
+
else {
|
1362
|
+
/* new module declaration */
|
1363
|
+
klass = rb_define_module_id(id);
|
1364
|
+
rb_set_class_path_string(klass, cbase, rb_id2str(id));
|
1365
|
+
rb_const_set(cbase, id, klass);
|
1366
|
+
}
|
1367
|
+
break;
|
1368
|
+
default:
|
1369
|
+
rb_bug("unknown defineclass type: %d", (int)type);
|
1370
|
+
}
|
1371
|
+
|
1372
|
+
COPY_CREF(class_iseq->cref_stack, vm_cref_push(th, klass, NOEX_PUBLIC, NULL));
|
1373
|
+
|
1374
|
+
/* enter scope */
|
1375
|
+
vm_push_frame(th, class_iseq, VM_FRAME_MAGIC_CLASS,
|
1376
|
+
klass, 0, VM_ENVVAL_BLOCK_PTR(GET_BLOCK_PTR()),
|
1377
|
+
class_iseq->iseq_encoded, GET_SP(),
|
1378
|
+
class_iseq->local_size, 0, class_iseq->stack_max);
|
1379
|
+
RESTORE_REGS();
|
1380
|
+
NEXT_INSN();
|
1381
|
+
|
1382
|
+
#line 1383 "vm.inc"
|
1383
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1384
|
+
PUSH(val);
|
1385
|
+
#undef CURRENT_INSN_defineclass
|
1386
|
+
#undef INSN_IS_SC
|
1387
|
+
#undef INSN_LABEL
|
1388
|
+
#undef LABEL_IS_SC
|
1389
|
+
END_INSN(defineclass);}}}
|
1390
|
+
INSN_ENTRY(send){
|
1391
|
+
{
|
1392
|
+
VALUE val;
|
1393
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
1394
|
+
|
1395
|
+
DEBUG_ENTER_INSN("send");
|
1396
|
+
ADD_PC(1+1);
|
1397
|
+
PREFETCH(GET_PC());
|
1398
|
+
#define CURRENT_INSN_send 1
|
1399
|
+
#define INSN_IS_SC() 0
|
1400
|
+
#define INSN_LABEL(lab) LABEL_send_##lab
|
1401
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1402
|
+
COLLECT_USAGE_INSN(BIN(send));
|
1403
|
+
COLLECT_USAGE_OPERAND(BIN(send), 0, ci);
|
1404
|
+
{
|
1405
|
+
#line 992 "insns.def"
|
1406
|
+
ci->argc = ci->orig_argc;
|
1407
|
+
ci->blockptr = 0;
|
1408
|
+
vm_caller_setup_args(th, reg_cfp, ci);
|
1409
|
+
vm_search_method(ci, ci->recv = TOPN(ci->argc));
|
1410
|
+
CALL_METHOD(ci);
|
1411
|
+
|
1412
|
+
#line 1413 "vm.inc"
|
1413
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1414
|
+
PUSH(val);
|
1415
|
+
#undef CURRENT_INSN_send
|
1416
|
+
#undef INSN_IS_SC
|
1417
|
+
#undef INSN_LABEL
|
1418
|
+
#undef LABEL_IS_SC
|
1419
|
+
END_INSN(send);}}}
|
1420
|
+
INSN_ENTRY(opt_str_freeze){
|
1421
|
+
{
|
1422
|
+
VALUE val;
|
1423
|
+
VALUE str = (VALUE)GET_OPERAND(1);
|
1424
|
+
|
1425
|
+
DEBUG_ENTER_INSN("opt_str_freeze");
|
1426
|
+
ADD_PC(1+1);
|
1427
|
+
PREFETCH(GET_PC());
|
1428
|
+
#define CURRENT_INSN_opt_str_freeze 1
|
1429
|
+
#define INSN_IS_SC() 0
|
1430
|
+
#define INSN_LABEL(lab) LABEL_opt_str_freeze_##lab
|
1431
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1432
|
+
COLLECT_USAGE_INSN(BIN(opt_str_freeze));
|
1433
|
+
COLLECT_USAGE_OPERAND(BIN(opt_str_freeze), 0, str);
|
1434
|
+
{
|
1435
|
+
#line 1005 "insns.def"
|
1436
|
+
if (BASIC_OP_UNREDEFINED_P(BOP_FREEZE, STRING_REDEFINED_OP_FLAG)) {
|
1437
|
+
val = str;
|
1438
|
+
}
|
1439
|
+
else {
|
1440
|
+
val = rb_funcall(rb_str_resurrect(str), idFreeze, 0);
|
1441
|
+
}
|
1442
|
+
|
1443
|
+
#line 1444 "vm.inc"
|
1444
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1445
|
+
PUSH(val);
|
1446
|
+
#undef CURRENT_INSN_opt_str_freeze
|
1447
|
+
#undef INSN_IS_SC
|
1448
|
+
#undef INSN_LABEL
|
1449
|
+
#undef LABEL_IS_SC
|
1450
|
+
END_INSN(opt_str_freeze);}}}
|
1451
|
+
INSN_ENTRY(opt_send_simple){
|
1452
|
+
{
|
1453
|
+
VALUE val;
|
1454
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
1455
|
+
|
1456
|
+
DEBUG_ENTER_INSN("opt_send_simple");
|
1457
|
+
ADD_PC(1+1);
|
1458
|
+
PREFETCH(GET_PC());
|
1459
|
+
#define CURRENT_INSN_opt_send_simple 1
|
1460
|
+
#define INSN_IS_SC() 0
|
1461
|
+
#define INSN_LABEL(lab) LABEL_opt_send_simple_##lab
|
1462
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1463
|
+
COLLECT_USAGE_INSN(BIN(opt_send_simple));
|
1464
|
+
COLLECT_USAGE_OPERAND(BIN(opt_send_simple), 0, ci);
|
1465
|
+
{
|
1466
|
+
#line 1024 "insns.def"
|
1467
|
+
vm_search_method(ci, ci->recv = TOPN(ci->argc));
|
1468
|
+
CALL_METHOD(ci);
|
1469
|
+
|
1470
|
+
#line 1471 "vm.inc"
|
1471
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1472
|
+
PUSH(val);
|
1473
|
+
#undef CURRENT_INSN_opt_send_simple
|
1474
|
+
#undef INSN_IS_SC
|
1475
|
+
#undef INSN_LABEL
|
1476
|
+
#undef LABEL_IS_SC
|
1477
|
+
END_INSN(opt_send_simple);}}}
|
1478
|
+
INSN_ENTRY(invokesuper){
|
1479
|
+
{
|
1480
|
+
VALUE val;
|
1481
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
1482
|
+
|
1483
|
+
DEBUG_ENTER_INSN("invokesuper");
|
1484
|
+
ADD_PC(1+1);
|
1485
|
+
PREFETCH(GET_PC());
|
1486
|
+
#define CURRENT_INSN_invokesuper 1
|
1487
|
+
#define INSN_IS_SC() 0
|
1488
|
+
#define INSN_LABEL(lab) LABEL_invokesuper_##lab
|
1489
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1490
|
+
COLLECT_USAGE_INSN(BIN(invokesuper));
|
1491
|
+
COLLECT_USAGE_OPERAND(BIN(invokesuper), 0, ci);
|
1492
|
+
{
|
1493
|
+
#line 1039 "insns.def"
|
1494
|
+
ci->argc = ci->orig_argc;
|
1495
|
+
ci->blockptr = !(ci->flag & VM_CALL_ARGS_BLOCKARG) ? GET_BLOCK_PTR() : 0;
|
1496
|
+
|
1497
|
+
if (UNLIKELY(!(ci->flag & VM_CALL_ARGS_SKIP_SETUP))) {
|
1498
|
+
vm_caller_setup_args(th, reg_cfp, ci);
|
1499
|
+
}
|
1500
|
+
ci->recv = GET_SELF();
|
1501
|
+
vm_search_super_method(th, GET_CFP(), ci);
|
1502
|
+
CALL_METHOD(ci);
|
1503
|
+
|
1504
|
+
#line 1505 "vm.inc"
|
1505
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1506
|
+
PUSH(val);
|
1507
|
+
#undef CURRENT_INSN_invokesuper
|
1508
|
+
#undef INSN_IS_SC
|
1509
|
+
#undef INSN_LABEL
|
1510
|
+
#undef LABEL_IS_SC
|
1511
|
+
END_INSN(invokesuper);}}}
|
1512
|
+
INSN_ENTRY(invokeblock){
|
1513
|
+
{
|
1514
|
+
VALUE val;
|
1515
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
1516
|
+
|
1517
|
+
DEBUG_ENTER_INSN("invokeblock");
|
1518
|
+
ADD_PC(1+1);
|
1519
|
+
PREFETCH(GET_PC());
|
1520
|
+
#define CURRENT_INSN_invokeblock 1
|
1521
|
+
#define INSN_IS_SC() 0
|
1522
|
+
#define INSN_LABEL(lab) LABEL_invokeblock_##lab
|
1523
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1524
|
+
COLLECT_USAGE_INSN(BIN(invokeblock));
|
1525
|
+
COLLECT_USAGE_OPERAND(BIN(invokeblock), 0, ci);
|
1526
|
+
{
|
1527
|
+
#line 1061 "insns.def"
|
1528
|
+
ci->argc = ci->orig_argc;
|
1529
|
+
ci->blockptr = 0;
|
1530
|
+
ci->recv = GET_SELF();
|
1531
|
+
val = vm_invoke_block(th, GET_CFP(), ci);
|
1532
|
+
if (val == Qundef) {
|
1533
|
+
RESTORE_REGS();
|
1534
|
+
NEXT_INSN();
|
1535
|
+
}
|
1536
|
+
|
1537
|
+
#line 1538 "vm.inc"
|
1538
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1539
|
+
PUSH(val);
|
1540
|
+
#undef CURRENT_INSN_invokeblock
|
1541
|
+
#undef INSN_IS_SC
|
1542
|
+
#undef INSN_LABEL
|
1543
|
+
#undef LABEL_IS_SC
|
1544
|
+
END_INSN(invokeblock);}}}
|
1545
|
+
INSN_ENTRY(leave){
|
1546
|
+
{
|
1547
|
+
|
1548
|
+
VALUE val = TOPN(0);
|
1549
|
+
DEBUG_ENTER_INSN("leave");
|
1550
|
+
ADD_PC(1+0);
|
1551
|
+
PREFETCH(GET_PC());
|
1552
|
+
POPN(1);
|
1553
|
+
#define CURRENT_INSN_leave 1
|
1554
|
+
#define INSN_IS_SC() 0
|
1555
|
+
#define INSN_LABEL(lab) LABEL_leave_##lab
|
1556
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1557
|
+
COLLECT_USAGE_INSN(BIN(leave));
|
1558
|
+
{
|
1559
|
+
#line 1082 "insns.def"
|
1560
|
+
if (OPT_CHECKED_RUN) {
|
1561
|
+
if (reg_cfp->sp != vm_base_ptr(reg_cfp)) {
|
1562
|
+
rb_bug("Stack consistency error (sp: %"PRIdPTRDIFF", bp: %"PRIdPTRDIFF")",
|
1563
|
+
VM_SP_CNT(th, reg_cfp->sp), VM_SP_CNT(th, vm_base_ptr(reg_cfp)));
|
1564
|
+
}
|
1565
|
+
}
|
1566
|
+
|
1567
|
+
RUBY_VM_CHECK_INTS(th);
|
1568
|
+
|
1569
|
+
if (UNLIKELY(VM_FRAME_TYPE_FINISH_P(GET_CFP()))) {
|
1570
|
+
vm_pop_frame(th);
|
1571
|
+
|
1572
|
+
#if OPT_CALL_THREADED_CODE
|
1573
|
+
th->retval = val;
|
1574
|
+
return 0;
|
1575
|
+
#else
|
1576
|
+
return val;
|
1577
|
+
#endif
|
1578
|
+
}
|
1579
|
+
else {
|
1580
|
+
vm_pop_frame(th);
|
1581
|
+
RESTORE_REGS();
|
1582
|
+
}
|
1583
|
+
|
1584
|
+
#line 1585 "vm.inc"
|
1585
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1586
|
+
PUSH(val);
|
1587
|
+
#undef CURRENT_INSN_leave
|
1588
|
+
#undef INSN_IS_SC
|
1589
|
+
#undef INSN_LABEL
|
1590
|
+
#undef LABEL_IS_SC
|
1591
|
+
END_INSN(leave);}}}
|
1592
|
+
INSN_ENTRY(throw){
|
1593
|
+
{
|
1594
|
+
VALUE val;
|
1595
|
+
rb_num_t throw_state = (rb_num_t)GET_OPERAND(1);
|
1596
|
+
VALUE throwobj = TOPN(0);
|
1597
|
+
DEBUG_ENTER_INSN("throw");
|
1598
|
+
ADD_PC(1+1);
|
1599
|
+
PREFETCH(GET_PC());
|
1600
|
+
POPN(1);
|
1601
|
+
#define CURRENT_INSN_throw 1
|
1602
|
+
#define INSN_IS_SC() 0
|
1603
|
+
#define INSN_LABEL(lab) LABEL_throw_##lab
|
1604
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1605
|
+
COLLECT_USAGE_INSN(BIN(throw));
|
1606
|
+
COLLECT_USAGE_OPERAND(BIN(throw), 0, throw_state);
|
1607
|
+
{
|
1608
|
+
#line 1122 "insns.def"
|
1609
|
+
RUBY_VM_CHECK_INTS(th);
|
1610
|
+
val = vm_throw(th, GET_CFP(), throw_state, throwobj);
|
1611
|
+
THROW_EXCEPTION(val);
|
1612
|
+
/* unreachable */
|
1613
|
+
|
1614
|
+
#line 1615 "vm.inc"
|
1615
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1616
|
+
PUSH(val);
|
1617
|
+
#undef CURRENT_INSN_throw
|
1618
|
+
#undef INSN_IS_SC
|
1619
|
+
#undef INSN_LABEL
|
1620
|
+
#undef LABEL_IS_SC
|
1621
|
+
END_INSN(throw);}}}
|
1622
|
+
INSN_ENTRY(jump){
|
1623
|
+
{
|
1624
|
+
OFFSET dst = (OFFSET)GET_OPERAND(1);
|
1625
|
+
|
1626
|
+
DEBUG_ENTER_INSN("jump");
|
1627
|
+
ADD_PC(1+1);
|
1628
|
+
PREFETCH(GET_PC());
|
1629
|
+
#define CURRENT_INSN_jump 1
|
1630
|
+
#define INSN_IS_SC() 0
|
1631
|
+
#define INSN_LABEL(lab) LABEL_jump_##lab
|
1632
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1633
|
+
COLLECT_USAGE_INSN(BIN(jump));
|
1634
|
+
COLLECT_USAGE_OPERAND(BIN(jump), 0, dst);
|
1635
|
+
{
|
1636
|
+
#line 1143 "insns.def"
|
1637
|
+
RUBY_VM_CHECK_INTS(th);
|
1638
|
+
JUMP(dst);
|
1639
|
+
|
1640
|
+
#line 1641 "vm.inc"
|
1641
|
+
#undef CURRENT_INSN_jump
|
1642
|
+
#undef INSN_IS_SC
|
1643
|
+
#undef INSN_LABEL
|
1644
|
+
#undef LABEL_IS_SC
|
1645
|
+
END_INSN(jump);}}}
|
1646
|
+
INSN_ENTRY(branchif){
|
1647
|
+
{
|
1648
|
+
OFFSET dst = (OFFSET)GET_OPERAND(1);
|
1649
|
+
VALUE val = TOPN(0);
|
1650
|
+
DEBUG_ENTER_INSN("branchif");
|
1651
|
+
ADD_PC(1+1);
|
1652
|
+
PREFETCH(GET_PC());
|
1653
|
+
POPN(1);
|
1654
|
+
#define CURRENT_INSN_branchif 1
|
1655
|
+
#define INSN_IS_SC() 0
|
1656
|
+
#define INSN_LABEL(lab) LABEL_branchif_##lab
|
1657
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1658
|
+
COLLECT_USAGE_INSN(BIN(branchif));
|
1659
|
+
COLLECT_USAGE_OPERAND(BIN(branchif), 0, dst);
|
1660
|
+
{
|
1661
|
+
#line 1158 "insns.def"
|
1662
|
+
if (RTEST(val)) {
|
1663
|
+
RUBY_VM_CHECK_INTS(th);
|
1664
|
+
JUMP(dst);
|
1665
|
+
}
|
1666
|
+
|
1667
|
+
#line 1668 "vm.inc"
|
1668
|
+
#undef CURRENT_INSN_branchif
|
1669
|
+
#undef INSN_IS_SC
|
1670
|
+
#undef INSN_LABEL
|
1671
|
+
#undef LABEL_IS_SC
|
1672
|
+
END_INSN(branchif);}}}
|
1673
|
+
INSN_ENTRY(branchunless){
|
1674
|
+
{
|
1675
|
+
OFFSET dst = (OFFSET)GET_OPERAND(1);
|
1676
|
+
VALUE val = TOPN(0);
|
1677
|
+
DEBUG_ENTER_INSN("branchunless");
|
1678
|
+
ADD_PC(1+1);
|
1679
|
+
PREFETCH(GET_PC());
|
1680
|
+
POPN(1);
|
1681
|
+
#define CURRENT_INSN_branchunless 1
|
1682
|
+
#define INSN_IS_SC() 0
|
1683
|
+
#define INSN_LABEL(lab) LABEL_branchunless_##lab
|
1684
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1685
|
+
COLLECT_USAGE_INSN(BIN(branchunless));
|
1686
|
+
COLLECT_USAGE_OPERAND(BIN(branchunless), 0, dst);
|
1687
|
+
{
|
1688
|
+
#line 1175 "insns.def"
|
1689
|
+
if (!RTEST(val)) {
|
1690
|
+
RUBY_VM_CHECK_INTS(th);
|
1691
|
+
JUMP(dst);
|
1692
|
+
}
|
1693
|
+
|
1694
|
+
#line 1695 "vm.inc"
|
1695
|
+
#undef CURRENT_INSN_branchunless
|
1696
|
+
#undef INSN_IS_SC
|
1697
|
+
#undef INSN_LABEL
|
1698
|
+
#undef LABEL_IS_SC
|
1699
|
+
END_INSN(branchunless);}}}
|
1700
|
+
INSN_ENTRY(getinlinecache){
|
1701
|
+
{
|
1702
|
+
VALUE val;
|
1703
|
+
IC ic = (IC)GET_OPERAND(2);
|
1704
|
+
OFFSET dst = (OFFSET)GET_OPERAND(1);
|
1705
|
+
|
1706
|
+
DEBUG_ENTER_INSN("getinlinecache");
|
1707
|
+
ADD_PC(1+2);
|
1708
|
+
PREFETCH(GET_PC());
|
1709
|
+
#define CURRENT_INSN_getinlinecache 1
|
1710
|
+
#define INSN_IS_SC() 0
|
1711
|
+
#define INSN_LABEL(lab) LABEL_getinlinecache_##lab
|
1712
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1713
|
+
COLLECT_USAGE_INSN(BIN(getinlinecache));
|
1714
|
+
COLLECT_USAGE_OPERAND(BIN(getinlinecache), 0, dst);
|
1715
|
+
COLLECT_USAGE_OPERAND(BIN(getinlinecache), 1, ic);
|
1716
|
+
{
|
1717
|
+
#line 1197 "insns.def"
|
1718
|
+
if (ic->ic_serial == GET_GLOBAL_CONSTANT_STATE()) {
|
1719
|
+
val = ic->ic_value.value;
|
1720
|
+
JUMP(dst);
|
1721
|
+
}
|
1722
|
+
else {
|
1723
|
+
/* none */
|
1724
|
+
val = Qnil;
|
1725
|
+
}
|
1726
|
+
|
1727
|
+
#line 1728 "vm.inc"
|
1728
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1729
|
+
PUSH(val);
|
1730
|
+
#undef CURRENT_INSN_getinlinecache
|
1731
|
+
#undef INSN_IS_SC
|
1732
|
+
#undef INSN_LABEL
|
1733
|
+
#undef LABEL_IS_SC
|
1734
|
+
END_INSN(getinlinecache);}}}
|
1735
|
+
INSN_ENTRY(setinlinecache){
|
1736
|
+
{
|
1737
|
+
IC ic = (IC)GET_OPERAND(1);
|
1738
|
+
VALUE val = TOPN(0);
|
1739
|
+
DEBUG_ENTER_INSN("setinlinecache");
|
1740
|
+
ADD_PC(1+1);
|
1741
|
+
PREFETCH(GET_PC());
|
1742
|
+
POPN(1);
|
1743
|
+
#define CURRENT_INSN_setinlinecache 1
|
1744
|
+
#define INSN_IS_SC() 0
|
1745
|
+
#define INSN_LABEL(lab) LABEL_setinlinecache_##lab
|
1746
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1747
|
+
COLLECT_USAGE_INSN(BIN(setinlinecache));
|
1748
|
+
COLLECT_USAGE_OPERAND(BIN(setinlinecache), 0, ic);
|
1749
|
+
{
|
1750
|
+
#line 1218 "insns.def"
|
1751
|
+
if (ic->ic_value.value == Qundef) {
|
1752
|
+
rb_iseq_add_mark_object(GET_ISEQ(), val);
|
1753
|
+
}
|
1754
|
+
ic->ic_value.value = val;
|
1755
|
+
ic->ic_serial = GET_GLOBAL_CONSTANT_STATE() - ruby_vm_const_missing_count;
|
1756
|
+
ruby_vm_const_missing_count = 0;
|
1757
|
+
|
1758
|
+
#line 1759 "vm.inc"
|
1759
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1760
|
+
PUSH(val);
|
1761
|
+
#undef CURRENT_INSN_setinlinecache
|
1762
|
+
#undef INSN_IS_SC
|
1763
|
+
#undef INSN_LABEL
|
1764
|
+
#undef LABEL_IS_SC
|
1765
|
+
END_INSN(setinlinecache);}}}
|
1766
|
+
INSN_ENTRY(once){
|
1767
|
+
{
|
1768
|
+
VALUE val;
|
1769
|
+
IC ic = (IC)GET_OPERAND(2);
|
1770
|
+
ISEQ iseq = (ISEQ)GET_OPERAND(1);
|
1771
|
+
|
1772
|
+
DEBUG_ENTER_INSN("once");
|
1773
|
+
ADD_PC(1+2);
|
1774
|
+
PREFETCH(GET_PC());
|
1775
|
+
#define CURRENT_INSN_once 1
|
1776
|
+
#define INSN_IS_SC() 0
|
1777
|
+
#define INSN_LABEL(lab) LABEL_once_##lab
|
1778
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1779
|
+
COLLECT_USAGE_INSN(BIN(once));
|
1780
|
+
COLLECT_USAGE_OPERAND(BIN(once), 0, iseq);
|
1781
|
+
COLLECT_USAGE_OPERAND(BIN(once), 1, ic);
|
1782
|
+
{
|
1783
|
+
#line 1237 "insns.def"
|
1784
|
+
union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)ic;
|
1785
|
+
|
1786
|
+
retry:
|
1787
|
+
if (is->once.done == Qfalse) {
|
1788
|
+
if (is->once.running_thread == NULL) {
|
1789
|
+
is->once.running_thread = th;
|
1790
|
+
val = is->once.value = rb_ensure(vm_once_exec, (VALUE)iseq, vm_once_clear, (VALUE)is);
|
1791
|
+
/* is->once.running_thread is cleared by vm_once_clear() */
|
1792
|
+
is->once.done = Qtrue;
|
1793
|
+
rb_iseq_add_mark_object(GET_ISEQ(), val);
|
1794
|
+
}
|
1795
|
+
else if (is->once.running_thread == th) {
|
1796
|
+
/* recursive once */
|
1797
|
+
val = vm_once_exec(iseq);
|
1798
|
+
}
|
1799
|
+
else {
|
1800
|
+
/* waiting for finish */
|
1801
|
+
RUBY_VM_CHECK_INTS(th);
|
1802
|
+
rb_thread_schedule();
|
1803
|
+
goto retry;
|
1804
|
+
}
|
1805
|
+
}
|
1806
|
+
else {
|
1807
|
+
val = is->once.value;
|
1808
|
+
}
|
1809
|
+
|
1810
|
+
#line 1811 "vm.inc"
|
1811
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1812
|
+
PUSH(val);
|
1813
|
+
#undef CURRENT_INSN_once
|
1814
|
+
#undef INSN_IS_SC
|
1815
|
+
#undef INSN_LABEL
|
1816
|
+
#undef LABEL_IS_SC
|
1817
|
+
END_INSN(once);}}}
|
1818
|
+
INSN_ENTRY(opt_case_dispatch){
|
1819
|
+
{
|
1820
|
+
OFFSET else_offset = (OFFSET)GET_OPERAND(2);
|
1821
|
+
CDHASH hash = (CDHASH)GET_OPERAND(1);
|
1822
|
+
VALUE key = TOPN(0);
|
1823
|
+
DEBUG_ENTER_INSN("opt_case_dispatch");
|
1824
|
+
ADD_PC(1+2);
|
1825
|
+
PREFETCH(GET_PC());
|
1826
|
+
POPN(1);
|
1827
|
+
#define CURRENT_INSN_opt_case_dispatch 1
|
1828
|
+
#define INSN_IS_SC() 0
|
1829
|
+
#define INSN_LABEL(lab) LABEL_opt_case_dispatch_##lab
|
1830
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1831
|
+
COLLECT_USAGE_INSN(BIN(opt_case_dispatch));
|
1832
|
+
COLLECT_USAGE_OPERAND(BIN(opt_case_dispatch), 0, hash);
|
1833
|
+
COLLECT_USAGE_OPERAND(BIN(opt_case_dispatch), 1, else_offset);
|
1834
|
+
{
|
1835
|
+
#line 1275 "insns.def"
|
1836
|
+
switch(TYPE(key)) {
|
1837
|
+
case T_FLOAT: {
|
1838
|
+
double ival;
|
1839
|
+
if (modf(RFLOAT_VALUE(key), &ival) == 0.0 && !isinf(ival)) {
|
1840
|
+
key = FIXABLE(ival) ? LONG2FIX((long)ival) : rb_dbl2big(ival);
|
1841
|
+
}
|
1842
|
+
}
|
1843
|
+
case T_SYMBOL: /* fall through */
|
1844
|
+
case T_FIXNUM:
|
1845
|
+
case T_BIGNUM:
|
1846
|
+
case T_STRING:
|
1847
|
+
if (BASIC_OP_UNREDEFINED_P(BOP_EQQ,
|
1848
|
+
SYMBOL_REDEFINED_OP_FLAG |
|
1849
|
+
FIXNUM_REDEFINED_OP_FLAG |
|
1850
|
+
FLOAT_REDEFINED_OP_FLAG |
|
1851
|
+
BIGNUM_REDEFINED_OP_FLAG |
|
1852
|
+
STRING_REDEFINED_OP_FLAG)) {
|
1853
|
+
st_data_t val;
|
1854
|
+
if (st_lookup(RHASH_TBL_RAW(hash), key, &val)) {
|
1855
|
+
JUMP(FIX2INT((VALUE)val));
|
1856
|
+
}
|
1857
|
+
else {
|
1858
|
+
JUMP(else_offset);
|
1859
|
+
}
|
1860
|
+
break;
|
1861
|
+
}
|
1862
|
+
default:
|
1863
|
+
break;
|
1864
|
+
}
|
1865
|
+
|
1866
|
+
#line 1867 "vm.inc"
|
1867
|
+
#undef CURRENT_INSN_opt_case_dispatch
|
1868
|
+
#undef INSN_IS_SC
|
1869
|
+
#undef INSN_LABEL
|
1870
|
+
#undef LABEL_IS_SC
|
1871
|
+
END_INSN(opt_case_dispatch);}}}
|
1872
|
+
INSN_ENTRY(opt_plus){
|
1873
|
+
{
|
1874
|
+
VALUE val;
|
1875
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
1876
|
+
VALUE recv = TOPN(1);
|
1877
|
+
VALUE obj = TOPN(0);
|
1878
|
+
DEBUG_ENTER_INSN("opt_plus");
|
1879
|
+
ADD_PC(1+1);
|
1880
|
+
PREFETCH(GET_PC());
|
1881
|
+
POPN(2);
|
1882
|
+
#define CURRENT_INSN_opt_plus 1
|
1883
|
+
#define INSN_IS_SC() 0
|
1884
|
+
#define INSN_LABEL(lab) LABEL_opt_plus_##lab
|
1885
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1886
|
+
COLLECT_USAGE_INSN(BIN(opt_plus));
|
1887
|
+
COLLECT_USAGE_OPERAND(BIN(opt_plus), 0, ci);
|
1888
|
+
{
|
1889
|
+
#line 1319 "insns.def"
|
1890
|
+
if (FIXNUM_2_P(recv, obj) &&
|
1891
|
+
BASIC_OP_UNREDEFINED_P(BOP_PLUS,FIXNUM_REDEFINED_OP_FLAG)) {
|
1892
|
+
/* fixnum + fixnum */
|
1893
|
+
#ifndef LONG_LONG_VALUE
|
1894
|
+
val = (recv + (obj & (~1)));
|
1895
|
+
if ((~(recv ^ obj) & (recv ^ val)) &
|
1896
|
+
((VALUE)0x01 << ((sizeof(VALUE) * CHAR_BIT) - 1))) {
|
1897
|
+
val = rb_big_plus(rb_int2big(FIX2LONG(recv)),
|
1898
|
+
rb_int2big(FIX2LONG(obj)));
|
1899
|
+
}
|
1900
|
+
#else
|
1901
|
+
long a, b, c;
|
1902
|
+
a = FIX2LONG(recv);
|
1903
|
+
b = FIX2LONG(obj);
|
1904
|
+
c = a + b;
|
1905
|
+
if (FIXABLE(c)) {
|
1906
|
+
val = LONG2FIX(c);
|
1907
|
+
}
|
1908
|
+
else {
|
1909
|
+
val = rb_big_plus(rb_int2big(a), rb_int2big(b));
|
1910
|
+
}
|
1911
|
+
#endif
|
1912
|
+
}
|
1913
|
+
else if (FLONUM_2_P(recv, obj) &&
|
1914
|
+
BASIC_OP_UNREDEFINED_P(BOP_PLUS, FLOAT_REDEFINED_OP_FLAG)) {
|
1915
|
+
val = DBL2NUM(RFLOAT_VALUE(recv) + RFLOAT_VALUE(obj));
|
1916
|
+
}
|
1917
|
+
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
1918
|
+
if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
|
1919
|
+
BASIC_OP_UNREDEFINED_P(BOP_PLUS, FLOAT_REDEFINED_OP_FLAG)) {
|
1920
|
+
val = DBL2NUM(RFLOAT_VALUE(recv) + RFLOAT_VALUE(obj));
|
1921
|
+
}
|
1922
|
+
else if (RBASIC_CLASS(recv) == rb_cString && RBASIC_CLASS(obj) == rb_cString &&
|
1923
|
+
BASIC_OP_UNREDEFINED_P(BOP_PLUS, STRING_REDEFINED_OP_FLAG)) {
|
1924
|
+
val = rb_str_plus(recv, obj);
|
1925
|
+
}
|
1926
|
+
else if (RBASIC_CLASS(recv) == rb_cArray &&
|
1927
|
+
BASIC_OP_UNREDEFINED_P(BOP_PLUS, ARRAY_REDEFINED_OP_FLAG)) {
|
1928
|
+
val = rb_ary_plus(recv, obj);
|
1929
|
+
}
|
1930
|
+
else {
|
1931
|
+
goto INSN_LABEL(normal_dispatch);
|
1932
|
+
}
|
1933
|
+
}
|
1934
|
+
else {
|
1935
|
+
INSN_LABEL(normal_dispatch):
|
1936
|
+
PUSH(recv);
|
1937
|
+
PUSH(obj);
|
1938
|
+
CALL_SIMPLE_METHOD(recv);
|
1939
|
+
}
|
1940
|
+
|
1941
|
+
#line 1942 "vm.inc"
|
1942
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1943
|
+
PUSH(val);
|
1944
|
+
#undef CURRENT_INSN_opt_plus
|
1945
|
+
#undef INSN_IS_SC
|
1946
|
+
#undef INSN_LABEL
|
1947
|
+
#undef LABEL_IS_SC
|
1948
|
+
END_INSN(opt_plus);}}}
|
1949
|
+
INSN_ENTRY(opt_minus){
|
1950
|
+
{
|
1951
|
+
VALUE val;
|
1952
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
1953
|
+
VALUE recv = TOPN(1);
|
1954
|
+
VALUE obj = TOPN(0);
|
1955
|
+
DEBUG_ENTER_INSN("opt_minus");
|
1956
|
+
ADD_PC(1+1);
|
1957
|
+
PREFETCH(GET_PC());
|
1958
|
+
POPN(2);
|
1959
|
+
#define CURRENT_INSN_opt_minus 1
|
1960
|
+
#define INSN_IS_SC() 0
|
1961
|
+
#define INSN_LABEL(lab) LABEL_opt_minus_##lab
|
1962
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1963
|
+
COLLECT_USAGE_INSN(BIN(opt_minus));
|
1964
|
+
COLLECT_USAGE_OPERAND(BIN(opt_minus), 0, ci);
|
1965
|
+
{
|
1966
|
+
#line 1382 "insns.def"
|
1967
|
+
if (FIXNUM_2_P(recv, obj) &&
|
1968
|
+
BASIC_OP_UNREDEFINED_P(BOP_MINUS, FIXNUM_REDEFINED_OP_FLAG)) {
|
1969
|
+
long a, b, c;
|
1970
|
+
|
1971
|
+
a = FIX2LONG(recv);
|
1972
|
+
b = FIX2LONG(obj);
|
1973
|
+
c = a - b;
|
1974
|
+
|
1975
|
+
if (FIXABLE(c)) {
|
1976
|
+
val = LONG2FIX(c);
|
1977
|
+
}
|
1978
|
+
else {
|
1979
|
+
val = rb_big_minus(rb_int2big(a), rb_int2big(b));
|
1980
|
+
}
|
1981
|
+
}
|
1982
|
+
else if (FLONUM_2_P(recv, obj) &&
|
1983
|
+
BASIC_OP_UNREDEFINED_P(BOP_MINUS, FLOAT_REDEFINED_OP_FLAG)) {
|
1984
|
+
val = DBL2NUM(RFLOAT_VALUE(recv) - RFLOAT_VALUE(obj));
|
1985
|
+
}
|
1986
|
+
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
1987
|
+
if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
|
1988
|
+
BASIC_OP_UNREDEFINED_P(BOP_MINUS, FLOAT_REDEFINED_OP_FLAG)) {
|
1989
|
+
val = DBL2NUM(RFLOAT_VALUE(recv) - RFLOAT_VALUE(obj));
|
1990
|
+
}
|
1991
|
+
else {
|
1992
|
+
goto INSN_LABEL(normal_dispatch);
|
1993
|
+
}
|
1994
|
+
}
|
1995
|
+
else {
|
1996
|
+
/* other */
|
1997
|
+
INSN_LABEL(normal_dispatch):
|
1998
|
+
PUSH(recv);
|
1999
|
+
PUSH(obj);
|
2000
|
+
CALL_SIMPLE_METHOD(recv);
|
2001
|
+
}
|
2002
|
+
|
2003
|
+
#line 2004 "vm.inc"
|
2004
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2005
|
+
PUSH(val);
|
2006
|
+
#undef CURRENT_INSN_opt_minus
|
2007
|
+
#undef INSN_IS_SC
|
2008
|
+
#undef INSN_LABEL
|
2009
|
+
#undef LABEL_IS_SC
|
2010
|
+
END_INSN(opt_minus);}}}
|
2011
|
+
INSN_ENTRY(opt_mult){
|
2012
|
+
{
|
2013
|
+
VALUE val;
|
2014
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2015
|
+
VALUE recv = TOPN(1);
|
2016
|
+
VALUE obj = TOPN(0);
|
2017
|
+
DEBUG_ENTER_INSN("opt_mult");
|
2018
|
+
ADD_PC(1+1);
|
2019
|
+
PREFETCH(GET_PC());
|
2020
|
+
POPN(2);
|
2021
|
+
#define CURRENT_INSN_opt_mult 1
|
2022
|
+
#define INSN_IS_SC() 0
|
2023
|
+
#define INSN_LABEL(lab) LABEL_opt_mult_##lab
|
2024
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2025
|
+
COLLECT_USAGE_INSN(BIN(opt_mult));
|
2026
|
+
COLLECT_USAGE_OPERAND(BIN(opt_mult), 0, ci);
|
2027
|
+
{
|
2028
|
+
#line 1430 "insns.def"
|
2029
|
+
if (FIXNUM_2_P(recv, obj) &&
|
2030
|
+
BASIC_OP_UNREDEFINED_P(BOP_MULT, FIXNUM_REDEFINED_OP_FLAG)) {
|
2031
|
+
long a, b;
|
2032
|
+
|
2033
|
+
a = FIX2LONG(recv);
|
2034
|
+
if (a == 0) {
|
2035
|
+
val = recv;
|
2036
|
+
}
|
2037
|
+
else {
|
2038
|
+
b = FIX2LONG(obj);
|
2039
|
+
if (MUL_OVERFLOW_FIXNUM_P(a, b)) {
|
2040
|
+
val = rb_big_mul(rb_int2big(a), rb_int2big(b));
|
2041
|
+
}
|
2042
|
+
else {
|
2043
|
+
val = LONG2FIX(a * b);
|
2044
|
+
}
|
2045
|
+
}
|
2046
|
+
}
|
2047
|
+
else if (FLONUM_2_P(recv, obj) &&
|
2048
|
+
BASIC_OP_UNREDEFINED_P(BOP_MULT, FLOAT_REDEFINED_OP_FLAG)) {
|
2049
|
+
val = DBL2NUM(RFLOAT_VALUE(recv) * RFLOAT_VALUE(obj));
|
2050
|
+
}
|
2051
|
+
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
2052
|
+
if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
|
2053
|
+
BASIC_OP_UNREDEFINED_P(BOP_MULT, FLOAT_REDEFINED_OP_FLAG)) {
|
2054
|
+
val = DBL2NUM(RFLOAT_VALUE(recv) * RFLOAT_VALUE(obj));
|
2055
|
+
}
|
2056
|
+
else {
|
2057
|
+
goto INSN_LABEL(normal_dispatch);
|
2058
|
+
}
|
2059
|
+
}
|
2060
|
+
else {
|
2061
|
+
INSN_LABEL(normal_dispatch):
|
2062
|
+
PUSH(recv);
|
2063
|
+
PUSH(obj);
|
2064
|
+
CALL_SIMPLE_METHOD(recv);
|
2065
|
+
}
|
2066
|
+
|
2067
|
+
#line 2068 "vm.inc"
|
2068
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2069
|
+
PUSH(val);
|
2070
|
+
#undef CURRENT_INSN_opt_mult
|
2071
|
+
#undef INSN_IS_SC
|
2072
|
+
#undef INSN_LABEL
|
2073
|
+
#undef LABEL_IS_SC
|
2074
|
+
END_INSN(opt_mult);}}}
|
2075
|
+
INSN_ENTRY(opt_div){
|
2076
|
+
{
|
2077
|
+
VALUE val;
|
2078
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2079
|
+
VALUE recv = TOPN(1);
|
2080
|
+
VALUE obj = TOPN(0);
|
2081
|
+
DEBUG_ENTER_INSN("opt_div");
|
2082
|
+
ADD_PC(1+1);
|
2083
|
+
PREFETCH(GET_PC());
|
2084
|
+
POPN(2);
|
2085
|
+
#define CURRENT_INSN_opt_div 1
|
2086
|
+
#define INSN_IS_SC() 0
|
2087
|
+
#define INSN_LABEL(lab) LABEL_opt_div_##lab
|
2088
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2089
|
+
COLLECT_USAGE_INSN(BIN(opt_div));
|
2090
|
+
COLLECT_USAGE_OPERAND(BIN(opt_div), 0, ci);
|
2091
|
+
{
|
2092
|
+
#line 1480 "insns.def"
|
2093
|
+
if (FIXNUM_2_P(recv, obj) &&
|
2094
|
+
BASIC_OP_UNREDEFINED_P(BOP_DIV, FIXNUM_REDEFINED_OP_FLAG)) {
|
2095
|
+
long x, y, div;
|
2096
|
+
|
2097
|
+
x = FIX2LONG(recv);
|
2098
|
+
y = FIX2LONG(obj);
|
2099
|
+
{
|
2100
|
+
/* copied from numeric.c#fixdivmod */
|
2101
|
+
long mod;
|
2102
|
+
if (y == 0)
|
2103
|
+
goto INSN_LABEL(normal_dispatch);
|
2104
|
+
if (y < 0) {
|
2105
|
+
if (x < 0)
|
2106
|
+
div = -x / -y;
|
2107
|
+
else
|
2108
|
+
div = -(x / -y);
|
2109
|
+
}
|
2110
|
+
else {
|
2111
|
+
if (x < 0)
|
2112
|
+
div = -(-x / y);
|
2113
|
+
else
|
2114
|
+
div = x / y;
|
2115
|
+
}
|
2116
|
+
mod = x - div * y;
|
2117
|
+
if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) {
|
2118
|
+
mod += y;
|
2119
|
+
div -= 1;
|
2120
|
+
}
|
2121
|
+
}
|
2122
|
+
val = LONG2NUM(div);
|
2123
|
+
}
|
2124
|
+
else if (FLONUM_2_P(recv, obj) &&
|
2125
|
+
BASIC_OP_UNREDEFINED_P(BOP_DIV, FLOAT_REDEFINED_OP_FLAG)) {
|
2126
|
+
val = DBL2NUM(RFLOAT_VALUE(recv) / RFLOAT_VALUE(obj));
|
2127
|
+
}
|
2128
|
+
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
2129
|
+
if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
|
2130
|
+
BASIC_OP_UNREDEFINED_P(BOP_DIV, FLOAT_REDEFINED_OP_FLAG)) {
|
2131
|
+
val = DBL2NUM(RFLOAT_VALUE(recv) / RFLOAT_VALUE(obj));
|
2132
|
+
}
|
2133
|
+
else {
|
2134
|
+
goto INSN_LABEL(normal_dispatch);
|
2135
|
+
}
|
2136
|
+
}
|
2137
|
+
else {
|
2138
|
+
INSN_LABEL(normal_dispatch):
|
2139
|
+
PUSH(recv);
|
2140
|
+
PUSH(obj);
|
2141
|
+
CALL_SIMPLE_METHOD(recv);
|
2142
|
+
}
|
2143
|
+
|
2144
|
+
#line 2145 "vm.inc"
|
2145
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2146
|
+
PUSH(val);
|
2147
|
+
#undef CURRENT_INSN_opt_div
|
2148
|
+
#undef INSN_IS_SC
|
2149
|
+
#undef INSN_LABEL
|
2150
|
+
#undef LABEL_IS_SC
|
2151
|
+
END_INSN(opt_div);}}}
|
2152
|
+
INSN_ENTRY(opt_mod){
|
2153
|
+
{
|
2154
|
+
VALUE val;
|
2155
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2156
|
+
VALUE recv = TOPN(1);
|
2157
|
+
VALUE obj = TOPN(0);
|
2158
|
+
DEBUG_ENTER_INSN("opt_mod");
|
2159
|
+
ADD_PC(1+1);
|
2160
|
+
PREFETCH(GET_PC());
|
2161
|
+
POPN(2);
|
2162
|
+
#define CURRENT_INSN_opt_mod 1
|
2163
|
+
#define INSN_IS_SC() 0
|
2164
|
+
#define INSN_LABEL(lab) LABEL_opt_mod_##lab
|
2165
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2166
|
+
COLLECT_USAGE_INSN(BIN(opt_mod));
|
2167
|
+
COLLECT_USAGE_OPERAND(BIN(opt_mod), 0, ci);
|
2168
|
+
{
|
2169
|
+
#line 1543 "insns.def"
|
2170
|
+
if (FIXNUM_2_P(recv, obj) &&
|
2171
|
+
BASIC_OP_UNREDEFINED_P(BOP_MOD, FIXNUM_REDEFINED_OP_FLAG )) {
|
2172
|
+
long x, y;
|
2173
|
+
|
2174
|
+
x = FIX2LONG(recv);
|
2175
|
+
y = FIX2LONG(obj);
|
2176
|
+
if (x > 0 && y > 0) {
|
2177
|
+
val = LONG2FIX(x % y);
|
2178
|
+
} else {
|
2179
|
+
/* copied from numeric.c#fixdivmod */
|
2180
|
+
long div, mod;
|
2181
|
+
|
2182
|
+
if (y == 0)
|
2183
|
+
goto INSN_LABEL(normal_dispatch);
|
2184
|
+
if (y < 0) {
|
2185
|
+
if (x < 0)
|
2186
|
+
div = -x / -y;
|
2187
|
+
else
|
2188
|
+
div = -(x / -y);
|
2189
|
+
}
|
2190
|
+
else {
|
2191
|
+
if (x < 0)
|
2192
|
+
div = -(-x / y);
|
2193
|
+
else
|
2194
|
+
div = x / y;
|
2195
|
+
}
|
2196
|
+
mod = x - div * y;
|
2197
|
+
if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) {
|
2198
|
+
mod += y;
|
2199
|
+
div -= 1;
|
2200
|
+
}
|
2201
|
+
val = LONG2FIX(mod);
|
2202
|
+
}
|
2203
|
+
}
|
2204
|
+
else if (FLONUM_2_P(recv, obj) &&
|
2205
|
+
BASIC_OP_UNREDEFINED_P(BOP_MOD, FLOAT_REDEFINED_OP_FLAG)) {
|
2206
|
+
val = DBL2NUM(ruby_float_mod(RFLOAT_VALUE(recv), RFLOAT_VALUE(obj)));
|
2207
|
+
}
|
2208
|
+
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
2209
|
+
if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
|
2210
|
+
BASIC_OP_UNREDEFINED_P(BOP_MOD, FLOAT_REDEFINED_OP_FLAG)) {
|
2211
|
+
val = DBL2NUM(ruby_float_mod(RFLOAT_VALUE(recv), RFLOAT_VALUE(obj)));
|
2212
|
+
}
|
2213
|
+
else {
|
2214
|
+
goto INSN_LABEL(normal_dispatch);
|
2215
|
+
}
|
2216
|
+
}
|
2217
|
+
else {
|
2218
|
+
INSN_LABEL(normal_dispatch):
|
2219
|
+
PUSH(recv);
|
2220
|
+
PUSH(obj);
|
2221
|
+
CALL_SIMPLE_METHOD(recv);
|
2222
|
+
}
|
2223
|
+
|
2224
|
+
#line 2225 "vm.inc"
|
2225
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2226
|
+
PUSH(val);
|
2227
|
+
#undef CURRENT_INSN_opt_mod
|
2228
|
+
#undef INSN_IS_SC
|
2229
|
+
#undef INSN_LABEL
|
2230
|
+
#undef LABEL_IS_SC
|
2231
|
+
END_INSN(opt_mod);}}}
|
2232
|
+
INSN_ENTRY(opt_eq){
|
2233
|
+
{
|
2234
|
+
VALUE val;
|
2235
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2236
|
+
VALUE recv = TOPN(1);
|
2237
|
+
VALUE obj = TOPN(0);
|
2238
|
+
DEBUG_ENTER_INSN("opt_eq");
|
2239
|
+
ADD_PC(1+1);
|
2240
|
+
PREFETCH(GET_PC());
|
2241
|
+
POPN(2);
|
2242
|
+
#define CURRENT_INSN_opt_eq 1
|
2243
|
+
#define INSN_IS_SC() 0
|
2244
|
+
#define INSN_LABEL(lab) LABEL_opt_eq_##lab
|
2245
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2246
|
+
COLLECT_USAGE_INSN(BIN(opt_eq));
|
2247
|
+
COLLECT_USAGE_OPERAND(BIN(opt_eq), 0, ci);
|
2248
|
+
{
|
2249
|
+
#line 1609 "insns.def"
|
2250
|
+
val = opt_eq_func(recv, obj, ci);
|
2251
|
+
|
2252
|
+
if (val == Qundef) {
|
2253
|
+
/* other */
|
2254
|
+
PUSH(recv);
|
2255
|
+
PUSH(obj);
|
2256
|
+
CALL_SIMPLE_METHOD(recv);
|
2257
|
+
}
|
2258
|
+
|
2259
|
+
#line 2260 "vm.inc"
|
2260
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2261
|
+
PUSH(val);
|
2262
|
+
#undef CURRENT_INSN_opt_eq
|
2263
|
+
#undef INSN_IS_SC
|
2264
|
+
#undef INSN_LABEL
|
2265
|
+
#undef LABEL_IS_SC
|
2266
|
+
END_INSN(opt_eq);}}}
|
2267
|
+
INSN_ENTRY(opt_neq){
|
2268
|
+
{
|
2269
|
+
VALUE val;
|
2270
|
+
CALL_INFO ci_eq = (CALL_INFO)GET_OPERAND(2);
|
2271
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2272
|
+
VALUE recv = TOPN(1);
|
2273
|
+
VALUE obj = TOPN(0);
|
2274
|
+
DEBUG_ENTER_INSN("opt_neq");
|
2275
|
+
ADD_PC(1+2);
|
2276
|
+
PREFETCH(GET_PC());
|
2277
|
+
POPN(2);
|
2278
|
+
#define CURRENT_INSN_opt_neq 1
|
2279
|
+
#define INSN_IS_SC() 0
|
2280
|
+
#define INSN_LABEL(lab) LABEL_opt_neq_##lab
|
2281
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2282
|
+
COLLECT_USAGE_INSN(BIN(opt_neq));
|
2283
|
+
COLLECT_USAGE_OPERAND(BIN(opt_neq), 0, ci);
|
2284
|
+
COLLECT_USAGE_OPERAND(BIN(opt_neq), 1, ci_eq);
|
2285
|
+
{
|
2286
|
+
#line 1630 "insns.def"
|
2287
|
+
extern VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2);
|
2288
|
+
vm_search_method(ci, recv);
|
2289
|
+
val = Qundef;
|
2290
|
+
|
2291
|
+
if (check_cfunc(ci->me, rb_obj_not_equal)) {
|
2292
|
+
val = opt_eq_func(recv, obj, ci_eq);
|
2293
|
+
|
2294
|
+
if (val != Qundef) {
|
2295
|
+
val = RTEST(val) ? Qfalse : Qtrue;
|
2296
|
+
}
|
2297
|
+
}
|
2298
|
+
|
2299
|
+
if (val == Qundef) {
|
2300
|
+
/* other */
|
2301
|
+
PUSH(recv);
|
2302
|
+
PUSH(obj);
|
2303
|
+
CALL_SIMPLE_METHOD(recv);
|
2304
|
+
}
|
2305
|
+
|
2306
|
+
#line 2307 "vm.inc"
|
2307
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2308
|
+
PUSH(val);
|
2309
|
+
#undef CURRENT_INSN_opt_neq
|
2310
|
+
#undef INSN_IS_SC
|
2311
|
+
#undef INSN_LABEL
|
2312
|
+
#undef LABEL_IS_SC
|
2313
|
+
END_INSN(opt_neq);}}}
|
2314
|
+
INSN_ENTRY(opt_lt){
|
2315
|
+
{
|
2316
|
+
VALUE val;
|
2317
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2318
|
+
VALUE recv = TOPN(1);
|
2319
|
+
VALUE obj = TOPN(0);
|
2320
|
+
DEBUG_ENTER_INSN("opt_lt");
|
2321
|
+
ADD_PC(1+1);
|
2322
|
+
PREFETCH(GET_PC());
|
2323
|
+
POPN(2);
|
2324
|
+
#define CURRENT_INSN_opt_lt 1
|
2325
|
+
#define INSN_IS_SC() 0
|
2326
|
+
#define INSN_LABEL(lab) LABEL_opt_lt_##lab
|
2327
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2328
|
+
COLLECT_USAGE_INSN(BIN(opt_lt));
|
2329
|
+
COLLECT_USAGE_OPERAND(BIN(opt_lt), 0, ci);
|
2330
|
+
{
|
2331
|
+
#line 1661 "insns.def"
|
2332
|
+
if (FIXNUM_2_P(recv, obj) &&
|
2333
|
+
BASIC_OP_UNREDEFINED_P(BOP_LT, FIXNUM_REDEFINED_OP_FLAG)) {
|
2334
|
+
SIGNED_VALUE a = recv, b = obj;
|
2335
|
+
|
2336
|
+
if (a < b) {
|
2337
|
+
val = Qtrue;
|
2338
|
+
}
|
2339
|
+
else {
|
2340
|
+
val = Qfalse;
|
2341
|
+
}
|
2342
|
+
}
|
2343
|
+
else if (FLONUM_2_P(recv, obj) &&
|
2344
|
+
BASIC_OP_UNREDEFINED_P(BOP_LT, FLOAT_REDEFINED_OP_FLAG)) {
|
2345
|
+
/* flonum is not NaN */
|
2346
|
+
val = RFLOAT_VALUE(recv) < RFLOAT_VALUE(obj) ? Qtrue : Qfalse;
|
2347
|
+
}
|
2348
|
+
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
2349
|
+
if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
|
2350
|
+
BASIC_OP_UNREDEFINED_P(BOP_LT, FLOAT_REDEFINED_OP_FLAG)) {
|
2351
|
+
val = double_cmp_lt(RFLOAT_VALUE(recv), RFLOAT_VALUE(obj));
|
2352
|
+
}
|
2353
|
+
else {
|
2354
|
+
goto INSN_LABEL(normal_dispatch);
|
2355
|
+
}
|
2356
|
+
}
|
2357
|
+
else {
|
2358
|
+
INSN_LABEL(normal_dispatch):
|
2359
|
+
PUSH(recv);
|
2360
|
+
PUSH(obj);
|
2361
|
+
CALL_SIMPLE_METHOD(recv);
|
2362
|
+
}
|
2363
|
+
|
2364
|
+
#line 2365 "vm.inc"
|
2365
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2366
|
+
PUSH(val);
|
2367
|
+
#undef CURRENT_INSN_opt_lt
|
2368
|
+
#undef INSN_IS_SC
|
2369
|
+
#undef INSN_LABEL
|
2370
|
+
#undef LABEL_IS_SC
|
2371
|
+
END_INSN(opt_lt);}}}
|
2372
|
+
INSN_ENTRY(opt_le){
|
2373
|
+
{
|
2374
|
+
VALUE val;
|
2375
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2376
|
+
VALUE recv = TOPN(1);
|
2377
|
+
VALUE obj = TOPN(0);
|
2378
|
+
DEBUG_ENTER_INSN("opt_le");
|
2379
|
+
ADD_PC(1+1);
|
2380
|
+
PREFETCH(GET_PC());
|
2381
|
+
POPN(2);
|
2382
|
+
#define CURRENT_INSN_opt_le 1
|
2383
|
+
#define INSN_IS_SC() 0
|
2384
|
+
#define INSN_LABEL(lab) LABEL_opt_le_##lab
|
2385
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2386
|
+
COLLECT_USAGE_INSN(BIN(opt_le));
|
2387
|
+
COLLECT_USAGE_OPERAND(BIN(opt_le), 0, ci);
|
2388
|
+
{
|
2389
|
+
#line 1705 "insns.def"
|
2390
|
+
if (FIXNUM_2_P(recv, obj) &&
|
2391
|
+
BASIC_OP_UNREDEFINED_P(BOP_LE, FIXNUM_REDEFINED_OP_FLAG)) {
|
2392
|
+
SIGNED_VALUE a = recv, b = obj;
|
2393
|
+
|
2394
|
+
if (a <= b) {
|
2395
|
+
val = Qtrue;
|
2396
|
+
}
|
2397
|
+
else {
|
2398
|
+
val = Qfalse;
|
2399
|
+
}
|
2400
|
+
}
|
2401
|
+
else if (FLONUM_2_P(recv, obj) &&
|
2402
|
+
BASIC_OP_UNREDEFINED_P(BOP_LE, FLOAT_REDEFINED_OP_FLAG)) {
|
2403
|
+
/* flonum is not NaN */
|
2404
|
+
val = RFLOAT_VALUE(recv) <= RFLOAT_VALUE(obj) ? Qtrue : Qfalse;
|
2405
|
+
}
|
2406
|
+
else {
|
2407
|
+
/* other */
|
2408
|
+
PUSH(recv);
|
2409
|
+
PUSH(obj);
|
2410
|
+
CALL_SIMPLE_METHOD(recv);
|
2411
|
+
}
|
2412
|
+
|
2413
|
+
#line 2414 "vm.inc"
|
2414
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2415
|
+
PUSH(val);
|
2416
|
+
#undef CURRENT_INSN_opt_le
|
2417
|
+
#undef INSN_IS_SC
|
2418
|
+
#undef INSN_LABEL
|
2419
|
+
#undef LABEL_IS_SC
|
2420
|
+
END_INSN(opt_le);}}}
|
2421
|
+
INSN_ENTRY(opt_gt){
|
2422
|
+
{
|
2423
|
+
VALUE val;
|
2424
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2425
|
+
VALUE recv = TOPN(1);
|
2426
|
+
VALUE obj = TOPN(0);
|
2427
|
+
DEBUG_ENTER_INSN("opt_gt");
|
2428
|
+
ADD_PC(1+1);
|
2429
|
+
PREFETCH(GET_PC());
|
2430
|
+
POPN(2);
|
2431
|
+
#define CURRENT_INSN_opt_gt 1
|
2432
|
+
#define INSN_IS_SC() 0
|
2433
|
+
#define INSN_LABEL(lab) LABEL_opt_gt_##lab
|
2434
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2435
|
+
COLLECT_USAGE_INSN(BIN(opt_gt));
|
2436
|
+
COLLECT_USAGE_OPERAND(BIN(opt_gt), 0, ci);
|
2437
|
+
{
|
2438
|
+
#line 1740 "insns.def"
|
2439
|
+
if (FIXNUM_2_P(recv, obj) &&
|
2440
|
+
BASIC_OP_UNREDEFINED_P(BOP_GT, FIXNUM_REDEFINED_OP_FLAG)) {
|
2441
|
+
SIGNED_VALUE a = recv, b = obj;
|
2442
|
+
|
2443
|
+
if (a > b) {
|
2444
|
+
val = Qtrue;
|
2445
|
+
}
|
2446
|
+
else {
|
2447
|
+
val = Qfalse;
|
2448
|
+
}
|
2449
|
+
}
|
2450
|
+
else if (FLONUM_2_P(recv, obj) &&
|
2451
|
+
BASIC_OP_UNREDEFINED_P(BOP_GT, FLOAT_REDEFINED_OP_FLAG)) {
|
2452
|
+
/* flonum is not NaN */
|
2453
|
+
val = RFLOAT_VALUE(recv) > RFLOAT_VALUE(obj) ? Qtrue : Qfalse;
|
2454
|
+
}
|
2455
|
+
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
2456
|
+
if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
|
2457
|
+
BASIC_OP_UNREDEFINED_P(BOP_GT, FLOAT_REDEFINED_OP_FLAG)) {
|
2458
|
+
val = double_cmp_gt(RFLOAT_VALUE(recv), RFLOAT_VALUE(obj));
|
2459
|
+
}
|
2460
|
+
else {
|
2461
|
+
goto INSN_LABEL(normal_dispatch);
|
2462
|
+
}
|
2463
|
+
}
|
2464
|
+
else {
|
2465
|
+
INSN_LABEL(normal_dispatch):
|
2466
|
+
PUSH(recv);
|
2467
|
+
PUSH(obj);
|
2468
|
+
CALL_SIMPLE_METHOD(recv);
|
2469
|
+
}
|
2470
|
+
|
2471
|
+
#line 2472 "vm.inc"
|
2472
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2473
|
+
PUSH(val);
|
2474
|
+
#undef CURRENT_INSN_opt_gt
|
2475
|
+
#undef INSN_IS_SC
|
2476
|
+
#undef INSN_LABEL
|
2477
|
+
#undef LABEL_IS_SC
|
2478
|
+
END_INSN(opt_gt);}}}
|
2479
|
+
INSN_ENTRY(opt_ge){
|
2480
|
+
{
|
2481
|
+
VALUE val;
|
2482
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2483
|
+
VALUE recv = TOPN(1);
|
2484
|
+
VALUE obj = TOPN(0);
|
2485
|
+
DEBUG_ENTER_INSN("opt_ge");
|
2486
|
+
ADD_PC(1+1);
|
2487
|
+
PREFETCH(GET_PC());
|
2488
|
+
POPN(2);
|
2489
|
+
#define CURRENT_INSN_opt_ge 1
|
2490
|
+
#define INSN_IS_SC() 0
|
2491
|
+
#define INSN_LABEL(lab) LABEL_opt_ge_##lab
|
2492
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2493
|
+
COLLECT_USAGE_INSN(BIN(opt_ge));
|
2494
|
+
COLLECT_USAGE_OPERAND(BIN(opt_ge), 0, ci);
|
2495
|
+
{
|
2496
|
+
#line 1784 "insns.def"
|
2497
|
+
if (FIXNUM_2_P(recv, obj) &&
|
2498
|
+
BASIC_OP_UNREDEFINED_P(BOP_GE, FIXNUM_REDEFINED_OP_FLAG)) {
|
2499
|
+
SIGNED_VALUE a = recv, b = obj;
|
2500
|
+
|
2501
|
+
if (a >= b) {
|
2502
|
+
val = Qtrue;
|
2503
|
+
}
|
2504
|
+
else {
|
2505
|
+
val = Qfalse;
|
2506
|
+
}
|
2507
|
+
}
|
2508
|
+
else if (FLONUM_2_P(recv, obj) &&
|
2509
|
+
BASIC_OP_UNREDEFINED_P(BOP_GE, FLOAT_REDEFINED_OP_FLAG)) {
|
2510
|
+
/* flonum is not NaN */
|
2511
|
+
val = RFLOAT_VALUE(recv) >= RFLOAT_VALUE(obj) ? Qtrue : Qfalse;
|
2512
|
+
}
|
2513
|
+
else {
|
2514
|
+
PUSH(recv);
|
2515
|
+
PUSH(obj);
|
2516
|
+
CALL_SIMPLE_METHOD(recv);
|
2517
|
+
}
|
2518
|
+
|
2519
|
+
#line 2520 "vm.inc"
|
2520
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2521
|
+
PUSH(val);
|
2522
|
+
#undef CURRENT_INSN_opt_ge
|
2523
|
+
#undef INSN_IS_SC
|
2524
|
+
#undef INSN_LABEL
|
2525
|
+
#undef LABEL_IS_SC
|
2526
|
+
END_INSN(opt_ge);}}}
|
2527
|
+
INSN_ENTRY(opt_ltlt){
|
2528
|
+
{
|
2529
|
+
VALUE val;
|
2530
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2531
|
+
VALUE recv = TOPN(1);
|
2532
|
+
VALUE obj = TOPN(0);
|
2533
|
+
DEBUG_ENTER_INSN("opt_ltlt");
|
2534
|
+
ADD_PC(1+1);
|
2535
|
+
PREFETCH(GET_PC());
|
2536
|
+
POPN(2);
|
2537
|
+
#define CURRENT_INSN_opt_ltlt 1
|
2538
|
+
#define INSN_IS_SC() 0
|
2539
|
+
#define INSN_LABEL(lab) LABEL_opt_ltlt_##lab
|
2540
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2541
|
+
COLLECT_USAGE_INSN(BIN(opt_ltlt));
|
2542
|
+
COLLECT_USAGE_OPERAND(BIN(opt_ltlt), 0, ci);
|
2543
|
+
{
|
2544
|
+
#line 1818 "insns.def"
|
2545
|
+
if (!SPECIAL_CONST_P(recv)) {
|
2546
|
+
if (RBASIC_CLASS(recv) == rb_cString &&
|
2547
|
+
BASIC_OP_UNREDEFINED_P(BOP_LTLT, STRING_REDEFINED_OP_FLAG)) {
|
2548
|
+
val = rb_str_concat(recv, obj);
|
2549
|
+
}
|
2550
|
+
else if (RBASIC_CLASS(recv) == rb_cArray &&
|
2551
|
+
BASIC_OP_UNREDEFINED_P(BOP_LTLT, ARRAY_REDEFINED_OP_FLAG)) {
|
2552
|
+
val = rb_ary_push(recv, obj);
|
2553
|
+
}
|
2554
|
+
else {
|
2555
|
+
goto INSN_LABEL(normal_dispatch);
|
2556
|
+
}
|
2557
|
+
}
|
2558
|
+
else {
|
2559
|
+
INSN_LABEL(normal_dispatch):
|
2560
|
+
PUSH(recv);
|
2561
|
+
PUSH(obj);
|
2562
|
+
CALL_SIMPLE_METHOD(recv);
|
2563
|
+
}
|
2564
|
+
|
2565
|
+
#line 2566 "vm.inc"
|
2566
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2567
|
+
PUSH(val);
|
2568
|
+
#undef CURRENT_INSN_opt_ltlt
|
2569
|
+
#undef INSN_IS_SC
|
2570
|
+
#undef INSN_LABEL
|
2571
|
+
#undef LABEL_IS_SC
|
2572
|
+
END_INSN(opt_ltlt);}}}
|
2573
|
+
INSN_ENTRY(opt_aref){
|
2574
|
+
{
|
2575
|
+
VALUE val;
|
2576
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2577
|
+
VALUE recv = TOPN(1);
|
2578
|
+
VALUE obj = TOPN(0);
|
2579
|
+
DEBUG_ENTER_INSN("opt_aref");
|
2580
|
+
ADD_PC(1+1);
|
2581
|
+
PREFETCH(GET_PC());
|
2582
|
+
POPN(2);
|
2583
|
+
#define CURRENT_INSN_opt_aref 1
|
2584
|
+
#define INSN_IS_SC() 0
|
2585
|
+
#define INSN_LABEL(lab) LABEL_opt_aref_##lab
|
2586
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2587
|
+
COLLECT_USAGE_INSN(BIN(opt_aref));
|
2588
|
+
COLLECT_USAGE_OPERAND(BIN(opt_aref), 0, ci);
|
2589
|
+
{
|
2590
|
+
#line 1850 "insns.def"
|
2591
|
+
if (!SPECIAL_CONST_P(recv)) {
|
2592
|
+
if (RBASIC_CLASS(recv) == rb_cArray && BASIC_OP_UNREDEFINED_P(BOP_AREF, ARRAY_REDEFINED_OP_FLAG) && FIXNUM_P(obj)) {
|
2593
|
+
val = rb_ary_entry(recv, FIX2LONG(obj));
|
2594
|
+
}
|
2595
|
+
else if (RBASIC_CLASS(recv) == rb_cHash && BASIC_OP_UNREDEFINED_P(BOP_AREF, HASH_REDEFINED_OP_FLAG)) {
|
2596
|
+
val = rb_hash_aref(recv, obj);
|
2597
|
+
}
|
2598
|
+
else {
|
2599
|
+
goto INSN_LABEL(normal_dispatch);
|
2600
|
+
}
|
2601
|
+
}
|
2602
|
+
else {
|
2603
|
+
INSN_LABEL(normal_dispatch):
|
2604
|
+
PUSH(recv);
|
2605
|
+
PUSH(obj);
|
2606
|
+
CALL_SIMPLE_METHOD(recv);
|
2607
|
+
}
|
2608
|
+
|
2609
|
+
#line 2610 "vm.inc"
|
2610
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2611
|
+
PUSH(val);
|
2612
|
+
#undef CURRENT_INSN_opt_aref
|
2613
|
+
#undef INSN_IS_SC
|
2614
|
+
#undef INSN_LABEL
|
2615
|
+
#undef LABEL_IS_SC
|
2616
|
+
END_INSN(opt_aref);}}}
|
2617
|
+
INSN_ENTRY(opt_aset){
|
2618
|
+
{
|
2619
|
+
VALUE val;
|
2620
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2621
|
+
VALUE recv = TOPN(2);
|
2622
|
+
VALUE obj = TOPN(1);
|
2623
|
+
VALUE set = TOPN(0);
|
2624
|
+
DEBUG_ENTER_INSN("opt_aset");
|
2625
|
+
ADD_PC(1+1);
|
2626
|
+
PREFETCH(GET_PC());
|
2627
|
+
POPN(3);
|
2628
|
+
#define CURRENT_INSN_opt_aset 1
|
2629
|
+
#define INSN_IS_SC() 0
|
2630
|
+
#define INSN_LABEL(lab) LABEL_opt_aset_##lab
|
2631
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2632
|
+
COLLECT_USAGE_INSN(BIN(opt_aset));
|
2633
|
+
COLLECT_USAGE_OPERAND(BIN(opt_aset), 0, ci);
|
2634
|
+
{
|
2635
|
+
#line 1880 "insns.def"
|
2636
|
+
if (!SPECIAL_CONST_P(recv)) {
|
2637
|
+
if (RBASIC_CLASS(recv) == rb_cArray && BASIC_OP_UNREDEFINED_P(BOP_ASET, ARRAY_REDEFINED_OP_FLAG) && FIXNUM_P(obj)) {
|
2638
|
+
rb_ary_store(recv, FIX2LONG(obj), set);
|
2639
|
+
val = set;
|
2640
|
+
}
|
2641
|
+
else if (RBASIC_CLASS(recv) == rb_cHash && BASIC_OP_UNREDEFINED_P(BOP_ASET, HASH_REDEFINED_OP_FLAG)) {
|
2642
|
+
rb_hash_aset(recv, obj, set);
|
2643
|
+
val = set;
|
2644
|
+
}
|
2645
|
+
else {
|
2646
|
+
goto INSN_LABEL(normal_dispatch);
|
2647
|
+
}
|
2648
|
+
}
|
2649
|
+
else {
|
2650
|
+
INSN_LABEL(normal_dispatch):
|
2651
|
+
PUSH(recv);
|
2652
|
+
PUSH(obj);
|
2653
|
+
PUSH(set);
|
2654
|
+
CALL_SIMPLE_METHOD(recv);
|
2655
|
+
}
|
2656
|
+
|
2657
|
+
#line 2658 "vm.inc"
|
2658
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2659
|
+
PUSH(val);
|
2660
|
+
#undef CURRENT_INSN_opt_aset
|
2661
|
+
#undef INSN_IS_SC
|
2662
|
+
#undef INSN_LABEL
|
2663
|
+
#undef LABEL_IS_SC
|
2664
|
+
END_INSN(opt_aset);}}}
|
2665
|
+
INSN_ENTRY(opt_length){
|
2666
|
+
{
|
2667
|
+
VALUE val;
|
2668
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2669
|
+
VALUE recv = TOPN(0);
|
2670
|
+
DEBUG_ENTER_INSN("opt_length");
|
2671
|
+
ADD_PC(1+1);
|
2672
|
+
PREFETCH(GET_PC());
|
2673
|
+
POPN(1);
|
2674
|
+
#define CURRENT_INSN_opt_length 1
|
2675
|
+
#define INSN_IS_SC() 0
|
2676
|
+
#define INSN_LABEL(lab) LABEL_opt_length_##lab
|
2677
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2678
|
+
COLLECT_USAGE_INSN(BIN(opt_length));
|
2679
|
+
COLLECT_USAGE_OPERAND(BIN(opt_length), 0, ci);
|
2680
|
+
{
|
2681
|
+
#line 1913 "insns.def"
|
2682
|
+
if (!SPECIAL_CONST_P(recv)) {
|
2683
|
+
if (RBASIC_CLASS(recv) == rb_cString &&
|
2684
|
+
BASIC_OP_UNREDEFINED_P(BOP_LENGTH, STRING_REDEFINED_OP_FLAG)) {
|
2685
|
+
val = rb_str_length(recv);
|
2686
|
+
}
|
2687
|
+
else if (RBASIC_CLASS(recv) == rb_cArray &&
|
2688
|
+
BASIC_OP_UNREDEFINED_P(BOP_LENGTH, ARRAY_REDEFINED_OP_FLAG)) {
|
2689
|
+
val = LONG2NUM(RARRAY_LEN(recv));
|
2690
|
+
}
|
2691
|
+
else if (RBASIC_CLASS(recv) == rb_cHash &&
|
2692
|
+
BASIC_OP_UNREDEFINED_P(BOP_LENGTH, HASH_REDEFINED_OP_FLAG)) {
|
2693
|
+
val = INT2FIX(RHASH_SIZE(recv));
|
2694
|
+
}
|
2695
|
+
else {
|
2696
|
+
goto INSN_LABEL(normal_dispatch);
|
2697
|
+
}
|
2698
|
+
}
|
2699
|
+
else {
|
2700
|
+
INSN_LABEL(normal_dispatch):
|
2701
|
+
PUSH(recv);
|
2702
|
+
CALL_SIMPLE_METHOD(recv);
|
2703
|
+
}
|
2704
|
+
|
2705
|
+
#line 2706 "vm.inc"
|
2706
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2707
|
+
PUSH(val);
|
2708
|
+
#undef CURRENT_INSN_opt_length
|
2709
|
+
#undef INSN_IS_SC
|
2710
|
+
#undef INSN_LABEL
|
2711
|
+
#undef LABEL_IS_SC
|
2712
|
+
END_INSN(opt_length);}}}
|
2713
|
+
INSN_ENTRY(opt_size){
|
2714
|
+
{
|
2715
|
+
VALUE val;
|
2716
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2717
|
+
VALUE recv = TOPN(0);
|
2718
|
+
DEBUG_ENTER_INSN("opt_size");
|
2719
|
+
ADD_PC(1+1);
|
2720
|
+
PREFETCH(GET_PC());
|
2721
|
+
POPN(1);
|
2722
|
+
#define CURRENT_INSN_opt_size 1
|
2723
|
+
#define INSN_IS_SC() 0
|
2724
|
+
#define INSN_LABEL(lab) LABEL_opt_size_##lab
|
2725
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2726
|
+
COLLECT_USAGE_INSN(BIN(opt_size));
|
2727
|
+
COLLECT_USAGE_OPERAND(BIN(opt_size), 0, ci);
|
2728
|
+
{
|
2729
|
+
#line 1948 "insns.def"
|
2730
|
+
if (!SPECIAL_CONST_P(recv)) {
|
2731
|
+
if (RBASIC_CLASS(recv) == rb_cString &&
|
2732
|
+
BASIC_OP_UNREDEFINED_P(BOP_SIZE, STRING_REDEFINED_OP_FLAG)) {
|
2733
|
+
val = rb_str_length(recv);
|
2734
|
+
}
|
2735
|
+
else if (RBASIC_CLASS(recv) == rb_cArray &&
|
2736
|
+
BASIC_OP_UNREDEFINED_P(BOP_SIZE, ARRAY_REDEFINED_OP_FLAG)) {
|
2737
|
+
val = LONG2NUM(RARRAY_LEN(recv));
|
2738
|
+
}
|
2739
|
+
else if (RBASIC_CLASS(recv) == rb_cHash &&
|
2740
|
+
BASIC_OP_UNREDEFINED_P(BOP_SIZE, HASH_REDEFINED_OP_FLAG)) {
|
2741
|
+
val = INT2FIX(RHASH_SIZE(recv));
|
2742
|
+
}
|
2743
|
+
else {
|
2744
|
+
goto INSN_LABEL(normal_dispatch);
|
2745
|
+
}
|
2746
|
+
}
|
2747
|
+
else {
|
2748
|
+
INSN_LABEL(normal_dispatch):
|
2749
|
+
PUSH(recv);
|
2750
|
+
CALL_SIMPLE_METHOD(recv);
|
2751
|
+
}
|
2752
|
+
|
2753
|
+
#line 2754 "vm.inc"
|
2754
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2755
|
+
PUSH(val);
|
2756
|
+
#undef CURRENT_INSN_opt_size
|
2757
|
+
#undef INSN_IS_SC
|
2758
|
+
#undef INSN_LABEL
|
2759
|
+
#undef LABEL_IS_SC
|
2760
|
+
END_INSN(opt_size);}}}
|
2761
|
+
INSN_ENTRY(opt_empty_p){
|
2762
|
+
{
|
2763
|
+
VALUE val;
|
2764
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2765
|
+
VALUE recv = TOPN(0);
|
2766
|
+
DEBUG_ENTER_INSN("opt_empty_p");
|
2767
|
+
ADD_PC(1+1);
|
2768
|
+
PREFETCH(GET_PC());
|
2769
|
+
POPN(1);
|
2770
|
+
#define CURRENT_INSN_opt_empty_p 1
|
2771
|
+
#define INSN_IS_SC() 0
|
2772
|
+
#define INSN_LABEL(lab) LABEL_opt_empty_p_##lab
|
2773
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2774
|
+
COLLECT_USAGE_INSN(BIN(opt_empty_p));
|
2775
|
+
COLLECT_USAGE_OPERAND(BIN(opt_empty_p), 0, ci);
|
2776
|
+
{
|
2777
|
+
#line 1983 "insns.def"
|
2778
|
+
if (!SPECIAL_CONST_P(recv)) {
|
2779
|
+
if (RBASIC_CLASS(recv) == rb_cString &&
|
2780
|
+
BASIC_OP_UNREDEFINED_P(BOP_EMPTY_P, STRING_REDEFINED_OP_FLAG)) {
|
2781
|
+
if (RSTRING_LEN(recv) == 0) val = Qtrue;
|
2782
|
+
else val = Qfalse;
|
2783
|
+
}
|
2784
|
+
else if (RBASIC_CLASS(recv) == rb_cArray &&
|
2785
|
+
BASIC_OP_UNREDEFINED_P(BOP_EMPTY_P, ARRAY_REDEFINED_OP_FLAG)) {
|
2786
|
+
if (RARRAY_LEN(recv) == 0) val = Qtrue;
|
2787
|
+
else val = Qfalse;
|
2788
|
+
}
|
2789
|
+
else if (RBASIC_CLASS(recv) == rb_cHash &&
|
2790
|
+
BASIC_OP_UNREDEFINED_P(BOP_EMPTY_P, HASH_REDEFINED_OP_FLAG)) {
|
2791
|
+
if (RHASH_EMPTY_P(recv)) val = Qtrue;
|
2792
|
+
else val = Qfalse;
|
2793
|
+
}
|
2794
|
+
else {
|
2795
|
+
goto INSN_LABEL(normal_dispatch);
|
2796
|
+
}
|
2797
|
+
}
|
2798
|
+
else {
|
2799
|
+
INSN_LABEL(normal_dispatch):
|
2800
|
+
PUSH(recv);
|
2801
|
+
CALL_SIMPLE_METHOD(recv);
|
2802
|
+
}
|
2803
|
+
|
2804
|
+
#line 2805 "vm.inc"
|
2805
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2806
|
+
PUSH(val);
|
2807
|
+
#undef CURRENT_INSN_opt_empty_p
|
2808
|
+
#undef INSN_IS_SC
|
2809
|
+
#undef INSN_LABEL
|
2810
|
+
#undef LABEL_IS_SC
|
2811
|
+
END_INSN(opt_empty_p);}}}
|
2812
|
+
INSN_ENTRY(opt_succ){
|
2813
|
+
{
|
2814
|
+
VALUE val;
|
2815
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2816
|
+
VALUE recv = TOPN(0);
|
2817
|
+
DEBUG_ENTER_INSN("opt_succ");
|
2818
|
+
ADD_PC(1+1);
|
2819
|
+
PREFETCH(GET_PC());
|
2820
|
+
POPN(1);
|
2821
|
+
#define CURRENT_INSN_opt_succ 1
|
2822
|
+
#define INSN_IS_SC() 0
|
2823
|
+
#define INSN_LABEL(lab) LABEL_opt_succ_##lab
|
2824
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2825
|
+
COLLECT_USAGE_INSN(BIN(opt_succ));
|
2826
|
+
COLLECT_USAGE_OPERAND(BIN(opt_succ), 0, ci);
|
2827
|
+
{
|
2828
|
+
#line 2021 "insns.def"
|
2829
|
+
if (SPECIAL_CONST_P(recv)) {
|
2830
|
+
if (FIXNUM_P(recv) &&
|
2831
|
+
BASIC_OP_UNREDEFINED_P(BOP_SUCC, FIXNUM_REDEFINED_OP_FLAG)) {
|
2832
|
+
const VALUE obj = INT2FIX(1);
|
2833
|
+
/* fixnum + INT2FIX(1) */
|
2834
|
+
val = (recv + (obj & (~1)));
|
2835
|
+
if ((~(recv ^ obj) & (recv ^ val)) & ((unsigned long)LONG_MAX + 1)) {
|
2836
|
+
val = rb_big_plus(rb_int2big(FIX2LONG(recv)),
|
2837
|
+
rb_int2big(FIX2LONG(obj)));
|
2838
|
+
}
|
2839
|
+
}
|
2840
|
+
else {
|
2841
|
+
goto INSN_LABEL(normal_dispatch);
|
2842
|
+
}
|
2843
|
+
}
|
2844
|
+
else {
|
2845
|
+
if (RBASIC_CLASS(recv) == rb_cString &&
|
2846
|
+
BASIC_OP_UNREDEFINED_P(BOP_SUCC, STRING_REDEFINED_OP_FLAG)) {
|
2847
|
+
val = rb_str_succ(recv);
|
2848
|
+
}
|
2849
|
+
else if (RBASIC_CLASS(recv) == rb_cTime &&
|
2850
|
+
BASIC_OP_UNREDEFINED_P(BOP_SUCC, TIME_REDEFINED_OP_FLAG)) {
|
2851
|
+
val = rb_time_succ(recv);
|
2852
|
+
}
|
2853
|
+
else
|
2854
|
+
{
|
2855
|
+
goto INSN_LABEL(normal_dispatch);
|
2856
|
+
}
|
2857
|
+
}
|
2858
|
+
if (0) {
|
2859
|
+
INSN_LABEL(normal_dispatch):
|
2860
|
+
PUSH(recv);
|
2861
|
+
CALL_SIMPLE_METHOD(recv);
|
2862
|
+
}
|
2863
|
+
|
2864
|
+
#line 2865 "vm.inc"
|
2865
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2866
|
+
PUSH(val);
|
2867
|
+
#undef CURRENT_INSN_opt_succ
|
2868
|
+
#undef INSN_IS_SC
|
2869
|
+
#undef INSN_LABEL
|
2870
|
+
#undef LABEL_IS_SC
|
2871
|
+
END_INSN(opt_succ);}}}
|
2872
|
+
INSN_ENTRY(opt_not){
|
2873
|
+
{
|
2874
|
+
VALUE val;
|
2875
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2876
|
+
VALUE recv = TOPN(0);
|
2877
|
+
DEBUG_ENTER_INSN("opt_not");
|
2878
|
+
ADD_PC(1+1);
|
2879
|
+
PREFETCH(GET_PC());
|
2880
|
+
POPN(1);
|
2881
|
+
#define CURRENT_INSN_opt_not 1
|
2882
|
+
#define INSN_IS_SC() 0
|
2883
|
+
#define INSN_LABEL(lab) LABEL_opt_not_##lab
|
2884
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2885
|
+
COLLECT_USAGE_INSN(BIN(opt_not));
|
2886
|
+
COLLECT_USAGE_OPERAND(BIN(opt_not), 0, ci);
|
2887
|
+
{
|
2888
|
+
#line 2068 "insns.def"
|
2889
|
+
extern VALUE rb_obj_not(VALUE obj);
|
2890
|
+
vm_search_method(ci, recv);
|
2891
|
+
|
2892
|
+
if (check_cfunc(ci->me, rb_obj_not)) {
|
2893
|
+
val = RTEST(recv) ? Qfalse : Qtrue;
|
2894
|
+
}
|
2895
|
+
else {
|
2896
|
+
PUSH(recv);
|
2897
|
+
CALL_SIMPLE_METHOD(recv);
|
2898
|
+
}
|
2899
|
+
|
2900
|
+
#line 2901 "vm.inc"
|
2901
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2902
|
+
PUSH(val);
|
2903
|
+
#undef CURRENT_INSN_opt_not
|
2904
|
+
#undef INSN_IS_SC
|
2905
|
+
#undef INSN_LABEL
|
2906
|
+
#undef LABEL_IS_SC
|
2907
|
+
END_INSN(opt_not);}}}
|
2908
|
+
INSN_ENTRY(opt_regexpmatch1){
|
2909
|
+
{
|
2910
|
+
VALUE val;
|
2911
|
+
VALUE r = (VALUE)GET_OPERAND(1);
|
2912
|
+
VALUE obj = TOPN(0);
|
2913
|
+
DEBUG_ENTER_INSN("opt_regexpmatch1");
|
2914
|
+
ADD_PC(1+1);
|
2915
|
+
PREFETCH(GET_PC());
|
2916
|
+
POPN(1);
|
2917
|
+
#define CURRENT_INSN_opt_regexpmatch1 1
|
2918
|
+
#define INSN_IS_SC() 0
|
2919
|
+
#define INSN_LABEL(lab) LABEL_opt_regexpmatch1_##lab
|
2920
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2921
|
+
COLLECT_USAGE_INSN(BIN(opt_regexpmatch1));
|
2922
|
+
COLLECT_USAGE_OPERAND(BIN(opt_regexpmatch1), 0, r);
|
2923
|
+
{
|
2924
|
+
#line 2092 "insns.def"
|
2925
|
+
if (BASIC_OP_UNREDEFINED_P(BOP_MATCH, REGEXP_REDEFINED_OP_FLAG)) {
|
2926
|
+
val = rb_reg_match(r, obj);
|
2927
|
+
} else {
|
2928
|
+
val = rb_funcall(r, idEqTilde, 1, obj);
|
2929
|
+
}
|
2930
|
+
|
2931
|
+
#line 2932 "vm.inc"
|
2932
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2933
|
+
PUSH(val);
|
2934
|
+
#undef CURRENT_INSN_opt_regexpmatch1
|
2935
|
+
#undef INSN_IS_SC
|
2936
|
+
#undef INSN_LABEL
|
2937
|
+
#undef LABEL_IS_SC
|
2938
|
+
END_INSN(opt_regexpmatch1);}}}
|
2939
|
+
INSN_ENTRY(opt_regexpmatch2){
|
2940
|
+
{
|
2941
|
+
VALUE val;
|
2942
|
+
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2943
|
+
VALUE obj2 = TOPN(1);
|
2944
|
+
VALUE obj1 = TOPN(0);
|
2945
|
+
DEBUG_ENTER_INSN("opt_regexpmatch2");
|
2946
|
+
ADD_PC(1+1);
|
2947
|
+
PREFETCH(GET_PC());
|
2948
|
+
POPN(2);
|
2949
|
+
#define CURRENT_INSN_opt_regexpmatch2 1
|
2950
|
+
#define INSN_IS_SC() 0
|
2951
|
+
#define INSN_LABEL(lab) LABEL_opt_regexpmatch2_##lab
|
2952
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2953
|
+
COLLECT_USAGE_INSN(BIN(opt_regexpmatch2));
|
2954
|
+
COLLECT_USAGE_OPERAND(BIN(opt_regexpmatch2), 0, ci);
|
2955
|
+
{
|
2956
|
+
#line 2110 "insns.def"
|
2957
|
+
if (RB_TYPE_P(obj2, T_STRING) &&
|
2958
|
+
BASIC_OP_UNREDEFINED_P(BOP_MATCH, STRING_REDEFINED_OP_FLAG)) {
|
2959
|
+
val = rb_reg_match(obj1, obj2);
|
2960
|
+
}
|
2961
|
+
else {
|
2962
|
+
PUSH(obj2);
|
2963
|
+
PUSH(obj1);
|
2964
|
+
CALL_SIMPLE_METHOD(obj2);
|
2965
|
+
}
|
2966
|
+
|
2967
|
+
#line 2968 "vm.inc"
|
2968
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2969
|
+
PUSH(val);
|
2970
|
+
#undef CURRENT_INSN_opt_regexpmatch2
|
2971
|
+
#undef INSN_IS_SC
|
2972
|
+
#undef INSN_LABEL
|
2973
|
+
#undef LABEL_IS_SC
|
2974
|
+
END_INSN(opt_regexpmatch2);}}}
|
2975
|
+
INSN_ENTRY(opt_call_c_function){
|
2976
|
+
{
|
2977
|
+
rb_insn_func_t funcptr = (rb_insn_func_t)GET_OPERAND(1);
|
2978
|
+
|
2979
|
+
DEBUG_ENTER_INSN("opt_call_c_function");
|
2980
|
+
ADD_PC(1+1);
|
2981
|
+
PREFETCH(GET_PC());
|
2982
|
+
#define CURRENT_INSN_opt_call_c_function 1
|
2983
|
+
#define INSN_IS_SC() 0
|
2984
|
+
#define INSN_LABEL(lab) LABEL_opt_call_c_function_##lab
|
2985
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2986
|
+
COLLECT_USAGE_INSN(BIN(opt_call_c_function));
|
2987
|
+
COLLECT_USAGE_OPERAND(BIN(opt_call_c_function), 0, funcptr);
|
2988
|
+
{
|
2989
|
+
#line 2132 "insns.def"
|
2990
|
+
reg_cfp = (funcptr)(th, reg_cfp);
|
2991
|
+
|
2992
|
+
if (reg_cfp == 0) {
|
2993
|
+
VALUE err = th->errinfo;
|
2994
|
+
th->errinfo = Qnil;
|
2995
|
+
THROW_EXCEPTION(err);
|
2996
|
+
}
|
2997
|
+
|
2998
|
+
RESTORE_REGS();
|
2999
|
+
NEXT_INSN();
|
3000
|
+
|
3001
|
+
#line 3002 "vm.inc"
|
3002
|
+
#undef CURRENT_INSN_opt_call_c_function
|
3003
|
+
#undef INSN_IS_SC
|
3004
|
+
#undef INSN_LABEL
|
3005
|
+
#undef LABEL_IS_SC
|
3006
|
+
END_INSN(opt_call_c_function);}}}
|
3007
|
+
INSN_ENTRY(bitblt){
|
3008
|
+
{
|
3009
|
+
VALUE ret;
|
3010
|
+
|
3011
|
+
|
3012
|
+
DEBUG_ENTER_INSN("bitblt");
|
3013
|
+
ADD_PC(1+0);
|
3014
|
+
PREFETCH(GET_PC());
|
3015
|
+
#define CURRENT_INSN_bitblt 1
|
3016
|
+
#define INSN_IS_SC() 0
|
3017
|
+
#define INSN_LABEL(lab) LABEL_bitblt_##lab
|
3018
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3019
|
+
COLLECT_USAGE_INSN(BIN(bitblt));
|
3020
|
+
{
|
3021
|
+
#line 2155 "insns.def"
|
3022
|
+
ret = rb_str_new2("a bit of bacon, lettuce and tomato");
|
3023
|
+
|
3024
|
+
#line 3025 "vm.inc"
|
3025
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3026
|
+
PUSH(ret);
|
3027
|
+
#undef CURRENT_INSN_bitblt
|
3028
|
+
#undef INSN_IS_SC
|
3029
|
+
#undef INSN_LABEL
|
3030
|
+
#undef LABEL_IS_SC
|
3031
|
+
END_INSN(bitblt);}}}
|
3032
|
+
INSN_ENTRY(answer){
|
3033
|
+
{
|
3034
|
+
VALUE ret;
|
3035
|
+
|
3036
|
+
|
3037
|
+
DEBUG_ENTER_INSN("answer");
|
3038
|
+
ADD_PC(1+0);
|
3039
|
+
PREFETCH(GET_PC());
|
3040
|
+
#define CURRENT_INSN_answer 1
|
3041
|
+
#define INSN_IS_SC() 0
|
3042
|
+
#define INSN_LABEL(lab) LABEL_answer_##lab
|
3043
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3044
|
+
COLLECT_USAGE_INSN(BIN(answer));
|
3045
|
+
{
|
3046
|
+
#line 2169 "insns.def"
|
3047
|
+
ret = INT2FIX(42);
|
3048
|
+
|
3049
|
+
#line 3050 "vm.inc"
|
3050
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3051
|
+
PUSH(ret);
|
3052
|
+
#undef CURRENT_INSN_answer
|
3053
|
+
#undef INSN_IS_SC
|
3054
|
+
#undef INSN_LABEL
|
3055
|
+
#undef LABEL_IS_SC
|
3056
|
+
END_INSN(answer);}}}
|
3057
|
+
INSN_ENTRY(getlocal_OP__WC__0){
|
3058
|
+
{
|
3059
|
+
VALUE val;
|
3060
|
+
#define level 0
|
3061
|
+
lindex_t idx = (lindex_t)GET_OPERAND(1);
|
3062
|
+
|
3063
|
+
DEBUG_ENTER_INSN("getlocal_OP__WC__0");
|
3064
|
+
ADD_PC(1+1);
|
3065
|
+
PREFETCH(GET_PC());
|
3066
|
+
#define CURRENT_INSN_getlocal_OP__WC__0 1
|
3067
|
+
#define INSN_IS_SC() 0
|
3068
|
+
#define INSN_LABEL(lab) LABEL_getlocal_OP__WC__0_##lab
|
3069
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3070
|
+
COLLECT_USAGE_INSN(BIN(getlocal_OP__WC__0));
|
3071
|
+
COLLECT_USAGE_OPERAND(BIN(getlocal_OP__WC__0), 0, idx);
|
3072
|
+
{
|
3073
|
+
#line 60 "insns.def"
|
3074
|
+
int i, lev = (int)level;
|
3075
|
+
VALUE *ep = GET_EP();
|
3076
|
+
|
3077
|
+
for (i = 0; i < lev; i++) {
|
3078
|
+
ep = GET_PREV_EP(ep);
|
3079
|
+
}
|
3080
|
+
val = *(ep - idx);
|
3081
|
+
|
3082
|
+
#line 3083 "vm.inc"
|
3083
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3084
|
+
PUSH(val);
|
3085
|
+
#undef level
|
3086
|
+
#undef CURRENT_INSN_getlocal_OP__WC__0
|
3087
|
+
#undef INSN_IS_SC
|
3088
|
+
#undef INSN_LABEL
|
3089
|
+
#undef LABEL_IS_SC
|
3090
|
+
END_INSN(getlocal_OP__WC__0);}}}
|
3091
|
+
INSN_ENTRY(getlocal_OP__WC__1){
|
3092
|
+
{
|
3093
|
+
VALUE val;
|
3094
|
+
#define level 1
|
3095
|
+
lindex_t idx = (lindex_t)GET_OPERAND(1);
|
3096
|
+
|
3097
|
+
DEBUG_ENTER_INSN("getlocal_OP__WC__1");
|
3098
|
+
ADD_PC(1+1);
|
3099
|
+
PREFETCH(GET_PC());
|
3100
|
+
#define CURRENT_INSN_getlocal_OP__WC__1 1
|
3101
|
+
#define INSN_IS_SC() 0
|
3102
|
+
#define INSN_LABEL(lab) LABEL_getlocal_OP__WC__1_##lab
|
3103
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3104
|
+
COLLECT_USAGE_INSN(BIN(getlocal_OP__WC__1));
|
3105
|
+
COLLECT_USAGE_OPERAND(BIN(getlocal_OP__WC__1), 0, idx);
|
3106
|
+
{
|
3107
|
+
#line 60 "insns.def"
|
3108
|
+
int i, lev = (int)level;
|
3109
|
+
VALUE *ep = GET_EP();
|
3110
|
+
|
3111
|
+
for (i = 0; i < lev; i++) {
|
3112
|
+
ep = GET_PREV_EP(ep);
|
3113
|
+
}
|
3114
|
+
val = *(ep - idx);
|
3115
|
+
|
3116
|
+
#line 3117 "vm.inc"
|
3117
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3118
|
+
PUSH(val);
|
3119
|
+
#undef level
|
3120
|
+
#undef CURRENT_INSN_getlocal_OP__WC__1
|
3121
|
+
#undef INSN_IS_SC
|
3122
|
+
#undef INSN_LABEL
|
3123
|
+
#undef LABEL_IS_SC
|
3124
|
+
END_INSN(getlocal_OP__WC__1);}}}
|
3125
|
+
INSN_ENTRY(setlocal_OP__WC__0){
|
3126
|
+
{
|
3127
|
+
#define level 0
|
3128
|
+
lindex_t idx = (lindex_t)GET_OPERAND(1);
|
3129
|
+
VALUE val = TOPN(0);
|
3130
|
+
DEBUG_ENTER_INSN("setlocal_OP__WC__0");
|
3131
|
+
ADD_PC(1+1);
|
3132
|
+
PREFETCH(GET_PC());
|
3133
|
+
POPN(1);
|
3134
|
+
#define CURRENT_INSN_setlocal_OP__WC__0 1
|
3135
|
+
#define INSN_IS_SC() 0
|
3136
|
+
#define INSN_LABEL(lab) LABEL_setlocal_OP__WC__0_##lab
|
3137
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3138
|
+
COLLECT_USAGE_INSN(BIN(setlocal_OP__WC__0));
|
3139
|
+
COLLECT_USAGE_OPERAND(BIN(setlocal_OP__WC__0), 0, idx);
|
3140
|
+
{
|
3141
|
+
#line 82 "insns.def"
|
3142
|
+
int i, lev = (int)level;
|
3143
|
+
VALUE *ep = GET_EP();
|
3144
|
+
|
3145
|
+
for (i = 0; i < lev; i++) {
|
3146
|
+
ep = GET_PREV_EP(ep);
|
3147
|
+
}
|
3148
|
+
*(ep - idx) = val;
|
3149
|
+
|
3150
|
+
#line 3151 "vm.inc"
|
3151
|
+
#undef level
|
3152
|
+
#undef CURRENT_INSN_setlocal_OP__WC__0
|
3153
|
+
#undef INSN_IS_SC
|
3154
|
+
#undef INSN_LABEL
|
3155
|
+
#undef LABEL_IS_SC
|
3156
|
+
END_INSN(setlocal_OP__WC__0);}}}
|
3157
|
+
INSN_ENTRY(setlocal_OP__WC__1){
|
3158
|
+
{
|
3159
|
+
#define level 1
|
3160
|
+
lindex_t idx = (lindex_t)GET_OPERAND(1);
|
3161
|
+
VALUE val = TOPN(0);
|
3162
|
+
DEBUG_ENTER_INSN("setlocal_OP__WC__1");
|
3163
|
+
ADD_PC(1+1);
|
3164
|
+
PREFETCH(GET_PC());
|
3165
|
+
POPN(1);
|
3166
|
+
#define CURRENT_INSN_setlocal_OP__WC__1 1
|
3167
|
+
#define INSN_IS_SC() 0
|
3168
|
+
#define INSN_LABEL(lab) LABEL_setlocal_OP__WC__1_##lab
|
3169
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3170
|
+
COLLECT_USAGE_INSN(BIN(setlocal_OP__WC__1));
|
3171
|
+
COLLECT_USAGE_OPERAND(BIN(setlocal_OP__WC__1), 0, idx);
|
3172
|
+
{
|
3173
|
+
#line 82 "insns.def"
|
3174
|
+
int i, lev = (int)level;
|
3175
|
+
VALUE *ep = GET_EP();
|
3176
|
+
|
3177
|
+
for (i = 0; i < lev; i++) {
|
3178
|
+
ep = GET_PREV_EP(ep);
|
3179
|
+
}
|
3180
|
+
*(ep - idx) = val;
|
3181
|
+
|
3182
|
+
#line 3183 "vm.inc"
|
3183
|
+
#undef level
|
3184
|
+
#undef CURRENT_INSN_setlocal_OP__WC__1
|
3185
|
+
#undef INSN_IS_SC
|
3186
|
+
#undef INSN_LABEL
|
3187
|
+
#undef LABEL_IS_SC
|
3188
|
+
END_INSN(setlocal_OP__WC__1);}}}
|
3189
|
+
INSN_ENTRY(putobject_OP_INT2FIX_O_0_C_){
|
3190
|
+
{
|
3191
|
+
#define val INT2FIX(0)
|
3192
|
+
|
3193
|
+
|
3194
|
+
DEBUG_ENTER_INSN("putobject_OP_INT2FIX_O_0_C_");
|
3195
|
+
ADD_PC(1+0);
|
3196
|
+
PREFETCH(GET_PC());
|
3197
|
+
#define CURRENT_INSN_putobject_OP_INT2FIX_O_0_C_ 1
|
3198
|
+
#define INSN_IS_SC() 0
|
3199
|
+
#define INSN_LABEL(lab) LABEL_putobject_OP_INT2FIX_O_0_C__##lab
|
3200
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3201
|
+
COLLECT_USAGE_INSN(BIN(putobject_OP_INT2FIX_O_0_C_));
|
3202
|
+
{
|
3203
|
+
#line 297 "insns.def"
|
3204
|
+
/* */
|
3205
|
+
|
3206
|
+
#line 3207 "vm.inc"
|
3207
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3208
|
+
PUSH(val);
|
3209
|
+
#undef val
|
3210
|
+
#undef CURRENT_INSN_putobject_OP_INT2FIX_O_0_C_
|
3211
|
+
#undef INSN_IS_SC
|
3212
|
+
#undef INSN_LABEL
|
3213
|
+
#undef LABEL_IS_SC
|
3214
|
+
END_INSN(putobject_OP_INT2FIX_O_0_C_);}}}
|
3215
|
+
INSN_ENTRY(putobject_OP_INT2FIX_O_1_C_){
|
3216
|
+
{
|
3217
|
+
#define val INT2FIX(1)
|
3218
|
+
|
3219
|
+
|
3220
|
+
DEBUG_ENTER_INSN("putobject_OP_INT2FIX_O_1_C_");
|
3221
|
+
ADD_PC(1+0);
|
3222
|
+
PREFETCH(GET_PC());
|
3223
|
+
#define CURRENT_INSN_putobject_OP_INT2FIX_O_1_C_ 1
|
3224
|
+
#define INSN_IS_SC() 0
|
3225
|
+
#define INSN_LABEL(lab) LABEL_putobject_OP_INT2FIX_O_1_C__##lab
|
3226
|
+
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3227
|
+
COLLECT_USAGE_INSN(BIN(putobject_OP_INT2FIX_O_1_C_));
|
3228
|
+
{
|
3229
|
+
#line 297 "insns.def"
|
3230
|
+
/* */
|
3231
|
+
|
3232
|
+
#line 3233 "vm.inc"
|
3233
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3234
|
+
PUSH(val);
|
3235
|
+
#undef val
|
3236
|
+
#undef CURRENT_INSN_putobject_OP_INT2FIX_O_1_C_
|
3237
|
+
#undef INSN_IS_SC
|
3238
|
+
#undef INSN_LABEL
|
3239
|
+
#undef LABEL_IS_SC
|
3240
|
+
END_INSN(putobject_OP_INT2FIX_O_1_C_);}}}
|
3241
|
+
|