Skip to content

Instantly share code, notes, and snippets.

@shyouhei
Created January 9, 2018 10:31
Show Gist options
  • Save shyouhei/827cc9b614d3894809edd7680b7053e0 to your computer and use it in GitHub Desktop.
Save shyouhei/827cc9b614d3894809edd7680b7053e0 to your computer and use it in GitHub Desktop.
/* -*- mode:c; style:ruby; coding: utf-8; indent-tabs-mode: nil -*- */
/* This is an auto-generated file and is a part of the programming language
* Ruby. The person who created a program to generate this file (``I''
* hereafter) would like to refrain from defining licensing of this generated
* source code.
*
* This file consist of many small parts of codes copyrighted by each authors,
* not only the ``I'' person. Those original authors agree with some
* open-source license. I believe that the license we agree is the condition
* mentioned in the file COPYING. It states "4. You may modify and include
* the part of the software into any other software ...". But the problem is,
* the license never makes it clear if such modified parts still remain in the
* same license, or not. The fact that we agree with the source code's
* licensing terms do not automatically define that of generated ones. This is
* the reason why this file is under unclear situation. All that I know is
* that above provision guarantees this file to exist.
*
* Please let me hesitate to declare something about this nuanced contract. I
* am not in the position to take over other authors' license to merge into my
* one. Changing them to (say) GPLv3 is not doable by myself. Perhaps someday
* it might turn out to be okay to say this file is under a license. I wish the
* situation would become more clear in the future. */
/*******************************************************************/
/*******************************************************************/
/*******************************************************************/
/**
This file contains instruction information for yarv instruction sequence..
----
This file is auto generated by insns2vm.rb
DO NOT TOUCH!
If you want to fix something, you must edit "/Users/urabe.shyouhei/data/src/rewrite-generator/tool/ruby_vm/views/insns_info.inc.erb"
or tool/insns2vm.rb
*/
enum ruby_insn_type_chars {
TS_VARIABLE = '.',
TS_CALLCACHE = 'E',
TS_CALLINFO = 'C',
TS_CDHASH = 'H',
TS_GENTRY = 'G',
TS_IC = 'K',
TS_ID = 'I',
TS_ISEQ = 'S',
TS_OFFSET = 'O',
TS_VALUE = 'V',
TS_LINDEX = 'L',
TS_FUNCPTR = 'F',
TS_NUM = 'N'
};
CONSTFUNC(MAYBE_UNUSED(static const char *insn_name(VALUE insn)));
extern const char *rb_vm_insn_name_info;
extern const unsigned short rb_vm_insn_name_offset[];
#ifdef RUBY_VM_INSNS_INFO
const unsigned short rb_vm_insn_name_offset[] = {
0, 4, 13, 22, 36, 50, 69, 80, 91, 111, 131, 148,
165, 177, 189, 199, 209, 216, 224, 234, 251, 259, 269, 283,
292, 305, 314, 321, 330, 339, 351, 363, 374, 382, 391, 395,
399, 404, 409, 417, 423, 428, 433, 445, 453, 464, 477, 491,
503, 508, 523, 538, 555, 572, 595, 607, 619, 625, 631, 636,
645, 658, 668, 681, 696, 711, 716, 734, 743, 753, 762, 770,
778, 785, 793, 800, 807, 814, 821, 830, 839, 848, 862, 876,
887, 896, 908, 917, 925, 942, 959, 979, 986, 993, 1007, 1021,
1035, 1049, 1070, 1091, 1101, 1116, 1131, 1151, 1171, 1196, 1213, 1230,
1256, 1282, 1305, 1328, 1346, 1364, 1380, 1396, 1409, 1423, 1439, 1462,
1476, 1492, 1512, 1527, 1546, 1561, 1574, 1589, 1604, 1622, 1640, 1657,
1671, 1686, 1696, 1706, 1717, 1728, 1742, 1754, 1765, 1776, 1794, 1808,
1825, 1844, 1864, 1882, 1893, 1914, 1935, 1958, 1981, 2010, 2028, 2046,
2058, 2070, 2081, 2096, 2115, 2131, 2150, 2171, 2192, 2203, 2227, 2242,
2258, 2273, 2287, 2301, 2314, 2328, 2341, 2354, 2367, 2380, 2395, 2410,
2425, 2445, 2465, 2482, 2497, 2515, 2530, 2544, 2567, 2590, 2616, 2629,
2642, 2662, 2682, 2702, 2722, 2749,
};
ASSERT_VM_INSTRUCTION_SIZE(rb_vm_insn_name_offset);
static PACKED_STRUCT(struct {
const char L000[ 4]; const char L001[ 9]; const char L002[ 9];
const char L003[14]; const char L004[14]; const char L005[19];
const char L006[11]; const char L007[11]; const char L008[20];
const char L009[20]; const char L010[17]; const char L011[17];
const char L012[12]; const char L013[12]; const char L014[10];
const char L015[10]; const char L016[ 7]; const char L017[ 8];
const char L018[10]; const char L019[17]; const char L020[ 8];
const char L021[10]; const char L022[14]; const char L023[ 9];
const char L024[13]; const char L025[ 9]; const char L026[ 7];
const char L027[ 9]; const char L028[ 9]; const char L029[12];
const char L030[12]; const char L031[11]; const char L032[ 8];
const char L033[ 9]; const char L034[ 4]; const char L035[ 4];
const char L036[ 5]; const char L037[ 5]; const char L038[ 8];
const char L039[ 6]; const char L040[ 5]; const char L041[ 5];
const char L042[12]; const char L043[ 8]; const char L044[11];
const char L045[13]; const char L046[14]; const char L047[12];
const char L048[ 5]; const char L049[15]; const char L050[15];
const char L051[17]; const char L052[17]; const char L053[23];
const char L054[12]; const char L055[12]; const char L056[ 6];
const char L057[ 6]; const char L058[ 5]; const char L059[ 9];
const char L060[13]; const char L061[10]; const char L062[13];
const char L063[15]; const char L064[15]; const char L065[ 5];
const char L066[18]; const char L067[ 9]; const char L068[10];
const char L069[ 9]; const char L070[ 8]; const char L071[ 8];
const char L072[ 7]; const char L073[ 8]; const char L074[ 7];
const char L075[ 7]; const char L076[ 7]; const char L077[ 7];
const char L078[ 9]; const char L079[ 9]; const char L080[ 9];
const char L081[14]; const char L082[14]; const char L083[11];
const char L084[ 9]; const char L085[12]; const char L086[ 9];
const char L087[ 8]; const char L088[17]; const char L089[17];
const char L090[20]; const char L091[ 7]; const char L092[ 7];
const char L093[14]; const char L094[14]; const char L095[14];
const char L096[14]; const char L097[21]; const char L098[21];
const char L099[10]; const char L100[15]; const char L101[15];
const char L102[20]; const char L103[20]; const char L104[25];
const char L105[17]; const char L106[17]; const char L107[26];
const char L108[26]; const char L109[23]; const char L110[23];
const char L111[18]; const char L112[18]; const char L113[16];
const char L114[16]; const char L115[13]; const char L116[14];
const char L117[16]; const char L118[23]; const char L119[14];
const char L120[16]; const char L121[20]; const char L122[15];
const char L123[19]; const char L124[15]; const char L125[13];
const char L126[15]; const char L127[15]; const char L128[18];
const char L129[18]; const char L130[17]; const char L131[14];
const char L132[15]; const char L133[10]; const char L134[10];
const char L135[11]; const char L136[11]; const char L137[14];
const char L138[12]; const char L139[11]; const char L140[11];
const char L141[18]; const char L142[14]; const char L143[17];
const char L144[19]; const char L145[20]; const char L146[18];
const char L147[11]; const char L148[21]; const char L149[21];
const char L150[23]; const char L151[23]; const char L152[29];
const char L153[18]; const char L154[18]; const char L155[12];
const char L156[12]; const char L157[11]; const char L158[15];
const char L159[19]; const char L160[16]; const char L161[19];
const char L162[21]; const char L163[21]; const char L164[11];
const char L165[24]; const char L166[15]; const char L167[16];
const char L168[15]; const char L169[14]; const char L170[14];
const char L171[13]; const char L172[14]; const char L173[13];
const char L174[13]; const char L175[13]; const char L176[13];
const char L177[15]; const char L178[15]; const char L179[15];
const char L180[20]; const char L181[20]; const char L182[17];
const char L183[15]; const char L184[18]; const char L185[15];
const char L186[14]; const char L187[23]; const char L188[23];
const char L189[26]; const char L190[13]; const char L191[13];
const char L192[20]; const char L193[20]; const char L194[20];
const char L195[20]; const char L196[27]; const char L197[27];
}) const rb_vm_insn_name_base = {
"nop" , "getlocal" ,
"setlocal" , "getblockparam" ,
"setblockparam" , "getblockparamproxy" ,
"getspecial" , "setspecial" ,
"getinstancevariable" , "setinstancevariable" ,
"getclassvariable" , "setclassvariable" ,
"getconstant" , "setconstant" ,
"getglobal" , "setglobal" ,
"putnil" , "putself" ,
"putobject" , "putspecialobject" ,
"putiseq" , "putstring" ,
"concatstrings" , "tostring" ,
"freezestring" , "toregexp" ,
"intern" , "newarray" ,
"duparray" , "expandarray" ,
"concatarray" , "splatarray" ,
"newhash" , "newrange" ,
"pop" , "dup" ,
"dupn" , "swap" ,
"reverse" , "reput" ,
"topn" , "setn" ,
"adjuststack" , "defined" ,
"checkmatch" , "checkkeyword" ,
"tracecoverage" , "defineclass" ,
"send" , "opt_str_freeze" ,
"opt_str_uminus" , "opt_newarray_max" ,
"opt_newarray_min" , "opt_send_without_block" ,
"invokesuper" , "invokeblock" ,
"leave" , "throw" ,
"jump" , "branchif" ,
"branchunless" , "branchnil" ,
"branchiftype" , "getinlinecache" ,
"setinlinecache" , "once" ,
"opt_case_dispatch" , "opt_plus" ,
"opt_minus" , "opt_mult" ,
"opt_div" , "opt_mod" ,
"opt_eq" , "opt_neq" ,
"opt_lt" , "opt_le" ,
"opt_gt" , "opt_ge" ,
"opt_ltlt" , "opt_aref" ,
"opt_aset" , "opt_aset_with" ,
"opt_aref_with" , "opt_length" ,
"opt_size" , "opt_empty_p" ,
"opt_succ" , "opt_not" ,
"opt_regexpmatch1" , "opt_regexpmatch2" ,
"opt_call_c_function" , "bitblt" ,
"answer" , "getlocal_WC_0" ,
"getlocal_WC_1" , "setlocal_WC_0" ,
"setlocal_WC_1" , "putobject_INT2FIX_0_" ,
"putobject_INT2FIX_1_" , "trace_nop" ,
"trace_getlocal" , "trace_setlocal" ,
"trace_getblockparam" , "trace_setblockparam" ,
"trace_getblockparamproxy" , "trace_getspecial" ,
"trace_setspecial" , "trace_getinstancevariable" ,
"trace_setinstancevariable" , "trace_getclassvariable" ,
"trace_setclassvariable" , "trace_getconstant" ,
"trace_setconstant" , "trace_getglobal" ,
"trace_setglobal" , "trace_putnil" ,
"trace_putself" , "trace_putobject" ,
"trace_putspecialobject" , "trace_putiseq" ,
"trace_putstring" , "trace_concatstrings" ,
"trace_tostring" , "trace_freezestring" ,
"trace_toregexp" , "trace_intern" ,
"trace_newarray" , "trace_duparray" ,
"trace_expandarray" , "trace_concatarray" ,
"trace_splatarray" , "trace_newhash" ,
"trace_newrange" , "trace_pop" ,
"trace_dup" , "trace_dupn" ,
"trace_swap" , "trace_reverse" ,
"trace_reput" , "trace_topn" ,
"trace_setn" , "trace_adjuststack" ,
"trace_defined" , "trace_checkmatch" ,
"trace_checkkeyword" , "trace_tracecoverage" ,
"trace_defineclass" , "trace_send" ,
"trace_opt_str_freeze" , "trace_opt_str_uminus" ,
"trace_opt_newarray_max" , "trace_opt_newarray_min" ,
"trace_opt_send_without_block", "trace_invokesuper" ,
"trace_invokeblock" , "trace_leave" ,
"trace_throw" , "trace_jump" ,
"trace_branchif" , "trace_branchunless" ,
"trace_branchnil" , "trace_branchiftype" ,
"trace_getinlinecache" , "trace_setinlinecache" ,
"trace_once" , "trace_opt_case_dispatch" ,
"trace_opt_plus" , "trace_opt_minus" ,
"trace_opt_mult" , "trace_opt_div" ,
"trace_opt_mod" , "trace_opt_eq" ,
"trace_opt_neq" , "trace_opt_lt" ,
"trace_opt_le" , "trace_opt_gt" ,
"trace_opt_ge" , "trace_opt_ltlt" ,
"trace_opt_aref" , "trace_opt_aset" ,
"trace_opt_aset_with" , "trace_opt_aref_with" ,
"trace_opt_length" , "trace_opt_size" ,
"trace_opt_empty_p" , "trace_opt_succ" ,
"trace_opt_not" , "trace_opt_regexpmatch1" ,
"trace_opt_regexpmatch2" , "trace_opt_call_c_function" ,
"trace_bitblt" , "trace_answer" ,
"trace_getlocal_WC_0" , "trace_getlocal_WC_1" ,
"trace_setlocal_WC_0" , "trace_setlocal_WC_1" ,
"trace_putobject_INT2FIX_0_" , "trace_putobject_INT2FIX_1_" ,
};
const char *rb_vm_insn_name_info = (const char *)&rb_vm_insn_name_base;
#endif
const char *
insn_name(VALUE i)
{
return &rb_vm_insn_name_info[rb_vm_insn_name_offset[i]];
}
CONSTFUNC(MAYBE_UNUSED(static int insn_len(VALUE insn)));
extern const char rb_vm_insn_len_info[];
#ifdef RUBY_VM_INSNS_INFO
const char rb_vm_insn_len_info[] = {
1, 3, 3, 3, 3, 3, 3, 2, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 1, 2,
3, 1, 2, 2, 3, 1, 2, 2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 4, 2, 3, 3, 4, 4, 2,
2, 2, 2, 3, 4, 2, 1, 2, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3,
3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 3, 2, 3, 2, 1, 1, 2, 2, 2, 2, 1, 1, 1,
3, 3, 3, 3, 3, 3, 2, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 1, 2, 3,
1, 2, 2, 3, 1, 2, 2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 4, 2, 3, 3, 4, 4, 2, 2,
2, 2, 3, 4, 2, 1, 2, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3,
3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 3, 2, 3, 2, 1, 1, 2, 2, 2, 2, 1, 1,
};
#endif
int
insn_len(VALUE i)
{
return rb_vm_insn_len_info[i];
}
CONSTFUNC(MAYBE_UNUSED(static const char *insn_op_types(VALUE insn)));
CONSTFUNC(MAYBE_UNUSED(static int insn_op_type(VALUE insn, long pos)));
extern const char *rb_vm_insn_op_info;
extern const unsigned short rb_vm_insn_op_offset[];
#ifdef RUBY_VM_INSNS_INFO
const unsigned short rb_vm_insn_op_offset[] = {
0, 1, 4, 7, 10, 13, 16, 19, 21, 24, 27, 29, 31, 33,
35, 37, 39, 40, 41, 43, 45, 47, 49, 51, 52, 54, 57, 58,
60, 62, 65, 66, 68, 70, 72, 73, 74, 76, 77, 79, 80, 82,
84, 86, 90, 92, 95, 98, 102, 106, 108, 110, 112, 114, 117, 121,
123, 124, 126, 128, 130, 132, 134, 137, 140, 142, 145, 148, 151, 154,
157, 160, 163, 166, 171, 174, 177, 180, 183, 186, 189, 192, 196, 200,
203, 206, 209, 212, 215, 217, 220, 222, 223, 224, 226, 228, 230, 232,
233, 234, 235, 238, 241, 244, 247, 250, 253, 255, 258, 261, 263, 265,
267, 269, 271, 273, 274, 275, 277, 279, 281, 283, 285, 286, 288, 291,
292, 294, 296, 299, 300, 302, 304, 306, 307, 308, 310, 311, 313, 314,
316, 318, 320, 324, 326, 329, 332, 336, 340, 342, 344, 346, 348, 351,
355, 357, 358, 360, 362, 364, 366, 368, 371, 374, 376, 379, 382, 385,
388, 391, 394, 397, 400, 405, 408, 411, 414, 417, 420, 423, 426, 430,
434, 437, 440, 443, 446, 449, 451, 454, 456, 457, 458, 460, 462, 464,
466, 467,
};
ASSERT_VM_INSTRUCTION_SIZE(rb_vm_insn_op_offset);
static PACKED_STRUCT(struct {
const char L000[ 1]; const char L001[ 3]; const char L002[ 3];
const char L003[ 3]; const char L004[ 3]; const char L005[ 3];
const char L006[ 3]; const char L007[ 2]; const char L008[ 3];
const char L009[ 3]; const char L010[ 2]; const char L011[ 2];
const char L012[ 2]; const char L013[ 2]; const char L014[ 2];
const char L015[ 2]; const char L016[ 1]; const char L017[ 1];
const char L018[ 2]; const char L019[ 2]; const char L020[ 2];
const char L021[ 2]; const char L022[ 2]; const char L023[ 1];
const char L024[ 2]; const char L025[ 3]; const char L026[ 1];
const char L027[ 2]; const char L028[ 2]; const char L029[ 3];
const char L030[ 1]; const char L031[ 2]; const char L032[ 2];
const char L033[ 2]; const char L034[ 1]; const char L035[ 1];
const char L036[ 2]; const char L037[ 1]; const char L038[ 2];
const char L039[ 1]; const char L040[ 2]; const char L041[ 2];
const char L042[ 2]; const char L043[ 4]; const char L044[ 2];
const char L045[ 3]; const char L046[ 3]; const char L047[ 4];
const char L048[ 4]; const char L049[ 2]; const char L050[ 2];
const char L051[ 2]; const char L052[ 2]; const char L053[ 3];
const char L054[ 4]; const char L055[ 2]; const char L056[ 1];
const char L057[ 2]; const char L058[ 2]; const char L059[ 2];
const char L060[ 2]; const char L061[ 2]; const char L062[ 3];
const char L063[ 3]; const char L064[ 2]; const char L065[ 3];
const char L066[ 3]; const char L067[ 3]; const char L068[ 3];
const char L069[ 3]; const char L070[ 3]; const char L071[ 3];
const char L072[ 3]; const char L073[ 5]; const char L074[ 3];
const char L075[ 3]; const char L076[ 3]; const char L077[ 3];
const char L078[ 3]; const char L079[ 3]; const char L080[ 3];
const char L081[ 4]; const char L082[ 4]; const char L083[ 3];
const char L084[ 3]; const char L085[ 3]; const char L086[ 3];
const char L087[ 3]; const char L088[ 2]; const char L089[ 3];
const char L090[ 2]; const char L091[ 1]; const char L092[ 1];
const char L093[ 2]; const char L094[ 2]; const char L095[ 2];
const char L096[ 2]; const char L097[ 1]; const char L098[ 1];
const char L099[ 1]; const char L100[ 3]; const char L101[ 3];
const char L102[ 3]; const char L103[ 3]; const char L104[ 3];
const char L105[ 3]; const char L106[ 2]; const char L107[ 3];
const char L108[ 3]; const char L109[ 2]; const char L110[ 2];
const char L111[ 2]; const char L112[ 2]; const char L113[ 2];
const char L114[ 2]; const char L115[ 1]; const char L116[ 1];
const char L117[ 2]; const char L118[ 2]; const char L119[ 2];
const char L120[ 2]; const char L121[ 2]; const char L122[ 1];
const char L123[ 2]; const char L124[ 3]; const char L125[ 1];
const char L126[ 2]; const char L127[ 2]; const char L128[ 3];
const char L129[ 1]; const char L130[ 2]; const char L131[ 2];
const char L132[ 2]; const char L133[ 1]; const char L134[ 1];
const char L135[ 2]; const char L136[ 1]; const char L137[ 2];
const char L138[ 1]; const char L139[ 2]; const char L140[ 2];
const char L141[ 2]; const char L142[ 4]; const char L143[ 2];
const char L144[ 3]; const char L145[ 3]; const char L146[ 4];
const char L147[ 4]; const char L148[ 2]; const char L149[ 2];
const char L150[ 2]; const char L151[ 2]; const char L152[ 3];
const char L153[ 4]; const char L154[ 2]; const char L155[ 1];
const char L156[ 2]; const char L157[ 2]; const char L158[ 2];
const char L159[ 2]; const char L160[ 2]; const char L161[ 3];
const char L162[ 3]; const char L163[ 2]; const char L164[ 3];
const char L165[ 3]; const char L166[ 3]; const char L167[ 3];
const char L168[ 3]; const char L169[ 3]; const char L170[ 3];
const char L171[ 3]; const char L172[ 5]; const char L173[ 3];
const char L174[ 3]; const char L175[ 3]; const char L176[ 3];
const char L177[ 3]; const char L178[ 3]; const char L179[ 3];
const char L180[ 4]; const char L181[ 4]; const char L182[ 3];
const char L183[ 3]; const char L184[ 3]; const char L185[ 3];
const char L186[ 3]; const char L187[ 2]; const char L188[ 3];
const char L189[ 2]; const char L190[ 1]; const char L191[ 1];
const char L192[ 2]; const char L193[ 2]; const char L194[ 2];
const char L195[ 2]; const char L196[ 1]; const char L197[ 1];
}) const rb_vm_insn_op_base = {
"" , "LN" , "LN" , "LN" , "LN" , "LN" , "NN" , "N" ,
"IK" , "IK" , "I" , "I" , "I" , "I" , "G" , "G" ,
"" , "" , "V" , "N" , "S" , "V" , "N" , "" ,
"V" , "NN" , "" , "N" , "V" , "NN" , "" , "V" ,
"N" , "N" , "" , "" , "N" , "" , "N" , "" ,
"N" , "N" , "N" , "NVV" , "N" , "LL" , "NV" , "ISN" ,
"CES" , "V" , "V" , "N" , "N" , "CE" , "CES" , "C" ,
"" , "N" , "O" , "O" , "O" , "O" , "NO" , "OK" ,
"K" , "SK" , "HO" , "CE" , "CE" , "CE" , "CE" , "CE" ,
"CE" , "CECE", "CE" , "CE" , "CE" , "CE" , "CE" , "CE" ,
"CE" , "CEV" , "CEV" , "CE" , "CE" , "CE" , "CE" , "CE" ,
"V" , "CE" , "F" , "" , "" , "L" , "L" , "L" ,
"L" , "" , "" , "" , "LN" , "LN" , "LN" , "LN" ,
"LN" , "NN" , "N" , "IK" , "IK" , "I" , "I" , "I" ,
"I" , "G" , "G" , "" , "" , "V" , "N" , "S" ,
"V" , "N" , "" , "V" , "NN" , "" , "N" , "V" ,
"NN" , "" , "V" , "N" , "N" , "" , "" , "N" ,
"" , "N" , "" , "N" , "N" , "N" , "NVV" , "N" ,
"LL" , "NV" , "ISN" , "CES" , "V" , "V" , "N" , "N" ,
"CE" , "CES" , "C" , "" , "N" , "O" , "O" , "O" ,
"O" , "NO" , "OK" , "K" , "SK" , "HO" , "CE" , "CE" ,
"CE" , "CE" , "CE" , "CE" , "CECE", "CE" , "CE" , "CE" ,
"CE" , "CE" , "CE" , "CE" , "CEV" , "CEV" , "CE" , "CE" ,
"CE" , "CE" , "CE" , "V" , "CE" , "F" , "" , "" ,
"L" , "L" , "L" , "L" , "" , "" ,
};
const char *rb_vm_insn_op_info = (const char *)&rb_vm_insn_op_base;
#endif
const char *
insn_op_types(VALUE i)
{
return &rb_vm_insn_op_info[rb_vm_insn_op_offset[i]];
}
int
insn_op_type(VALUE i, long j)
{
if (j >= insn_len(i)) {
return 0;
}
else {
return insn_op_types(i)[j];
}
}
typedef long OFFSET;
typedef unsigned long lindex_t;
typedef VALUE GENTRY;
typedef rb_iseq_t *ISEQ;
#define CALL_ATTRIBUTE(name, insn, ...) attr_ ## name ## _ ## insn(__VA_ARGS__)
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_nop()));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_getlocal(lindex_t idx, rb_num_t level)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_setlocal(lindex_t idx, rb_num_t level)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_getblockparam(lindex_t idx, rb_num_t level)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_setblockparam(lindex_t idx, rb_num_t level)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_getblockparamproxy(lindex_t idx, rb_num_t level)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_getspecial(rb_num_t key, rb_num_t type)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_setspecial(rb_num_t key)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_getinstancevariable(ID id, IC ic)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_setinstancevariable(ID id, IC ic)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_getclassvariable(ID id)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_setclassvariable(ID id)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_getconstant(ID id)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_setconstant(ID id)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_getglobal(GENTRY entry)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_setglobal(GENTRY entry)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_putnil()));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_putself()));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_putobject(VALUE val)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_putspecialobject(rb_num_t value_type)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_putiseq(ISEQ iseq)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_putstring(VALUE str)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_concatstrings(rb_num_t num)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_tostring()));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_freezestring(VALUE debug_info)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_toregexp(rb_num_t opt, rb_num_t cnt)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_intern()));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_newarray(rb_num_t num)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_duparray(VALUE ary)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_expandarray(rb_num_t num, rb_num_t flag)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_concatarray()));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_splatarray(VALUE flag)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_newhash(rb_num_t num)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_newrange(rb_num_t flag)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_pop()));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_dup()));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_dupn(rb_num_t n)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_swap()));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_reverse(rb_num_t n)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_reput()));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_topn(rb_num_t n)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_setn(rb_num_t n)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_adjuststack(rb_num_t n)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_defined(rb_num_t op_type, VALUE obj, VALUE needstr)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_checkmatch(rb_num_t flag)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_checkkeyword(lindex_t kw_bits_index, lindex_t keyword_index)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_tracecoverage(rb_num_t nf, VALUE data)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_defineclass(ID id, ISEQ class_iseq, rb_num_t flags)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_send(CALL_INFO ci, CALL_CACHE cc, ISEQ blockiseq)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_str_freeze(VALUE str)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_str_uminus(VALUE str)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_newarray_max(rb_num_t num)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_newarray_min(rb_num_t num)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_send_without_block(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_invokesuper(CALL_INFO ci, CALL_CACHE cc, ISEQ blockiseq)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_invokeblock(CALL_INFO ci)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_leave()));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_throw(rb_num_t throw_state)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_jump(OFFSET dst)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_branchif(OFFSET dst)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_branchunless(OFFSET dst)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_branchnil(OFFSET dst)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_branchiftype(rb_num_t type, OFFSET dst)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_getinlinecache(OFFSET dst, IC ic)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_setinlinecache(IC ic)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_once(ISEQ iseq, IC ic)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_case_dispatch(CDHASH hash, OFFSET else_offset)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_plus(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_minus(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_mult(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_div(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_mod(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_eq(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_neq(CALL_INFO ci, CALL_CACHE cc, CALL_INFO ci_eq, CALL_CACHE cc_eq)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_lt(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_le(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_gt(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_ge(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_ltlt(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_aref(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_aset(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_aset_with(CALL_INFO ci, CALL_CACHE cc, VALUE key)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_aref_with(CALL_INFO ci, CALL_CACHE cc, VALUE key)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_length(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_size(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_empty_p(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_succ(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_not(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_regexpmatch1(VALUE recv)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_regexpmatch2(CALL_INFO ci, CALL_CACHE cc)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_opt_call_c_function(rb_insn_func_t funcptr)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_bitblt()));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_answer()));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_getlocal_WC_0(lindex_t idx)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_getlocal_WC_1(lindex_t idx)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_setlocal_WC_0(lindex_t idx)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_setlocal_WC_1(lindex_t idx)));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_putobject_INT2FIX_0_()));
PUREFUNC(MAYBE_UNUSED(static rb_snum_t attr_sp_inc_putobject_INT2FIX_1_()));
/* attr rb_snum_t sp_inc @ nop()()() */
rb_snum_t
attr_sp_inc_nop()
{
return 0;
}
/* attr rb_snum_t sp_inc @ getlocal(idx, level)()(val) */
rb_snum_t
attr_sp_inc_getlocal(
MAYBE_UNUSED(lindex_t idx),
MAYBE_UNUSED(rb_num_t level)
)
{
return 1;
}
/* attr rb_snum_t sp_inc @ setlocal(idx, level)(val)() */
rb_snum_t
attr_sp_inc_setlocal(
MAYBE_UNUSED(lindex_t idx),
MAYBE_UNUSED(rb_num_t level)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ getblockparam(idx, level)()(val) */
rb_snum_t
attr_sp_inc_getblockparam(
MAYBE_UNUSED(lindex_t idx),
MAYBE_UNUSED(rb_num_t level)
)
{
return 1;
}
/* attr rb_snum_t sp_inc @ setblockparam(idx, level)(val)() */
rb_snum_t
attr_sp_inc_setblockparam(
MAYBE_UNUSED(lindex_t idx),
MAYBE_UNUSED(rb_num_t level)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ getblockparamproxy(idx, level)()(val) */
rb_snum_t
attr_sp_inc_getblockparamproxy(
MAYBE_UNUSED(lindex_t idx),
MAYBE_UNUSED(rb_num_t level)
)
{
return 1;
}
/* attr rb_snum_t sp_inc @ getspecial(key, type)()(val) */
rb_snum_t
attr_sp_inc_getspecial(
MAYBE_UNUSED(rb_num_t key),
MAYBE_UNUSED(rb_num_t type)
)
{
return 1;
}
/* attr rb_snum_t sp_inc @ setspecial(key)(obj)() */
rb_snum_t
attr_sp_inc_setspecial(MAYBE_UNUSED(rb_num_t key))
{
return -1;
}
/* attr rb_snum_t sp_inc @ getinstancevariable(id, ic)()(val) */
rb_snum_t
attr_sp_inc_getinstancevariable(
MAYBE_UNUSED(ID id),
MAYBE_UNUSED(IC ic)
)
{
return 1;
}
/* attr rb_snum_t sp_inc @ setinstancevariable(id, ic)(val)() */
rb_snum_t
attr_sp_inc_setinstancevariable(
MAYBE_UNUSED(ID id),
MAYBE_UNUSED(IC ic)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ getclassvariable(id)()(val) */
rb_snum_t
attr_sp_inc_getclassvariable(MAYBE_UNUSED(ID id))
{
return 1;
}
/* attr rb_snum_t sp_inc @ setclassvariable(id)(val)() */
rb_snum_t
attr_sp_inc_setclassvariable(MAYBE_UNUSED(ID id))
{
return -1;
}
/* attr rb_snum_t sp_inc @ getconstant(id)(klass)(val) */
rb_snum_t
attr_sp_inc_getconstant(MAYBE_UNUSED(ID id))
{
return 0;
}
/* attr rb_snum_t sp_inc @ setconstant(id)(val, cbase)() */
rb_snum_t
attr_sp_inc_setconstant(MAYBE_UNUSED(ID id))
{
return -2;
}
/* attr rb_snum_t sp_inc @ getglobal(entry)()(val) */
rb_snum_t
attr_sp_inc_getglobal(MAYBE_UNUSED(GENTRY entry))
{
return 1;
}
/* attr rb_snum_t sp_inc @ setglobal(entry)(val)() */
rb_snum_t
attr_sp_inc_setglobal(MAYBE_UNUSED(GENTRY entry))
{
return -1;
}
/* attr rb_snum_t sp_inc @ putnil()()(val) */
rb_snum_t
attr_sp_inc_putnil()
{
return 1;
}
/* attr rb_snum_t sp_inc @ putself()()(val) */
rb_snum_t
attr_sp_inc_putself()
{
return 1;
}
/* attr rb_snum_t sp_inc @ putobject(val)()(val) */
rb_snum_t
attr_sp_inc_putobject(MAYBE_UNUSED(VALUE val))
{
return 1;
}
/* attr rb_snum_t sp_inc @ putspecialobject(value_type)()(val) */
rb_snum_t
attr_sp_inc_putspecialobject(MAYBE_UNUSED(rb_num_t value_type))
{
return 1;
}
/* attr rb_snum_t sp_inc @ putiseq(iseq)()(ret) */
rb_snum_t
attr_sp_inc_putiseq(MAYBE_UNUSED(ISEQ iseq))
{
return 1;
}
/* attr rb_snum_t sp_inc @ putstring(str)()(val) */
rb_snum_t
attr_sp_inc_putstring(MAYBE_UNUSED(VALUE str))
{
return 1;
}
/* attr rb_snum_t sp_inc @ concatstrings(num)(...)(val) */
rb_snum_t
attr_sp_inc_concatstrings(MAYBE_UNUSED(rb_num_t num))
{
return
#line 361 "/Users/urabe.shyouhei/data/src/rewrite-generator/insns.def"
1 - num;
#line 716 "/Users/urabe.shyouhei/data/build/ruby@gcc-7/rewrite-generator/insns_info.inc"
}
/* attr rb_snum_t sp_inc @ tostring()(val, str)(val) */
rb_snum_t
attr_sp_inc_tostring()
{
return -1;
}
/* attr rb_snum_t sp_inc @ freezestring(debug_info)(str)(str) */
rb_snum_t
attr_sp_inc_freezestring(MAYBE_UNUSED(VALUE debug_info))
{
return 0;
}
/* attr rb_snum_t sp_inc @ toregexp(opt, cnt)(...)(val) */
rb_snum_t
attr_sp_inc_toregexp(
MAYBE_UNUSED(rb_num_t opt),
MAYBE_UNUSED(rb_num_t cnt)
)
{
return
#line 396 "/Users/urabe.shyouhei/data/src/rewrite-generator/insns.def"
1 - cnt;
#line 743 "/Users/urabe.shyouhei/data/build/ruby@gcc-7/rewrite-generator/insns_info.inc"
}
/* attr rb_snum_t sp_inc @ intern()(str)(sym) */
rb_snum_t
attr_sp_inc_intern()
{
return 0;
}
/* attr rb_snum_t sp_inc @ newarray(num)(...)(val) */
rb_snum_t
attr_sp_inc_newarray(MAYBE_UNUSED(rb_num_t num))
{
return
#line 422 "/Users/urabe.shyouhei/data/src/rewrite-generator/insns.def"
1 - num;
#line 760 "/Users/urabe.shyouhei/data/build/ruby@gcc-7/rewrite-generator/insns_info.inc"
}
/* attr rb_snum_t sp_inc @ duparray(ary)()(val) */
rb_snum_t
attr_sp_inc_duparray(MAYBE_UNUSED(VALUE ary))
{
return 1;
}
/* attr rb_snum_t sp_inc @ expandarray(num, flag)(..., ary)(...) */
rb_snum_t
attr_sp_inc_expandarray(
MAYBE_UNUSED(rb_num_t num),
MAYBE_UNUSED(rb_num_t flag)
)
{
return
#line 452 "/Users/urabe.shyouhei/data/src/rewrite-generator/insns.def"
num - 1 + (flag & 1 ? 1 : 0);
#line 780 "/Users/urabe.shyouhei/data/build/ruby@gcc-7/rewrite-generator/insns_info.inc"
}
/* attr rb_snum_t sp_inc @ concatarray()(ary1, ary2)(ary) */
rb_snum_t
attr_sp_inc_concatarray()
{
return -1;
}
/* attr rb_snum_t sp_inc @ splatarray(flag)(ary)(obj) */
rb_snum_t
attr_sp_inc_splatarray(MAYBE_UNUSED(VALUE flag))
{
return 0;
}
/* attr rb_snum_t sp_inc @ newhash(num)(...)(val) */
rb_snum_t
attr_sp_inc_newhash(MAYBE_UNUSED(rb_num_t num))
{
return
#line 483 "/Users/urabe.shyouhei/data/src/rewrite-generator/insns.def"
1 - num;
#line 804 "/Users/urabe.shyouhei/data/build/ruby@gcc-7/rewrite-generator/insns_info.inc"
}
/* attr rb_snum_t sp_inc @ newrange(flag)(low, high)(val) */
rb_snum_t
attr_sp_inc_newrange(MAYBE_UNUSED(rb_num_t flag))
{
return -1;
}
/* attr rb_snum_t sp_inc @ pop()(val)() */
rb_snum_t
attr_sp_inc_pop()
{
return -1;
}
/* attr rb_snum_t sp_inc @ dup()(val)(val1, val2) */
rb_snum_t
attr_sp_inc_dup()
{
return 1;
}
/* attr rb_snum_t sp_inc @ dupn(n)(...)(...) */
rb_snum_t
attr_sp_inc_dupn(MAYBE_UNUSED(rb_num_t n))
{
return
#line 536 "/Users/urabe.shyouhei/data/src/rewrite-generator/insns.def"
n;
#line 835 "/Users/urabe.shyouhei/data/build/ruby@gcc-7/rewrite-generator/insns_info.inc"
}
/* attr rb_snum_t sp_inc @ swap()(val, obj)(obj, val) */
rb_snum_t
attr_sp_inc_swap()
{
return 0;
}
/* attr rb_snum_t sp_inc @ reverse(n)(...)(...) */
rb_snum_t
attr_sp_inc_reverse(MAYBE_UNUSED(rb_num_t n))
{
return
#line 561 "/Users/urabe.shyouhei/data/src/rewrite-generator/insns.def"
0;
#line 852 "/Users/urabe.shyouhei/data/build/ruby@gcc-7/rewrite-generator/insns_info.inc"
}
/* attr rb_snum_t sp_inc @ reput()(..., val)(val) */
rb_snum_t
attr_sp_inc_reput()
{
return
#line 580 "/Users/urabe.shyouhei/data/src/rewrite-generator/insns.def"
0;
#line 862 "/Users/urabe.shyouhei/data/build/ruby@gcc-7/rewrite-generator/insns_info.inc"
}
/* attr rb_snum_t sp_inc @ topn(n)(...)(val) */
rb_snum_t
attr_sp_inc_topn(MAYBE_UNUSED(rb_num_t n))
{
return
#line 591 "/Users/urabe.shyouhei/data/src/rewrite-generator/insns.def"
1;
#line 872 "/Users/urabe.shyouhei/data/build/ruby@gcc-7/rewrite-generator/insns_info.inc"
}
/* attr rb_snum_t sp_inc @ setn(n)(..., val)(val) */
rb_snum_t
attr_sp_inc_setn(MAYBE_UNUSED(rb_num_t n))
{
return
#line 602 "/Users/urabe.shyouhei/data/src/rewrite-generator/insns.def"
0;
#line 882 "/Users/urabe.shyouhei/data/build/ruby@gcc-7/rewrite-generator/insns_info.inc"
}
/* attr rb_snum_t sp_inc @ adjuststack(n)(...)(...) */
rb_snum_t
attr_sp_inc_adjuststack(MAYBE_UNUSED(rb_num_t n))
{
return
#line 613 "/Users/urabe.shyouhei/data/src/rewrite-generator/insns.def"
-n;
#line 892 "/Users/urabe.shyouhei/data/build/ruby@gcc-7/rewrite-generator/insns_info.inc"
}
/* attr rb_snum_t sp_inc @ defined(op_type, obj, needstr)(v)(val) */
rb_snum_t
attr_sp_inc_defined(
MAYBE_UNUSED(rb_num_t op_type),
MAYBE_UNUSED(VALUE obj),
MAYBE_UNUSED(VALUE needstr)
)
{
return 0;
}
/* attr rb_snum_t sp_inc @ checkmatch(flag)(target, pattern)(result) */
rb_snum_t
attr_sp_inc_checkmatch(MAYBE_UNUSED(rb_num_t flag))
{
return -1;
}
/* attr rb_snum_t sp_inc @ checkkeyword(kw_bits_index, keyword_index)()(ret) */
rb_snum_t
attr_sp_inc_checkkeyword(
MAYBE_UNUSED(lindex_t kw_bits_index),
MAYBE_UNUSED(lindex_t keyword_index)
)
{
return 1;
}
/* attr rb_snum_t sp_inc @ tracecoverage(nf, data)()() */
rb_snum_t
attr_sp_inc_tracecoverage(
MAYBE_UNUSED(rb_num_t nf),
MAYBE_UNUSED(VALUE data)
)
{
return 0;
}
/* attr rb_snum_t sp_inc @ defineclass(id, class_iseq, flags)(cbase, super)(val) */
rb_snum_t
attr_sp_inc_defineclass(
MAYBE_UNUSED(ID id),
MAYBE_UNUSED(ISEQ class_iseq),
MAYBE_UNUSED(rb_num_t flags)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ send(ci, cc, blockiseq)(...)(val) */
rb_snum_t
attr_sp_inc_send(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc),
MAYBE_UNUSED(ISEQ blockiseq)
)
{
return
#line 709 "/Users/urabe.shyouhei/data/src/rewrite-generator/insns.def"
- (int)(ci->orig_argc + ((ci->flag & VM_CALL_ARGS_BLOCKARG) ? 1 : 0));
#line 955 "/Users/urabe.shyouhei/data/build/ruby@gcc-7/rewrite-generator/insns_info.inc"
}
/* attr rb_snum_t sp_inc @ opt_str_freeze(str)()(val) */
rb_snum_t
attr_sp_inc_opt_str_freeze(MAYBE_UNUSED(VALUE str))
{
return 1;
}
/* attr rb_snum_t sp_inc @ opt_str_uminus(str)()(val) */
rb_snum_t
attr_sp_inc_opt_str_uminus(MAYBE_UNUSED(VALUE str))
{
return 1;
}
/* attr rb_snum_t sp_inc @ opt_newarray_max(num)(...)(val) */
rb_snum_t
attr_sp_inc_opt_newarray_max(MAYBE_UNUSED(rb_num_t num))
{
return
#line 751 "/Users/urabe.shyouhei/data/src/rewrite-generator/insns.def"
1 - num;
#line 979 "/Users/urabe.shyouhei/data/build/ruby@gcc-7/rewrite-generator/insns_info.inc"
}
/* attr rb_snum_t sp_inc @ opt_newarray_min(num)(...)(val) */
rb_snum_t
attr_sp_inc_opt_newarray_min(MAYBE_UNUSED(rb_num_t num))
{
return
#line 762 "/Users/urabe.shyouhei/data/src/rewrite-generator/insns.def"
1 - num;
#line 989 "/Users/urabe.shyouhei/data/build/ruby@gcc-7/rewrite-generator/insns_info.inc"
}
/* attr rb_snum_t sp_inc @ opt_send_without_block(ci, cc)(...)(val) */
rb_snum_t
attr_sp_inc_opt_send_without_block(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return
#line 774 "/Users/urabe.shyouhei/data/src/rewrite-generator/insns.def"
-ci->orig_argc;
#line 1002 "/Users/urabe.shyouhei/data/build/ruby@gcc-7/rewrite-generator/insns_info.inc"
}
/* attr rb_snum_t sp_inc @ invokesuper(ci, cc, blockiseq)(...)(val) */
rb_snum_t
attr_sp_inc_invokesuper(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc),
MAYBE_UNUSED(ISEQ blockiseq)
)
{
return
#line 788 "/Users/urabe.shyouhei/data/src/rewrite-generator/insns.def"
- (int)(ci->orig_argc + ((ci->flag & VM_CALL_ARGS_BLOCKARG) ? 1 : 0));
#line 1016 "/Users/urabe.shyouhei/data/build/ruby@gcc-7/rewrite-generator/insns_info.inc"
}
/* attr rb_snum_t sp_inc @ invokeblock(ci)(...)(val) */
rb_snum_t
attr_sp_inc_invokeblock(MAYBE_UNUSED(CALL_INFO ci))
{
return
#line 805 "/Users/urabe.shyouhei/data/src/rewrite-generator/insns.def"
1 - ci->orig_argc;
#line 1026 "/Users/urabe.shyouhei/data/build/ruby@gcc-7/rewrite-generator/insns_info.inc"
}
/* attr rb_snum_t sp_inc @ leave()(val)(val) */
rb_snum_t
attr_sp_inc_leave()
{
return 0;
}
/* attr rb_snum_t sp_inc @ throw(throw_state)(throwobj)(val) */
rb_snum_t
attr_sp_inc_throw(MAYBE_UNUSED(rb_num_t throw_state))
{
return 0;
}
/* attr rb_snum_t sp_inc @ jump(dst)()() */
rb_snum_t
attr_sp_inc_jump(MAYBE_UNUSED(OFFSET dst))
{
return 0;
}
/* attr rb_snum_t sp_inc @ branchif(dst)(val)() */
rb_snum_t
attr_sp_inc_branchif(MAYBE_UNUSED(OFFSET dst))
{
return -1;
}
/* attr rb_snum_t sp_inc @ branchunless(dst)(val)() */
rb_snum_t
attr_sp_inc_branchunless(MAYBE_UNUSED(OFFSET dst))
{
return -1;
}
/* attr rb_snum_t sp_inc @ branchnil(dst)(val)() */
rb_snum_t
attr_sp_inc_branchnil(MAYBE_UNUSED(OFFSET dst))
{
return -1;
}
/* attr rb_snum_t sp_inc @ branchiftype(type, dst)(val)() */
rb_snum_t
attr_sp_inc_branchiftype(
MAYBE_UNUSED(rb_num_t type),
MAYBE_UNUSED(OFFSET dst)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ getinlinecache(dst, ic)()(val) */
rb_snum_t
attr_sp_inc_getinlinecache(
MAYBE_UNUSED(OFFSET dst),
MAYBE_UNUSED(IC ic)
)
{
return 1;
}
/* attr rb_snum_t sp_inc @ setinlinecache(ic)(val)(val) */
rb_snum_t
attr_sp_inc_setinlinecache(MAYBE_UNUSED(IC ic))
{
return 0;
}
/* attr rb_snum_t sp_inc @ once(iseq, ic)()(val) */
rb_snum_t
attr_sp_inc_once(
MAYBE_UNUSED(ISEQ iseq),
MAYBE_UNUSED(IC ic)
)
{
return 1;
}
/* attr rb_snum_t sp_inc @ opt_case_dispatch(hash, else_offset)(..., key)() */
rb_snum_t
attr_sp_inc_opt_case_dispatch(
MAYBE_UNUSED(CDHASH hash),
MAYBE_UNUSED(OFFSET else_offset)
)
{
return
#line 982 "/Users/urabe.shyouhei/data/src/rewrite-generator/insns.def"
-1;
#line 1118 "/Users/urabe.shyouhei/data/build/ruby@gcc-7/rewrite-generator/insns_info.inc"
}
/* attr rb_snum_t sp_inc @ opt_plus(ci, cc)(recv, obj)(val) */
rb_snum_t
attr_sp_inc_opt_plus(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ opt_minus(ci, cc)(recv, obj)(val) */
rb_snum_t
attr_sp_inc_opt_minus(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ opt_mult(ci, cc)(recv, obj)(val) */
rb_snum_t
attr_sp_inc_opt_mult(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ opt_div(ci, cc)(recv, obj)(val) */
rb_snum_t
attr_sp_inc_opt_div(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ opt_mod(ci, cc)(recv, obj)(val) */
rb_snum_t
attr_sp_inc_opt_mod(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ opt_eq(ci, cc)(recv, obj)(val) */
rb_snum_t
attr_sp_inc_opt_eq(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ opt_neq(ci, cc, ci_eq, cc_eq)(recv, obj)(val) */
rb_snum_t
attr_sp_inc_opt_neq(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc),
MAYBE_UNUSED(CALL_INFO ci_eq),
MAYBE_UNUSED(CALL_CACHE cc_eq)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ opt_lt(ci, cc)(recv, obj)(val) */
rb_snum_t
attr_sp_inc_opt_lt(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ opt_le(ci, cc)(recv, obj)(val) */
rb_snum_t
attr_sp_inc_opt_le(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ opt_gt(ci, cc)(recv, obj)(val) */
rb_snum_t
attr_sp_inc_opt_gt(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ opt_ge(ci, cc)(recv, obj)(val) */
rb_snum_t
attr_sp_inc_opt_ge(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ opt_ltlt(ci, cc)(recv, obj)(val) */
rb_snum_t
attr_sp_inc_opt_ltlt(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ opt_aref(ci, cc)(recv, obj)(val) */
rb_snum_t
attr_sp_inc_opt_aref(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ opt_aset(ci, cc)(recv, obj, set)(val) */
rb_snum_t
attr_sp_inc_opt_aset(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return -2;
}
/* attr rb_snum_t sp_inc @ opt_aset_with(ci, cc, key)(recv, val)(val) */
rb_snum_t
attr_sp_inc_opt_aset_with(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc),
MAYBE_UNUSED(VALUE key)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ opt_aref_with(ci, cc, key)(recv)(val) */
rb_snum_t
attr_sp_inc_opt_aref_with(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc),
MAYBE_UNUSED(VALUE key)
)
{
return 0;
}
/* attr rb_snum_t sp_inc @ opt_length(ci, cc)(recv)(val) */
rb_snum_t
attr_sp_inc_opt_length(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return 0;
}
/* attr rb_snum_t sp_inc @ opt_size(ci, cc)(recv)(val) */
rb_snum_t
attr_sp_inc_opt_size(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return 0;
}
/* attr rb_snum_t sp_inc @ opt_empty_p(ci, cc)(recv)(val) */
rb_snum_t
attr_sp_inc_opt_empty_p(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return 0;
}
/* attr rb_snum_t sp_inc @ opt_succ(ci, cc)(recv)(val) */
rb_snum_t
attr_sp_inc_opt_succ(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return 0;
}
/* attr rb_snum_t sp_inc @ opt_not(ci, cc)(recv)(val) */
rb_snum_t
attr_sp_inc_opt_not(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return 0;
}
/* attr rb_snum_t sp_inc @ opt_regexpmatch1(recv)(obj)(val) */
rb_snum_t
attr_sp_inc_opt_regexpmatch1(MAYBE_UNUSED(VALUE recv))
{
return 0;
}
/* attr rb_snum_t sp_inc @ opt_regexpmatch2(ci, cc)(obj2, obj1)(val) */
rb_snum_t
attr_sp_inc_opt_regexpmatch2(
MAYBE_UNUSED(CALL_INFO ci),
MAYBE_UNUSED(CALL_CACHE cc)
)
{
return -1;
}
/* attr rb_snum_t sp_inc @ opt_call_c_function(funcptr)()() */
rb_snum_t
attr_sp_inc_opt_call_c_function(MAYBE_UNUSED(rb_insn_func_t funcptr))
{
return 0;
}
/* attr rb_snum_t sp_inc @ bitblt()()(ret) */
rb_snum_t
attr_sp_inc_bitblt()
{
return 1;
}
/* attr rb_snum_t sp_inc @ answer()()(ret) */
rb_snum_t
attr_sp_inc_answer()
{
return 1;
}
/* attr rb_snum_t sp_inc @ getlocal_WC_0(idx)()(val) */
rb_snum_t
attr_sp_inc_getlocal_WC_0(MAYBE_UNUSED(lindex_t idx))
{
return 1;
}
/* attr rb_snum_t sp_inc @ getlocal_WC_1(idx)()(val) */
rb_snum_t
attr_sp_inc_getlocal_WC_1(MAYBE_UNUSED(lindex_t idx))
{
return 1;
}
/* attr rb_snum_t sp_inc @ setlocal_WC_0(idx)(val)() */
rb_snum_t
attr_sp_inc_setlocal_WC_0(MAYBE_UNUSED(lindex_t idx))
{
return -1;
}
/* attr rb_snum_t sp_inc @ setlocal_WC_1(idx)(val)() */
rb_snum_t
attr_sp_inc_setlocal_WC_1(MAYBE_UNUSED(lindex_t idx))
{
return -1;
}
/* attr rb_snum_t sp_inc @ putobject_INT2FIX_0_()()(val) */
rb_snum_t
attr_sp_inc_putobject_INT2FIX_0_()
{
return 1;
}
/* attr rb_snum_t sp_inc @ putobject_INT2FIX_1_()()(val) */
rb_snum_t
attr_sp_inc_putobject_INT2FIX_1_()
{
return 1;
}
PUREFUNC(MAYBE_UNUSED(static int insn_stack_increase(int depth, int insn, const VALUE *opes)));
PUREFUNC(static rb_snum_t insn_stack_increase_dispatch(enum ruby_vminsn_type insn, const VALUE *opes));
rb_snum_t
insn_stack_increase_dispatch(enum ruby_vminsn_type insn, const VALUE *opes)
{
static const signed char t[] = {
0, 1, -1, 1, -1, 1, 1, -1,
1, -1, 1, -1, 0, -2, 1, -1,
1, 1, 1, 1, 1, 1, -127, -1,
0, -127, 0, -127, 1, -127, -1, 0,
-127, -1, -1, 1, -127, 0, -127, -127,
-127, -127, -127, 0, -1, 1, 0, -1,
-127, 1, 1, -127, -127, -127, -127, -127,
0, 0, 0, -1, -1, -1, -1, 1,
0, 1, -127, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-2, -1, 0, 0, 0, 0, 0, 0,
0, -1, 0, 1, 1, 1, 1, -1,
-1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
};
char c = t[insn];
ASSERT_VM_INSTRUCTION_SIZE(t);
if (c != -127) {
return c;
}
else switch(insn) {
default:
UNREACHABLE;
case BIN(concatstrings):
return CALL_ATTRIBUTE(sp_inc, concatstrings, NUM2LONG(opes[0]));
case BIN(toregexp):
return CALL_ATTRIBUTE(sp_inc, toregexp, NUM2LONG(opes[0]), NUM2LONG(opes[1]));
case BIN(newarray):
return CALL_ATTRIBUTE(sp_inc, newarray, NUM2LONG(opes[0]));
case BIN(expandarray):
return CALL_ATTRIBUTE(sp_inc, expandarray, NUM2LONG(opes[0]), NUM2LONG(opes[1]));
case BIN(newhash):
return CALL_ATTRIBUTE(sp_inc, newhash, NUM2LONG(opes[0]));
case BIN(dupn):
return CALL_ATTRIBUTE(sp_inc, dupn, NUM2LONG(opes[0]));
case BIN(reverse):
return CALL_ATTRIBUTE(sp_inc, reverse, NUM2LONG(opes[0]));
case BIN(reput):
return CALL_ATTRIBUTE(sp_inc, reput);
case BIN(topn):
return CALL_ATTRIBUTE(sp_inc, topn, NUM2LONG(opes[0]));
case BIN(setn):
return CALL_ATTRIBUTE(sp_inc, setn, NUM2LONG(opes[0]));
case BIN(adjuststack):
return CALL_ATTRIBUTE(sp_inc, adjuststack, NUM2LONG(opes[0]));
case BIN(send):
return CALL_ATTRIBUTE(sp_inc, send, (CALL_INFO)(opes[0]), (CALL_CACHE)(opes[1]), (ISEQ)(opes[2]));
case BIN(opt_newarray_max):
return CALL_ATTRIBUTE(sp_inc, opt_newarray_max, NUM2LONG(opes[0]));
case BIN(opt_newarray_min):
return CALL_ATTRIBUTE(sp_inc, opt_newarray_min, NUM2LONG(opes[0]));
case BIN(opt_send_without_block):
return CALL_ATTRIBUTE(sp_inc, opt_send_without_block, (CALL_INFO)(opes[0]), (CALL_CACHE)(opes[1]));
case BIN(invokesuper):
return CALL_ATTRIBUTE(sp_inc, invokesuper, (CALL_INFO)(opes[0]), (CALL_CACHE)(opes[1]), (ISEQ)(opes[2]));
case BIN(invokeblock):
return CALL_ATTRIBUTE(sp_inc, invokeblock, (CALL_INFO)(opes[0]));
case BIN(opt_case_dispatch):
return CALL_ATTRIBUTE(sp_inc, opt_case_dispatch, (CDHASH)(opes[0]), (OFFSET)(opes[1]));
}
}
int
insn_stack_increase(int depth, int insn, const VALUE *opes)
{
enum ruby_vminsn_type itype = (enum ruby_vminsn_type)insn;
return depth + (int)insn_stack_increase_dispatch(itype, opes);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment