debase-ruby_core_source 0.8.2 → 0.8.3

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