rubinius-compiler 3.9 → 3.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cae6bb504ecb18d32cffe029f4289ea295e489b3
4
- data.tar.gz: 58d59c9947a7575718524ff19540b98fbbc2d10d
3
+ metadata.gz: 43a70986619cb373730960efd90ca453c167d955
4
+ data.tar.gz: 491d005f82901b9b4892de820a6d5a3c914997c3
5
5
  SHA512:
6
- metadata.gz: dad9a44d039237075e1be221038f929cde927b1f0deb72f12296ea1b3eb5461cd917ad56e9e7e7a95458f2e106bacd5e4dd097e27faafb7705a1f281ac442b86
7
- data.tar.gz: 07369dc1d2f6a2ce1fb3e0bf869acd4dece223a8516a3e709db1ebc205b03d35fbe9f350a768b389563f58633e93e77da9759aeb70640f332173ecf2920f616c
6
+ metadata.gz: ee4b15f721f45fa9e9057c28aef06febccc47a7cc611a52e3ecf3bc8ae2edd76196d7d17cbb17d738a9d6dfe452fc3499e77d1c35eae8832742e474f83f43496
7
+ data.tar.gz: 5783d337b23a39cb4d1267854538cc620cade019e5cb22fb0d9a7365162d3d937dd119f0702248e0bbbd5515515d146e9c62940554918a416c76fd27629b968c
@@ -2,92 +2,162 @@
2
2
 
3
3
  module CodeTools
4
4
  module GeneratorMethods
5
- def noop
5
+ def add_scope
6
6
  @stream << 0
7
7
  @ip += 1
8
- @current_block.add_stack(0, 0)
8
+ @current_block.add_stack(1, 0)
9
9
  @instruction = 0
10
10
  end
11
11
 
12
- def push_nil
12
+ def allow_private
13
13
  @stream << 1
14
14
  @ip += 1
15
- @current_block.add_stack(0, 1)
15
+ @current_block.add_stack(0, 0)
16
16
  @instruction = 1
17
17
  end
18
18
 
19
- def push_true
20
- @stream << 2
21
- @ip += 1
22
- @current_block.add_stack(0, 1)
19
+ def cast_array
20
+ unless @instruction == 2 or @instruction == 29
21
+ @stream << 2
22
+ @ip += 1
23
+ end
23
24
  @instruction = 2
24
25
  end
25
26
 
26
- def push_false
27
+ def cast_for_multi_block_arg
27
28
  @stream << 3
28
29
  @ip += 1
29
30
  @current_block.add_stack(0, 1)
30
31
  @instruction = 3
31
32
  end
32
33
 
33
- def push_int(arg1)
34
- @stream << 4 << arg1
35
- @ip += 2
34
+ def cast_for_single_block_arg
35
+ @stream << 4
36
+ @ip += 1
36
37
  @current_block.add_stack(0, 1)
37
38
  @instruction = 4
38
39
  end
39
40
 
40
- def push_self
41
+ def cast_for_splat_block_arg
41
42
  @stream << 5
42
43
  @ip += 1
43
44
  @current_block.add_stack(0, 1)
44
45
  @instruction = 5
45
46
  end
46
47
 
47
- def push_memo(arg1)
48
- arg1 = find_literal(arg1)
49
- @stream << 6 << arg1
50
- @ip += 2
48
+ def cast_multi_value
49
+ @stream << 6
50
+ @ip += 1
51
51
  @current_block.add_stack(1, 1)
52
52
  @instruction = 6
53
53
  end
54
54
 
55
- def emit_push_literal(arg1)
56
- @stream << 7 << arg1
55
+ def check_frozen
56
+ @stream << 7
57
+ @ip += 1
58
+ @current_block.add_stack(1, 1)
59
+ @instruction = 7
60
+ end
61
+
62
+ def check_interrupts
63
+ @stream << 8
64
+ @ip += 1
65
+ @current_block.add_stack(0, 0)
66
+ @instruction = 8
67
+ end
68
+
69
+ def check_serial(arg1, arg2)
70
+ arg1 = find_literal(arg1)
71
+ @stream << 9 << arg1 << arg2
72
+ @ip += 3
73
+ @current_block.add_stack(1, 1)
74
+ @instruction = 9
75
+ end
76
+
77
+ def check_serial_private(arg1, arg2)
78
+ arg1 = find_literal(arg1)
79
+ @stream << 10 << arg1 << arg2
80
+ @ip += 3
81
+ @current_block.add_stack(1, 1)
82
+ @instruction = 10
83
+ end
84
+
85
+ def clear_exception
86
+ @stream << 11
87
+ @ip += 1
88
+ @current_block.add_stack(0, 0)
89
+ @instruction = 11
90
+ end
91
+
92
+ def create_block(arg1)
93
+ arg1 = add_generator(arg1)
94
+ @stream << 12 << arg1
57
95
  @ip += 2
58
96
  @current_block.add_stack(0, 1)
59
- @instruction = 7
97
+ @instruction = 12
98
+ end
99
+
100
+ def dup
101
+ @stream << 13
102
+ @ip += 1
103
+ @current_block.add_stack(1, 2)
104
+ @instruction = 13
105
+ end
106
+
107
+ def dup_many(arg1)
108
+ arg1 = Integer(arg1)
109
+ @stream << 14 << arg1
110
+ @ip += 2
111
+ @current_block.add_stack(arg1, (arg1 * 2))
112
+ @instruction = 14
113
+ end
114
+
115
+ def ensure_return
116
+ @stream << 15
117
+ @ip += 1
118
+ @current_block.add_stack(1, 1)
119
+ @current_block.close true
120
+ @current_block = new_basic_block
121
+ @instruction = 15
122
+ end
123
+
124
+ def find_const(arg1)
125
+ arg1 = find_literal(arg1)
126
+ @stream << 16 << arg1
127
+ @ip += 2
128
+ @current_block.add_stack(1, 1)
129
+ @instruction = 16
60
130
  end
61
131
 
62
132
  def goto(arg1)
63
133
  location = @ip + 1
64
- @stream << 8 << arg1
134
+ @stream << 17 << arg1
65
135
  @ip += 2
66
136
  arg1.used_at location
67
137
  @current_block.add_stack(0, 0)
68
138
  @current_block.left = arg1.basic_block
69
139
  @current_block.close
70
140
  @current_block = new_basic_block
71
- @instruction = 8
141
+ @instruction = 17
72
142
  end
73
143
 
74
- def goto_if_false(arg1)
144
+ def goto_if_equal(arg1)
75
145
  location = @ip + 1
76
- @stream << 9 << arg1
146
+ @stream << 18 << arg1
77
147
  @ip += 2
78
148
  arg1.used_at location
79
- @current_block.add_stack(1, 0)
149
+ @current_block.add_stack(2, 0)
80
150
  @current_block.left = arg1.basic_block
81
151
  @current_block.close
82
152
  block = new_basic_block
83
153
  @current_block.right = block
84
154
  @current_block = block
85
- @instruction = 9
155
+ @instruction = 18
86
156
  end
87
157
 
88
- def goto_if_true(arg1)
158
+ def goto_if_false(arg1)
89
159
  location = @ip + 1
90
- @stream << 10 << arg1
160
+ @stream << 19 << arg1
91
161
  @ip += 2
92
162
  arg1.used_at location
93
163
  @current_block.add_stack(1, 0)
@@ -96,12 +166,12 @@ module CodeTools
96
166
  block = new_basic_block
97
167
  @current_block.right = block
98
168
  @current_block = block
99
- @instruction = 10
169
+ @instruction = 19
100
170
  end
101
171
 
102
172
  def goto_if_nil(arg1)
103
173
  location = @ip + 1
104
- @stream << 11 << arg1
174
+ @stream << 20 << arg1
105
175
  @ip += 2
106
176
  arg1.used_at location
107
177
  @current_block.add_stack(1, 0)
@@ -110,26 +180,26 @@ module CodeTools
110
180
  block = new_basic_block
111
181
  @current_block.right = block
112
182
  @current_block = block
113
- @instruction = 11
183
+ @instruction = 20
114
184
  end
115
185
 
116
- def goto_if_not_nil(arg1)
186
+ def goto_if_not_equal(arg1)
117
187
  location = @ip + 1
118
- @stream << 12 << arg1
188
+ @stream << 21 << arg1
119
189
  @ip += 2
120
190
  arg1.used_at location
121
- @current_block.add_stack(1, 0)
191
+ @current_block.add_stack(2, 0)
122
192
  @current_block.left = arg1.basic_block
123
193
  @current_block.close
124
194
  block = new_basic_block
125
195
  @current_block.right = block
126
196
  @current_block = block
127
- @instruction = 12
197
+ @instruction = 21
128
198
  end
129
199
 
130
- def goto_if_undefined(arg1)
200
+ def goto_if_not_nil(arg1)
131
201
  location = @ip + 1
132
- @stream << 13 << arg1
202
+ @stream << 22 << arg1
133
203
  @ip += 2
134
204
  arg1.used_at location
135
205
  @current_block.add_stack(1, 0)
@@ -138,12 +208,12 @@ module CodeTools
138
208
  block = new_basic_block
139
209
  @current_block.right = block
140
210
  @current_block = block
141
- @instruction = 13
211
+ @instruction = 22
142
212
  end
143
213
 
144
214
  def goto_if_not_undefined(arg1)
145
215
  location = @ip + 1
146
- @stream << 14 << arg1
216
+ @stream << 23 << arg1
147
217
  @ip += 2
148
218
  arg1.used_at location
149
219
  @current_block.add_stack(1, 0)
@@ -152,549 +222,471 @@ module CodeTools
152
222
  block = new_basic_block
153
223
  @current_block.right = block
154
224
  @current_block = block
155
- @instruction = 14
225
+ @instruction = 23
156
226
  end
157
227
 
158
- def goto_if_equal(arg1)
228
+ def goto_if_true(arg1)
159
229
  location = @ip + 1
160
- @stream << 15 << arg1
230
+ @stream << 24 << arg1
161
231
  @ip += 2
162
232
  arg1.used_at location
163
- @current_block.add_stack(2, 0)
233
+ @current_block.add_stack(1, 0)
164
234
  @current_block.left = arg1.basic_block
165
235
  @current_block.close
166
236
  block = new_basic_block
167
237
  @current_block.right = block
168
238
  @current_block = block
169
- @instruction = 15
239
+ @instruction = 24
170
240
  end
171
241
 
172
- def goto_if_not_equal(arg1)
242
+ def goto_if_undefined(arg1)
173
243
  location = @ip + 1
174
- @stream << 16 << arg1
244
+ @stream << 25 << arg1
175
245
  @ip += 2
176
246
  arg1.used_at location
177
- @current_block.add_stack(2, 0)
247
+ @current_block.add_stack(1, 0)
178
248
  @current_block.left = arg1.basic_block
179
249
  @current_block.close
180
250
  block = new_basic_block
181
251
  @current_block.right = block
182
252
  @current_block = block
183
- @instruction = 16
184
- end
185
-
186
- def ret
187
- @stream << 17
188
- @ip += 1
189
- @current_block.add_stack(1, 1)
190
- @current_block.close true
191
- @current_block = new_basic_block
192
- @instruction = 17
193
- end
194
-
195
- def swap
196
- @stream << 18
197
- @ip += 1
198
- @current_block.add_stack(2, 2)
199
- @instruction = 18
253
+ @instruction = 25
200
254
  end
201
255
 
202
- def dup
203
- @stream << 19
256
+ def instance_of
257
+ @stream << 26
204
258
  @ip += 1
205
- @current_block.add_stack(1, 2)
206
- @instruction = 19
259
+ @current_block.add_stack(2, 1)
260
+ @instruction = 26
207
261
  end
208
262
 
209
- def dup_many(arg1)
210
- arg1 = Integer(arg1)
211
- @stream << 20 << arg1
212
- @ip += 2
213
- @current_block.add_stack(arg1, (arg1 * 2))
214
- @instruction = 20
263
+ def invoke_primitive(arg1, arg2)
264
+ arg1 = find_literal(arg1)
265
+ arg2 = Integer(arg2)
266
+ @stream << 27 << arg1 << arg2
267
+ @ip += 3
268
+ @current_block.add_stack(arg2, 1)
269
+ @instruction = 27
215
270
  end
216
271
 
217
- def pop
218
- @stream << 21
272
+ def kind_of
273
+ @stream << 28
219
274
  @ip += 1
220
- @current_block.add_stack(1, 0)
221
- @instruction = 21
275
+ @current_block.add_stack(2, 1)
276
+ @instruction = 28
222
277
  end
223
278
 
224
- def pop_many(arg1)
279
+ def make_array(arg1)
225
280
  arg1 = Integer(arg1)
226
- @stream << 22 << arg1
281
+ @stream << 29 << arg1
227
282
  @ip += 2
228
- @current_block.add_stack(arg1, 0)
229
- @instruction = 22
283
+ @current_block.add_stack(arg1, 1)
284
+ @instruction = 29
230
285
  end
231
286
 
232
- def rotate(arg1)
233
- arg1 = Integer(arg1)
234
- @stream << 23 << arg1
287
+ def move_down(arg1)
288
+ @stream << 30 << arg1
235
289
  @ip += 2
236
290
  @current_block.add_stack(arg1, (arg1 * 1))
237
- @instruction = 23
291
+ @instruction = 30
238
292
  end
239
293
 
240
- def move_down(arg1)
241
- @stream << 24 << arg1
242
- @ip += 2
243
- @current_block.add_stack(arg1, (arg1 * 1))
244
- @instruction = 24
294
+ def noop
295
+ @stream << 31
296
+ @ip += 1
297
+ @current_block.add_stack(0, 0)
298
+ @instruction = 31
245
299
  end
246
300
 
247
- def set_local(arg1)
248
- @stream << 25 << arg1
301
+ def object_to_s(arg1)
302
+ arg1 = find_literal(arg1)
303
+ @stream << 32 << arg1
249
304
  @ip += 2
250
305
  @current_block.add_stack(1, 1)
251
- @instruction = 25
306
+ @instruction = 32
252
307
  end
253
308
 
254
- def push_local(arg1)
255
- @stream << 26 << arg1
309
+ def passed_arg(arg1)
310
+ @stream << 33 << arg1
256
311
  @ip += 2
257
312
  @current_block.add_stack(0, 1)
258
- @instruction = 26
313
+ @instruction = 33
259
314
  end
260
315
 
261
- def push_local_depth(arg1, arg2)
262
- @stream << 27 << arg1 << arg2
263
- @ip += 3
316
+ def passed_blockarg(arg1)
317
+ arg1 = Integer(arg1)
318
+ @stream << 34 << arg1
319
+ @ip += 2
264
320
  @current_block.add_stack(0, 1)
265
- @instruction = 27
321
+ @instruction = 34
266
322
  end
267
323
 
268
- def set_local_depth(arg1, arg2)
269
- @stream << 28 << arg1 << arg2
270
- @ip += 3
271
- @current_block.add_stack(1, 1)
272
- @instruction = 28
324
+ def pop
325
+ @stream << 35
326
+ @ip += 1
327
+ @current_block.add_stack(1, 0)
328
+ @instruction = 35
273
329
  end
274
330
 
275
- def passed_arg(arg1)
276
- @stream << 29 << arg1
331
+ def pop_many(arg1)
332
+ arg1 = Integer(arg1)
333
+ @stream << 36 << arg1
277
334
  @ip += 2
278
- @current_block.add_stack(0, 1)
279
- @instruction = 29
280
- end
281
-
282
- def push_current_exception
283
- @stream << 30
284
- @ip += 1
285
- @current_block.add_stack(0, 1)
286
- @instruction = 30
335
+ @current_block.add_stack(arg1, 0)
336
+ @instruction = 36
287
337
  end
288
338
 
289
- def clear_exception
290
- @stream << 31
339
+ def pop_unwind
340
+ @stream << 37
291
341
  @ip += 1
292
342
  @current_block.add_stack(0, 0)
293
- @instruction = 31
343
+ @instruction = 37
294
344
  end
295
345
 
296
- def push_exception_state
297
- @stream << 32
346
+ def push_block
347
+ @stream << 38
298
348
  @ip += 1
299
349
  @current_block.add_stack(0, 1)
300
- @instruction = 32
350
+ @instruction = 38
301
351
  end
302
352
 
303
- def restore_exception_state
304
- @stream << 33
305
- @ip += 1
306
- @current_block.add_stack(1, 0)
307
- @instruction = 33
308
- end
309
-
310
- def raise_exc
311
- @stream << 34
312
- @ip += 1
313
- @current_block.add_stack(1, 0)
314
- @current_block.close false
315
- @current_block = new_basic_block
316
- @instruction = 34
317
- end
318
-
319
- def setup_unwind(arg1, arg2)
320
- location = @ip + 1
321
- @stream << 35 << arg1 << arg2
322
- @ip += 3
323
- arg1.used_at location
324
- @current_block.add_stack(0, 0)
325
- @current_block.left = arg1.basic_block
326
- @current_block.close
327
- block = new_basic_block
328
- @current_block.right = block
329
- @current_block = block
330
- @instruction = 35
331
- end
332
-
333
- def pop_unwind
334
- @stream << 36
335
- @ip += 1
336
- @current_block.add_stack(0, 0)
337
- @instruction = 36
338
- end
339
-
340
- def raise_return
341
- @stream << 37
342
- @ip += 1
343
- @current_block.add_stack(1, 1)
344
- @current_block.close true
345
- @current_block = new_basic_block
346
- @instruction = 37
347
- end
348
-
349
- def ensure_return
350
- @stream << 38
351
- @ip += 1
352
- @current_block.add_stack(1, 1)
353
- @current_block.close true
354
- @current_block = new_basic_block
355
- @instruction = 38
356
- end
357
-
358
- def raise_break
353
+ def push_block_arg
359
354
  @stream << 39
360
355
  @ip += 1
361
- @current_block.add_stack(1, 1)
362
- @current_block.close false
363
- @current_block = new_basic_block
356
+ @current_block.add_stack(0, 1)
364
357
  @instruction = 39
365
358
  end
366
359
 
367
- def reraise
368
- @stream << 40
369
- @ip += 1
370
- @current_block.add_stack(0, 0)
371
- @current_block.close false
372
- @current_block = new_basic_block
360
+ def push_const(arg1)
361
+ arg1 = find_literal(arg1)
362
+ @stream << 40 << arg1
363
+ @ip += 2
364
+ @current_block.add_stack(0, 1)
373
365
  @instruction = 40
374
366
  end
375
367
 
376
- def make_array(arg1)
377
- arg1 = Integer(arg1)
378
- @stream << 41 << arg1
379
- @ip += 2
380
- @current_block.add_stack(arg1, 1)
368
+ def push_cpath_top
369
+ @stream << 41
370
+ @ip += 1
371
+ @current_block.add_stack(0, 1)
381
372
  @instruction = 41
382
373
  end
383
374
 
384
- def cast_array
385
- unless @instruction == 42 or @instruction == 41
386
- @stream << 42
387
- @ip += 1
388
- end
375
+ def push_current_exception
376
+ @stream << 42
377
+ @ip += 1
378
+ @current_block.add_stack(0, 1)
389
379
  @instruction = 42
390
380
  end
391
381
 
392
- def shift_array
382
+ def push_exception_state
393
383
  @stream << 43
394
384
  @ip += 1
395
- @current_block.add_stack(1, 2)
385
+ @current_block.add_stack(0, 1)
396
386
  @instruction = 43
397
387
  end
398
388
 
399
- def set_ivar(arg1)
400
- arg1 = find_literal(arg1)
401
- @stream << 44 << arg1
402
- @ip += 2
403
- @current_block.add_stack(1, 1)
389
+ def push_false
390
+ @stream << 44
391
+ @ip += 1
392
+ @current_block.add_stack(0, 1)
404
393
  @instruction = 44
405
394
  end
406
395
 
407
- def push_ivar(arg1)
408
- arg1 = find_literal(arg1)
409
- @stream << 45 << arg1
410
- @ip += 2
396
+ def push_has_block
397
+ @stream << 45
398
+ @ip += 1
411
399
  @current_block.add_stack(0, 1)
412
400
  @instruction = 45
413
401
  end
414
402
 
415
- def set_const(arg1)
416
- arg1 = find_literal(arg1)
403
+ def push_int(arg1)
417
404
  @stream << 46 << arg1
418
405
  @ip += 2
419
- @current_block.add_stack(1, 1)
406
+ @current_block.add_stack(0, 1)
420
407
  @instruction = 46
421
408
  end
422
409
 
423
- def set_const_at(arg1)
410
+ def push_ivar(arg1)
424
411
  arg1 = find_literal(arg1)
425
412
  @stream << 47 << arg1
426
413
  @ip += 2
427
- @current_block.add_stack(2, 1)
414
+ @current_block.add_stack(0, 1)
428
415
  @instruction = 47
429
416
  end
430
417
 
431
- def push_cpath_top
432
- @stream << 48
433
- @ip += 1
418
+ def emit_push_literal(arg1)
419
+ @stream << 48 << arg1
420
+ @ip += 2
434
421
  @current_block.add_stack(0, 1)
435
422
  @instruction = 48
436
423
  end
437
424
 
438
- def push_const(arg1)
439
- arg1 = find_literal(arg1)
425
+ def push_local(arg1)
440
426
  @stream << 49 << arg1
441
427
  @ip += 2
442
428
  @current_block.add_stack(0, 1)
443
429
  @instruction = 49
444
430
  end
445
431
 
446
- def find_const(arg1)
447
- arg1 = find_literal(arg1)
448
- @stream << 50 << arg1
449
- @ip += 2
450
- @current_block.add_stack(1, 1)
432
+ def push_local_depth(arg1, arg2)
433
+ @stream << 50 << arg1 << arg2
434
+ @ip += 3
435
+ @current_block.add_stack(0, 1)
451
436
  @instruction = 50
452
437
  end
453
438
 
454
- def set_call_flags(arg1)
439
+ def push_memo(arg1)
440
+ arg1 = find_literal(arg1)
455
441
  @stream << 51 << arg1
456
442
  @ip += 2
457
- @current_block.add_stack(0, 0)
443
+ @current_block.add_stack(1, 1)
458
444
  @instruction = 51
459
445
  end
460
446
 
461
- def allow_private
447
+ def push_mirror
462
448
  @stream << 52
463
449
  @ip += 1
464
- @current_block.add_stack(0, 0)
450
+ @current_block.add_stack(0, 1)
465
451
  @instruction = 52
466
452
  end
467
453
 
468
- def send_vcall(arg1)
469
- arg1 = find_literal(arg1)
454
+ def push_my_field(arg1)
470
455
  @stream << 53 << arg1
471
456
  @ip += 2
472
457
  @current_block.add_stack(0, 1)
473
458
  @instruction = 53
474
459
  end
475
460
 
476
- def send_method(arg1)
477
- arg1 = find_literal(arg1)
461
+ def push_my_offset(arg1)
478
462
  @stream << 54 << arg1
479
463
  @ip += 2
480
- @current_block.add_stack(1, 1)
464
+ @current_block.add_stack(0, 1)
481
465
  @instruction = 54
482
466
  end
483
467
 
484
- def send_stack(arg1, arg2)
485
- arg1 = find_literal(arg1)
486
- arg2 = Integer(arg2)
487
- @stream << 55 << arg1 << arg2
488
- @ip += 3
489
- @current_block.add_stack(arg2+1, 1)
468
+ def push_nil
469
+ @stream << 55
470
+ @ip += 1
471
+ @current_block.add_stack(0, 1)
490
472
  @instruction = 55
491
473
  end
492
474
 
493
- def send_stack_with_block(arg1, arg2)
494
- arg1 = find_literal(arg1)
495
- arg2 = Integer(arg2)
496
- @stream << 56 << arg1 << arg2
497
- @ip += 3
498
- @current_block.add_stack(arg2+2, 1)
475
+ def push_proc
476
+ @stream << 56
477
+ @ip += 1
478
+ @current_block.add_stack(0, 1)
499
479
  @instruction = 56
500
480
  end
501
481
 
502
- def send_stack_with_splat(arg1, arg2)
503
- arg1 = find_literal(arg1)
504
- arg2 = Integer(arg2)
505
- @stream << 57 << arg1 << arg2
506
- @ip += 3
507
- @current_block.add_stack(arg2+3, 1)
482
+ def push_rubinius
483
+ @stream << 57
484
+ @ip += 1
485
+ @current_block.add_stack(0, 1)
508
486
  @instruction = 57
509
487
  end
510
488
 
511
- def send_super_stack_with_block(arg1, arg2)
512
- arg1 = find_literal(arg1)
513
- arg2 = Integer(arg2)
514
- @stream << 58 << arg1 << arg2
515
- @ip += 3
516
- @current_block.add_stack(arg2+1, 1)
489
+ def push_scope
490
+ @stream << 58
491
+ @ip += 1
492
+ @current_block.add_stack(0, 1)
517
493
  @instruction = 58
518
494
  end
519
495
 
520
- def send_super_stack_with_splat(arg1, arg2)
521
- arg1 = find_literal(arg1)
522
- arg2 = Integer(arg2)
523
- @stream << 59 << arg1 << arg2
524
- @ip += 3
525
- @current_block.add_stack(arg2+2, 1)
496
+ def push_self
497
+ @stream << 59
498
+ @ip += 1
499
+ @current_block.add_stack(0, 1)
526
500
  @instruction = 59
527
501
  end
528
502
 
529
- def push_block
530
- @stream << 60
531
- @ip += 1
503
+ def push_stack_local(arg1)
504
+ @stream << 60 << arg1
505
+ @ip += 2
532
506
  @current_block.add_stack(0, 1)
533
507
  @instruction = 60
534
508
  end
535
509
 
536
- def passed_blockarg(arg1)
537
- arg1 = Integer(arg1)
538
- @stream << 61 << arg1
539
- @ip += 2
510
+ def push_true
511
+ @stream << 61
512
+ @ip += 1
540
513
  @current_block.add_stack(0, 1)
541
514
  @instruction = 61
542
515
  end
543
516
 
544
- def create_block(arg1)
545
- arg1 = add_generator(arg1)
546
- @stream << 62 << arg1
547
- @ip += 2
517
+ def push_type
518
+ @stream << 62
519
+ @ip += 1
548
520
  @current_block.add_stack(0, 1)
549
521
  @instruction = 62
550
522
  end
551
523
 
552
- def cast_for_single_block_arg
524
+ def push_undef
553
525
  @stream << 63
554
526
  @ip += 1
555
527
  @current_block.add_stack(0, 1)
556
528
  @instruction = 63
557
529
  end
558
530
 
559
- def cast_for_multi_block_arg
531
+ def push_variables
560
532
  @stream << 64
561
533
  @ip += 1
562
534
  @current_block.add_stack(0, 1)
563
535
  @instruction = 64
564
536
  end
565
537
 
566
- def cast_for_splat_block_arg
538
+ def raise_break
567
539
  @stream << 65
568
540
  @ip += 1
569
- @current_block.add_stack(0, 1)
541
+ @current_block.add_stack(1, 1)
542
+ @current_block.close false
543
+ @current_block = new_basic_block
570
544
  @instruction = 65
571
545
  end
572
546
 
573
- def yield_stack(arg1)
574
- arg1 = Integer(arg1)
575
- @stream << 66 << arg1
576
- @ip += 2
577
- @current_block.add_stack(arg1, 1)
547
+ def raise_exc
548
+ @stream << 66
549
+ @ip += 1
550
+ @current_block.add_stack(1, 0)
551
+ @current_block.close false
552
+ @current_block = new_basic_block
578
553
  @instruction = 66
579
554
  end
580
555
 
581
- def yield_splat(arg1)
582
- arg1 = Integer(arg1)
583
- @stream << 67 << arg1
584
- @ip += 2
585
- @current_block.add_stack(arg1+1, 1)
556
+ def raise_return
557
+ @stream << 67
558
+ @ip += 1
559
+ @current_block.add_stack(1, 1)
560
+ @current_block.close true
561
+ @current_block = new_basic_block
586
562
  @instruction = 67
587
563
  end
588
564
 
589
- def string_append
565
+ def reraise
590
566
  @stream << 68
591
567
  @ip += 1
592
- @current_block.add_stack(2, 1)
568
+ @current_block.add_stack(0, 0)
569
+ @current_block.close false
570
+ @current_block = new_basic_block
593
571
  @instruction = 68
594
572
  end
595
573
 
596
- def string_build(arg1)
597
- arg1 = Integer(arg1)
598
- @stream << 69 << arg1
599
- @ip += 2
600
- @current_block.add_stack(arg1, 1)
574
+ def restore_exception_state
575
+ @stream << 69
576
+ @ip += 1
577
+ @current_block.add_stack(1, 0)
601
578
  @instruction = 69
602
579
  end
603
580
 
604
- def string_dup
581
+ def ret
605
582
  @stream << 70
606
583
  @ip += 1
607
584
  @current_block.add_stack(1, 1)
585
+ @current_block.close true
586
+ @current_block = new_basic_block
608
587
  @instruction = 70
609
588
  end
610
589
 
611
- def push_scope
612
- @stream << 71
613
- @ip += 1
614
- @current_block.add_stack(0, 1)
590
+ def rotate(arg1)
591
+ arg1 = Integer(arg1)
592
+ @stream << 71 << arg1
593
+ @ip += 2
594
+ @current_block.add_stack(arg1, (arg1 * 1))
615
595
  @instruction = 71
616
596
  end
617
597
 
618
- def add_scope
598
+ def run_exception
619
599
  @stream << 72
620
600
  @ip += 1
621
- @current_block.add_stack(1, 0)
601
+ @current_block.add_stack(0, 0)
622
602
  @instruction = 72
623
603
  end
624
604
 
625
- def push_variables
626
- @stream << 73
627
- @ip += 1
628
- @current_block.add_stack(0, 1)
605
+ def send_method(arg1)
606
+ arg1 = find_literal(arg1)
607
+ @stream << 73 << arg1
608
+ @ip += 2
609
+ @current_block.add_stack(1, 1)
629
610
  @instruction = 73
630
611
  end
631
612
 
632
- def check_interrupts
633
- @stream << 74
634
- @ip += 1
635
- @current_block.add_stack(0, 0)
613
+ def send_stack(arg1, arg2)
614
+ arg1 = find_literal(arg1)
615
+ arg2 = Integer(arg2)
616
+ @stream << 74 << arg1 << arg2
617
+ @ip += 3
618
+ @current_block.add_stack(arg2+1, 1)
636
619
  @instruction = 74
637
620
  end
638
621
 
639
- def yield_debugger
640
- @stream << 75
641
- @ip += 1
642
- @current_block.add_stack(0, 0)
622
+ def send_stack_with_block(arg1, arg2)
623
+ arg1 = find_literal(arg1)
624
+ arg2 = Integer(arg2)
625
+ @stream << 75 << arg1 << arg2
626
+ @ip += 3
627
+ @current_block.add_stack(arg2+2, 1)
643
628
  @instruction = 75
644
629
  end
645
630
 
646
- def check_serial(arg1, arg2)
631
+ def send_stack_with_splat(arg1, arg2)
647
632
  arg1 = find_literal(arg1)
633
+ arg2 = Integer(arg2)
648
634
  @stream << 76 << arg1 << arg2
649
635
  @ip += 3
650
- @current_block.add_stack(1, 1)
636
+ @current_block.add_stack(arg2+3, 1)
651
637
  @instruction = 76
652
638
  end
653
639
 
654
- def check_serial_private(arg1, arg2)
640
+ def send_super_stack_with_block(arg1, arg2)
655
641
  arg1 = find_literal(arg1)
642
+ arg2 = Integer(arg2)
656
643
  @stream << 77 << arg1 << arg2
657
644
  @ip += 3
658
- @current_block.add_stack(1, 1)
645
+ @current_block.add_stack(arg2+1, 1)
659
646
  @instruction = 77
660
647
  end
661
648
 
662
- def push_my_field(arg1)
663
- @stream << 78 << arg1
664
- @ip += 2
665
- @current_block.add_stack(0, 1)
649
+ def send_super_stack_with_splat(arg1, arg2)
650
+ arg1 = find_literal(arg1)
651
+ arg2 = Integer(arg2)
652
+ @stream << 78 << arg1 << arg2
653
+ @ip += 3
654
+ @current_block.add_stack(arg2+2, 1)
666
655
  @instruction = 78
667
656
  end
668
657
 
669
- def store_my_field(arg1)
658
+ def send_vcall(arg1)
659
+ arg1 = find_literal(arg1)
670
660
  @stream << 79 << arg1
671
661
  @ip += 2
672
- @current_block.add_stack(1, 1)
662
+ @current_block.add_stack(0, 1)
673
663
  @instruction = 79
674
664
  end
675
665
 
676
- def kind_of
677
- @stream << 80
678
- @ip += 1
679
- @current_block.add_stack(2, 1)
666
+ def set_call_flags(arg1)
667
+ @stream << 80 << arg1
668
+ @ip += 2
669
+ @current_block.add_stack(0, 0)
680
670
  @instruction = 80
681
671
  end
682
672
 
683
- def instance_of
684
- @stream << 81
685
- @ip += 1
686
- @current_block.add_stack(2, 1)
673
+ def set_const(arg1)
674
+ arg1 = find_literal(arg1)
675
+ @stream << 81 << arg1
676
+ @ip += 2
677
+ @current_block.add_stack(1, 1)
687
678
  @instruction = 81
688
679
  end
689
680
 
690
- def push_my_offset(arg1)
681
+ def set_const_at(arg1)
682
+ arg1 = find_literal(arg1)
691
683
  @stream << 82 << arg1
692
684
  @ip += 2
693
- @current_block.add_stack(0, 1)
685
+ @current_block.add_stack(2, 1)
694
686
  @instruction = 82
695
687
  end
696
688
 
697
- def zsuper(arg1)
689
+ def set_ivar(arg1)
698
690
  arg1 = find_literal(arg1)
699
691
  @stream << 83 << arg1
700
692
  @ip += 2
@@ -702,99 +694,114 @@ module CodeTools
702
694
  @instruction = 83
703
695
  end
704
696
 
705
- def push_block_arg
706
- @stream << 84
707
- @ip += 1
708
- @current_block.add_stack(0, 1)
697
+ def set_local(arg1)
698
+ @stream << 84 << arg1
699
+ @ip += 2
700
+ @current_block.add_stack(1, 1)
709
701
  @instruction = 84
710
702
  end
711
703
 
712
- def push_undef
713
- @stream << 85
714
- @ip += 1
715
- @current_block.add_stack(0, 1)
704
+ def set_local_depth(arg1, arg2)
705
+ @stream << 85 << arg1 << arg2
706
+ @ip += 3
707
+ @current_block.add_stack(1, 1)
716
708
  @instruction = 85
717
709
  end
718
710
 
719
- def push_stack_local(arg1)
711
+ def set_stack_local(arg1)
720
712
  @stream << 86 << arg1
721
713
  @ip += 2
722
- @current_block.add_stack(0, 1)
714
+ @current_block.add_stack(1, 1)
723
715
  @instruction = 86
724
716
  end
725
717
 
726
- def set_stack_local(arg1)
727
- @stream << 87 << arg1
728
- @ip += 2
729
- @current_block.add_stack(1, 1)
718
+ def setup_unwind(arg1, arg2)
719
+ location = @ip + 1
720
+ @stream << 87 << arg1 << arg2
721
+ @ip += 3
722
+ arg1.used_at location
723
+ @current_block.add_stack(0, 0)
724
+ @current_block.left = arg1.basic_block
725
+ @current_block.close
726
+ block = new_basic_block
727
+ @current_block.right = block
728
+ @current_block = block
730
729
  @instruction = 87
731
730
  end
732
731
 
733
- def push_has_block
732
+ def shift_array
734
733
  @stream << 88
735
734
  @ip += 1
736
- @current_block.add_stack(0, 1)
735
+ @current_block.add_stack(1, 2)
737
736
  @instruction = 88
738
737
  end
739
738
 
740
- def push_proc
741
- @stream << 89
742
- @ip += 1
743
- @current_block.add_stack(0, 1)
739
+ def store_my_field(arg1)
740
+ @stream << 89 << arg1
741
+ @ip += 2
742
+ @current_block.add_stack(1, 1)
744
743
  @instruction = 89
745
744
  end
746
745
 
747
- def check_frozen
746
+ def string_append
748
747
  @stream << 90
749
748
  @ip += 1
750
- @current_block.add_stack(1, 1)
749
+ @current_block.add_stack(2, 1)
751
750
  @instruction = 90
752
751
  end
753
752
 
754
- def cast_multi_value
755
- @stream << 91
756
- @ip += 1
757
- @current_block.add_stack(1, 1)
753
+ def string_build(arg1)
754
+ arg1 = Integer(arg1)
755
+ @stream << 91 << arg1
756
+ @ip += 2
757
+ @current_block.add_stack(arg1, 1)
758
758
  @instruction = 91
759
759
  end
760
760
 
761
- def invoke_primitive(arg1, arg2)
762
- arg1 = find_literal(arg1)
763
- arg2 = Integer(arg2)
764
- @stream << 92 << arg1 << arg2
765
- @ip += 3
766
- @current_block.add_stack(arg2, 1)
761
+ def string_dup
762
+ @stream << 92
763
+ @ip += 1
764
+ @current_block.add_stack(1, 1)
767
765
  @instruction = 92
768
766
  end
769
767
 
770
- def push_rubinius
768
+ def swap
771
769
  @stream << 93
772
770
  @ip += 1
773
- @current_block.add_stack(0, 1)
771
+ @current_block.add_stack(2, 2)
774
772
  @instruction = 93
775
773
  end
776
774
 
777
- def object_to_s(arg1)
778
- arg1 = find_literal(arg1)
779
- @stream << 94 << arg1
780
- @ip += 2
781
- @current_block.add_stack(1, 1)
775
+ def yield_debugger
776
+ @stream << 94
777
+ @ip += 1
778
+ @current_block.add_stack(0, 0)
782
779
  @instruction = 94
783
780
  end
784
781
 
785
- def push_type
786
- @stream << 95
787
- @ip += 1
788
- @current_block.add_stack(0, 1)
782
+ def yield_splat(arg1)
783
+ arg1 = Integer(arg1)
784
+ @stream << 95 << arg1
785
+ @ip += 2
786
+ @current_block.add_stack(arg1+1, 1)
789
787
  @instruction = 95
790
788
  end
791
789
 
792
- def push_mirror
793
- @stream << 96
794
- @ip += 1
795
- @current_block.add_stack(0, 1)
790
+ def yield_stack(arg1)
791
+ arg1 = Integer(arg1)
792
+ @stream << 96 << arg1
793
+ @ip += 2
794
+ @current_block.add_stack(arg1, 1)
796
795
  @instruction = 96
797
796
  end
798
797
 
798
+ def zsuper(arg1)
799
+ arg1 = find_literal(arg1)
800
+ @stream << 97 << arg1
801
+ @ip += 2
802
+ @current_block.add_stack(1, 1)
803
+ @instruction = 97
804
+ end
805
+
799
806
  end
800
807
  end
@@ -1,5 +1,5 @@
1
1
  module CodeTools
2
2
  class Compiler
3
- VERSION = "3.9"
3
+ VERSION = "3.10"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubinius-compiler
3
3
  version: !ruby/object:Gem::Version
4
- version: '3.9'
4
+ version: '3.10'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Shirai