~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to debian/generated-incs/insns_info.inc

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2010-07-31 17:08:39 UTC
  • mfrom: (1.1.4 upstream) (8.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100731170839-j034dmpdqt1cc4p6
Tags: 1.9.2~svn28788-1
* New release based on upstream snapshot from the 1.9.2 branch,
  after 1.9.2 RC2. That branch is (supposed to be) binary-compatible
  with the 1.9.1 branch.
  + Builds fine on i386. Closes: #580852.
* Upgrade to Standards-Version: 3.9.1. No changes needed.
* Updated generated incs.
* Patches that still need work:
  + Unclear status, need more investigation:
   090729_fix_Makefile_deps.dpatch
   090803_exclude_rdoc.dpatch
   203_adjust_base_of_search_path.dpatch
   902_define_YAML_in_yaml_stringio.rb.dpatch
   919_common.mk_tweaks.dpatch
   931_libruby_suffix.dpatch
   940_test_thread_mutex_sync_shorter.dpatch
  + Maybe not needed anymore, keeping but not applying.
   102_skip_test_copy_stream.dpatch (test doesn't block anymore?)
   104_skip_btest_io.dpatch (test doesn't block anymore?)
   201_gem_prelude.dpatch (we don't use that rubygems anyway?)
   202_gem_default_dir.dpatch (we don't use that rubygems anyway?)
   940_test_file_exhaustive_fails_as_root.dpatch
   940_test_priority_fails.dpatch
   100518_load_libc_libm.dpatch
* Add disable-tests.diff: disable some tests that cause failures on FreeBSD.
  Closes: #590002, #543805, #542927.
* However, many new failures on FreeBSD. Since that version is still an
  improvement, add the check that makes test suite failures non-fatal on
  FreeBSD again. That still needs to be investigated.
* Re-add 903_skip_base_ruby_check.dpatch
* Add build-dependency on ruby1.8 and drop all pre-generated files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/** -*-c-*-
2
 
  This file contains instruction information for yarv instruction sequence.
3
 
   
4
 
  ----
5
 
  This file is auto generated by insns2vm.rb
6
 
  DO NOT TOUCH!
7
 
  
8
 
  If you want to fix something, you must edit 'template/insns_info.inc.tmpl'
9
 
  or insns2vm.rb
10
 
 */
11
 
 
12
 
#define TS_ISEQ 'S'
13
 
#define TS_OFFSET 'O'
14
 
#define TS_GENTRY 'G'
15
 
#define TS_DINDEX 'D'
16
 
#define TS_VARIABLE '.'
17
 
#define TS_CDHASH 'H'
18
 
#define TS_IC 'C'
19
 
#define TS_ID 'I'
20
 
#define TS_NUM 'N'
21
 
#define TS_FUNCPTR 'F'
22
 
#define TS_VALUE 'V'
23
 
#define TS_LINDEX 'L'
24
 
 
25
 
static const char *const insn_name_info[] = {
26
 
  "nop",
27
 
  "getlocal",
28
 
  "setlocal",
29
 
  "getspecial",
30
 
  "setspecial",
31
 
  "getdynamic",
32
 
  "setdynamic",
33
 
  "getinstancevariable",
34
 
  "setinstancevariable",
35
 
  "getclassvariable",
36
 
  "setclassvariable",
37
 
  "getconstant",
38
 
  "setconstant",
39
 
  "getglobal",
40
 
  "setglobal",
41
 
  "putnil",
42
 
  "putself",
43
 
  "putobject",
44
 
  "putspecialobject",
45
 
  "putiseq",
46
 
  "putstring",
47
 
  "concatstrings",
48
 
  "tostring",
49
 
  "toregexp",
50
 
  "newarray",
51
 
  "duparray",
52
 
  "expandarray",
53
 
  "concatarray",
54
 
  "splatarray",
55
 
  "checkincludearray",
56
 
  "newhash",
57
 
  "newrange",
58
 
  "pop",
59
 
  "dup",
60
 
  "dupn",
61
 
  "swap",
62
 
  "reput",
63
 
  "topn",
64
 
  "setn",
65
 
  "adjuststack",
66
 
  "defined",
67
 
  "trace",
68
 
  "defineclass",
69
 
  "send",
70
 
  "invokesuper",
71
 
  "invokeblock",
72
 
  "leave",
73
 
  "finish",
74
 
  "throw",
75
 
  "jump",
76
 
  "branchif",
77
 
  "branchunless",
78
 
  "getinlinecache",
79
 
  "onceinlinecache",
80
 
  "setinlinecache",
81
 
  "opt_case_dispatch",
82
 
  "opt_checkenv",
83
 
  "opt_plus",
84
 
  "opt_minus",
85
 
  "opt_mult",
86
 
  "opt_div",
87
 
  "opt_mod",
88
 
  "opt_eq",
89
 
  "opt_neq",
90
 
  "opt_lt",
91
 
  "opt_le",
92
 
  "opt_gt",
93
 
  "opt_ge",
94
 
  "opt_ltlt",
95
 
  "opt_aref",
96
 
  "opt_aset",
97
 
  "opt_length",
98
 
  "opt_succ",
99
 
  "opt_not",
100
 
  "opt_regexpmatch1",
101
 
  "opt_regexpmatch2",
102
 
  "opt_call_c_function",
103
 
  "bitblt",
104
 
  "answer",
105
 
 
106
 
};
107
 
 
108
 
static const char *const insn_operand_info[] = {
109
 
  "", 
110
 
  "L", 
111
 
  "L", 
112
 
  "VN", 
113
 
  "V", 
114
 
  "DN", 
115
 
  "DN", 
116
 
  "I", 
117
 
  "I", 
118
 
  "I", 
119
 
  "I", 
120
 
  "I", 
121
 
  "I", 
122
 
  "G", 
123
 
  "G", 
124
 
  "", 
125
 
  "", 
126
 
  "V", 
127
 
  "N", 
128
 
  "S", 
129
 
  "V", 
130
 
  "N", 
131
 
  "", 
132
 
  "NN", 
133
 
  "N", 
134
 
  "V", 
135
 
  "NN", 
136
 
  "", 
137
 
  "V", 
138
 
  "V", 
139
 
  "N", 
140
 
  "N", 
141
 
  "", 
142
 
  "", 
143
 
  "N", 
144
 
  "", 
145
 
  "", 
146
 
  "N", 
147
 
  "N", 
148
 
  "N", 
149
 
  "NVV", 
150
 
  "N", 
151
 
  "ISN", 
152
 
  "INSNC", 
153
 
  "NSN", 
154
 
  "NN", 
155
 
  "", 
156
 
  "", 
157
 
  "N", 
158
 
  "O", 
159
 
  "O", 
160
 
  "O", 
161
 
  "CO", 
162
 
  "CO", 
163
 
  "O", 
164
 
  "HO", 
165
 
  "", 
166
 
  "", 
167
 
  "", 
168
 
  "", 
169
 
  "", 
170
 
  "", 
171
 
  "C", 
172
 
  "CC", 
173
 
  "", 
174
 
  "", 
175
 
  "", 
176
 
  "", 
177
 
  "", 
178
 
  "", 
179
 
  "", 
180
 
  "", 
181
 
  "", 
182
 
  "C", 
183
 
  "V", 
184
 
  "", 
185
 
  "F", 
186
 
  "", 
187
 
  "", 
188
 
 
189
 
};
190
 
 
191
 
static const int insn_len_info[] = {
192
 
  1,
193
 
  2,
194
 
  2,
195
 
  3,
196
 
  2,
197
 
  3,
198
 
  3,
199
 
  2,
200
 
  2,
201
 
  2,
202
 
  2,
203
 
  2,
204
 
  2,
205
 
  2,
206
 
  2,
207
 
  1,
208
 
  1,
209
 
  2,
210
 
  2,
211
 
  2,
212
 
  2,
213
 
  2,
214
 
  1,
215
 
  3,
216
 
  2,
217
 
  2,
218
 
  3,
219
 
  1,
220
 
  2,
221
 
  2,
222
 
  2,
223
 
  2,
224
 
  1,
225
 
  1,
226
 
  2,
227
 
  1,
228
 
  1,
229
 
  2,
230
 
  2,
231
 
  2,
232
 
  4,
233
 
  2,
234
 
  4,
235
 
  6,
236
 
  4,
237
 
  3,
238
 
  1,
239
 
  1,
240
 
  2,
241
 
  2,
242
 
  2,
243
 
  2,
244
 
  3,
245
 
  3,
246
 
  2,
247
 
  3,
248
 
  1,
249
 
  1,
250
 
  1,
251
 
  1,
252
 
  1,
253
 
  1,
254
 
  2,
255
 
  3,
256
 
  1,
257
 
  1,
258
 
  1,
259
 
  1,
260
 
  1,
261
 
  1,
262
 
  1,
263
 
  1,
264
 
  1,
265
 
  2,
266
 
  2,
267
 
  1,
268
 
  2,
269
 
  1,
270
 
  1,
271
 
 
272
 
};
273
 
 
274
 
#ifdef USE_INSN_RET_NUM
275
 
static const int insn_stack_push_num_info[] = {
276
 
  0,
277
 
  1,
278
 
  0,
279
 
  1,
280
 
  0,
281
 
  1,
282
 
  0,
283
 
  1,
284
 
  0,
285
 
  1,
286
 
  0,
287
 
  1,
288
 
  0,
289
 
  1,
290
 
  0,
291
 
  1,
292
 
  1,
293
 
  1,
294
 
  1,
295
 
  1,
296
 
  1,
297
 
  1,
298
 
  1,
299
 
  1,
300
 
  1,
301
 
  1,
302
 
  1,
303
 
  1,
304
 
  1,
305
 
  2,
306
 
  1,
307
 
  1,
308
 
  0,
309
 
  2,
310
 
  1,
311
 
  2,
312
 
  1,
313
 
  1,
314
 
  1,
315
 
  1,
316
 
  1,
317
 
  0,
318
 
  1,
319
 
  1,
320
 
  1,
321
 
  1,
322
 
  1,
323
 
  1,
324
 
  1,
325
 
  0,
326
 
  0,
327
 
  0,
328
 
  1,
329
 
  1,
330
 
  1,
331
 
  0,
332
 
  0,
333
 
  1,
334
 
  1,
335
 
  1,
336
 
  1,
337
 
  1,
338
 
  1,
339
 
  1,
340
 
  1,
341
 
  1,
342
 
  1,
343
 
  1,
344
 
  1,
345
 
  1,
346
 
  1,
347
 
  1,
348
 
  1,
349
 
  1,
350
 
  1,
351
 
  1,
352
 
  0,
353
 
  1,
354
 
  1,
355
 
 
356
 
};
357
 
#endif
358
 
 
359
 
#ifdef USE_INSN_STACK_INCREASE
360
 
static int
361
 
insn_stack_increase(int depth, int insn, VALUE *opes)
362
 
{
363
 
  switch(insn){
364
 
        case BIN(nop):{
365
 
          return depth + 0;
366
 
        }
367
 
        case BIN(getlocal):{
368
 
          return depth + 1;
369
 
        }
370
 
        case BIN(setlocal):{
371
 
          return depth + -1;
372
 
        }
373
 
        case BIN(getspecial):{
374
 
          return depth + 1;
375
 
        }
376
 
        case BIN(setspecial):{
377
 
          return depth + -1;
378
 
        }
379
 
        case BIN(getdynamic):{
380
 
          return depth + 1;
381
 
        }
382
 
        case BIN(setdynamic):{
383
 
          return depth + -1;
384
 
        }
385
 
        case BIN(getinstancevariable):{
386
 
          return depth + 1;
387
 
        }
388
 
        case BIN(setinstancevariable):{
389
 
          return depth + -1;
390
 
        }
391
 
        case BIN(getclassvariable):{
392
 
          return depth + 1;
393
 
        }
394
 
        case BIN(setclassvariable):{
395
 
          return depth + -1;
396
 
        }
397
 
        case BIN(getconstant):{
398
 
          return depth + 0;
399
 
        }
400
 
        case BIN(setconstant):{
401
 
          return depth + -2;
402
 
        }
403
 
        case BIN(getglobal):{
404
 
          return depth + 1;
405
 
        }
406
 
        case BIN(setglobal):{
407
 
          return depth + -1;
408
 
        }
409
 
        case BIN(putnil):{
410
 
          return depth + 1;
411
 
        }
412
 
        case BIN(putself):{
413
 
          return depth + 1;
414
 
        }
415
 
        case BIN(putobject):{
416
 
          return depth + 1;
417
 
        }
418
 
        case BIN(putspecialobject):{
419
 
          return depth + 1;
420
 
        }
421
 
        case BIN(putiseq):{
422
 
          return depth + 1;
423
 
        }
424
 
        case BIN(putstring):{
425
 
          return depth + 1;
426
 
        }
427
 
        case BIN(concatstrings):{
428
 
          int inc = 0;
429
 
        rb_num_t num = FIX2INT(opes[0]);
430
 
        inc += 1 - num;;
431
 
        return depth + inc;
432
 
        }
433
 
        case BIN(tostring):{
434
 
          return depth + 0;
435
 
        }
436
 
        case BIN(toregexp):{
437
 
          int inc = 0;
438
 
        rb_num_t cnt = FIX2INT(opes[1]);
439
 
        inc += 1 - cnt;;
440
 
        return depth + inc;
441
 
        }
442
 
        case BIN(newarray):{
443
 
          int inc = 0;
444
 
        rb_num_t num = FIX2INT(opes[0]);
445
 
        inc += 1 - num;;
446
 
        return depth + inc;
447
 
        }
448
 
        case BIN(duparray):{
449
 
          return depth + 1;
450
 
        }
451
 
        case BIN(expandarray):{
452
 
          int inc = 0;
453
 
        rb_num_t num = FIX2INT(opes[0]);
454
 
        rb_num_t flag = FIX2INT(opes[1]);
455
 
        inc += num - 1 + (flag & 1 ? 1 : 0);;
456
 
        return depth + inc;
457
 
        }
458
 
        case BIN(concatarray):{
459
 
          return depth + -1;
460
 
        }
461
 
        case BIN(splatarray):{
462
 
          return depth + 0;
463
 
        }
464
 
        case BIN(checkincludearray):{
465
 
          return depth + 0;
466
 
        }
467
 
        case BIN(newhash):{
468
 
          int inc = 0;
469
 
        rb_num_t num = FIX2INT(opes[0]);
470
 
        inc += 1 - num;;
471
 
        return depth + inc;
472
 
        }
473
 
        case BIN(newrange):{
474
 
          return depth + -1;
475
 
        }
476
 
        case BIN(pop):{
477
 
          return depth + -1;
478
 
        }
479
 
        case BIN(dup):{
480
 
          return depth + 1;
481
 
        }
482
 
        case BIN(dupn):{
483
 
          int inc = 0;
484
 
        rb_num_t n = FIX2INT(opes[0]);
485
 
        inc += n;;
486
 
        return depth + inc;
487
 
        }
488
 
        case BIN(swap):{
489
 
          return depth + 0;
490
 
        }
491
 
        case BIN(reput):{
492
 
          int inc = 0;
493
 
        inc += 0;;
494
 
        return depth + inc;
495
 
        }
496
 
        case BIN(topn):{
497
 
          int inc = 0;
498
 
        inc += 1;;
499
 
        return depth + inc;
500
 
        }
501
 
        case BIN(setn):{
502
 
          int inc = 0;
503
 
        inc += 0;
504
 
        return depth + inc;
505
 
        }
506
 
        case BIN(adjuststack):{
507
 
          int inc = 0;
508
 
        rb_num_t n = FIX2INT(opes[0]);
509
 
        inc -= n;
510
 
        return depth + inc;
511
 
        }
512
 
        case BIN(defined):{
513
 
          return depth + 0;
514
 
        }
515
 
        case BIN(trace):{
516
 
          return depth + 0;
517
 
        }
518
 
        case BIN(defineclass):{
519
 
          return depth + -1;
520
 
        }
521
 
        case BIN(send):{
522
 
          int inc = 0;
523
 
        rb_num_t op_argc = FIX2INT(opes[1]);
524
 
        rb_num_t op_flag = FIX2INT(opes[3]);
525
 
        inc += - (op_argc + ((op_flag & VM_CALL_ARGS_BLOCKARG_BIT) ? 1 : 0));;
526
 
        return depth + inc;
527
 
        }
528
 
        case BIN(invokesuper):{
529
 
          int inc = 0;
530
 
        rb_num_t op_argc = FIX2INT(opes[0]);
531
 
        rb_num_t op_flag = FIX2INT(opes[2]);
532
 
        inc += - (op_argc + ((op_flag & VM_CALL_ARGS_BLOCKARG_BIT) ? 1 : 0));;
533
 
        return depth + inc;
534
 
        }
535
 
        case BIN(invokeblock):{
536
 
          int inc = 0;
537
 
        rb_num_t num = FIX2INT(opes[0]);
538
 
        inc += 1 - num;;
539
 
        return depth + inc;
540
 
        }
541
 
        case BIN(leave):{
542
 
          return depth + 0;
543
 
        }
544
 
        case BIN(finish):{
545
 
          return depth + 0;
546
 
        }
547
 
        case BIN(throw):{
548
 
          return depth + 0;
549
 
        }
550
 
        case BIN(jump):{
551
 
          return depth + 0;
552
 
        }
553
 
        case BIN(branchif):{
554
 
          return depth + -1;
555
 
        }
556
 
        case BIN(branchunless):{
557
 
          return depth + -1;
558
 
        }
559
 
        case BIN(getinlinecache):{
560
 
          return depth + 1;
561
 
        }
562
 
        case BIN(onceinlinecache):{
563
 
          return depth + 1;
564
 
        }
565
 
        case BIN(setinlinecache):{
566
 
          return depth + 0;
567
 
        }
568
 
        case BIN(opt_case_dispatch):{
569
 
          int inc = 0;
570
 
        inc += -1;;
571
 
        return depth + inc;
572
 
        }
573
 
        case BIN(opt_checkenv):{
574
 
          return depth + 0;
575
 
        }
576
 
        case BIN(opt_plus):{
577
 
          return depth + -1;
578
 
        }
579
 
        case BIN(opt_minus):{
580
 
          return depth + -1;
581
 
        }
582
 
        case BIN(opt_mult):{
583
 
          return depth + -1;
584
 
        }
585
 
        case BIN(opt_div):{
586
 
          return depth + -1;
587
 
        }
588
 
        case BIN(opt_mod):{
589
 
          return depth + -1;
590
 
        }
591
 
        case BIN(opt_eq):{
592
 
          return depth + -1;
593
 
        }
594
 
        case BIN(opt_neq):{
595
 
          return depth + -1;
596
 
        }
597
 
        case BIN(opt_lt):{
598
 
          return depth + -1;
599
 
        }
600
 
        case BIN(opt_le):{
601
 
          return depth + -1;
602
 
        }
603
 
        case BIN(opt_gt):{
604
 
          return depth + -1;
605
 
        }
606
 
        case BIN(opt_ge):{
607
 
          return depth + -1;
608
 
        }
609
 
        case BIN(opt_ltlt):{
610
 
          return depth + -1;
611
 
        }
612
 
        case BIN(opt_aref):{
613
 
          return depth + -1;
614
 
        }
615
 
        case BIN(opt_aset):{
616
 
          return depth + -2;
617
 
        }
618
 
        case BIN(opt_length):{
619
 
          return depth + 0;
620
 
        }
621
 
        case BIN(opt_succ):{
622
 
          return depth + 0;
623
 
        }
624
 
        case BIN(opt_not):{
625
 
          return depth + 0;
626
 
        }
627
 
        case BIN(opt_regexpmatch1):{
628
 
          return depth + 0;
629
 
        }
630
 
        case BIN(opt_regexpmatch2):{
631
 
          return depth + -1;
632
 
        }
633
 
        case BIN(opt_call_c_function):{
634
 
          return depth + 0;
635
 
        }
636
 
        case BIN(bitblt):{
637
 
          return depth + 1;
638
 
        }
639
 
        case BIN(answer):{
640
 
          return depth + 1;
641
 
        }
642
 
 
643
 
  default:
644
 
    rb_bug("insn_sp_increase: unreachable");
645
 
  }
646
 
  return 0;
647
 
}
648
 
#endif
649
 
 
650
 
/* some utilities */
651
 
 
652
 
static int
653
 
insn_len(int insn)
654
 
{
655
 
  return insn_len_info[insn];
656
 
}
657
 
 
658
 
static const char *
659
 
insn_name(int insn)
660
 
{
661
 
  return insn_name_info[insn];
662
 
}
663
 
 
664
 
static const char *
665
 
insn_op_types(int insn)
666
 
{
667
 
  return insn_operand_info[insn];
668
 
}
669
 
 
670
 
static int
671
 
insn_op_type(int insn, int pos)
672
 
{
673
 
  int len = insn_len(insn) - 1;
674
 
  if(pos < len){
675
 
    return insn_operand_info[insn][pos];
676
 
  }
677
 
  else{
678
 
    return 0;
679
 
  }
680
 
}
681
 
 
682
 
#ifdef USE_INSN_RET_NUM
683
 
static int
684
 
insn_ret_num(int insn)
685
 
{
686
 
  return insn_stack_push_num_info[insn];
687
 
}
688
 
#endif