rubinius-compiler 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rubinius/compiler/compiled_file.rb +2 -1
- data/lib/rubinius/compiler/compiler.rb +1 -1
- data/lib/rubinius/compiler/evaluator.rb +1 -1
- data/lib/rubinius/compiler/generator.rb +10 -2
- data/lib/rubinius/compiler/generator_methods.rb +272 -188
- data/lib/rubinius/compiler/locals.rb +1 -1
- data/lib/rubinius/compiler/opcodes.rb +100 -94
- data/lib/rubinius/compiler/printers.rb +1 -1
- data/lib/rubinius/compiler/runtime.rb +1 -1
- data/lib/rubinius/compiler/stages.rb +6 -6
- data/lib/rubinius/compiler/version.rb +2 -2
- data/rubinius-compiler.gemspec +1 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6461765caf933c9880b40e98a8212492ebc5cd6f
|
4
|
+
data.tar.gz: 0760ffd4804e13684075b96bcf12b61034cb17b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f9a3f9e7ec313ee71137eb050c115b1c8cb4ea038e6260fb82a451d5a24a6df27e04b9790d16f70f82e5b17d802105fcd02f135957ebb24b94dc0e3de49a632
|
7
|
+
data.tar.gz: 1af62c1104bdf5b796c3ca3a3b0bfb9f36930ba85297700fa88012ba2f9669ca4709609939531c9ef93e5aae0d0c3f8eb62d4c2f31b0224b04f82e809359b120
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: us-ascii -*-
|
2
2
|
|
3
|
-
module
|
3
|
+
module CodeTools
|
4
4
|
##
|
5
5
|
# A decode for the .rbc file format.
|
6
6
|
|
@@ -294,6 +294,7 @@ module Rubinius::ToolSets.current::ToolSet
|
|
294
294
|
str.append marshal(val.required_args)
|
295
295
|
str.append marshal(val.total_args)
|
296
296
|
str.append marshal(val.splat)
|
297
|
+
str.append marshal(val.arity)
|
297
298
|
str.append marshal(val.literals)
|
298
299
|
str.append marshal(val.lines)
|
299
300
|
str.append marshal(val.file)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: us-ascii -*-
|
2
2
|
|
3
|
-
module
|
3
|
+
module CodeTools
|
4
4
|
class Generator
|
5
5
|
include GeneratorMethods
|
6
6
|
|
@@ -261,6 +261,7 @@ module Rubinius::ToolSets.current::ToolSet
|
|
261
261
|
@required_args = 0
|
262
262
|
@post_args = 0
|
263
263
|
@total_args = 0
|
264
|
+
@arity = 0
|
264
265
|
|
265
266
|
@detected_args = 0
|
266
267
|
@detected_locals = 0
|
@@ -285,7 +286,7 @@ module Rubinius::ToolSets.current::ToolSet
|
|
285
286
|
:required_args, :post_args, :total_args, :splat_index,
|
286
287
|
:local_count, :local_names, :primitive, :for_block, :for_module_body,
|
287
288
|
:current_block, :detected_args, :detected_locals,
|
288
|
-
:block_index
|
289
|
+
:block_index, :arity
|
289
290
|
|
290
291
|
def execute(node)
|
291
292
|
node.bytecode self
|
@@ -324,6 +325,7 @@ module Rubinius::ToolSets.current::ToolSet
|
|
324
325
|
code.total_args = @total_args
|
325
326
|
code.splat = @splat_index
|
326
327
|
code.block_index = @block_index
|
328
|
+
code.arity = @arity
|
327
329
|
code.local_count = @local_count
|
328
330
|
code.local_names = @local_names.to_tuple if @local_names
|
329
331
|
|
@@ -448,6 +450,12 @@ module Rubinius::ToolSets.current::ToolSet
|
|
448
450
|
alias_method :dup, :dup_top
|
449
451
|
alias_method :git, :goto_if_true
|
450
452
|
alias_method :gif, :goto_if_false
|
453
|
+
alias_method :gin, :goto_if_nil
|
454
|
+
alias_method :ginn, :goto_if_not_nil
|
455
|
+
alias_method :giu, :goto_if_undefined
|
456
|
+
alias_method :ginu, :goto_if_not_undefined
|
457
|
+
alias_method :gie, :goto_if_equal
|
458
|
+
alias_method :gine, :goto_if_not_equal
|
451
459
|
alias_method :swap, :swap_stack
|
452
460
|
|
453
461
|
# Helpers
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# *** This file is generated by InstructionParser ***
|
2
2
|
|
3
|
-
module
|
3
|
+
module CodeTools
|
4
4
|
module GeneratorMethods
|
5
5
|
def noop
|
6
6
|
@stream << 0
|
@@ -113,139 +113,223 @@ module Rubinius::ToolSets.current::ToolSet
|
|
113
113
|
@instruction = 10
|
114
114
|
end
|
115
115
|
|
116
|
+
def goto_if_nil(arg1)
|
117
|
+
location = @ip + 1
|
118
|
+
@stream << 11 << arg1
|
119
|
+
@ip += 2
|
120
|
+
arg1.used_at location
|
121
|
+
@current_block.add_stack(1, 0)
|
122
|
+
@current_block.left = arg1.basic_block
|
123
|
+
@current_block.close
|
124
|
+
block = new_basic_block
|
125
|
+
@current_block.right = block
|
126
|
+
@current_block = block
|
127
|
+
@instruction = 11
|
128
|
+
end
|
129
|
+
|
130
|
+
def goto_if_not_nil(arg1)
|
131
|
+
location = @ip + 1
|
132
|
+
@stream << 12 << arg1
|
133
|
+
@ip += 2
|
134
|
+
arg1.used_at location
|
135
|
+
@current_block.add_stack(1, 0)
|
136
|
+
@current_block.left = arg1.basic_block
|
137
|
+
@current_block.close
|
138
|
+
block = new_basic_block
|
139
|
+
@current_block.right = block
|
140
|
+
@current_block = block
|
141
|
+
@instruction = 12
|
142
|
+
end
|
143
|
+
|
144
|
+
def goto_if_undefined(arg1)
|
145
|
+
location = @ip + 1
|
146
|
+
@stream << 13 << arg1
|
147
|
+
@ip += 2
|
148
|
+
arg1.used_at location
|
149
|
+
@current_block.add_stack(1, 0)
|
150
|
+
@current_block.left = arg1.basic_block
|
151
|
+
@current_block.close
|
152
|
+
block = new_basic_block
|
153
|
+
@current_block.right = block
|
154
|
+
@current_block = block
|
155
|
+
@instruction = 13
|
156
|
+
end
|
157
|
+
|
158
|
+
def goto_if_not_undefined(arg1)
|
159
|
+
location = @ip + 1
|
160
|
+
@stream << 14 << arg1
|
161
|
+
@ip += 2
|
162
|
+
arg1.used_at location
|
163
|
+
@current_block.add_stack(1, 0)
|
164
|
+
@current_block.left = arg1.basic_block
|
165
|
+
@current_block.close
|
166
|
+
block = new_basic_block
|
167
|
+
@current_block.right = block
|
168
|
+
@current_block = block
|
169
|
+
@instruction = 14
|
170
|
+
end
|
171
|
+
|
172
|
+
def goto_if_equal(arg1)
|
173
|
+
location = @ip + 1
|
174
|
+
@stream << 15 << arg1
|
175
|
+
@ip += 2
|
176
|
+
arg1.used_at location
|
177
|
+
@current_block.add_stack(2, 0)
|
178
|
+
@current_block.left = arg1.basic_block
|
179
|
+
@current_block.close
|
180
|
+
block = new_basic_block
|
181
|
+
@current_block.right = block
|
182
|
+
@current_block = block
|
183
|
+
@instruction = 15
|
184
|
+
end
|
185
|
+
|
186
|
+
def goto_if_not_equal(arg1)
|
187
|
+
location = @ip + 1
|
188
|
+
@stream << 16 << arg1
|
189
|
+
@ip += 2
|
190
|
+
arg1.used_at location
|
191
|
+
@current_block.add_stack(2, 0)
|
192
|
+
@current_block.left = arg1.basic_block
|
193
|
+
@current_block.close
|
194
|
+
block = new_basic_block
|
195
|
+
@current_block.right = block
|
196
|
+
@current_block = block
|
197
|
+
@instruction = 16
|
198
|
+
end
|
199
|
+
|
116
200
|
def ret
|
117
|
-
@stream <<
|
201
|
+
@stream << 17
|
118
202
|
@ip += 1
|
119
203
|
@current_block.add_stack(1, 1)
|
120
204
|
@current_block.close true
|
121
205
|
@current_block = new_basic_block
|
122
|
-
@instruction =
|
206
|
+
@instruction = 17
|
123
207
|
end
|
124
208
|
|
125
209
|
def swap_stack
|
126
|
-
@stream <<
|
210
|
+
@stream << 18
|
127
211
|
@ip += 1
|
128
212
|
@current_block.add_stack(2, 2)
|
129
|
-
@instruction =
|
213
|
+
@instruction = 18
|
130
214
|
end
|
131
215
|
|
132
216
|
def dup_top
|
133
|
-
@stream <<
|
217
|
+
@stream << 19
|
134
218
|
@ip += 1
|
135
219
|
@current_block.add_stack(1, 2)
|
136
|
-
@instruction =
|
220
|
+
@instruction = 19
|
137
221
|
end
|
138
222
|
|
139
223
|
def dup_many(arg1)
|
140
|
-
@stream <<
|
224
|
+
@stream << 20 << arg1
|
141
225
|
@ip += 2
|
142
226
|
@current_block.add_stack(arg1, (arg1 * 2))
|
143
|
-
@instruction =
|
227
|
+
@instruction = 20
|
144
228
|
end
|
145
229
|
|
146
230
|
def pop
|
147
|
-
@stream <<
|
231
|
+
@stream << 21
|
148
232
|
@ip += 1
|
149
233
|
@current_block.add_stack(1, 0)
|
150
|
-
@instruction =
|
234
|
+
@instruction = 21
|
151
235
|
end
|
152
236
|
|
153
237
|
def pop_many(arg1)
|
154
|
-
@stream <<
|
238
|
+
@stream << 22 << arg1
|
155
239
|
@ip += 2
|
156
240
|
@current_block.add_stack(arg1, 0)
|
157
|
-
@instruction =
|
241
|
+
@instruction = 22
|
158
242
|
end
|
159
243
|
|
160
244
|
def rotate(arg1)
|
161
|
-
@stream <<
|
245
|
+
@stream << 23 << arg1
|
162
246
|
@ip += 2
|
163
247
|
@current_block.add_stack(arg1, (arg1 * 1))
|
164
|
-
@instruction =
|
248
|
+
@instruction = 23
|
165
249
|
end
|
166
250
|
|
167
251
|
def move_down(arg1)
|
168
|
-
@stream <<
|
252
|
+
@stream << 24 << arg1
|
169
253
|
@ip += 2
|
170
254
|
@current_block.add_stack(arg1, (arg1 * 1))
|
171
|
-
@instruction =
|
255
|
+
@instruction = 24
|
172
256
|
end
|
173
257
|
|
174
258
|
def set_local(arg1)
|
175
|
-
@stream <<
|
259
|
+
@stream << 25 << arg1
|
176
260
|
@ip += 2
|
177
261
|
@current_block.add_stack(1, 1)
|
178
|
-
@instruction =
|
262
|
+
@instruction = 25
|
179
263
|
end
|
180
264
|
|
181
265
|
def push_local(arg1)
|
182
|
-
@stream <<
|
266
|
+
@stream << 26 << arg1
|
183
267
|
@ip += 2
|
184
268
|
@current_block.add_stack(0, 1)
|
185
|
-
@instruction =
|
269
|
+
@instruction = 26
|
186
270
|
end
|
187
271
|
|
188
272
|
def push_local_depth(arg1, arg2)
|
189
|
-
@stream <<
|
273
|
+
@stream << 27 << arg1 << arg2
|
190
274
|
@ip += 3
|
191
275
|
@current_block.add_stack(0, 1)
|
192
|
-
@instruction =
|
276
|
+
@instruction = 27
|
193
277
|
end
|
194
278
|
|
195
279
|
def set_local_depth(arg1, arg2)
|
196
|
-
@stream <<
|
280
|
+
@stream << 28 << arg1 << arg2
|
197
281
|
@ip += 3
|
198
282
|
@current_block.add_stack(1, 1)
|
199
|
-
@instruction =
|
283
|
+
@instruction = 28
|
200
284
|
end
|
201
285
|
|
202
286
|
def passed_arg(arg1)
|
203
|
-
@stream <<
|
287
|
+
@stream << 29 << arg1
|
204
288
|
@ip += 2
|
205
289
|
@current_block.add_stack(0, 1)
|
206
|
-
@instruction =
|
290
|
+
@instruction = 29
|
207
291
|
end
|
208
292
|
|
209
293
|
def push_current_exception
|
210
|
-
@stream <<
|
294
|
+
@stream << 30
|
211
295
|
@ip += 1
|
212
296
|
@current_block.add_stack(0, 1)
|
213
|
-
@instruction =
|
297
|
+
@instruction = 30
|
214
298
|
end
|
215
299
|
|
216
300
|
def clear_exception
|
217
|
-
@stream <<
|
301
|
+
@stream << 31
|
218
302
|
@ip += 1
|
219
303
|
@current_block.add_stack(0, 0)
|
220
|
-
@instruction =
|
304
|
+
@instruction = 31
|
221
305
|
end
|
222
306
|
|
223
307
|
def push_exception_state
|
224
|
-
@stream <<
|
308
|
+
@stream << 32
|
225
309
|
@ip += 1
|
226
310
|
@current_block.add_stack(0, 1)
|
227
|
-
@instruction =
|
311
|
+
@instruction = 32
|
228
312
|
end
|
229
313
|
|
230
314
|
def restore_exception_state
|
231
|
-
@stream <<
|
315
|
+
@stream << 33
|
232
316
|
@ip += 1
|
233
317
|
@current_block.add_stack(1, 0)
|
234
|
-
@instruction =
|
318
|
+
@instruction = 33
|
235
319
|
end
|
236
320
|
|
237
321
|
def raise_exc
|
238
|
-
@stream <<
|
322
|
+
@stream << 34
|
239
323
|
@ip += 1
|
240
324
|
@current_block.add_stack(1, 0)
|
241
325
|
@current_block.close false
|
242
326
|
@current_block = new_basic_block
|
243
|
-
@instruction =
|
327
|
+
@instruction = 34
|
244
328
|
end
|
245
329
|
|
246
330
|
def setup_unwind(arg1, arg2)
|
247
331
|
location = @ip + 1
|
248
|
-
@stream <<
|
332
|
+
@stream << 35 << arg1 << arg2
|
249
333
|
@ip += 3
|
250
334
|
arg1.used_at location
|
251
335
|
@current_block.add_stack(0, 0)
|
@@ -254,548 +338,548 @@ module Rubinius::ToolSets.current::ToolSet
|
|
254
338
|
block = new_basic_block
|
255
339
|
@current_block.right = block
|
256
340
|
@current_block = block
|
257
|
-
@instruction =
|
341
|
+
@instruction = 35
|
258
342
|
end
|
259
343
|
|
260
344
|
def pop_unwind
|
261
|
-
@stream <<
|
345
|
+
@stream << 36
|
262
346
|
@ip += 1
|
263
347
|
@current_block.add_stack(0, 0)
|
264
|
-
@instruction =
|
348
|
+
@instruction = 36
|
265
349
|
end
|
266
350
|
|
267
351
|
def raise_return
|
268
|
-
@stream <<
|
352
|
+
@stream << 37
|
269
353
|
@ip += 1
|
270
354
|
@current_block.add_stack(1, 1)
|
271
355
|
@current_block.close true
|
272
356
|
@current_block = new_basic_block
|
273
|
-
@instruction =
|
357
|
+
@instruction = 37
|
274
358
|
end
|
275
359
|
|
276
360
|
def ensure_return
|
277
|
-
@stream <<
|
361
|
+
@stream << 38
|
278
362
|
@ip += 1
|
279
363
|
@current_block.add_stack(1, 1)
|
280
364
|
@current_block.close true
|
281
365
|
@current_block = new_basic_block
|
282
|
-
@instruction =
|
366
|
+
@instruction = 38
|
283
367
|
end
|
284
368
|
|
285
369
|
def raise_break
|
286
|
-
@stream <<
|
370
|
+
@stream << 39
|
287
371
|
@ip += 1
|
288
372
|
@current_block.add_stack(1, 1)
|
289
373
|
@current_block.close false
|
290
374
|
@current_block = new_basic_block
|
291
|
-
@instruction =
|
375
|
+
@instruction = 39
|
292
376
|
end
|
293
377
|
|
294
378
|
def reraise
|
295
|
-
@stream <<
|
379
|
+
@stream << 40
|
296
380
|
@ip += 1
|
297
381
|
@current_block.add_stack(0, 0)
|
298
382
|
@current_block.close false
|
299
383
|
@current_block = new_basic_block
|
300
|
-
@instruction =
|
384
|
+
@instruction = 40
|
301
385
|
end
|
302
386
|
|
303
387
|
def make_array(arg1)
|
304
|
-
@stream <<
|
388
|
+
@stream << 41 << arg1
|
305
389
|
@ip += 2
|
306
390
|
@current_block.add_stack(arg1, 1)
|
307
|
-
@instruction =
|
391
|
+
@instruction = 41
|
308
392
|
end
|
309
393
|
|
310
394
|
def cast_array
|
311
|
-
unless @instruction ==
|
312
|
-
@stream <<
|
395
|
+
unless @instruction == 42 or @instruction == 41
|
396
|
+
@stream << 42
|
313
397
|
@ip += 1
|
314
398
|
end
|
315
|
-
@instruction =
|
399
|
+
@instruction = 42
|
316
400
|
end
|
317
401
|
|
318
402
|
def shift_array
|
319
|
-
@stream <<
|
403
|
+
@stream << 43
|
320
404
|
@ip += 1
|
321
405
|
@current_block.add_stack(1, 2)
|
322
|
-
@instruction =
|
406
|
+
@instruction = 43
|
323
407
|
end
|
324
408
|
|
325
409
|
def set_ivar(arg1)
|
326
410
|
arg1 = find_literal arg1
|
327
|
-
@stream <<
|
411
|
+
@stream << 44 << arg1
|
328
412
|
@ip += 2
|
329
413
|
@current_block.add_stack(1, 1)
|
330
|
-
@instruction =
|
414
|
+
@instruction = 44
|
331
415
|
end
|
332
416
|
|
333
417
|
def push_ivar(arg1)
|
334
418
|
arg1 = find_literal arg1
|
335
|
-
@stream <<
|
419
|
+
@stream << 45 << arg1
|
336
420
|
@ip += 2
|
337
421
|
@current_block.add_stack(0, 1)
|
338
|
-
@instruction =
|
422
|
+
@instruction = 45
|
339
423
|
end
|
340
424
|
|
341
425
|
def set_const(arg1)
|
342
|
-
@stream <<
|
426
|
+
@stream << 47 << arg1
|
343
427
|
@ip += 2
|
344
428
|
@current_block.add_stack(1, 1)
|
345
|
-
@instruction =
|
429
|
+
@instruction = 47
|
346
430
|
end
|
347
431
|
|
348
432
|
def set_const_at(arg1)
|
349
|
-
@stream <<
|
433
|
+
@stream << 48 << arg1
|
350
434
|
@ip += 2
|
351
435
|
@current_block.add_stack(2, 1)
|
352
|
-
@instruction =
|
436
|
+
@instruction = 48
|
353
437
|
end
|
354
438
|
|
355
439
|
def find_const(arg1)
|
356
440
|
arg1 = find_literal arg1
|
357
|
-
@stream <<
|
441
|
+
@stream << 49 << arg1
|
358
442
|
@ip += 2
|
359
443
|
@current_block.add_stack(1, 1)
|
360
|
-
@instruction =
|
444
|
+
@instruction = 49
|
361
445
|
end
|
362
446
|
|
363
447
|
def push_cpath_top
|
364
|
-
@stream <<
|
448
|
+
@stream << 50
|
365
449
|
@ip += 1
|
366
450
|
@current_block.add_stack(0, 1)
|
367
|
-
@instruction =
|
451
|
+
@instruction = 50
|
368
452
|
end
|
369
453
|
|
370
454
|
def push_const_fast(arg1)
|
371
|
-
@stream <<
|
455
|
+
@stream << 51 << arg1
|
372
456
|
@ip += 2
|
373
457
|
@current_block.add_stack(0, 1)
|
374
|
-
@instruction =
|
458
|
+
@instruction = 51
|
375
459
|
end
|
376
460
|
|
377
461
|
def find_const_fast(arg1)
|
378
|
-
@stream <<
|
462
|
+
@stream << 52 << arg1
|
379
463
|
@ip += 2
|
380
464
|
@current_block.add_stack(1, 1)
|
381
|
-
@instruction =
|
465
|
+
@instruction = 52
|
382
466
|
end
|
383
467
|
|
384
468
|
def set_call_flags(arg1)
|
385
|
-
@stream <<
|
469
|
+
@stream << 53 << arg1
|
386
470
|
@ip += 2
|
387
471
|
@current_block.add_stack(0, 0)
|
388
|
-
@instruction =
|
472
|
+
@instruction = 53
|
389
473
|
end
|
390
474
|
|
391
475
|
def allow_private
|
392
|
-
@stream <<
|
476
|
+
@stream << 54
|
393
477
|
@ip += 1
|
394
478
|
@current_block.add_stack(0, 0)
|
395
|
-
@instruction =
|
479
|
+
@instruction = 54
|
396
480
|
end
|
397
481
|
|
398
482
|
def send_method(arg1)
|
399
|
-
@stream <<
|
483
|
+
@stream << 55 << arg1
|
400
484
|
@ip += 2
|
401
485
|
@current_block.add_stack(1, 1)
|
402
|
-
@instruction =
|
486
|
+
@instruction = 55
|
403
487
|
end
|
404
488
|
|
405
489
|
def send_stack(arg1, arg2)
|
406
|
-
@stream <<
|
490
|
+
@stream << 56 << arg1 << arg2
|
407
491
|
@ip += 3
|
408
492
|
@current_block.add_stack(arg2+1, 1)
|
409
|
-
@instruction =
|
493
|
+
@instruction = 56
|
410
494
|
end
|
411
495
|
|
412
496
|
def send_stack_with_block(arg1, arg2)
|
413
|
-
@stream <<
|
497
|
+
@stream << 57 << arg1 << arg2
|
414
498
|
@ip += 3
|
415
499
|
@current_block.add_stack(arg2+2, 1)
|
416
|
-
@instruction =
|
500
|
+
@instruction = 57
|
417
501
|
end
|
418
502
|
|
419
503
|
def send_stack_with_splat(arg1, arg2)
|
420
|
-
@stream <<
|
504
|
+
@stream << 58 << arg1 << arg2
|
421
505
|
@ip += 3
|
422
506
|
@current_block.add_stack(arg2+3, 1)
|
423
|
-
@instruction =
|
507
|
+
@instruction = 58
|
424
508
|
end
|
425
509
|
|
426
510
|
def send_super_stack_with_block(arg1, arg2)
|
427
|
-
@stream <<
|
511
|
+
@stream << 59 << arg1 << arg2
|
428
512
|
@ip += 3
|
429
513
|
@current_block.add_stack(arg2+1, 1)
|
430
|
-
@instruction =
|
514
|
+
@instruction = 59
|
431
515
|
end
|
432
516
|
|
433
517
|
def send_super_stack_with_splat(arg1, arg2)
|
434
|
-
@stream <<
|
518
|
+
@stream << 60 << arg1 << arg2
|
435
519
|
@ip += 3
|
436
520
|
@current_block.add_stack(arg2+2, 1)
|
437
|
-
@instruction =
|
521
|
+
@instruction = 60
|
438
522
|
end
|
439
523
|
|
440
524
|
def push_block
|
441
|
-
@stream <<
|
525
|
+
@stream << 61
|
442
526
|
@ip += 1
|
443
527
|
@current_block.add_stack(0, 1)
|
444
|
-
@instruction =
|
528
|
+
@instruction = 61
|
445
529
|
end
|
446
530
|
|
447
531
|
def passed_blockarg(arg1)
|
448
|
-
@stream <<
|
532
|
+
@stream << 62 << arg1
|
449
533
|
@ip += 2
|
450
534
|
@current_block.add_stack(0, 1)
|
451
|
-
@instruction =
|
535
|
+
@instruction = 62
|
452
536
|
end
|
453
537
|
|
454
538
|
def create_block(arg1)
|
455
539
|
arg1 = add_literal arg1
|
456
540
|
@generators << arg1
|
457
|
-
@stream <<
|
541
|
+
@stream << 63 << arg1
|
458
542
|
@ip += 2
|
459
543
|
@current_block.add_stack(0, 1)
|
460
|
-
@instruction =
|
544
|
+
@instruction = 63
|
461
545
|
end
|
462
546
|
|
463
547
|
def cast_for_single_block_arg
|
464
|
-
@stream <<
|
548
|
+
@stream << 64
|
465
549
|
@ip += 1
|
466
550
|
@current_block.add_stack(0, 1)
|
467
|
-
@instruction =
|
551
|
+
@instruction = 64
|
468
552
|
end
|
469
553
|
|
470
554
|
def cast_for_multi_block_arg
|
471
|
-
@stream <<
|
555
|
+
@stream << 65
|
472
556
|
@ip += 1
|
473
557
|
@current_block.add_stack(0, 1)
|
474
|
-
@instruction =
|
558
|
+
@instruction = 65
|
475
559
|
end
|
476
560
|
|
477
561
|
def cast_for_splat_block_arg
|
478
|
-
@stream <<
|
562
|
+
@stream << 66
|
479
563
|
@ip += 1
|
480
564
|
@current_block.add_stack(0, 1)
|
481
|
-
@instruction =
|
565
|
+
@instruction = 66
|
482
566
|
end
|
483
567
|
|
484
568
|
def yield_stack(arg1)
|
485
|
-
@stream <<
|
569
|
+
@stream << 67 << arg1
|
486
570
|
@ip += 2
|
487
571
|
@current_block.add_stack(arg1, 1)
|
488
|
-
@instruction =
|
572
|
+
@instruction = 67
|
489
573
|
end
|
490
574
|
|
491
575
|
def yield_splat(arg1)
|
492
|
-
@stream <<
|
576
|
+
@stream << 68 << arg1
|
493
577
|
@ip += 2
|
494
578
|
@current_block.add_stack(arg1+1, 1)
|
495
|
-
@instruction =
|
579
|
+
@instruction = 68
|
496
580
|
end
|
497
581
|
|
498
582
|
def string_append
|
499
|
-
@stream <<
|
583
|
+
@stream << 69
|
500
584
|
@ip += 1
|
501
585
|
@current_block.add_stack(2, 1)
|
502
|
-
@instruction =
|
586
|
+
@instruction = 69
|
503
587
|
end
|
504
588
|
|
505
589
|
def string_build(arg1)
|
506
|
-
@stream <<
|
590
|
+
@stream << 70 << arg1
|
507
591
|
@ip += 2
|
508
592
|
@current_block.add_stack(arg1, 1)
|
509
|
-
@instruction =
|
593
|
+
@instruction = 70
|
510
594
|
end
|
511
595
|
|
512
596
|
def string_dup
|
513
|
-
@stream <<
|
597
|
+
@stream << 71
|
514
598
|
@ip += 1
|
515
599
|
@current_block.add_stack(1, 1)
|
516
|
-
@instruction =
|
600
|
+
@instruction = 71
|
517
601
|
end
|
518
602
|
|
519
603
|
def push_scope
|
520
|
-
@stream <<
|
604
|
+
@stream << 72
|
521
605
|
@ip += 1
|
522
606
|
@current_block.add_stack(0, 1)
|
523
|
-
@instruction =
|
607
|
+
@instruction = 72
|
524
608
|
end
|
525
609
|
|
526
610
|
def add_scope
|
527
|
-
@stream <<
|
611
|
+
@stream << 73
|
528
612
|
@ip += 1
|
529
613
|
@current_block.add_stack(1, 0)
|
530
|
-
@instruction =
|
614
|
+
@instruction = 73
|
531
615
|
end
|
532
616
|
|
533
617
|
def push_variables
|
534
|
-
@stream <<
|
618
|
+
@stream << 74
|
535
619
|
@ip += 1
|
536
620
|
@current_block.add_stack(0, 1)
|
537
|
-
@instruction =
|
621
|
+
@instruction = 74
|
538
622
|
end
|
539
623
|
|
540
624
|
def check_interrupts
|
541
|
-
@stream <<
|
625
|
+
@stream << 75
|
542
626
|
@ip += 1
|
543
627
|
@current_block.add_stack(0, 0)
|
544
|
-
@instruction =
|
628
|
+
@instruction = 75
|
545
629
|
end
|
546
630
|
|
547
631
|
def yield_debugger
|
548
|
-
@stream <<
|
632
|
+
@stream << 76
|
549
633
|
@ip += 1
|
550
634
|
@current_block.add_stack(0, 0)
|
551
|
-
@instruction =
|
635
|
+
@instruction = 76
|
552
636
|
end
|
553
637
|
|
554
638
|
def is_nil
|
555
|
-
@stream <<
|
639
|
+
@stream << 77
|
556
640
|
@ip += 1
|
557
641
|
@current_block.add_stack(1, 1)
|
558
|
-
@instruction =
|
642
|
+
@instruction = 77
|
559
643
|
end
|
560
644
|
|
561
645
|
def check_serial(arg1, arg2)
|
562
646
|
arg1 = find_literal arg1
|
563
647
|
arg2 = Integer(arg2)
|
564
|
-
@stream <<
|
648
|
+
@stream << 78 << arg1 << arg2
|
565
649
|
@ip += 3
|
566
650
|
@current_block.add_stack(1, 1)
|
567
|
-
@instruction =
|
651
|
+
@instruction = 78
|
568
652
|
end
|
569
653
|
|
570
654
|
def check_serial_private(arg1, arg2)
|
571
655
|
arg1 = find_literal arg1
|
572
656
|
arg2 = Integer(arg2)
|
573
|
-
@stream <<
|
657
|
+
@stream << 79 << arg1 << arg2
|
574
658
|
@ip += 3
|
575
659
|
@current_block.add_stack(1, 1)
|
576
|
-
@instruction =
|
660
|
+
@instruction = 79
|
577
661
|
end
|
578
662
|
|
579
663
|
def push_my_field(arg1)
|
580
|
-
@stream <<
|
664
|
+
@stream << 80 << arg1
|
581
665
|
@ip += 2
|
582
666
|
@current_block.add_stack(0, 1)
|
583
|
-
@instruction =
|
667
|
+
@instruction = 80
|
584
668
|
end
|
585
669
|
|
586
670
|
def store_my_field(arg1)
|
587
|
-
@stream <<
|
671
|
+
@stream << 81 << arg1
|
588
672
|
@ip += 2
|
589
673
|
@current_block.add_stack(1, 1)
|
590
|
-
@instruction =
|
674
|
+
@instruction = 81
|
591
675
|
end
|
592
676
|
|
593
677
|
def kind_of
|
594
|
-
@stream <<
|
678
|
+
@stream << 82
|
595
679
|
@ip += 1
|
596
680
|
@current_block.add_stack(2, 1)
|
597
|
-
@instruction =
|
681
|
+
@instruction = 82
|
598
682
|
end
|
599
683
|
|
600
684
|
def instance_of
|
601
|
-
@stream <<
|
685
|
+
@stream << 83
|
602
686
|
@ip += 1
|
603
687
|
@current_block.add_stack(2, 1)
|
604
|
-
@instruction =
|
688
|
+
@instruction = 83
|
605
689
|
end
|
606
690
|
|
607
691
|
def meta_push_neg_1
|
608
|
-
@stream <<
|
692
|
+
@stream << 84
|
609
693
|
@ip += 1
|
610
694
|
@current_block.add_stack(0, 1)
|
611
|
-
@instruction =
|
695
|
+
@instruction = 84
|
612
696
|
end
|
613
697
|
|
614
698
|
def meta_push_0
|
615
|
-
@stream <<
|
699
|
+
@stream << 85
|
616
700
|
@ip += 1
|
617
701
|
@current_block.add_stack(0, 1)
|
618
|
-
@instruction =
|
702
|
+
@instruction = 85
|
619
703
|
end
|
620
704
|
|
621
705
|
def meta_push_1
|
622
|
-
@stream <<
|
706
|
+
@stream << 86
|
623
707
|
@ip += 1
|
624
708
|
@current_block.add_stack(0, 1)
|
625
|
-
@instruction =
|
709
|
+
@instruction = 86
|
626
710
|
end
|
627
711
|
|
628
712
|
def meta_push_2
|
629
|
-
@stream <<
|
713
|
+
@stream << 87
|
630
714
|
@ip += 1
|
631
715
|
@current_block.add_stack(0, 1)
|
632
|
-
@instruction =
|
716
|
+
@instruction = 87
|
633
717
|
end
|
634
718
|
|
635
719
|
def meta_send_op_plus(arg1)
|
636
|
-
@stream <<
|
720
|
+
@stream << 88 << arg1
|
637
721
|
@ip += 2
|
638
722
|
@current_block.add_stack(2, 1)
|
639
|
-
@instruction =
|
723
|
+
@instruction = 88
|
640
724
|
end
|
641
725
|
|
642
726
|
def meta_send_op_minus(arg1)
|
643
|
-
@stream <<
|
727
|
+
@stream << 89 << arg1
|
644
728
|
@ip += 2
|
645
729
|
@current_block.add_stack(2, 1)
|
646
|
-
@instruction =
|
730
|
+
@instruction = 89
|
647
731
|
end
|
648
732
|
|
649
733
|
def meta_send_op_equal(arg1)
|
650
|
-
@stream <<
|
734
|
+
@stream << 90 << arg1
|
651
735
|
@ip += 2
|
652
736
|
@current_block.add_stack(2, 1)
|
653
|
-
@instruction =
|
737
|
+
@instruction = 90
|
654
738
|
end
|
655
739
|
|
656
740
|
def meta_send_op_lt(arg1)
|
657
|
-
@stream <<
|
741
|
+
@stream << 91 << arg1
|
658
742
|
@ip += 2
|
659
743
|
@current_block.add_stack(2, 1)
|
660
|
-
@instruction =
|
744
|
+
@instruction = 91
|
661
745
|
end
|
662
746
|
|
663
747
|
def meta_send_op_gt(arg1)
|
664
|
-
@stream <<
|
748
|
+
@stream << 92 << arg1
|
665
749
|
@ip += 2
|
666
750
|
@current_block.add_stack(2, 1)
|
667
|
-
@instruction =
|
751
|
+
@instruction = 92
|
668
752
|
end
|
669
753
|
|
670
754
|
def meta_send_op_tequal(arg1)
|
671
|
-
@stream <<
|
755
|
+
@stream << 93 << arg1
|
672
756
|
@ip += 2
|
673
757
|
@current_block.add_stack(2, 1)
|
674
|
-
@instruction =
|
758
|
+
@instruction = 93
|
675
759
|
end
|
676
760
|
|
677
761
|
def meta_send_call(arg1, arg2)
|
678
|
-
@stream <<
|
762
|
+
@stream << 94 << arg1 << arg2
|
679
763
|
@ip += 3
|
680
764
|
@current_block.add_stack(arg2+1, 1)
|
681
|
-
@instruction =
|
765
|
+
@instruction = 94
|
682
766
|
end
|
683
767
|
|
684
768
|
def push_my_offset(arg1)
|
685
|
-
@stream <<
|
769
|
+
@stream << 95 << arg1
|
686
770
|
@ip += 2
|
687
771
|
@current_block.add_stack(0, 1)
|
688
|
-
@instruction =
|
772
|
+
@instruction = 95
|
689
773
|
end
|
690
774
|
|
691
775
|
def zsuper(arg1)
|
692
776
|
arg1 = find_literal arg1
|
693
|
-
@stream <<
|
777
|
+
@stream << 96 << arg1
|
694
778
|
@ip += 2
|
695
779
|
@current_block.add_stack(1, 1)
|
696
|
-
@instruction =
|
780
|
+
@instruction = 96
|
697
781
|
end
|
698
782
|
|
699
783
|
def push_block_arg
|
700
|
-
@stream <<
|
784
|
+
@stream << 97
|
701
785
|
@ip += 1
|
702
786
|
@current_block.add_stack(0, 1)
|
703
|
-
@instruction =
|
787
|
+
@instruction = 97
|
704
788
|
end
|
705
789
|
|
706
790
|
def push_undef
|
707
|
-
@stream <<
|
791
|
+
@stream << 98
|
708
792
|
@ip += 1
|
709
793
|
@current_block.add_stack(0, 1)
|
710
|
-
@instruction =
|
794
|
+
@instruction = 98
|
711
795
|
end
|
712
796
|
|
713
797
|
def push_stack_local(arg1)
|
714
|
-
@stream <<
|
798
|
+
@stream << 99 << arg1
|
715
799
|
@ip += 2
|
716
800
|
@current_block.add_stack(0, 1)
|
717
|
-
@instruction =
|
801
|
+
@instruction = 99
|
718
802
|
end
|
719
803
|
|
720
804
|
def set_stack_local(arg1)
|
721
|
-
@stream <<
|
805
|
+
@stream << 100 << arg1
|
722
806
|
@ip += 2
|
723
807
|
@current_block.add_stack(1, 1)
|
724
|
-
@instruction =
|
808
|
+
@instruction = 100
|
725
809
|
end
|
726
810
|
|
727
811
|
def push_has_block
|
728
|
-
@stream <<
|
812
|
+
@stream << 101
|
729
813
|
@ip += 1
|
730
814
|
@current_block.add_stack(0, 1)
|
731
|
-
@instruction =
|
815
|
+
@instruction = 101
|
732
816
|
end
|
733
817
|
|
734
818
|
def push_proc
|
735
|
-
@stream <<
|
819
|
+
@stream << 102
|
736
820
|
@ip += 1
|
737
821
|
@current_block.add_stack(0, 1)
|
738
|
-
@instruction =
|
822
|
+
@instruction = 102
|
739
823
|
end
|
740
824
|
|
741
825
|
def check_frozen
|
742
|
-
@stream <<
|
826
|
+
@stream << 103
|
743
827
|
@ip += 1
|
744
828
|
@current_block.add_stack(1, 1)
|
745
|
-
@instruction =
|
829
|
+
@instruction = 103
|
746
830
|
end
|
747
831
|
|
748
832
|
def cast_multi_value
|
749
|
-
@stream <<
|
833
|
+
@stream << 104
|
750
834
|
@ip += 1
|
751
835
|
@current_block.add_stack(1, 1)
|
752
|
-
@instruction =
|
836
|
+
@instruction = 104
|
753
837
|
end
|
754
838
|
|
755
839
|
def invoke_primitive(arg1, arg2)
|
756
840
|
arg1 = find_literal arg1
|
757
841
|
arg2 = Integer(arg2)
|
758
|
-
@stream <<
|
842
|
+
@stream << 105 << arg1 << arg2
|
759
843
|
@ip += 3
|
760
844
|
@current_block.add_stack(arg2, 1)
|
761
|
-
@instruction =
|
845
|
+
@instruction = 105
|
762
846
|
end
|
763
847
|
|
764
848
|
def push_rubinius
|
765
|
-
@stream <<
|
849
|
+
@stream << 106
|
766
850
|
@ip += 1
|
767
851
|
@current_block.add_stack(0, 1)
|
768
|
-
@instruction =
|
852
|
+
@instruction = 106
|
769
853
|
end
|
770
854
|
|
771
855
|
def call_custom(arg1, arg2)
|
772
856
|
arg1 = find_literal arg1
|
773
857
|
arg2 = Integer(arg2)
|
774
|
-
@stream <<
|
858
|
+
@stream << 107 << arg1 << arg2
|
775
859
|
@ip += 3
|
776
860
|
@current_block.add_stack(arg2+1, 1)
|
777
|
-
@instruction =
|
861
|
+
@instruction = 107
|
778
862
|
end
|
779
863
|
|
780
864
|
def meta_to_s(arg1)
|
781
|
-
@stream <<
|
865
|
+
@stream << 108 << arg1
|
782
866
|
@ip += 2
|
783
867
|
@current_block.add_stack(1, 1)
|
784
|
-
@instruction =
|
868
|
+
@instruction = 108
|
785
869
|
end
|
786
870
|
|
787
871
|
def push_type
|
788
|
-
@stream <<
|
872
|
+
@stream << 109
|
789
873
|
@ip += 1
|
790
874
|
@current_block.add_stack(0, 1)
|
791
|
-
@instruction =
|
875
|
+
@instruction = 109
|
792
876
|
end
|
793
877
|
|
794
878
|
def push_mirror
|
795
|
-
@stream <<
|
879
|
+
@stream << 110
|
796
880
|
@ip += 1
|
797
881
|
@current_block.add_stack(0, 1)
|
798
|
-
@instruction =
|
882
|
+
@instruction = 110
|
799
883
|
end
|
800
884
|
|
801
885
|
end
|