debase-ruby_core_source 0.10.5 → 0.10.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +1 -1
  4. data/debase-ruby_core_source.gemspec +3 -2
  5. data/lib/debase/ruby_core_source.rb +1 -1
  6. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/addr2line.h +21 -0
  7. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ccan/build_assert/build_assert.h +40 -0
  8. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ccan/check_type/check_type.h +63 -0
  9. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ccan/container_of/container_of.h +142 -0
  10. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ccan/list/list.h +788 -0
  11. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ccan/str/str.h +16 -0
  12. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/constant.h +51 -0
  13. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/debug_counter.h +283 -0
  14. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/dln.h +51 -0
  15. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/encindex.h +69 -0
  16. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/eval_intern.h +333 -0
  17. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/gc.h +116 -0
  18. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/hrtime.h +168 -0
  19. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/id.h +252 -0
  20. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/id_table.h +31 -0
  21. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/insns.inc +249 -0
  22. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/insns_info.inc +9374 -0
  23. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/internal.h +2470 -0
  24. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/iseq.h +304 -0
  25. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/known_errors.inc +791 -0
  26. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/method.h +229 -0
  27. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/mjit.h +148 -0
  28. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/mjit_compile.inc +4226 -0
  29. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/node.h +449 -0
  30. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/node_name.inc +200 -0
  31. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/opt_sc.inc +109 -0
  32. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/optinsn.inc +128 -0
  33. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/optunifs.inc +43 -0
  34. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/parse.h +207 -0
  35. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/probes_helper.h +42 -0
  36. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/regenc.h +254 -0
  37. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/regint.h +938 -0
  38. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/regparse.h +370 -0
  39. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/revision.h +1 -0
  40. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ruby_assert.h +60 -0
  41. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ruby_atomic.h +244 -0
  42. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/siphash.h +48 -0
  43. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/symbol.h +112 -0
  44. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/thread_pthread.h +75 -0
  45. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/thread_win32.h +36 -0
  46. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/timev.h +53 -0
  47. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/transcode_data.h +139 -0
  48. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/transient_heap.h +60 -0
  49. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/version.h +73 -0
  50. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm.inc +4504 -0
  51. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm_call_iseq_optimized.inc +213 -0
  52. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm_core.h +1910 -0
  53. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm_debug.h +37 -0
  54. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm_exec.h +202 -0
  55. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm_insnhelper.h +316 -0
  56. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm_opts.h +70 -0
  57. data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vmtc.inc +243 -0
  58. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/addr2line.h +21 -0
  59. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/builtin.h +78 -0
  60. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/build_assert/build_assert.h +40 -0
  61. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/check_type/check_type.h +63 -0
  62. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/container_of/container_of.h +142 -0
  63. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/list/list.h +788 -0
  64. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/str/str.h +16 -0
  65. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/constant.h +50 -0
  66. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/debug_counter.h +390 -0
  67. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/dln.h +51 -0
  68. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/encindex.h +69 -0
  69. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/eval_intern.h +312 -0
  70. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/gc.h +131 -0
  71. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/hrtime.h +168 -0
  72. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/id.h +290 -0
  73. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h +34 -0
  74. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/insns.inc +253 -0
  75. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/insns_info.inc +9197 -0
  76. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/internal.h +2697 -0
  77. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/iseq.h +312 -0
  78. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/known_errors.inc +791 -0
  79. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/method.h +229 -0
  80. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/mjit.h +177 -0
  81. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/mjit_compile.inc +7779 -0
  82. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/node.h +476 -0
  83. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/node_name.inc +208 -0
  84. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/opt_sc.inc +109 -0
  85. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/optinsn.inc +128 -0
  86. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/optunifs.inc +43 -0
  87. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/parse.h +210 -0
  88. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/probes_helper.h +42 -0
  89. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/regenc.h +254 -0
  90. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/regint.h +938 -0
  91. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/regparse.h +370 -0
  92. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/revision.h +2 -0
  93. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ruby_assert.h +15 -0
  94. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ruby_atomic.h +244 -0
  95. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/siphash.h +48 -0
  96. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/symbol.h +119 -0
  97. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/thread_pthread.h +75 -0
  98. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/thread_win32.h +36 -0
  99. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/timev.h +56 -0
  100. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/transcode_data.h +139 -0
  101. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/transient_heap.h +62 -0
  102. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/variable.h +9 -0
  103. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/version.h +77 -0
  104. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm.inc +5466 -0
  105. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_call_iseq_optimized.inc +237 -0
  106. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_core.h +1968 -0
  107. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_debug.h +34 -0
  108. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_exec.h +193 -0
  109. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_insnhelper.h +267 -0
  110. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_opts.h +72 -0
  111. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vmtc.inc +247 -0
  112. data/lib/debase/ruby_core_source/version.rb +1 -1
  113. metadata +128 -8
@@ -0,0 +1,60 @@
1
+ /**********************************************************************
2
+
3
+ transient_heap.h - declarations of transient_heap related APIs.
4
+
5
+ Copyright (C) 2018 Koichi Sasada
6
+
7
+ **********************************************************************/
8
+
9
+ #ifndef RUBY_TRANSIENT_HEAP_H
10
+ #define RUBY_TRANSIENT_HEAP_H
11
+
12
+ #include "internal.h"
13
+
14
+ #if USE_TRANSIENT_HEAP
15
+
16
+ /* public API */
17
+
18
+ /* Allocate req_size bytes from transient_heap.
19
+ Allocated memories are free-ed when next GC
20
+ if this memory is not marked by `rb_transient_heap_mark()`.
21
+ */
22
+ void *rb_transient_heap_alloc(VALUE obj, size_t req_size);
23
+
24
+ /* If `obj` uses a memory pointed by `ptr` from transient_heap,
25
+ you need to call `rb_transient_heap_mark(obj, ptr)`
26
+ to assert liveness of `obj` (and ptr). */
27
+ void rb_transient_heap_mark(VALUE obj, const void *ptr);
28
+
29
+ /* used by gc.c */
30
+ void rb_transient_heap_promote(VALUE obj);
31
+ void rb_transient_heap_start_marking(int full_marking);
32
+ void rb_transient_heap_finish_marking(void);
33
+
34
+ /* for debug API */
35
+ void rb_transient_heap_dump(void);
36
+ void rb_transient_heap_verify(void);
37
+ int rb_transient_heap_managed_ptr_p(const void *ptr);
38
+
39
+ /* evacuate functions for each type */
40
+ void rb_ary_transient_heap_evacuate(VALUE ary, int promote);
41
+ void rb_obj_transient_heap_evacuate(VALUE obj, int promote);
42
+ void rb_hash_transient_heap_evacuate(VALUE hash, int promote);
43
+ void rb_struct_transient_heap_evacuate(VALUE st, int promote);
44
+
45
+ #else /* USE_TRANSIENT_HEAP */
46
+
47
+ #define rb_transient_heap_alloc(o, s) NULL
48
+ #define rb_transient_heap_verify() ((void)0)
49
+ #define rb_transient_heap_promote(obj) ((void)0)
50
+ #define rb_transient_heap_start_marking(full_marking) ((void)0)
51
+ #define rb_transient_heap_finish_marking() ((void)0)
52
+ #define rb_transient_heap_mark(obj, ptr) ((void)0)
53
+
54
+ #define rb_ary_transient_heap_evacuate(x, y) ((void)0)
55
+ #define rb_obj_transient_heap_evacuate(x, y) ((void)0)
56
+ #define rb_hash_transient_heap_evacuate(x, y) ((void)0)
57
+ #define rb_struct_transient_heap_evacuate(x, y) ((void)0)
58
+
59
+ #endif /* USE_TRANSIENT_HEAP */
60
+ #endif
@@ -0,0 +1,73 @@
1
+ #define RUBY_VERSION "2.6.5"
2
+ #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
3
+ #define RUBY_PATCHLEVEL 114
4
+
5
+ #define RUBY_RELEASE_YEAR 2019
6
+ #define RUBY_RELEASE_MONTH 10
7
+ #define RUBY_RELEASE_DAY 1
8
+
9
+ #include "ruby/version.h"
10
+
11
+ #ifndef TOKEN_PASTE
12
+ #define TOKEN_PASTE(x,y) x##y
13
+ #endif
14
+ #define ONLY_ONE_DIGIT(x) TOKEN_PASTE(10,x) < 1000
15
+ #define WITH_ZERO_PADDING(x) TOKEN_PASTE(0,x)
16
+ #define RUBY_BIRTH_YEAR_STR STRINGIZE(RUBY_BIRTH_YEAR)
17
+ #define RUBY_RELEASE_YEAR_STR STRINGIZE(RUBY_RELEASE_YEAR)
18
+ #if ONLY_ONE_DIGIT(RUBY_RELEASE_MONTH)
19
+ #define RUBY_RELEASE_MONTH_STR STRINGIZE(WITH_ZERO_PADDING(RUBY_RELEASE_MONTH))
20
+ #else
21
+ #define RUBY_RELEASE_MONTH_STR STRINGIZE(RUBY_RELEASE_MONTH)
22
+ #endif
23
+ #if ONLY_ONE_DIGIT(RUBY_RELEASE_DAY)
24
+ #define RUBY_RELEASE_DAY_STR STRINGIZE(WITH_ZERO_PADDING(RUBY_RELEASE_DAY))
25
+ #else
26
+ #define RUBY_RELEASE_DAY_STR STRINGIZE(RUBY_RELEASE_DAY)
27
+ #endif
28
+
29
+ #if !defined RUBY_LIB_VERSION && defined RUBY_LIB_VERSION_STYLE
30
+ # if RUBY_LIB_VERSION_STYLE == 3
31
+ # define RUBY_LIB_VERSION STRINGIZE(RUBY_API_VERSION_MAJOR)"."STRINGIZE(RUBY_API_VERSION_MINOR)"."STRINGIZE(RUBY_API_VERSION_TEENY)
32
+ # elif RUBY_LIB_VERSION_STYLE == 2
33
+ # define RUBY_LIB_VERSION STRINGIZE(RUBY_API_VERSION_MAJOR)"."STRINGIZE(RUBY_API_VERSION_MINOR)
34
+ # endif
35
+ #endif
36
+
37
+ #if RUBY_PATCHLEVEL == -1
38
+ #define RUBY_PATCHLEVEL_STR "dev"
39
+ #else
40
+ #define RUBY_PATCHLEVEL_STR "p"STRINGIZE(RUBY_PATCHLEVEL)
41
+ #endif
42
+
43
+ #ifndef RUBY_REVISION
44
+ # include "revision.h"
45
+ #endif
46
+ #ifndef RUBY_REVISION
47
+ # define RUBY_REVISION 0
48
+ #endif
49
+
50
+ #if RUBY_REVISION
51
+ # if RUBY_PATCHLEVEL == -1
52
+ # ifndef RUBY_BRANCH_NAME
53
+ # define RUBY_BRANCH_NAME "trunk"
54
+ # endif
55
+ # define RUBY_REVISION_STR " "RUBY_BRANCH_NAME" "STRINGIZE(RUBY_REVISION)
56
+ # else
57
+ # define RUBY_REVISION_STR " revision "STRINGIZE(RUBY_REVISION)
58
+ # endif
59
+ #else
60
+ # define RUBY_REVISION_STR ""
61
+ #endif
62
+
63
+ # define RUBY_DESCRIPTION_WITH(opt) \
64
+ "ruby "RUBY_VERSION \
65
+ RUBY_PATCHLEVEL_STR \
66
+ " ("RUBY_RELEASE_DATE \
67
+ RUBY_REVISION_STR")"opt" " \
68
+ "["RUBY_PLATFORM"]"
69
+ # define RUBY_COPYRIGHT \
70
+ "ruby - Copyright (C) " \
71
+ RUBY_BIRTH_YEAR_STR"-" \
72
+ RUBY_RELEASE_YEAR_STR" " \
73
+ RUBY_AUTHOR
@@ -0,0 +1,4504 @@
1
+ /* -*- mode:c; style:ruby; coding: utf-8; indent-tabs-mode: nil -*- */
2
+
3
+ /* This is an auto-generated file and is a part of the programming language
4
+ * Ruby. The person who created a program to generate this file (``I''
5
+ * hereafter) would like to refrain from defining licensing of this generated
6
+ * source code.
7
+ *
8
+ * This file consist of many small parts of codes copyrighted by each authors,
9
+ * not only the ``I'' person. Those original authors agree with some
10
+ * open-source license. I believe that the license we agree is the condition
11
+ * mentioned in the file COPYING. It states "4. You may modify and include
12
+ * the part of the software into any other software ...". But the problem is,
13
+ * the license never makes it clear if such modified parts still remain in the
14
+ * same license, or not. The fact that we agree with the source code's
15
+ * licensing terms do not automatically define that of generated ones. This is
16
+ * the reason why this file is under unclear situation. All that I know is
17
+ * that above provision guarantees this file to exist.
18
+ *
19
+ * Please let me hesitate to declare something about this nuanced contract. I
20
+ * am not in the position to take over other authors' license to merge into my
21
+ * one. Changing them to (say) GPLv3 is not doable by myself. Perhaps someday
22
+ * it might turn out to be okay to say this file is under a license. I wish the
23
+ * situation would become more clear in the future. */
24
+
25
+ /*******************************************************************/
26
+ /*******************************************************************/
27
+ /*******************************************************************/
28
+ /**
29
+ This file is VM main loop.
30
+
31
+ ----
32
+ This file is auto generated by insns2vm.rb
33
+ DO NOT TOUCH!
34
+
35
+ If you want to fix something, you must edit "tool/ruby_vm/views/vm.inc.erb"
36
+ or tool/insns2vm.rb
37
+ */
38
+
39
+ #include "vm_insnhelper.h"
40
+
41
+ /* insn nop()()() */
42
+ INSN_ENTRY(nop)
43
+ {
44
+ # define NAME_OF_CURRENT_INSN nop
45
+ # define INSN_ATTR(x) attr_ ## x ## _nop()
46
+ bool leaf;
47
+ MAYBE_UNUSED(VALUE *) canary;
48
+ START_OF_ORIGINAL_INSN(nop);
49
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
50
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
51
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
52
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
53
+ INC_SP(INSN_ATTR(sp_inc));
54
+ if (leaf) ADD_PC(INSN_ATTR(width));
55
+ END_INSN(nop);
56
+ # undef INSN_ATTR
57
+ # undef NAME_OF_CURRENT_INSN
58
+ }
59
+
60
+ /* insn getlocal(idx, level)()(val) */
61
+ INSN_ENTRY(getlocal)
62
+ {
63
+ # define NAME_OF_CURRENT_INSN getlocal
64
+ # define INSN_ATTR(x) attr_ ## x ## _getlocal(idx, level)
65
+ bool leaf;
66
+ MAYBE_UNUSED(VALUE *) canary;
67
+ MAYBE_UNUSED(VALUE) val;
68
+ MAYBE_UNUSED(lindex_t) idx;
69
+ MAYBE_UNUSED(rb_num_t) level;
70
+
71
+ START_OF_ORIGINAL_INSN(getlocal);
72
+ idx = (lindex_t)GET_OPERAND(1);
73
+ level = (rb_num_t)GET_OPERAND(2);
74
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
75
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
76
+ SETUP_CANARY();
77
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
78
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, idx);
79
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, level);
80
+ #line 81 "insns.def"
81
+ {
82
+ val = *(vm_get_ep(GET_EP(), level) - idx);
83
+ RB_DEBUG_COUNTER_INC(lvar_get);
84
+ (void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
85
+ }
86
+ #line 87 "vm.inc"
87
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
88
+ CHECK_CANARY();
89
+ INC_SP(INSN_ATTR(sp_inc));
90
+ TOPN(0) = val;
91
+ if (leaf) ADD_PC(INSN_ATTR(width));
92
+ END_INSN(getlocal);
93
+ # undef INSN_ATTR
94
+ # undef NAME_OF_CURRENT_INSN
95
+ }
96
+
97
+ /* insn setlocal(idx, level)(val)() */
98
+ INSN_ENTRY(setlocal)
99
+ {
100
+ # define NAME_OF_CURRENT_INSN setlocal
101
+ # define INSN_ATTR(x) attr_ ## x ## _setlocal(idx, level)
102
+ bool leaf;
103
+ MAYBE_UNUSED(VALUE *) canary;
104
+ MAYBE_UNUSED(VALUE) val;
105
+ MAYBE_UNUSED(lindex_t) idx;
106
+ MAYBE_UNUSED(rb_num_t) level;
107
+
108
+ START_OF_ORIGINAL_INSN(setlocal);
109
+ idx = (lindex_t)GET_OPERAND(1);
110
+ level = (rb_num_t)GET_OPERAND(2);
111
+ val = TOPN(0);
112
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
113
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
114
+ SETUP_CANARY();
115
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
116
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, idx);
117
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, level);
118
+ #line 95 "insns.def"
119
+ {
120
+ vm_env_write(vm_get_ep(GET_EP(), level), -(int)idx, val);
121
+ RB_DEBUG_COUNTER_INC(lvar_set);
122
+ (void)RB_DEBUG_COUNTER_INC_IF(lvar_set_dynamic, level > 0);
123
+ }
124
+ #line 125 "vm.inc"
125
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
126
+ CHECK_CANARY();
127
+ INC_SP(INSN_ATTR(sp_inc));
128
+ if (leaf) ADD_PC(INSN_ATTR(width));
129
+ END_INSN(setlocal);
130
+ # undef INSN_ATTR
131
+ # undef NAME_OF_CURRENT_INSN
132
+ }
133
+
134
+ /* insn getblockparam(idx, level)()(val) */
135
+ INSN_ENTRY(getblockparam)
136
+ {
137
+ # define NAME_OF_CURRENT_INSN getblockparam
138
+ # define INSN_ATTR(x) attr_ ## x ## _getblockparam(idx, level)
139
+ bool leaf;
140
+ MAYBE_UNUSED(VALUE *) canary;
141
+ MAYBE_UNUSED(VALUE) val;
142
+ MAYBE_UNUSED(lindex_t) idx;
143
+ MAYBE_UNUSED(rb_num_t) level;
144
+
145
+ START_OF_ORIGINAL_INSN(getblockparam);
146
+ idx = (lindex_t)GET_OPERAND(1);
147
+ level = (rb_num_t)GET_OPERAND(2);
148
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
149
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
150
+ SETUP_CANARY();
151
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
152
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, idx);
153
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, level);
154
+ #line 107 "insns.def"
155
+ {
156
+ const VALUE *ep = vm_get_ep(GET_EP(), level);
157
+ VM_ASSERT(VM_ENV_LOCAL_P(ep));
158
+
159
+ if (!VM_ENV_FLAGS(ep, VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM)) {
160
+ val = rb_vm_bh_to_procval(ec, VM_ENV_BLOCK_HANDLER(ep));
161
+ vm_env_write(ep, -(int)idx, val);
162
+ VM_ENV_FLAGS_SET(ep, VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM);
163
+ }
164
+ else {
165
+ val = *(ep - idx);
166
+ RB_DEBUG_COUNTER_INC(lvar_get);
167
+ (void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
168
+ }
169
+ }
170
+ #line 171 "vm.inc"
171
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
172
+ CHECK_CANARY();
173
+ INC_SP(INSN_ATTR(sp_inc));
174
+ TOPN(0) = val;
175
+ if (leaf) ADD_PC(INSN_ATTR(width));
176
+ END_INSN(getblockparam);
177
+ # undef INSN_ATTR
178
+ # undef NAME_OF_CURRENT_INSN
179
+ }
180
+
181
+ /* insn setblockparam(idx, level)(val)() */
182
+ INSN_ENTRY(setblockparam)
183
+ {
184
+ # define NAME_OF_CURRENT_INSN setblockparam
185
+ # define INSN_ATTR(x) attr_ ## x ## _setblockparam(idx, level)
186
+ bool leaf;
187
+ MAYBE_UNUSED(VALUE *) canary;
188
+ MAYBE_UNUSED(VALUE) val;
189
+ MAYBE_UNUSED(lindex_t) idx;
190
+ MAYBE_UNUSED(rb_num_t) level;
191
+
192
+ START_OF_ORIGINAL_INSN(setblockparam);
193
+ idx = (lindex_t)GET_OPERAND(1);
194
+ level = (rb_num_t)GET_OPERAND(2);
195
+ val = TOPN(0);
196
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
197
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
198
+ SETUP_CANARY();
199
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
200
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, idx);
201
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, level);
202
+ #line 129 "insns.def"
203
+ {
204
+ const VALUE *ep = vm_get_ep(GET_EP(), level);
205
+ VM_ASSERT(VM_ENV_LOCAL_P(ep));
206
+
207
+ vm_env_write(ep, -(int)idx, val);
208
+ RB_DEBUG_COUNTER_INC(lvar_set);
209
+ (void)RB_DEBUG_COUNTER_INC_IF(lvar_set_dynamic, level > 0);
210
+
211
+ VM_ENV_FLAGS_SET(ep, VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM);
212
+ }
213
+ #line 214 "vm.inc"
214
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
215
+ CHECK_CANARY();
216
+ INC_SP(INSN_ATTR(sp_inc));
217
+ if (leaf) ADD_PC(INSN_ATTR(width));
218
+ END_INSN(setblockparam);
219
+ # undef INSN_ATTR
220
+ # undef NAME_OF_CURRENT_INSN
221
+ }
222
+
223
+ /* insn getblockparamproxy(idx, level)()(val) */
224
+ INSN_ENTRY(getblockparamproxy)
225
+ {
226
+ # define NAME_OF_CURRENT_INSN getblockparamproxy
227
+ # define INSN_ATTR(x) attr_ ## x ## _getblockparamproxy(idx, level)
228
+ bool leaf;
229
+ MAYBE_UNUSED(VALUE *) canary;
230
+ MAYBE_UNUSED(VALUE) val;
231
+ MAYBE_UNUSED(lindex_t) idx;
232
+ MAYBE_UNUSED(rb_num_t) level;
233
+
234
+ START_OF_ORIGINAL_INSN(getblockparamproxy);
235
+ idx = (lindex_t)GET_OPERAND(1);
236
+ level = (rb_num_t)GET_OPERAND(2);
237
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
238
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
239
+ SETUP_CANARY();
240
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
241
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, idx);
242
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, level);
243
+ #line 148 "insns.def"
244
+ {
245
+ const VALUE *ep = vm_get_ep(GET_EP(), level);
246
+ VM_ASSERT(VM_ENV_LOCAL_P(ep));
247
+
248
+ if (!VM_ENV_FLAGS(ep, VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM)) {
249
+ VALUE block_handler = VM_ENV_BLOCK_HANDLER(ep);
250
+
251
+ if (block_handler) {
252
+ switch (vm_block_handler_type(block_handler)) {
253
+ case block_handler_type_iseq:
254
+ case block_handler_type_ifunc:
255
+ val = rb_block_param_proxy;
256
+ break;
257
+ case block_handler_type_symbol:
258
+ val = rb_sym_to_proc(VM_BH_TO_SYMBOL(block_handler));
259
+ goto INSN_LABEL(set);
260
+ case block_handler_type_proc:
261
+ val = VM_BH_TO_PROC(block_handler);
262
+ goto INSN_LABEL(set);
263
+ default:
264
+ VM_UNREACHABLE(getblockparamproxy);
265
+ }
266
+ }
267
+ else {
268
+ val = Qnil;
269
+ INSN_LABEL(set):
270
+ vm_env_write(ep, -(int)idx, val);
271
+ VM_ENV_FLAGS_SET(ep, VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM);
272
+ }
273
+ }
274
+ else {
275
+ val = *(ep - idx);
276
+ RB_DEBUG_COUNTER_INC(lvar_get);
277
+ (void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
278
+ }
279
+ }
280
+ #line 281 "vm.inc"
281
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
282
+ CHECK_CANARY();
283
+ INC_SP(INSN_ATTR(sp_inc));
284
+ TOPN(0) = val;
285
+ if (leaf) ADD_PC(INSN_ATTR(width));
286
+ END_INSN(getblockparamproxy);
287
+ # undef INSN_ATTR
288
+ # undef NAME_OF_CURRENT_INSN
289
+ }
290
+
291
+ /* insn getspecial(key, type)()(val) */
292
+ INSN_ENTRY(getspecial)
293
+ {
294
+ # define NAME_OF_CURRENT_INSN getspecial
295
+ # define INSN_ATTR(x) attr_ ## x ## _getspecial(key, type)
296
+ bool leaf;
297
+ MAYBE_UNUSED(VALUE *) canary;
298
+ MAYBE_UNUSED(VALUE) val;
299
+ MAYBE_UNUSED(rb_num_t) key, type;
300
+
301
+ START_OF_ORIGINAL_INSN(getspecial);
302
+ key = (rb_num_t)GET_OPERAND(1);
303
+ type = (rb_num_t)GET_OPERAND(2);
304
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
305
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
306
+ SETUP_CANARY();
307
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
308
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, key);
309
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, type);
310
+ #line 191 "insns.def"
311
+ {
312
+ val = vm_getspecial(ec, GET_LEP(), key, type);
313
+ }
314
+ #line 315 "vm.inc"
315
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
316
+ CHECK_CANARY();
317
+ INC_SP(INSN_ATTR(sp_inc));
318
+ TOPN(0) = val;
319
+ if (leaf) ADD_PC(INSN_ATTR(width));
320
+ END_INSN(getspecial);
321
+ # undef INSN_ATTR
322
+ # undef NAME_OF_CURRENT_INSN
323
+ }
324
+
325
+ /* insn setspecial(key)(obj)() */
326
+ INSN_ENTRY(setspecial)
327
+ {
328
+ # define NAME_OF_CURRENT_INSN setspecial
329
+ # define INSN_ATTR(x) attr_ ## x ## _setspecial(key)
330
+ bool leaf;
331
+ MAYBE_UNUSED(VALUE *) canary;
332
+ MAYBE_UNUSED(VALUE) obj;
333
+ MAYBE_UNUSED(rb_num_t) key;
334
+
335
+ START_OF_ORIGINAL_INSN(setspecial);
336
+ key = (rb_num_t)GET_OPERAND(1);
337
+ obj = TOPN(0);
338
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
339
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
340
+ SETUP_CANARY();
341
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
342
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, key);
343
+ #line 201 "insns.def"
344
+ {
345
+ lep_svar_set(ec, GET_LEP(), key, obj);
346
+ }
347
+ #line 348 "vm.inc"
348
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
349
+ CHECK_CANARY();
350
+ INC_SP(INSN_ATTR(sp_inc));
351
+ if (leaf) ADD_PC(INSN_ATTR(width));
352
+ END_INSN(setspecial);
353
+ # undef INSN_ATTR
354
+ # undef NAME_OF_CURRENT_INSN
355
+ }
356
+
357
+ /* insn getinstancevariable(id, ic)()(val) */
358
+ INSN_ENTRY(getinstancevariable)
359
+ {
360
+ # define NAME_OF_CURRENT_INSN getinstancevariable
361
+ # define INSN_ATTR(x) attr_ ## x ## _getinstancevariable(id, ic)
362
+ bool leaf;
363
+ MAYBE_UNUSED(VALUE *) canary;
364
+ MAYBE_UNUSED(IC) ic;
365
+ MAYBE_UNUSED(ID) id;
366
+ MAYBE_UNUSED(VALUE) val;
367
+
368
+ START_OF_ORIGINAL_INSN(getinstancevariable);
369
+ id = (ID)GET_OPERAND(1);
370
+ ic = (IC)GET_OPERAND(2);
371
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
372
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
373
+ SETUP_CANARY();
374
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
375
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, id);
376
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, ic);
377
+ #line 213 "insns.def"
378
+ {
379
+ val = vm_getinstancevariable(GET_SELF(), id, ic);
380
+ }
381
+ #line 382 "vm.inc"
382
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
383
+ CHECK_CANARY();
384
+ INC_SP(INSN_ATTR(sp_inc));
385
+ TOPN(0) = val;
386
+ if (leaf) ADD_PC(INSN_ATTR(width));
387
+ END_INSN(getinstancevariable);
388
+ # undef INSN_ATTR
389
+ # undef NAME_OF_CURRENT_INSN
390
+ }
391
+
392
+ /* insn setinstancevariable(id, ic)(val)() */
393
+ INSN_ENTRY(setinstancevariable)
394
+ {
395
+ # define NAME_OF_CURRENT_INSN setinstancevariable
396
+ # define INSN_ATTR(x) attr_ ## x ## _setinstancevariable(id, ic)
397
+ bool leaf;
398
+ MAYBE_UNUSED(VALUE *) canary;
399
+ MAYBE_UNUSED(IC) ic;
400
+ MAYBE_UNUSED(ID) id;
401
+ MAYBE_UNUSED(VALUE) val;
402
+
403
+ START_OF_ORIGINAL_INSN(setinstancevariable);
404
+ id = (ID)GET_OPERAND(1);
405
+ ic = (IC)GET_OPERAND(2);
406
+ val = TOPN(0);
407
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
408
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
409
+ SETUP_CANARY();
410
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
411
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, id);
412
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, ic);
413
+ #line 223 "insns.def"
414
+ {
415
+ vm_setinstancevariable(GET_SELF(), id, val, ic);
416
+ }
417
+ #line 418 "vm.inc"
418
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
419
+ CHECK_CANARY();
420
+ INC_SP(INSN_ATTR(sp_inc));
421
+ if (leaf) ADD_PC(INSN_ATTR(width));
422
+ END_INSN(setinstancevariable);
423
+ # undef INSN_ATTR
424
+ # undef NAME_OF_CURRENT_INSN
425
+ }
426
+
427
+ /* insn getclassvariable(id)()(val) */
428
+ INSN_ENTRY(getclassvariable)
429
+ {
430
+ # define NAME_OF_CURRENT_INSN getclassvariable
431
+ # define INSN_ATTR(x) attr_ ## x ## _getclassvariable(id)
432
+ bool leaf;
433
+ MAYBE_UNUSED(VALUE *) canary;
434
+ MAYBE_UNUSED(ID) id;
435
+ MAYBE_UNUSED(VALUE) val;
436
+
437
+ START_OF_ORIGINAL_INSN(getclassvariable);
438
+ id = (ID)GET_OPERAND(1);
439
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
440
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
441
+ SETUP_CANARY();
442
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
443
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, id);
444
+ #line 235 "insns.def"
445
+ {
446
+ val = rb_cvar_get(vm_get_cvar_base(rb_vm_get_cref(GET_EP()), GET_CFP()), id);
447
+ }
448
+ #line 449 "vm.inc"
449
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
450
+ CHECK_CANARY();
451
+ INC_SP(INSN_ATTR(sp_inc));
452
+ TOPN(0) = val;
453
+ if (leaf) ADD_PC(INSN_ATTR(width));
454
+ END_INSN(getclassvariable);
455
+ # undef INSN_ATTR
456
+ # undef NAME_OF_CURRENT_INSN
457
+ }
458
+
459
+ /* insn setclassvariable(id)(val)() */
460
+ INSN_ENTRY(setclassvariable)
461
+ {
462
+ # define NAME_OF_CURRENT_INSN setclassvariable
463
+ # define INSN_ATTR(x) attr_ ## x ## _setclassvariable(id)
464
+ bool leaf;
465
+ MAYBE_UNUSED(VALUE *) canary;
466
+ MAYBE_UNUSED(ID) id;
467
+ MAYBE_UNUSED(VALUE) val;
468
+
469
+ START_OF_ORIGINAL_INSN(setclassvariable);
470
+ id = (ID)GET_OPERAND(1);
471
+ val = TOPN(0);
472
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
473
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
474
+ SETUP_CANARY();
475
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
476
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, id);
477
+ #line 247 "insns.def"
478
+ {
479
+ vm_ensure_not_refinement_module(GET_SELF());
480
+ rb_cvar_set(vm_get_cvar_base(rb_vm_get_cref(GET_EP()), GET_CFP()), id, val);
481
+ }
482
+ #line 483 "vm.inc"
483
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
484
+ CHECK_CANARY();
485
+ INC_SP(INSN_ATTR(sp_inc));
486
+ if (leaf) ADD_PC(INSN_ATTR(width));
487
+ END_INSN(setclassvariable);
488
+ # undef INSN_ATTR
489
+ # undef NAME_OF_CURRENT_INSN
490
+ }
491
+
492
+ /* insn getconstant(id)(klass)(val) */
493
+ INSN_ENTRY(getconstant)
494
+ {
495
+ # define NAME_OF_CURRENT_INSN getconstant
496
+ # define INSN_ATTR(x) attr_ ## x ## _getconstant(id)
497
+ bool leaf;
498
+ MAYBE_UNUSED(VALUE *) canary;
499
+ MAYBE_UNUSED(ID) id;
500
+ MAYBE_UNUSED(VALUE) klass, val;
501
+
502
+ START_OF_ORIGINAL_INSN(getconstant);
503
+ id = (ID)GET_OPERAND(1);
504
+ klass = TOPN(0);
505
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
506
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
507
+ SETUP_CANARY();
508
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
509
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, id);
510
+ #line 263 "insns.def"
511
+ {
512
+ val = vm_get_ev_const(ec, klass, id, 0);
513
+ }
514
+ #line 515 "vm.inc"
515
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
516
+ CHECK_CANARY();
517
+ INC_SP(INSN_ATTR(sp_inc));
518
+ TOPN(0) = val;
519
+ if (leaf) ADD_PC(INSN_ATTR(width));
520
+ END_INSN(getconstant);
521
+ # undef INSN_ATTR
522
+ # undef NAME_OF_CURRENT_INSN
523
+ }
524
+
525
+ /* insn setconstant(id)(val, cbase)() */
526
+ INSN_ENTRY(setconstant)
527
+ {
528
+ # define NAME_OF_CURRENT_INSN setconstant
529
+ # define INSN_ATTR(x) attr_ ## x ## _setconstant(id)
530
+ bool leaf;
531
+ MAYBE_UNUSED(VALUE *) canary;
532
+ MAYBE_UNUSED(ID) id;
533
+ MAYBE_UNUSED(VALUE) cbase, val;
534
+
535
+ START_OF_ORIGINAL_INSN(setconstant);
536
+ id = (ID)GET_OPERAND(1);
537
+ val = TOPN(1);
538
+ cbase = TOPN(0);
539
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
540
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
541
+ SETUP_CANARY();
542
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
543
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, id);
544
+ #line 279 "insns.def"
545
+ {
546
+ vm_check_if_namespace(cbase);
547
+ vm_ensure_not_refinement_module(GET_SELF());
548
+ rb_const_set(cbase, id, val);
549
+ }
550
+ #line 551 "vm.inc"
551
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
552
+ CHECK_CANARY();
553
+ INC_SP(INSN_ATTR(sp_inc));
554
+ if (leaf) ADD_PC(INSN_ATTR(width));
555
+ END_INSN(setconstant);
556
+ # undef INSN_ATTR
557
+ # undef NAME_OF_CURRENT_INSN
558
+ }
559
+
560
+ /* insn getglobal(entry)()(val) */
561
+ INSN_ENTRY(getglobal)
562
+ {
563
+ # define NAME_OF_CURRENT_INSN getglobal
564
+ # define INSN_ATTR(x) attr_ ## x ## _getglobal(entry)
565
+ bool leaf;
566
+ MAYBE_UNUSED(VALUE *) canary;
567
+ MAYBE_UNUSED(GENTRY) entry;
568
+ MAYBE_UNUSED(VALUE) val;
569
+
570
+ START_OF_ORIGINAL_INSN(getglobal);
571
+ entry = (GENTRY)GET_OPERAND(1);
572
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
573
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
574
+ SETUP_CANARY();
575
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
576
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, entry);
577
+ #line 292 "insns.def"
578
+ {
579
+ val = GET_GLOBAL((VALUE)entry);
580
+ }
581
+ #line 582 "vm.inc"
582
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
583
+ CHECK_CANARY();
584
+ INC_SP(INSN_ATTR(sp_inc));
585
+ TOPN(0) = val;
586
+ if (leaf) ADD_PC(INSN_ATTR(width));
587
+ END_INSN(getglobal);
588
+ # undef INSN_ATTR
589
+ # undef NAME_OF_CURRENT_INSN
590
+ }
591
+
592
+ /* insn setglobal(entry)(val)() */
593
+ INSN_ENTRY(setglobal)
594
+ {
595
+ # define NAME_OF_CURRENT_INSN setglobal
596
+ # define INSN_ATTR(x) attr_ ## x ## _setglobal(entry)
597
+ bool leaf;
598
+ MAYBE_UNUSED(VALUE *) canary;
599
+ MAYBE_UNUSED(GENTRY) entry;
600
+ MAYBE_UNUSED(VALUE) val;
601
+
602
+ START_OF_ORIGINAL_INSN(setglobal);
603
+ entry = (GENTRY)GET_OPERAND(1);
604
+ val = TOPN(0);
605
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
606
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
607
+ SETUP_CANARY();
608
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
609
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, entry);
610
+ #line 303 "insns.def"
611
+ {
612
+ SET_GLOBAL((VALUE)entry, val);
613
+ }
614
+ #line 615 "vm.inc"
615
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
616
+ CHECK_CANARY();
617
+ INC_SP(INSN_ATTR(sp_inc));
618
+ if (leaf) ADD_PC(INSN_ATTR(width));
619
+ END_INSN(setglobal);
620
+ # undef INSN_ATTR
621
+ # undef NAME_OF_CURRENT_INSN
622
+ }
623
+
624
+ /* insn putnil()()(val) */
625
+ INSN_ENTRY(putnil)
626
+ {
627
+ # define NAME_OF_CURRENT_INSN putnil
628
+ # define INSN_ATTR(x) attr_ ## x ## _putnil()
629
+ bool leaf;
630
+ MAYBE_UNUSED(VALUE *) canary;
631
+ MAYBE_UNUSED(VALUE) val;
632
+
633
+ START_OF_ORIGINAL_INSN(putnil);
634
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
635
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
636
+ SETUP_CANARY();
637
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
638
+ #line 317 "insns.def"
639
+ {
640
+ val = Qnil;
641
+ }
642
+ #line 643 "vm.inc"
643
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
644
+ CHECK_CANARY();
645
+ INC_SP(INSN_ATTR(sp_inc));
646
+ TOPN(0) = val;
647
+ if (leaf) ADD_PC(INSN_ATTR(width));
648
+ END_INSN(putnil);
649
+ # undef INSN_ATTR
650
+ # undef NAME_OF_CURRENT_INSN
651
+ }
652
+
653
+ /* insn putself()()(val) */
654
+ INSN_ENTRY(putself)
655
+ {
656
+ # define NAME_OF_CURRENT_INSN putself
657
+ # define INSN_ATTR(x) attr_ ## x ## _putself()
658
+ bool leaf;
659
+ MAYBE_UNUSED(VALUE *) canary;
660
+ MAYBE_UNUSED(VALUE) val;
661
+
662
+ START_OF_ORIGINAL_INSN(putself);
663
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
664
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
665
+ SETUP_CANARY();
666
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
667
+ #line 327 "insns.def"
668
+ {
669
+ val = GET_SELF();
670
+ }
671
+ #line 672 "vm.inc"
672
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
673
+ CHECK_CANARY();
674
+ INC_SP(INSN_ATTR(sp_inc));
675
+ TOPN(0) = val;
676
+ if (leaf) ADD_PC(INSN_ATTR(width));
677
+ END_INSN(putself);
678
+ # undef INSN_ATTR
679
+ # undef NAME_OF_CURRENT_INSN
680
+ }
681
+
682
+ /* insn putobject(val)()(val) */
683
+ INSN_ENTRY(putobject)
684
+ {
685
+ # define NAME_OF_CURRENT_INSN putobject
686
+ # define INSN_ATTR(x) attr_ ## x ## _putobject(val)
687
+ bool leaf;
688
+ MAYBE_UNUSED(VALUE *) canary;
689
+ MAYBE_UNUSED(VALUE) val;
690
+
691
+ START_OF_ORIGINAL_INSN(putobject);
692
+ val = (VALUE)GET_OPERAND(1);
693
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
694
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
695
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
696
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, val);
697
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
698
+ INC_SP(INSN_ATTR(sp_inc));
699
+ TOPN(0) = val;
700
+ if (leaf) ADD_PC(INSN_ATTR(width));
701
+ END_INSN(putobject);
702
+ # undef INSN_ATTR
703
+ # undef NAME_OF_CURRENT_INSN
704
+ }
705
+
706
+ /* insn putspecialobject(value_type)()(val) */
707
+ INSN_ENTRY(putspecialobject)
708
+ {
709
+ # define NAME_OF_CURRENT_INSN putspecialobject
710
+ # define INSN_ATTR(x) attr_ ## x ## _putspecialobject(value_type)
711
+ bool leaf;
712
+ MAYBE_UNUSED(VALUE *) canary;
713
+ MAYBE_UNUSED(VALUE) val;
714
+ MAYBE_UNUSED(rb_num_t) value_type;
715
+
716
+ START_OF_ORIGINAL_INSN(putspecialobject);
717
+ value_type = (rb_num_t)GET_OPERAND(1);
718
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
719
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
720
+ SETUP_CANARY();
721
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
722
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, value_type);
723
+ #line 349 "insns.def"
724
+ {
725
+ enum vm_special_object_type type;
726
+
727
+ type = (enum vm_special_object_type)value_type;
728
+ val = vm_get_special_object(GET_EP(), type);
729
+ }
730
+ #line 731 "vm.inc"
731
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
732
+ CHECK_CANARY();
733
+ INC_SP(INSN_ATTR(sp_inc));
734
+ TOPN(0) = val;
735
+ if (leaf) ADD_PC(INSN_ATTR(width));
736
+ END_INSN(putspecialobject);
737
+ # undef INSN_ATTR
738
+ # undef NAME_OF_CURRENT_INSN
739
+ }
740
+
741
+ /* insn putiseq(iseq)()(ret) */
742
+ INSN_ENTRY(putiseq)
743
+ {
744
+ # define NAME_OF_CURRENT_INSN putiseq
745
+ # define INSN_ATTR(x) attr_ ## x ## _putiseq(iseq)
746
+ bool leaf;
747
+ MAYBE_UNUSED(VALUE *) canary;
748
+ MAYBE_UNUSED(ISEQ) iseq;
749
+ MAYBE_UNUSED(VALUE) ret;
750
+
751
+ START_OF_ORIGINAL_INSN(putiseq);
752
+ iseq = (ISEQ)GET_OPERAND(1);
753
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
754
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
755
+ SETUP_CANARY();
756
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
757
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, iseq);
758
+ #line 363 "insns.def"
759
+ {
760
+ ret = (VALUE)iseq;
761
+ }
762
+ #line 763 "vm.inc"
763
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
764
+ CHECK_CANARY();
765
+ INC_SP(INSN_ATTR(sp_inc));
766
+ TOPN(0) = ret;
767
+ if (leaf) ADD_PC(INSN_ATTR(width));
768
+ END_INSN(putiseq);
769
+ # undef INSN_ATTR
770
+ # undef NAME_OF_CURRENT_INSN
771
+ }
772
+
773
+ /* insn putstring(str)()(val) */
774
+ INSN_ENTRY(putstring)
775
+ {
776
+ # define NAME_OF_CURRENT_INSN putstring
777
+ # define INSN_ATTR(x) attr_ ## x ## _putstring(str)
778
+ bool leaf;
779
+ MAYBE_UNUSED(VALUE *) canary;
780
+ MAYBE_UNUSED(VALUE) str, val;
781
+
782
+ START_OF_ORIGINAL_INSN(putstring);
783
+ str = (VALUE)GET_OPERAND(1);
784
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
785
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
786
+ SETUP_CANARY();
787
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
788
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, str);
789
+ #line 373 "insns.def"
790
+ {
791
+ val = rb_str_resurrect(str);
792
+ }
793
+ #line 794 "vm.inc"
794
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
795
+ CHECK_CANARY();
796
+ INC_SP(INSN_ATTR(sp_inc));
797
+ TOPN(0) = val;
798
+ if (leaf) ADD_PC(INSN_ATTR(width));
799
+ END_INSN(putstring);
800
+ # undef INSN_ATTR
801
+ # undef NAME_OF_CURRENT_INSN
802
+ }
803
+
804
+ /* insn concatstrings(num)(...)(val) */
805
+ INSN_ENTRY(concatstrings)
806
+ {
807
+ # define NAME_OF_CURRENT_INSN concatstrings
808
+ # define INSN_ATTR(x) attr_ ## x ## _concatstrings(num)
809
+ bool leaf;
810
+ MAYBE_UNUSED(VALUE *) canary;
811
+ MAYBE_UNUSED(VALUE) val;
812
+ MAYBE_UNUSED(rb_num_t) num;
813
+
814
+ START_OF_ORIGINAL_INSN(concatstrings);
815
+ num = (rb_num_t)GET_OPERAND(1);
816
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
817
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
818
+ SETUP_CANARY();
819
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
820
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, num);
821
+ #line 384 "insns.def"
822
+ {
823
+ val = rb_str_concat_literals(num, STACK_ADDR_FROM_TOP(num));
824
+ }
825
+ #line 826 "vm.inc"
826
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
827
+ CHECK_CANARY();
828
+ INC_SP(INSN_ATTR(sp_inc));
829
+ TOPN(0) = val;
830
+ if (leaf) ADD_PC(INSN_ATTR(width));
831
+ END_INSN(concatstrings);
832
+ # undef INSN_ATTR
833
+ # undef NAME_OF_CURRENT_INSN
834
+ }
835
+
836
+ /* insn tostring()(val, str)(val) */
837
+ INSN_ENTRY(tostring)
838
+ {
839
+ # define NAME_OF_CURRENT_INSN tostring
840
+ # define INSN_ATTR(x) attr_ ## x ## _tostring()
841
+ bool leaf;
842
+ MAYBE_UNUSED(VALUE *) canary;
843
+ MAYBE_UNUSED(VALUE) str, val;
844
+
845
+ START_OF_ORIGINAL_INSN(tostring);
846
+ val = TOPN(1);
847
+ str = TOPN(0);
848
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
849
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
850
+ SETUP_CANARY();
851
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
852
+ #line 394 "insns.def"
853
+ {
854
+ val = rb_obj_as_string_result(str, val);
855
+ }
856
+ #line 857 "vm.inc"
857
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
858
+ CHECK_CANARY();
859
+ INC_SP(INSN_ATTR(sp_inc));
860
+ TOPN(0) = val;
861
+ if (leaf) ADD_PC(INSN_ATTR(width));
862
+ END_INSN(tostring);
863
+ # undef INSN_ATTR
864
+ # undef NAME_OF_CURRENT_INSN
865
+ }
866
+
867
+ /* insn freezestring(debug_info)(str)(str) */
868
+ INSN_ENTRY(freezestring)
869
+ {
870
+ # define NAME_OF_CURRENT_INSN freezestring
871
+ # define INSN_ATTR(x) attr_ ## x ## _freezestring(debug_info)
872
+ bool leaf;
873
+ MAYBE_UNUSED(VALUE *) canary;
874
+ MAYBE_UNUSED(VALUE) debug_info, str;
875
+
876
+ START_OF_ORIGINAL_INSN(freezestring);
877
+ debug_info = (VALUE)GET_OPERAND(1);
878
+ str = TOPN(0);
879
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
880
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
881
+ SETUP_CANARY();
882
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
883
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, debug_info);
884
+ #line 404 "insns.def"
885
+ {
886
+ vm_freezestring(str, debug_info);
887
+ }
888
+ #line 889 "vm.inc"
889
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
890
+ CHECK_CANARY();
891
+ INC_SP(INSN_ATTR(sp_inc));
892
+ TOPN(0) = str;
893
+ if (leaf) ADD_PC(INSN_ATTR(width));
894
+ END_INSN(freezestring);
895
+ # undef INSN_ATTR
896
+ # undef NAME_OF_CURRENT_INSN
897
+ }
898
+
899
+ /* insn toregexp(opt, cnt)(...)(val) */
900
+ INSN_ENTRY(toregexp)
901
+ {
902
+ # define NAME_OF_CURRENT_INSN toregexp
903
+ # define INSN_ATTR(x) attr_ ## x ## _toregexp(opt, cnt)
904
+ bool leaf;
905
+ MAYBE_UNUSED(VALUE *) canary;
906
+ MAYBE_UNUSED(VALUE) val;
907
+ MAYBE_UNUSED(rb_num_t) cnt, opt;
908
+
909
+ START_OF_ORIGINAL_INSN(toregexp);
910
+ opt = (rb_num_t)GET_OPERAND(1);
911
+ cnt = (rb_num_t)GET_OPERAND(2);
912
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
913
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
914
+ SETUP_CANARY();
915
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
916
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, opt);
917
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cnt);
918
+ #line 420 "insns.def"
919
+ {
920
+ const VALUE ary = rb_ary_tmp_new_from_values(0, cnt, STACK_ADDR_FROM_TOP(cnt));
921
+ val = rb_reg_new_ary(ary, (int)opt);
922
+ rb_ary_clear(ary);
923
+ }
924
+ #line 925 "vm.inc"
925
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
926
+ CHECK_CANARY();
927
+ INC_SP(INSN_ATTR(sp_inc));
928
+ TOPN(0) = val;
929
+ if (leaf) ADD_PC(INSN_ATTR(width));
930
+ END_INSN(toregexp);
931
+ # undef INSN_ATTR
932
+ # undef NAME_OF_CURRENT_INSN
933
+ }
934
+
935
+ /* insn intern()(str)(sym) */
936
+ INSN_ENTRY(intern)
937
+ {
938
+ # define NAME_OF_CURRENT_INSN intern
939
+ # define INSN_ATTR(x) attr_ ## x ## _intern()
940
+ bool leaf;
941
+ MAYBE_UNUSED(VALUE *) canary;
942
+ MAYBE_UNUSED(VALUE) str, sym;
943
+
944
+ START_OF_ORIGINAL_INSN(intern);
945
+ str = TOPN(0);
946
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
947
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
948
+ SETUP_CANARY();
949
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
950
+ #line 432 "insns.def"
951
+ {
952
+ sym = rb_str_intern(str);
953
+ }
954
+ #line 955 "vm.inc"
955
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
956
+ CHECK_CANARY();
957
+ INC_SP(INSN_ATTR(sp_inc));
958
+ TOPN(0) = sym;
959
+ if (leaf) ADD_PC(INSN_ATTR(width));
960
+ END_INSN(intern);
961
+ # undef INSN_ATTR
962
+ # undef NAME_OF_CURRENT_INSN
963
+ }
964
+
965
+ /* insn newarray(num)(...)(val) */
966
+ INSN_ENTRY(newarray)
967
+ {
968
+ # define NAME_OF_CURRENT_INSN newarray
969
+ # define INSN_ATTR(x) attr_ ## x ## _newarray(num)
970
+ bool leaf;
971
+ MAYBE_UNUSED(VALUE *) canary;
972
+ MAYBE_UNUSED(VALUE) val;
973
+ MAYBE_UNUSED(rb_num_t) num;
974
+
975
+ START_OF_ORIGINAL_INSN(newarray);
976
+ num = (rb_num_t)GET_OPERAND(1);
977
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
978
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
979
+ SETUP_CANARY();
980
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
981
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, num);
982
+ #line 443 "insns.def"
983
+ {
984
+ val = rb_ary_new4(num, STACK_ADDR_FROM_TOP(num));
985
+ }
986
+ #line 987 "vm.inc"
987
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
988
+ CHECK_CANARY();
989
+ INC_SP(INSN_ATTR(sp_inc));
990
+ TOPN(0) = val;
991
+ if (leaf) ADD_PC(INSN_ATTR(width));
992
+ END_INSN(newarray);
993
+ # undef INSN_ATTR
994
+ # undef NAME_OF_CURRENT_INSN
995
+ }
996
+
997
+ /* insn duparray(ary)()(val) */
998
+ INSN_ENTRY(duparray)
999
+ {
1000
+ # define NAME_OF_CURRENT_INSN duparray
1001
+ # define INSN_ATTR(x) attr_ ## x ## _duparray(ary)
1002
+ bool leaf;
1003
+ MAYBE_UNUSED(VALUE *) canary;
1004
+ MAYBE_UNUSED(VALUE) ary, val;
1005
+
1006
+ START_OF_ORIGINAL_INSN(duparray);
1007
+ ary = (VALUE)GET_OPERAND(1);
1008
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1009
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1010
+ SETUP_CANARY();
1011
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1012
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ary);
1013
+ #line 453 "insns.def"
1014
+ {
1015
+ RUBY_DTRACE_CREATE_HOOK(ARRAY, RARRAY_LEN(ary));
1016
+ val = rb_ary_resurrect(ary);
1017
+ }
1018
+ #line 1019 "vm.inc"
1019
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1020
+ CHECK_CANARY();
1021
+ INC_SP(INSN_ATTR(sp_inc));
1022
+ TOPN(0) = val;
1023
+ if (leaf) ADD_PC(INSN_ATTR(width));
1024
+ END_INSN(duparray);
1025
+ # undef INSN_ATTR
1026
+ # undef NAME_OF_CURRENT_INSN
1027
+ }
1028
+
1029
+ /* insn duphash(hash)()(val) */
1030
+ INSN_ENTRY(duphash)
1031
+ {
1032
+ # define NAME_OF_CURRENT_INSN duphash
1033
+ # define INSN_ATTR(x) attr_ ## x ## _duphash(hash)
1034
+ bool leaf;
1035
+ MAYBE_UNUSED(VALUE *) canary;
1036
+ MAYBE_UNUSED(VALUE) hash, val;
1037
+
1038
+ START_OF_ORIGINAL_INSN(duphash);
1039
+ hash = (VALUE)GET_OPERAND(1);
1040
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1041
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1042
+ SETUP_CANARY();
1043
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1044
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, hash);
1045
+ #line 464 "insns.def"
1046
+ {
1047
+ RUBY_DTRACE_CREATE_HOOK(HASH, RHASH_SIZE(hash) << 1);
1048
+ val = rb_hash_resurrect(hash);
1049
+ }
1050
+ #line 1051 "vm.inc"
1051
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1052
+ CHECK_CANARY();
1053
+ INC_SP(INSN_ATTR(sp_inc));
1054
+ TOPN(0) = val;
1055
+ if (leaf) ADD_PC(INSN_ATTR(width));
1056
+ END_INSN(duphash);
1057
+ # undef INSN_ATTR
1058
+ # undef NAME_OF_CURRENT_INSN
1059
+ }
1060
+
1061
+ /* insn expandarray(num, flag)(..., ary)(...) */
1062
+ INSN_ENTRY(expandarray)
1063
+ {
1064
+ # define NAME_OF_CURRENT_INSN expandarray
1065
+ # define INSN_ATTR(x) attr_ ## x ## _expandarray(num, flag)
1066
+ bool leaf;
1067
+ MAYBE_UNUSED(VALUE *) canary;
1068
+ MAYBE_UNUSED(VALUE) ary;
1069
+ MAYBE_UNUSED(rb_num_t) flag, num;
1070
+
1071
+ START_OF_ORIGINAL_INSN(expandarray);
1072
+ num = (rb_num_t)GET_OPERAND(1);
1073
+ flag = (rb_num_t)GET_OPERAND(2);
1074
+ ary = TOPN(0);
1075
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1076
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1077
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1078
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, num);
1079
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, flag);
1080
+ #line 485 "insns.def"
1081
+ {
1082
+ vm_expandarray(GET_SP(), ary, num, (int)flag);
1083
+ }
1084
+ #line 1085 "vm.inc"
1085
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1086
+ INC_SP(INSN_ATTR(sp_inc));
1087
+ if (leaf) ADD_PC(INSN_ATTR(width));
1088
+ END_INSN(expandarray);
1089
+ # undef INSN_ATTR
1090
+ # undef NAME_OF_CURRENT_INSN
1091
+ }
1092
+
1093
+ /* insn concatarray()(ary1, ary2)(ary) */
1094
+ INSN_ENTRY(concatarray)
1095
+ {
1096
+ # define NAME_OF_CURRENT_INSN concatarray
1097
+ # define INSN_ATTR(x) attr_ ## x ## _concatarray()
1098
+ bool leaf;
1099
+ MAYBE_UNUSED(VALUE *) canary;
1100
+ MAYBE_UNUSED(VALUE) ary, ary1, ary2;
1101
+
1102
+ START_OF_ORIGINAL_INSN(concatarray);
1103
+ ary1 = TOPN(1);
1104
+ ary2 = TOPN(0);
1105
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1106
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1107
+ SETUP_CANARY();
1108
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1109
+ #line 496 "insns.def"
1110
+ {
1111
+ ary = vm_concat_array(ary1, ary2);
1112
+ }
1113
+ #line 1114 "vm.inc"
1114
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1115
+ CHECK_CANARY();
1116
+ INC_SP(INSN_ATTR(sp_inc));
1117
+ TOPN(0) = ary;
1118
+ if (leaf) ADD_PC(INSN_ATTR(width));
1119
+ END_INSN(concatarray);
1120
+ # undef INSN_ATTR
1121
+ # undef NAME_OF_CURRENT_INSN
1122
+ }
1123
+
1124
+ /* insn splatarray(flag)(ary)(obj) */
1125
+ INSN_ENTRY(splatarray)
1126
+ {
1127
+ # define NAME_OF_CURRENT_INSN splatarray
1128
+ # define INSN_ATTR(x) attr_ ## x ## _splatarray(flag)
1129
+ bool leaf;
1130
+ MAYBE_UNUSED(VALUE *) canary;
1131
+ MAYBE_UNUSED(VALUE) ary, flag, obj;
1132
+
1133
+ START_OF_ORIGINAL_INSN(splatarray);
1134
+ flag = (VALUE)GET_OPERAND(1);
1135
+ ary = TOPN(0);
1136
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1137
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1138
+ SETUP_CANARY();
1139
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1140
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, flag);
1141
+ #line 507 "insns.def"
1142
+ {
1143
+ obj = vm_splat_array(flag, ary);
1144
+ }
1145
+ #line 1146 "vm.inc"
1146
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1147
+ CHECK_CANARY();
1148
+ INC_SP(INSN_ATTR(sp_inc));
1149
+ TOPN(0) = obj;
1150
+ if (leaf) ADD_PC(INSN_ATTR(width));
1151
+ END_INSN(splatarray);
1152
+ # undef INSN_ATTR
1153
+ # undef NAME_OF_CURRENT_INSN
1154
+ }
1155
+
1156
+ /* insn newhash(num)(...)(val) */
1157
+ INSN_ENTRY(newhash)
1158
+ {
1159
+ # define NAME_OF_CURRENT_INSN newhash
1160
+ # define INSN_ATTR(x) attr_ ## x ## _newhash(num)
1161
+ bool leaf;
1162
+ MAYBE_UNUSED(VALUE *) canary;
1163
+ MAYBE_UNUSED(VALUE) val;
1164
+ MAYBE_UNUSED(rb_num_t) num;
1165
+
1166
+ START_OF_ORIGINAL_INSN(newhash);
1167
+ num = (rb_num_t)GET_OPERAND(1);
1168
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1169
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1170
+ SETUP_CANARY();
1171
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1172
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, num);
1173
+ #line 519 "insns.def"
1174
+ {
1175
+ RUBY_DTRACE_CREATE_HOOK(HASH, num);
1176
+
1177
+ val = rb_hash_new_with_size(num / 2);
1178
+
1179
+ if (num) {
1180
+ rb_hash_bulk_insert(num, STACK_ADDR_FROM_TOP(num), val);
1181
+ }
1182
+ }
1183
+ #line 1184 "vm.inc"
1184
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1185
+ CHECK_CANARY();
1186
+ INC_SP(INSN_ATTR(sp_inc));
1187
+ TOPN(0) = val;
1188
+ if (leaf) ADD_PC(INSN_ATTR(width));
1189
+ END_INSN(newhash);
1190
+ # undef INSN_ATTR
1191
+ # undef NAME_OF_CURRENT_INSN
1192
+ }
1193
+
1194
+ /* insn newrange(flag)(low, high)(val) */
1195
+ INSN_ENTRY(newrange)
1196
+ {
1197
+ # define NAME_OF_CURRENT_INSN newrange
1198
+ # define INSN_ATTR(x) attr_ ## x ## _newrange(flag)
1199
+ bool leaf;
1200
+ MAYBE_UNUSED(VALUE *) canary;
1201
+ MAYBE_UNUSED(VALUE) high, low, val;
1202
+ MAYBE_UNUSED(rb_num_t) flag;
1203
+
1204
+ START_OF_ORIGINAL_INSN(newrange);
1205
+ flag = (rb_num_t)GET_OPERAND(1);
1206
+ low = TOPN(1);
1207
+ high = TOPN(0);
1208
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1209
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1210
+ SETUP_CANARY();
1211
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1212
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, flag);
1213
+ #line 537 "insns.def"
1214
+ {
1215
+ val = rb_range_new(low, high, (int)flag);
1216
+ }
1217
+ #line 1218 "vm.inc"
1218
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1219
+ CHECK_CANARY();
1220
+ INC_SP(INSN_ATTR(sp_inc));
1221
+ TOPN(0) = val;
1222
+ if (leaf) ADD_PC(INSN_ATTR(width));
1223
+ END_INSN(newrange);
1224
+ # undef INSN_ATTR
1225
+ # undef NAME_OF_CURRENT_INSN
1226
+ }
1227
+
1228
+ /* insn pop()(val)() */
1229
+ INSN_ENTRY(pop)
1230
+ {
1231
+ # define NAME_OF_CURRENT_INSN pop
1232
+ # define INSN_ATTR(x) attr_ ## x ## _pop()
1233
+ bool leaf;
1234
+ MAYBE_UNUSED(VALUE *) canary;
1235
+ MAYBE_UNUSED(VALUE) val;
1236
+
1237
+ START_OF_ORIGINAL_INSN(pop);
1238
+ val = TOPN(0);
1239
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1240
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1241
+ SETUP_CANARY();
1242
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1243
+ #line 551 "insns.def"
1244
+ {
1245
+ (void)val;
1246
+ /* none */
1247
+ }
1248
+ #line 1249 "vm.inc"
1249
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1250
+ CHECK_CANARY();
1251
+ INC_SP(INSN_ATTR(sp_inc));
1252
+ if (leaf) ADD_PC(INSN_ATTR(width));
1253
+ END_INSN(pop);
1254
+ # undef INSN_ATTR
1255
+ # undef NAME_OF_CURRENT_INSN
1256
+ }
1257
+
1258
+ /* insn dup()(val)(val1, val2) */
1259
+ INSN_ENTRY(dup)
1260
+ {
1261
+ # define NAME_OF_CURRENT_INSN dup
1262
+ # define INSN_ATTR(x) attr_ ## x ## _dup()
1263
+ bool leaf;
1264
+ MAYBE_UNUSED(VALUE *) canary;
1265
+ MAYBE_UNUSED(VALUE) val, val1, val2;
1266
+
1267
+ START_OF_ORIGINAL_INSN(dup);
1268
+ val = TOPN(0);
1269
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1270
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1271
+ SETUP_CANARY();
1272
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1273
+ #line 562 "insns.def"
1274
+ {
1275
+ val1 = val2 = val;
1276
+ }
1277
+ #line 1278 "vm.inc"
1278
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1279
+ CHECK_CANARY();
1280
+ INC_SP(INSN_ATTR(sp_inc));
1281
+ TOPN(0) = val2;
1282
+ TOPN(1) = val1;
1283
+ if (leaf) ADD_PC(INSN_ATTR(width));
1284
+ END_INSN(dup);
1285
+ # undef INSN_ATTR
1286
+ # undef NAME_OF_CURRENT_INSN
1287
+ }
1288
+
1289
+ /* insn dupn(n)(...)(...) */
1290
+ INSN_ENTRY(dupn)
1291
+ {
1292
+ # define NAME_OF_CURRENT_INSN dupn
1293
+ # define INSN_ATTR(x) attr_ ## x ## _dupn(n)
1294
+ bool leaf;
1295
+ MAYBE_UNUSED(VALUE *) canary;
1296
+ MAYBE_UNUSED(rb_num_t) n;
1297
+
1298
+ START_OF_ORIGINAL_INSN(dupn);
1299
+ n = (rb_num_t)GET_OPERAND(1);
1300
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1301
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1302
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1303
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, n);
1304
+ #line 573 "insns.def"
1305
+ {
1306
+ void *dst = GET_SP();
1307
+ void *src = STACK_ADDR_FROM_TOP(n);
1308
+
1309
+ MEMCPY(dst, src, VALUE, n);
1310
+ }
1311
+ #line 1312 "vm.inc"
1312
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1313
+ INC_SP(INSN_ATTR(sp_inc));
1314
+ if (leaf) ADD_PC(INSN_ATTR(width));
1315
+ END_INSN(dupn);
1316
+ # undef INSN_ATTR
1317
+ # undef NAME_OF_CURRENT_INSN
1318
+ }
1319
+
1320
+ /* insn swap()(val, obj)(obj, val) */
1321
+ INSN_ENTRY(swap)
1322
+ {
1323
+ # define NAME_OF_CURRENT_INSN swap
1324
+ # define INSN_ATTR(x) attr_ ## x ## _swap()
1325
+ bool leaf;
1326
+ MAYBE_UNUSED(VALUE *) canary;
1327
+ MAYBE_UNUSED(VALUE) obj, val;
1328
+
1329
+ START_OF_ORIGINAL_INSN(swap);
1330
+ val = TOPN(1);
1331
+ obj = TOPN(0);
1332
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1333
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1334
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1335
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1336
+ INC_SP(INSN_ATTR(sp_inc));
1337
+ TOPN(0) = val;
1338
+ TOPN(1) = obj;
1339
+ if (leaf) ADD_PC(INSN_ATTR(width));
1340
+ END_INSN(swap);
1341
+ # undef INSN_ATTR
1342
+ # undef NAME_OF_CURRENT_INSN
1343
+ }
1344
+
1345
+ /* insn reverse(n)(...)(...) */
1346
+ INSN_ENTRY(reverse)
1347
+ {
1348
+ # define NAME_OF_CURRENT_INSN reverse
1349
+ # define INSN_ATTR(x) attr_ ## x ## _reverse(n)
1350
+ bool leaf;
1351
+ MAYBE_UNUSED(VALUE *) canary;
1352
+ MAYBE_UNUSED(rb_num_t) n;
1353
+
1354
+ START_OF_ORIGINAL_INSN(reverse);
1355
+ n = (rb_num_t)GET_OPERAND(1);
1356
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1357
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1358
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1359
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, n);
1360
+ #line 597 "insns.def"
1361
+ {
1362
+ rb_num_t i;
1363
+ VALUE *sp = STACK_ADDR_FROM_TOP(n);
1364
+
1365
+ for (i=0; i<n/2; i++) {
1366
+ VALUE v0 = sp[i];
1367
+ VALUE v1 = TOPN(i);
1368
+ sp[i] = v1;
1369
+ TOPN(i) = v0;
1370
+ }
1371
+ }
1372
+ #line 1373 "vm.inc"
1373
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1374
+ INC_SP(INSN_ATTR(sp_inc));
1375
+ if (leaf) ADD_PC(INSN_ATTR(width));
1376
+ END_INSN(reverse);
1377
+ # undef INSN_ATTR
1378
+ # undef NAME_OF_CURRENT_INSN
1379
+ }
1380
+
1381
+ /* insn reput()(..., val)(val) */
1382
+ INSN_ENTRY(reput)
1383
+ {
1384
+ # define NAME_OF_CURRENT_INSN reput
1385
+ # define INSN_ATTR(x) attr_ ## x ## _reput()
1386
+ bool leaf;
1387
+ MAYBE_UNUSED(VALUE *) canary;
1388
+ MAYBE_UNUSED(VALUE) val;
1389
+
1390
+ START_OF_ORIGINAL_INSN(reput);
1391
+ val = TOPN(0);
1392
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1393
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1394
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1395
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1396
+ INC_SP(INSN_ATTR(sp_inc));
1397
+ TOPN(0) = val;
1398
+ if (leaf) ADD_PC(INSN_ATTR(width));
1399
+ END_INSN(reput);
1400
+ # undef INSN_ATTR
1401
+ # undef NAME_OF_CURRENT_INSN
1402
+ }
1403
+
1404
+ /* insn topn(n)(...)(val) */
1405
+ INSN_ENTRY(topn)
1406
+ {
1407
+ # define NAME_OF_CURRENT_INSN topn
1408
+ # define INSN_ATTR(x) attr_ ## x ## _topn(n)
1409
+ bool leaf;
1410
+ MAYBE_UNUSED(VALUE *) canary;
1411
+ MAYBE_UNUSED(VALUE) val;
1412
+ MAYBE_UNUSED(rb_num_t) n;
1413
+
1414
+ START_OF_ORIGINAL_INSN(topn);
1415
+ n = (rb_num_t)GET_OPERAND(1);
1416
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1417
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1418
+ SETUP_CANARY();
1419
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1420
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, n);
1421
+ #line 627 "insns.def"
1422
+ {
1423
+ val = TOPN(n);
1424
+ }
1425
+ #line 1426 "vm.inc"
1426
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1427
+ CHECK_CANARY();
1428
+ INC_SP(INSN_ATTR(sp_inc));
1429
+ TOPN(0) = val;
1430
+ if (leaf) ADD_PC(INSN_ATTR(width));
1431
+ END_INSN(topn);
1432
+ # undef INSN_ATTR
1433
+ # undef NAME_OF_CURRENT_INSN
1434
+ }
1435
+
1436
+ /* insn setn(n)(..., val)(val) */
1437
+ INSN_ENTRY(setn)
1438
+ {
1439
+ # define NAME_OF_CURRENT_INSN setn
1440
+ # define INSN_ATTR(x) attr_ ## x ## _setn(n)
1441
+ bool leaf;
1442
+ MAYBE_UNUSED(VALUE *) canary;
1443
+ MAYBE_UNUSED(VALUE) val;
1444
+ MAYBE_UNUSED(rb_num_t) n;
1445
+
1446
+ START_OF_ORIGINAL_INSN(setn);
1447
+ n = (rb_num_t)GET_OPERAND(1);
1448
+ val = TOPN(0);
1449
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1450
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1451
+ SETUP_CANARY();
1452
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1453
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, n);
1454
+ #line 638 "insns.def"
1455
+ {
1456
+ TOPN(n) = val;
1457
+ }
1458
+ #line 1459 "vm.inc"
1459
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1460
+ CHECK_CANARY();
1461
+ INC_SP(INSN_ATTR(sp_inc));
1462
+ TOPN(0) = val;
1463
+ if (leaf) ADD_PC(INSN_ATTR(width));
1464
+ END_INSN(setn);
1465
+ # undef INSN_ATTR
1466
+ # undef NAME_OF_CURRENT_INSN
1467
+ }
1468
+
1469
+ /* insn adjuststack(n)(...)(...) */
1470
+ INSN_ENTRY(adjuststack)
1471
+ {
1472
+ # define NAME_OF_CURRENT_INSN adjuststack
1473
+ # define INSN_ATTR(x) attr_ ## x ## _adjuststack(n)
1474
+ bool leaf;
1475
+ MAYBE_UNUSED(VALUE *) canary;
1476
+ MAYBE_UNUSED(rb_num_t) n;
1477
+
1478
+ START_OF_ORIGINAL_INSN(adjuststack);
1479
+ n = (rb_num_t)GET_OPERAND(1);
1480
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1481
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1482
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1483
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, n);
1484
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1485
+ INC_SP(INSN_ATTR(sp_inc));
1486
+ if (leaf) ADD_PC(INSN_ATTR(width));
1487
+ END_INSN(adjuststack);
1488
+ # undef INSN_ATTR
1489
+ # undef NAME_OF_CURRENT_INSN
1490
+ }
1491
+
1492
+ /* insn defined(op_type, obj, needstr)(v)(val) */
1493
+ INSN_ENTRY(defined)
1494
+ {
1495
+ # define NAME_OF_CURRENT_INSN defined
1496
+ # define INSN_ATTR(x) attr_ ## x ## _defined(op_type, obj, needstr)
1497
+ bool leaf;
1498
+ MAYBE_UNUSED(VALUE *) canary;
1499
+ MAYBE_UNUSED(VALUE) needstr, obj, v, val;
1500
+ MAYBE_UNUSED(rb_num_t) op_type;
1501
+
1502
+ START_OF_ORIGINAL_INSN(defined);
1503
+ op_type = (rb_num_t)GET_OPERAND(1);
1504
+ obj = (VALUE)GET_OPERAND(2);
1505
+ needstr = (VALUE)GET_OPERAND(3);
1506
+ v = TOPN(0);
1507
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1508
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1509
+ SETUP_CANARY();
1510
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1511
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, op_type);
1512
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, obj);
1513
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 2, needstr);
1514
+ #line 664 "insns.def"
1515
+ {
1516
+ val = vm_defined(ec, GET_CFP(), op_type, obj, needstr, v);
1517
+ }
1518
+ #line 1519 "vm.inc"
1519
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1520
+ CHECK_CANARY();
1521
+ INC_SP(INSN_ATTR(sp_inc));
1522
+ TOPN(0) = val;
1523
+ if (leaf) ADD_PC(INSN_ATTR(width));
1524
+ END_INSN(defined);
1525
+ # undef INSN_ATTR
1526
+ # undef NAME_OF_CURRENT_INSN
1527
+ }
1528
+
1529
+ /* insn checkmatch(flag)(target, pattern)(result) */
1530
+ INSN_ENTRY(checkmatch)
1531
+ {
1532
+ # define NAME_OF_CURRENT_INSN checkmatch
1533
+ # define INSN_ATTR(x) attr_ ## x ## _checkmatch(flag)
1534
+ bool leaf;
1535
+ MAYBE_UNUSED(VALUE *) canary;
1536
+ MAYBE_UNUSED(VALUE) pattern, result, target;
1537
+ MAYBE_UNUSED(rb_num_t) flag;
1538
+
1539
+ START_OF_ORIGINAL_INSN(checkmatch);
1540
+ flag = (rb_num_t)GET_OPERAND(1);
1541
+ target = TOPN(1);
1542
+ pattern = TOPN(0);
1543
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1544
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1545
+ SETUP_CANARY();
1546
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1547
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, flag);
1548
+ #line 681 "insns.def"
1549
+ {
1550
+ result = vm_check_match(ec, target, pattern, flag);
1551
+ }
1552
+ #line 1553 "vm.inc"
1553
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1554
+ CHECK_CANARY();
1555
+ INC_SP(INSN_ATTR(sp_inc));
1556
+ TOPN(0) = result;
1557
+ if (leaf) ADD_PC(INSN_ATTR(width));
1558
+ END_INSN(checkmatch);
1559
+ # undef INSN_ATTR
1560
+ # undef NAME_OF_CURRENT_INSN
1561
+ }
1562
+
1563
+ /* insn checkkeyword(kw_bits_index, keyword_index)()(ret) */
1564
+ INSN_ENTRY(checkkeyword)
1565
+ {
1566
+ # define NAME_OF_CURRENT_INSN checkkeyword
1567
+ # define INSN_ATTR(x) attr_ ## x ## _checkkeyword(kw_bits_index, keyword_index)
1568
+ bool leaf;
1569
+ MAYBE_UNUSED(VALUE *) canary;
1570
+ MAYBE_UNUSED(VALUE) ret;
1571
+ MAYBE_UNUSED(lindex_t) keyword_index, kw_bits_index;
1572
+
1573
+ START_OF_ORIGINAL_INSN(checkkeyword);
1574
+ kw_bits_index = (lindex_t)GET_OPERAND(1);
1575
+ keyword_index = (lindex_t)GET_OPERAND(2);
1576
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1577
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1578
+ SETUP_CANARY();
1579
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1580
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, kw_bits_index);
1581
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, keyword_index);
1582
+ #line 691 "insns.def"
1583
+ {
1584
+ ret = vm_check_keyword(kw_bits_index, keyword_index, GET_EP());
1585
+ }
1586
+ #line 1587 "vm.inc"
1587
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1588
+ CHECK_CANARY();
1589
+ INC_SP(INSN_ATTR(sp_inc));
1590
+ TOPN(0) = ret;
1591
+ if (leaf) ADD_PC(INSN_ATTR(width));
1592
+ END_INSN(checkkeyword);
1593
+ # undef INSN_ATTR
1594
+ # undef NAME_OF_CURRENT_INSN
1595
+ }
1596
+
1597
+ /* insn checktype(type)(val)(ret) */
1598
+ INSN_ENTRY(checktype)
1599
+ {
1600
+ # define NAME_OF_CURRENT_INSN checktype
1601
+ # define INSN_ATTR(x) attr_ ## x ## _checktype(type)
1602
+ bool leaf;
1603
+ MAYBE_UNUSED(VALUE *) canary;
1604
+ MAYBE_UNUSED(VALUE) ret, val;
1605
+ MAYBE_UNUSED(rb_num_t) type;
1606
+
1607
+ START_OF_ORIGINAL_INSN(checktype);
1608
+ type = (rb_num_t)GET_OPERAND(1);
1609
+ val = TOPN(0);
1610
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1611
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1612
+ SETUP_CANARY();
1613
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1614
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, type);
1615
+ #line 701 "insns.def"
1616
+ {
1617
+ ret = (TYPE(val) == (int)type) ? Qtrue : Qfalse;
1618
+ }
1619
+ #line 1620 "vm.inc"
1620
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1621
+ CHECK_CANARY();
1622
+ INC_SP(INSN_ATTR(sp_inc));
1623
+ TOPN(0) = ret;
1624
+ if (leaf) ADD_PC(INSN_ATTR(width));
1625
+ END_INSN(checktype);
1626
+ # undef INSN_ATTR
1627
+ # undef NAME_OF_CURRENT_INSN
1628
+ }
1629
+
1630
+ /* insn defineclass(id, class_iseq, flags)(cbase, super)(val) */
1631
+ INSN_ENTRY(defineclass)
1632
+ {
1633
+ # define NAME_OF_CURRENT_INSN defineclass
1634
+ # define INSN_ATTR(x) attr_ ## x ## _defineclass(id, class_iseq, flags)
1635
+ bool leaf;
1636
+ MAYBE_UNUSED(VALUE *) canary;
1637
+ MAYBE_UNUSED(ID) id;
1638
+ MAYBE_UNUSED(ISEQ) class_iseq;
1639
+ MAYBE_UNUSED(VALUE) cbase, super, val;
1640
+ MAYBE_UNUSED(rb_num_t) flags;
1641
+
1642
+ START_OF_ORIGINAL_INSN(defineclass);
1643
+ id = (ID)GET_OPERAND(1);
1644
+ class_iseq = (ISEQ)GET_OPERAND(2);
1645
+ flags = (rb_num_t)GET_OPERAND(3);
1646
+ cbase = TOPN(1);
1647
+ super = TOPN(0);
1648
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1649
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1650
+ POPN(INSN_ATTR(popn));
1651
+ SETUP_CANARY();
1652
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1653
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, id);
1654
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, class_iseq);
1655
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 2, flags);
1656
+ #line 717 "insns.def"
1657
+ {
1658
+ VALUE klass = vm_find_or_create_class_by_id(id, flags, cbase, super);
1659
+
1660
+ rb_iseq_check(class_iseq);
1661
+
1662
+ /* enter scope */
1663
+ vm_push_frame(ec, class_iseq, VM_FRAME_MAGIC_CLASS | VM_ENV_FLAG_LOCAL, klass,
1664
+ GET_BLOCK_HANDLER(),
1665
+ (VALUE)vm_cref_push(ec, klass, NULL, FALSE),
1666
+ class_iseq->body->iseq_encoded, GET_SP(),
1667
+ class_iseq->body->local_table_size,
1668
+ class_iseq->body->stack_max);
1669
+ RESTORE_REGS();
1670
+ NEXT_INSN();
1671
+ }
1672
+ #line 1673 "vm.inc"
1673
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1674
+ CHECK_CANARY();
1675
+ PUSH(val);
1676
+ if (leaf) ADD_PC(INSN_ATTR(width));
1677
+ END_INSN(defineclass);
1678
+ # undef INSN_ATTR
1679
+ # undef NAME_OF_CURRENT_INSN
1680
+ }
1681
+
1682
+ /* insn send(ci, cc, blockiseq)(...)(val) */
1683
+ INSN_ENTRY(send)
1684
+ {
1685
+ # define NAME_OF_CURRENT_INSN send
1686
+ # define INSN_ATTR(x) attr_ ## x ## _send(ci, cc, blockiseq)
1687
+ bool leaf;
1688
+ MAYBE_UNUSED(VALUE *) canary;
1689
+ MAYBE_UNUSED(CALL_CACHE) cc;
1690
+ MAYBE_UNUSED(CALL_INFO) ci;
1691
+ MAYBE_UNUSED(ISEQ) blockiseq;
1692
+ MAYBE_UNUSED(VALUE) val;
1693
+
1694
+ START_OF_ORIGINAL_INSN(send);
1695
+ ci = (CALL_INFO)GET_OPERAND(1);
1696
+ cc = (CALL_CACHE)GET_OPERAND(2);
1697
+ blockiseq = (ISEQ)GET_OPERAND(3);
1698
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1699
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1700
+ POPN(INSN_ATTR(popn));
1701
+ SETUP_CANARY();
1702
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1703
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
1704
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
1705
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 2, blockiseq);
1706
+ #line 744 "insns.def"
1707
+ {
1708
+ struct rb_calling_info calling;
1709
+
1710
+ calling.block_handler = vm_caller_setup_arg_block(ec, reg_cfp, ci, blockiseq, FALSE);
1711
+ calling.recv = TOPN(calling.argc = ci->orig_argc);
1712
+ vm_search_method(ci, cc, calling.recv);
1713
+ CALL_METHOD(&calling, ci, cc);
1714
+ }
1715
+ #line 1716 "vm.inc"
1716
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1717
+ CHECK_CANARY();
1718
+ PUSH(val);
1719
+ if (leaf) ADD_PC(INSN_ATTR(width));
1720
+ END_INSN(send);
1721
+ # undef INSN_ATTR
1722
+ # undef NAME_OF_CURRENT_INSN
1723
+ }
1724
+
1725
+ /* insn opt_send_without_block(ci, cc)(...)(val) */
1726
+ INSN_ENTRY(opt_send_without_block)
1727
+ {
1728
+ # define NAME_OF_CURRENT_INSN opt_send_without_block
1729
+ # define INSN_ATTR(x) attr_ ## x ## _opt_send_without_block(ci, cc)
1730
+ bool leaf;
1731
+ MAYBE_UNUSED(VALUE *) canary;
1732
+ MAYBE_UNUSED(CALL_CACHE) cc;
1733
+ MAYBE_UNUSED(CALL_INFO) ci;
1734
+ MAYBE_UNUSED(VALUE) val;
1735
+
1736
+ START_OF_ORIGINAL_INSN(opt_send_without_block);
1737
+ ci = (CALL_INFO)GET_OPERAND(1);
1738
+ cc = (CALL_CACHE)GET_OPERAND(2);
1739
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1740
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1741
+ POPN(INSN_ATTR(popn));
1742
+ SETUP_CANARY();
1743
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1744
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
1745
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
1746
+ #line 761 "insns.def"
1747
+ {
1748
+ struct rb_calling_info calling;
1749
+ calling.block_handler = VM_BLOCK_HANDLER_NONE;
1750
+ vm_search_method(ci, cc, calling.recv = TOPN(calling.argc = ci->orig_argc));
1751
+ CALL_METHOD(&calling, ci, cc);
1752
+ }
1753
+ #line 1754 "vm.inc"
1754
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1755
+ CHECK_CANARY();
1756
+ PUSH(val);
1757
+ if (leaf) ADD_PC(INSN_ATTR(width));
1758
+ END_INSN(opt_send_without_block);
1759
+ # undef INSN_ATTR
1760
+ # undef NAME_OF_CURRENT_INSN
1761
+ }
1762
+
1763
+ /* insn opt_str_freeze(str, ci, cc)()(val) */
1764
+ INSN_ENTRY(opt_str_freeze)
1765
+ {
1766
+ # define NAME_OF_CURRENT_INSN opt_str_freeze
1767
+ # define INSN_ATTR(x) attr_ ## x ## _opt_str_freeze(str, ci, cc)
1768
+ bool leaf;
1769
+ MAYBE_UNUSED(VALUE *) canary;
1770
+ MAYBE_UNUSED(CALL_CACHE) cc;
1771
+ MAYBE_UNUSED(CALL_INFO) ci;
1772
+ MAYBE_UNUSED(VALUE) str, val;
1773
+
1774
+ START_OF_ORIGINAL_INSN(opt_str_freeze);
1775
+ str = (VALUE)GET_OPERAND(1);
1776
+ ci = (CALL_INFO)GET_OPERAND(2);
1777
+ cc = (CALL_CACHE)GET_OPERAND(3);
1778
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1779
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1780
+ SETUP_CANARY();
1781
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1782
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, str);
1783
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, ci);
1784
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 2, cc);
1785
+ #line 773 "insns.def"
1786
+ {
1787
+ val = vm_opt_str_freeze(str, BOP_FREEZE, idFreeze);
1788
+
1789
+ if (val == Qundef) {
1790
+ PUSH(rb_str_resurrect(str));
1791
+ CALL_SIMPLE_METHOD();
1792
+ }
1793
+ }
1794
+ #line 1795 "vm.inc"
1795
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1796
+ CHECK_CANARY();
1797
+ INC_SP(INSN_ATTR(sp_inc));
1798
+ TOPN(0) = val;
1799
+ if (leaf) ADD_PC(INSN_ATTR(width));
1800
+ END_INSN(opt_str_freeze);
1801
+ # undef INSN_ATTR
1802
+ # undef NAME_OF_CURRENT_INSN
1803
+ }
1804
+
1805
+ /* insn opt_str_uminus(str, ci, cc)()(val) */
1806
+ INSN_ENTRY(opt_str_uminus)
1807
+ {
1808
+ # define NAME_OF_CURRENT_INSN opt_str_uminus
1809
+ # define INSN_ATTR(x) attr_ ## x ## _opt_str_uminus(str, ci, cc)
1810
+ bool leaf;
1811
+ MAYBE_UNUSED(VALUE *) canary;
1812
+ MAYBE_UNUSED(CALL_CACHE) cc;
1813
+ MAYBE_UNUSED(CALL_INFO) ci;
1814
+ MAYBE_UNUSED(VALUE) str, val;
1815
+
1816
+ START_OF_ORIGINAL_INSN(opt_str_uminus);
1817
+ str = (VALUE)GET_OPERAND(1);
1818
+ ci = (CALL_INFO)GET_OPERAND(2);
1819
+ cc = (CALL_CACHE)GET_OPERAND(3);
1820
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1821
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1822
+ SETUP_CANARY();
1823
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1824
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, str);
1825
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, ci);
1826
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 2, cc);
1827
+ #line 787 "insns.def"
1828
+ {
1829
+ val = vm_opt_str_freeze(str, BOP_UMINUS, idUMinus);
1830
+
1831
+ if (val == Qundef) {
1832
+ PUSH(rb_str_resurrect(str));
1833
+ CALL_SIMPLE_METHOD();
1834
+ }
1835
+ }
1836
+ #line 1837 "vm.inc"
1837
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1838
+ CHECK_CANARY();
1839
+ INC_SP(INSN_ATTR(sp_inc));
1840
+ TOPN(0) = val;
1841
+ if (leaf) ADD_PC(INSN_ATTR(width));
1842
+ END_INSN(opt_str_uminus);
1843
+ # undef INSN_ATTR
1844
+ # undef NAME_OF_CURRENT_INSN
1845
+ }
1846
+
1847
+ /* insn opt_newarray_max(num)(...)(val) */
1848
+ INSN_ENTRY(opt_newarray_max)
1849
+ {
1850
+ # define NAME_OF_CURRENT_INSN opt_newarray_max
1851
+ # define INSN_ATTR(x) attr_ ## x ## _opt_newarray_max(num)
1852
+ bool leaf;
1853
+ MAYBE_UNUSED(VALUE *) canary;
1854
+ MAYBE_UNUSED(VALUE) val;
1855
+ MAYBE_UNUSED(rb_num_t) num;
1856
+
1857
+ START_OF_ORIGINAL_INSN(opt_newarray_max);
1858
+ num = (rb_num_t)GET_OPERAND(1);
1859
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1860
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1861
+ SETUP_CANARY();
1862
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1863
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, num);
1864
+ #line 807 "insns.def"
1865
+ {
1866
+ val = vm_opt_newarray_max(num, STACK_ADDR_FROM_TOP(num));
1867
+ }
1868
+ #line 1869 "vm.inc"
1869
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1870
+ CHECK_CANARY();
1871
+ INC_SP(INSN_ATTR(sp_inc));
1872
+ TOPN(0) = val;
1873
+ if (leaf) ADD_PC(INSN_ATTR(width));
1874
+ END_INSN(opt_newarray_max);
1875
+ # undef INSN_ATTR
1876
+ # undef NAME_OF_CURRENT_INSN
1877
+ }
1878
+
1879
+ /* insn opt_newarray_min(num)(...)(val) */
1880
+ INSN_ENTRY(opt_newarray_min)
1881
+ {
1882
+ # define NAME_OF_CURRENT_INSN opt_newarray_min
1883
+ # define INSN_ATTR(x) attr_ ## x ## _opt_newarray_min(num)
1884
+ bool leaf;
1885
+ MAYBE_UNUSED(VALUE *) canary;
1886
+ MAYBE_UNUSED(VALUE) val;
1887
+ MAYBE_UNUSED(rb_num_t) num;
1888
+
1889
+ START_OF_ORIGINAL_INSN(opt_newarray_min);
1890
+ num = (rb_num_t)GET_OPERAND(1);
1891
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1892
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1893
+ SETUP_CANARY();
1894
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1895
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, num);
1896
+ #line 819 "insns.def"
1897
+ {
1898
+ val = vm_opt_newarray_min(num, STACK_ADDR_FROM_TOP(num));
1899
+ }
1900
+ #line 1901 "vm.inc"
1901
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1902
+ CHECK_CANARY();
1903
+ INC_SP(INSN_ATTR(sp_inc));
1904
+ TOPN(0) = val;
1905
+ if (leaf) ADD_PC(INSN_ATTR(width));
1906
+ END_INSN(opt_newarray_min);
1907
+ # undef INSN_ATTR
1908
+ # undef NAME_OF_CURRENT_INSN
1909
+ }
1910
+
1911
+ /* insn invokesuper(ci, cc, blockiseq)(...)(val) */
1912
+ INSN_ENTRY(invokesuper)
1913
+ {
1914
+ # define NAME_OF_CURRENT_INSN invokesuper
1915
+ # define INSN_ATTR(x) attr_ ## x ## _invokesuper(ci, cc, blockiseq)
1916
+ bool leaf;
1917
+ MAYBE_UNUSED(VALUE *) canary;
1918
+ MAYBE_UNUSED(CALL_CACHE) cc;
1919
+ MAYBE_UNUSED(CALL_INFO) ci;
1920
+ MAYBE_UNUSED(ISEQ) blockiseq;
1921
+ MAYBE_UNUSED(VALUE) val;
1922
+
1923
+ START_OF_ORIGINAL_INSN(invokesuper);
1924
+ ci = (CALL_INFO)GET_OPERAND(1);
1925
+ cc = (CALL_CACHE)GET_OPERAND(2);
1926
+ blockiseq = (ISEQ)GET_OPERAND(3);
1927
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1928
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1929
+ POPN(INSN_ATTR(popn));
1930
+ SETUP_CANARY();
1931
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1932
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
1933
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
1934
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 2, blockiseq);
1935
+ #line 830 "insns.def"
1936
+ {
1937
+ struct rb_calling_info calling;
1938
+
1939
+ calling.block_handler = vm_caller_setup_arg_block(ec, reg_cfp, ci, blockiseq, TRUE);
1940
+ calling.recv = TOPN(calling.argc = ci->orig_argc);
1941
+ vm_search_super_method(ec, GET_CFP(), &calling, ci, cc);
1942
+ CALL_METHOD(&calling, ci, cc);
1943
+ }
1944
+ #line 1945 "vm.inc"
1945
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1946
+ CHECK_CANARY();
1947
+ PUSH(val);
1948
+ if (leaf) ADD_PC(INSN_ATTR(width));
1949
+ END_INSN(invokesuper);
1950
+ # undef INSN_ATTR
1951
+ # undef NAME_OF_CURRENT_INSN
1952
+ }
1953
+
1954
+ /* insn invokeblock(ci)(...)(val) */
1955
+ INSN_ENTRY(invokeblock)
1956
+ {
1957
+ # define NAME_OF_CURRENT_INSN invokeblock
1958
+ # define INSN_ATTR(x) attr_ ## x ## _invokeblock(ci)
1959
+ bool leaf;
1960
+ MAYBE_UNUSED(VALUE *) canary;
1961
+ MAYBE_UNUSED(CALL_INFO) ci;
1962
+ MAYBE_UNUSED(VALUE) val;
1963
+
1964
+ START_OF_ORIGINAL_INSN(invokeblock);
1965
+ ci = (CALL_INFO)GET_OPERAND(1);
1966
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
1967
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
1968
+ POPN(INSN_ATTR(popn));
1969
+ SETUP_CANARY();
1970
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
1971
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
1972
+ #line 847 "insns.def"
1973
+ {
1974
+ struct rb_calling_info calling;
1975
+ VALUE block_handler;
1976
+
1977
+ calling.argc = ci->orig_argc;
1978
+ calling.block_handler = VM_BLOCK_HANDLER_NONE;
1979
+ calling.recv = Qundef; /* should not be used */
1980
+
1981
+ block_handler = VM_CF_BLOCK_HANDLER(GET_CFP());
1982
+ if (block_handler == VM_BLOCK_HANDLER_NONE) {
1983
+ rb_vm_localjump_error("no block given (yield)", Qnil, 0);
1984
+ }
1985
+
1986
+ val = vm_invoke_block(ec, GET_CFP(), &calling, ci, block_handler);
1987
+ if (val == Qundef) {
1988
+ EXEC_EC_CFP(val);
1989
+ }
1990
+ }
1991
+ #line 1992 "vm.inc"
1992
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
1993
+ CHECK_CANARY();
1994
+ PUSH(val);
1995
+ if (leaf) ADD_PC(INSN_ATTR(width));
1996
+ END_INSN(invokeblock);
1997
+ # undef INSN_ATTR
1998
+ # undef NAME_OF_CURRENT_INSN
1999
+ }
2000
+
2001
+ /* insn leave()(val)(val) */
2002
+ INSN_ENTRY(leave)
2003
+ {
2004
+ # define NAME_OF_CURRENT_INSN leave
2005
+ # define INSN_ATTR(x) attr_ ## x ## _leave()
2006
+ bool leaf;
2007
+ MAYBE_UNUSED(VALUE *) canary;
2008
+ MAYBE_UNUSED(VALUE) val;
2009
+
2010
+ START_OF_ORIGINAL_INSN(leave);
2011
+ val = TOPN(0);
2012
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2013
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2014
+ POPN(INSN_ATTR(popn));
2015
+ SETUP_CANARY();
2016
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2017
+ #line 877 "insns.def"
2018
+ {
2019
+ if (OPT_CHECKED_RUN) {
2020
+ const VALUE *const bp = vm_base_ptr(reg_cfp);
2021
+ if (reg_cfp->sp != bp) {
2022
+ vm_stack_consistency_error(ec, reg_cfp, bp);
2023
+ }
2024
+ }
2025
+
2026
+ RUBY_VM_CHECK_INTS(ec);
2027
+
2028
+ if (vm_pop_frame(ec, GET_CFP(), GET_EP())) {
2029
+ #if OPT_CALL_THREADED_CODE
2030
+ rb_ec_thread_ptr(ec)->retval = val;
2031
+ return 0;
2032
+ #else
2033
+ return val;
2034
+ #endif
2035
+ }
2036
+ else {
2037
+ RESTORE_REGS();
2038
+ }
2039
+ }
2040
+ #line 2041 "vm.inc"
2041
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2042
+ CHECK_CANARY();
2043
+ PUSH(val);
2044
+ if (leaf) ADD_PC(INSN_ATTR(width));
2045
+ END_INSN(leave);
2046
+ # undef INSN_ATTR
2047
+ # undef NAME_OF_CURRENT_INSN
2048
+ }
2049
+
2050
+ /* insn throw(throw_state)(throwobj)(val) */
2051
+ INSN_ENTRY(throw)
2052
+ {
2053
+ # define NAME_OF_CURRENT_INSN throw
2054
+ # define INSN_ATTR(x) attr_ ## x ## _throw(throw_state)
2055
+ bool leaf;
2056
+ MAYBE_UNUSED(VALUE *) canary;
2057
+ MAYBE_UNUSED(VALUE) throwobj, val;
2058
+ MAYBE_UNUSED(rb_num_t) throw_state;
2059
+
2060
+ START_OF_ORIGINAL_INSN(throw);
2061
+ throw_state = (rb_num_t)GET_OPERAND(1);
2062
+ throwobj = TOPN(0);
2063
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2064
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2065
+ SETUP_CANARY();
2066
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2067
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, throw_state);
2068
+ #line 912 "insns.def"
2069
+ {
2070
+ RUBY_VM_CHECK_INTS(ec);
2071
+ val = vm_throw(ec, GET_CFP(), throw_state, throwobj);
2072
+ THROW_EXCEPTION(val);
2073
+ /* unreachable */
2074
+ }
2075
+ #line 2076 "vm.inc"
2076
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2077
+ CHECK_CANARY();
2078
+ INC_SP(INSN_ATTR(sp_inc));
2079
+ TOPN(0) = val;
2080
+ if (leaf) ADD_PC(INSN_ATTR(width));
2081
+ END_INSN(throw);
2082
+ # undef INSN_ATTR
2083
+ # undef NAME_OF_CURRENT_INSN
2084
+ }
2085
+
2086
+ /* insn jump(dst)()() */
2087
+ INSN_ENTRY(jump)
2088
+ {
2089
+ # define NAME_OF_CURRENT_INSN jump
2090
+ # define INSN_ATTR(x) attr_ ## x ## _jump(dst)
2091
+ bool leaf;
2092
+ MAYBE_UNUSED(VALUE *) canary;
2093
+ MAYBE_UNUSED(OFFSET) dst;
2094
+
2095
+ START_OF_ORIGINAL_INSN(jump);
2096
+ dst = (OFFSET)GET_OPERAND(1);
2097
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2098
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2099
+ SETUP_CANARY();
2100
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2101
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, dst);
2102
+ #line 931 "insns.def"
2103
+ {
2104
+ RUBY_VM_CHECK_INTS(ec);
2105
+ JUMP(dst);
2106
+ }
2107
+ #line 2108 "vm.inc"
2108
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2109
+ CHECK_CANARY();
2110
+ INC_SP(INSN_ATTR(sp_inc));
2111
+ if (leaf) ADD_PC(INSN_ATTR(width));
2112
+ END_INSN(jump);
2113
+ # undef INSN_ATTR
2114
+ # undef NAME_OF_CURRENT_INSN
2115
+ }
2116
+
2117
+ /* insn branchif(dst)(val)() */
2118
+ INSN_ENTRY(branchif)
2119
+ {
2120
+ # define NAME_OF_CURRENT_INSN branchif
2121
+ # define INSN_ATTR(x) attr_ ## x ## _branchif(dst)
2122
+ bool leaf;
2123
+ MAYBE_UNUSED(VALUE *) canary;
2124
+ MAYBE_UNUSED(OFFSET) dst;
2125
+ MAYBE_UNUSED(VALUE) val;
2126
+
2127
+ START_OF_ORIGINAL_INSN(branchif);
2128
+ dst = (OFFSET)GET_OPERAND(1);
2129
+ val = TOPN(0);
2130
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2131
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2132
+ SETUP_CANARY();
2133
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2134
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, dst);
2135
+ #line 944 "insns.def"
2136
+ {
2137
+ if (RTEST(val)) {
2138
+ RUBY_VM_CHECK_INTS(ec);
2139
+ JUMP(dst);
2140
+ }
2141
+ }
2142
+ #line 2143 "vm.inc"
2143
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2144
+ CHECK_CANARY();
2145
+ INC_SP(INSN_ATTR(sp_inc));
2146
+ if (leaf) ADD_PC(INSN_ATTR(width));
2147
+ END_INSN(branchif);
2148
+ # undef INSN_ATTR
2149
+ # undef NAME_OF_CURRENT_INSN
2150
+ }
2151
+
2152
+ /* insn branchunless(dst)(val)() */
2153
+ INSN_ENTRY(branchunless)
2154
+ {
2155
+ # define NAME_OF_CURRENT_INSN branchunless
2156
+ # define INSN_ATTR(x) attr_ ## x ## _branchunless(dst)
2157
+ bool leaf;
2158
+ MAYBE_UNUSED(VALUE *) canary;
2159
+ MAYBE_UNUSED(OFFSET) dst;
2160
+ MAYBE_UNUSED(VALUE) val;
2161
+
2162
+ START_OF_ORIGINAL_INSN(branchunless);
2163
+ dst = (OFFSET)GET_OPERAND(1);
2164
+ val = TOPN(0);
2165
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2166
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2167
+ SETUP_CANARY();
2168
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2169
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, dst);
2170
+ #line 959 "insns.def"
2171
+ {
2172
+ if (!RTEST(val)) {
2173
+ RUBY_VM_CHECK_INTS(ec);
2174
+ JUMP(dst);
2175
+ }
2176
+ }
2177
+ #line 2178 "vm.inc"
2178
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2179
+ CHECK_CANARY();
2180
+ INC_SP(INSN_ATTR(sp_inc));
2181
+ if (leaf) ADD_PC(INSN_ATTR(width));
2182
+ END_INSN(branchunless);
2183
+ # undef INSN_ATTR
2184
+ # undef NAME_OF_CURRENT_INSN
2185
+ }
2186
+
2187
+ /* insn branchnil(dst)(val)() */
2188
+ INSN_ENTRY(branchnil)
2189
+ {
2190
+ # define NAME_OF_CURRENT_INSN branchnil
2191
+ # define INSN_ATTR(x) attr_ ## x ## _branchnil(dst)
2192
+ bool leaf;
2193
+ MAYBE_UNUSED(VALUE *) canary;
2194
+ MAYBE_UNUSED(OFFSET) dst;
2195
+ MAYBE_UNUSED(VALUE) val;
2196
+
2197
+ START_OF_ORIGINAL_INSN(branchnil);
2198
+ dst = (OFFSET)GET_OPERAND(1);
2199
+ val = TOPN(0);
2200
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2201
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2202
+ SETUP_CANARY();
2203
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2204
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, dst);
2205
+ #line 974 "insns.def"
2206
+ {
2207
+ if (NIL_P(val)) {
2208
+ RUBY_VM_CHECK_INTS(ec);
2209
+ JUMP(dst);
2210
+ }
2211
+ }
2212
+ #line 2213 "vm.inc"
2213
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2214
+ CHECK_CANARY();
2215
+ INC_SP(INSN_ATTR(sp_inc));
2216
+ if (leaf) ADD_PC(INSN_ATTR(width));
2217
+ END_INSN(branchnil);
2218
+ # undef INSN_ATTR
2219
+ # undef NAME_OF_CURRENT_INSN
2220
+ }
2221
+
2222
+ /* insn opt_getinlinecache(dst, ic)()(val) */
2223
+ INSN_ENTRY(opt_getinlinecache)
2224
+ {
2225
+ # define NAME_OF_CURRENT_INSN opt_getinlinecache
2226
+ # define INSN_ATTR(x) attr_ ## x ## _opt_getinlinecache(dst, ic)
2227
+ bool leaf;
2228
+ MAYBE_UNUSED(VALUE *) canary;
2229
+ MAYBE_UNUSED(IC) ic;
2230
+ MAYBE_UNUSED(OFFSET) dst;
2231
+ MAYBE_UNUSED(VALUE) val;
2232
+
2233
+ START_OF_ORIGINAL_INSN(opt_getinlinecache);
2234
+ dst = (OFFSET)GET_OPERAND(1);
2235
+ ic = (IC)GET_OPERAND(2);
2236
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2237
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2238
+ SETUP_CANARY();
2239
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2240
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, dst);
2241
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, ic);
2242
+ #line 991 "insns.def"
2243
+ {
2244
+ if (vm_ic_hit_p(ic, GET_EP())) {
2245
+ val = ic->ic_value.value;
2246
+ JUMP(dst);
2247
+ }
2248
+ else {
2249
+ val = Qnil;
2250
+ }
2251
+ }
2252
+ #line 2253 "vm.inc"
2253
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2254
+ CHECK_CANARY();
2255
+ INC_SP(INSN_ATTR(sp_inc));
2256
+ TOPN(0) = val;
2257
+ if (leaf) ADD_PC(INSN_ATTR(width));
2258
+ END_INSN(opt_getinlinecache);
2259
+ # undef INSN_ATTR
2260
+ # undef NAME_OF_CURRENT_INSN
2261
+ }
2262
+
2263
+ /* insn opt_setinlinecache(ic)(val)(val) */
2264
+ INSN_ENTRY(opt_setinlinecache)
2265
+ {
2266
+ # define NAME_OF_CURRENT_INSN opt_setinlinecache
2267
+ # define INSN_ATTR(x) attr_ ## x ## _opt_setinlinecache(ic)
2268
+ bool leaf;
2269
+ MAYBE_UNUSED(VALUE *) canary;
2270
+ MAYBE_UNUSED(IC) ic;
2271
+ MAYBE_UNUSED(VALUE) val;
2272
+
2273
+ START_OF_ORIGINAL_INSN(opt_setinlinecache);
2274
+ ic = (IC)GET_OPERAND(1);
2275
+ val = TOPN(0);
2276
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2277
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2278
+ SETUP_CANARY();
2279
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2280
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ic);
2281
+ #line 1007 "insns.def"
2282
+ {
2283
+ vm_ic_update(ic, val, GET_EP());
2284
+ }
2285
+ #line 2286 "vm.inc"
2286
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2287
+ CHECK_CANARY();
2288
+ INC_SP(INSN_ATTR(sp_inc));
2289
+ TOPN(0) = val;
2290
+ if (leaf) ADD_PC(INSN_ATTR(width));
2291
+ END_INSN(opt_setinlinecache);
2292
+ # undef INSN_ATTR
2293
+ # undef NAME_OF_CURRENT_INSN
2294
+ }
2295
+
2296
+ /* insn once(iseq, ise)()(val) */
2297
+ INSN_ENTRY(once)
2298
+ {
2299
+ # define NAME_OF_CURRENT_INSN once
2300
+ # define INSN_ATTR(x) attr_ ## x ## _once(iseq, ise)
2301
+ bool leaf;
2302
+ MAYBE_UNUSED(VALUE *) canary;
2303
+ MAYBE_UNUSED(ISE) ise;
2304
+ MAYBE_UNUSED(ISEQ) iseq;
2305
+ MAYBE_UNUSED(VALUE) val;
2306
+
2307
+ START_OF_ORIGINAL_INSN(once);
2308
+ iseq = (ISEQ)GET_OPERAND(1);
2309
+ ise = (ISE)GET_OPERAND(2);
2310
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2311
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2312
+ POPN(INSN_ATTR(popn));
2313
+ SETUP_CANARY();
2314
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2315
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, iseq);
2316
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, ise);
2317
+ #line 1017 "insns.def"
2318
+ {
2319
+ val = vm_once_dispatch(ec, iseq, ise);
2320
+ }
2321
+ #line 2322 "vm.inc"
2322
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2323
+ CHECK_CANARY();
2324
+ PUSH(val);
2325
+ if (leaf) ADD_PC(INSN_ATTR(width));
2326
+ END_INSN(once);
2327
+ # undef INSN_ATTR
2328
+ # undef NAME_OF_CURRENT_INSN
2329
+ }
2330
+
2331
+ /* insn opt_case_dispatch(hash, else_offset)(..., key)() */
2332
+ INSN_ENTRY(opt_case_dispatch)
2333
+ {
2334
+ # define NAME_OF_CURRENT_INSN opt_case_dispatch
2335
+ # define INSN_ATTR(x) attr_ ## x ## _opt_case_dispatch(hash, else_offset)
2336
+ bool leaf;
2337
+ MAYBE_UNUSED(VALUE *) canary;
2338
+ MAYBE_UNUSED(CDHASH) hash;
2339
+ MAYBE_UNUSED(OFFSET) else_offset;
2340
+ MAYBE_UNUSED(VALUE) key;
2341
+
2342
+ START_OF_ORIGINAL_INSN(opt_case_dispatch);
2343
+ hash = (CDHASH)GET_OPERAND(1);
2344
+ else_offset = (OFFSET)GET_OPERAND(2);
2345
+ key = TOPN(0);
2346
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2347
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2348
+ SETUP_CANARY();
2349
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2350
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, hash);
2351
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, else_offset);
2352
+ #line 1028 "insns.def"
2353
+ {
2354
+ OFFSET dst = vm_case_dispatch(hash, else_offset, key);
2355
+
2356
+ if (dst) {
2357
+ JUMP(dst);
2358
+ }
2359
+ }
2360
+ #line 2361 "vm.inc"
2361
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2362
+ CHECK_CANARY();
2363
+ INC_SP(INSN_ATTR(sp_inc));
2364
+ if (leaf) ADD_PC(INSN_ATTR(width));
2365
+ END_INSN(opt_case_dispatch);
2366
+ # undef INSN_ATTR
2367
+ # undef NAME_OF_CURRENT_INSN
2368
+ }
2369
+
2370
+ /* insn opt_plus(ci, cc)(recv, obj)(val) */
2371
+ INSN_ENTRY(opt_plus)
2372
+ {
2373
+ # define NAME_OF_CURRENT_INSN opt_plus
2374
+ # define INSN_ATTR(x) attr_ ## x ## _opt_plus(ci, cc)
2375
+ bool leaf;
2376
+ MAYBE_UNUSED(VALUE *) canary;
2377
+ MAYBE_UNUSED(CALL_CACHE) cc;
2378
+ MAYBE_UNUSED(CALL_INFO) ci;
2379
+ MAYBE_UNUSED(VALUE) obj, recv, val;
2380
+
2381
+ START_OF_ORIGINAL_INSN(opt_plus);
2382
+ ci = (CALL_INFO)GET_OPERAND(1);
2383
+ cc = (CALL_CACHE)GET_OPERAND(2);
2384
+ recv = TOPN(1);
2385
+ obj = TOPN(0);
2386
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2387
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2388
+ SETUP_CANARY();
2389
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2390
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
2391
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
2392
+ #line 1047 "insns.def"
2393
+ {
2394
+ val = vm_opt_plus(recv, obj);
2395
+
2396
+ if (val == Qundef) {
2397
+ CALL_SIMPLE_METHOD();
2398
+ }
2399
+ }
2400
+ #line 2401 "vm.inc"
2401
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2402
+ CHECK_CANARY();
2403
+ INC_SP(INSN_ATTR(sp_inc));
2404
+ TOPN(0) = val;
2405
+ if (leaf) ADD_PC(INSN_ATTR(width));
2406
+ END_INSN(opt_plus);
2407
+ # undef INSN_ATTR
2408
+ # undef NAME_OF_CURRENT_INSN
2409
+ }
2410
+
2411
+ /* insn opt_minus(ci, cc)(recv, obj)(val) */
2412
+ INSN_ENTRY(opt_minus)
2413
+ {
2414
+ # define NAME_OF_CURRENT_INSN opt_minus
2415
+ # define INSN_ATTR(x) attr_ ## x ## _opt_minus(ci, cc)
2416
+ bool leaf;
2417
+ MAYBE_UNUSED(VALUE *) canary;
2418
+ MAYBE_UNUSED(CALL_CACHE) cc;
2419
+ MAYBE_UNUSED(CALL_INFO) ci;
2420
+ MAYBE_UNUSED(VALUE) obj, recv, val;
2421
+
2422
+ START_OF_ORIGINAL_INSN(opt_minus);
2423
+ ci = (CALL_INFO)GET_OPERAND(1);
2424
+ cc = (CALL_CACHE)GET_OPERAND(2);
2425
+ recv = TOPN(1);
2426
+ obj = TOPN(0);
2427
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2428
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2429
+ SETUP_CANARY();
2430
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2431
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
2432
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
2433
+ #line 1061 "insns.def"
2434
+ {
2435
+ val = vm_opt_minus(recv, obj);
2436
+
2437
+ if (val == Qundef) {
2438
+ CALL_SIMPLE_METHOD();
2439
+ }
2440
+ }
2441
+ #line 2442 "vm.inc"
2442
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2443
+ CHECK_CANARY();
2444
+ INC_SP(INSN_ATTR(sp_inc));
2445
+ TOPN(0) = val;
2446
+ if (leaf) ADD_PC(INSN_ATTR(width));
2447
+ END_INSN(opt_minus);
2448
+ # undef INSN_ATTR
2449
+ # undef NAME_OF_CURRENT_INSN
2450
+ }
2451
+
2452
+ /* insn opt_mult(ci, cc)(recv, obj)(val) */
2453
+ INSN_ENTRY(opt_mult)
2454
+ {
2455
+ # define NAME_OF_CURRENT_INSN opt_mult
2456
+ # define INSN_ATTR(x) attr_ ## x ## _opt_mult(ci, cc)
2457
+ bool leaf;
2458
+ MAYBE_UNUSED(VALUE *) canary;
2459
+ MAYBE_UNUSED(CALL_CACHE) cc;
2460
+ MAYBE_UNUSED(CALL_INFO) ci;
2461
+ MAYBE_UNUSED(VALUE) obj, recv, val;
2462
+
2463
+ START_OF_ORIGINAL_INSN(opt_mult);
2464
+ ci = (CALL_INFO)GET_OPERAND(1);
2465
+ cc = (CALL_CACHE)GET_OPERAND(2);
2466
+ recv = TOPN(1);
2467
+ obj = TOPN(0);
2468
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2469
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2470
+ SETUP_CANARY();
2471
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2472
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
2473
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
2474
+ #line 1075 "insns.def"
2475
+ {
2476
+ val = vm_opt_mult(recv, obj);
2477
+
2478
+ if (val == Qundef) {
2479
+ CALL_SIMPLE_METHOD();
2480
+ }
2481
+ }
2482
+ #line 2483 "vm.inc"
2483
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2484
+ CHECK_CANARY();
2485
+ INC_SP(INSN_ATTR(sp_inc));
2486
+ TOPN(0) = val;
2487
+ if (leaf) ADD_PC(INSN_ATTR(width));
2488
+ END_INSN(opt_mult);
2489
+ # undef INSN_ATTR
2490
+ # undef NAME_OF_CURRENT_INSN
2491
+ }
2492
+
2493
+ /* insn opt_div(ci, cc)(recv, obj)(val) */
2494
+ INSN_ENTRY(opt_div)
2495
+ {
2496
+ # define NAME_OF_CURRENT_INSN opt_div
2497
+ # define INSN_ATTR(x) attr_ ## x ## _opt_div(ci, cc)
2498
+ bool leaf;
2499
+ MAYBE_UNUSED(VALUE *) canary;
2500
+ MAYBE_UNUSED(CALL_CACHE) cc;
2501
+ MAYBE_UNUSED(CALL_INFO) ci;
2502
+ MAYBE_UNUSED(VALUE) obj, recv, val;
2503
+
2504
+ START_OF_ORIGINAL_INSN(opt_div);
2505
+ ci = (CALL_INFO)GET_OPERAND(1);
2506
+ cc = (CALL_CACHE)GET_OPERAND(2);
2507
+ recv = TOPN(1);
2508
+ obj = TOPN(0);
2509
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2510
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2511
+ SETUP_CANARY();
2512
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2513
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
2514
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
2515
+ #line 1089 "insns.def"
2516
+ {
2517
+ val = vm_opt_div(recv, obj);
2518
+
2519
+ if (val == Qundef) {
2520
+ CALL_SIMPLE_METHOD();
2521
+ }
2522
+ }
2523
+ #line 2524 "vm.inc"
2524
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2525
+ CHECK_CANARY();
2526
+ INC_SP(INSN_ATTR(sp_inc));
2527
+ TOPN(0) = val;
2528
+ if (leaf) ADD_PC(INSN_ATTR(width));
2529
+ END_INSN(opt_div);
2530
+ # undef INSN_ATTR
2531
+ # undef NAME_OF_CURRENT_INSN
2532
+ }
2533
+
2534
+ /* insn opt_mod(ci, cc)(recv, obj)(val) */
2535
+ INSN_ENTRY(opt_mod)
2536
+ {
2537
+ # define NAME_OF_CURRENT_INSN opt_mod
2538
+ # define INSN_ATTR(x) attr_ ## x ## _opt_mod(ci, cc)
2539
+ bool leaf;
2540
+ MAYBE_UNUSED(VALUE *) canary;
2541
+ MAYBE_UNUSED(CALL_CACHE) cc;
2542
+ MAYBE_UNUSED(CALL_INFO) ci;
2543
+ MAYBE_UNUSED(VALUE) obj, recv, val;
2544
+
2545
+ START_OF_ORIGINAL_INSN(opt_mod);
2546
+ ci = (CALL_INFO)GET_OPERAND(1);
2547
+ cc = (CALL_CACHE)GET_OPERAND(2);
2548
+ recv = TOPN(1);
2549
+ obj = TOPN(0);
2550
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2551
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2552
+ SETUP_CANARY();
2553
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2554
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
2555
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
2556
+ #line 1103 "insns.def"
2557
+ {
2558
+ val = vm_opt_mod(recv, obj);
2559
+
2560
+ if (val == Qundef) {
2561
+ CALL_SIMPLE_METHOD();
2562
+ }
2563
+ }
2564
+ #line 2565 "vm.inc"
2565
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2566
+ CHECK_CANARY();
2567
+ INC_SP(INSN_ATTR(sp_inc));
2568
+ TOPN(0) = val;
2569
+ if (leaf) ADD_PC(INSN_ATTR(width));
2570
+ END_INSN(opt_mod);
2571
+ # undef INSN_ATTR
2572
+ # undef NAME_OF_CURRENT_INSN
2573
+ }
2574
+
2575
+ /* insn opt_eq(ci, cc)(recv, obj)(val) */
2576
+ INSN_ENTRY(opt_eq)
2577
+ {
2578
+ # define NAME_OF_CURRENT_INSN opt_eq
2579
+ # define INSN_ATTR(x) attr_ ## x ## _opt_eq(ci, cc)
2580
+ bool leaf;
2581
+ MAYBE_UNUSED(VALUE *) canary;
2582
+ MAYBE_UNUSED(CALL_CACHE) cc;
2583
+ MAYBE_UNUSED(CALL_INFO) ci;
2584
+ MAYBE_UNUSED(VALUE) obj, recv, val;
2585
+
2586
+ START_OF_ORIGINAL_INSN(opt_eq);
2587
+ ci = (CALL_INFO)GET_OPERAND(1);
2588
+ cc = (CALL_CACHE)GET_OPERAND(2);
2589
+ recv = TOPN(1);
2590
+ obj = TOPN(0);
2591
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2592
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2593
+ SETUP_CANARY();
2594
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2595
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
2596
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
2597
+ #line 1121 "insns.def"
2598
+ {
2599
+ val = opt_eq_func(recv, obj, ci, cc);
2600
+
2601
+ if (val == Qundef) {
2602
+ CALL_SIMPLE_METHOD();
2603
+ }
2604
+ }
2605
+ #line 2606 "vm.inc"
2606
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2607
+ CHECK_CANARY();
2608
+ INC_SP(INSN_ATTR(sp_inc));
2609
+ TOPN(0) = val;
2610
+ if (leaf) ADD_PC(INSN_ATTR(width));
2611
+ END_INSN(opt_eq);
2612
+ # undef INSN_ATTR
2613
+ # undef NAME_OF_CURRENT_INSN
2614
+ }
2615
+
2616
+ /* insn opt_neq(ci_eq, cc_eq, ci, cc)(recv, obj)(val) */
2617
+ INSN_ENTRY(opt_neq)
2618
+ {
2619
+ # define NAME_OF_CURRENT_INSN opt_neq
2620
+ # define INSN_ATTR(x) attr_ ## x ## _opt_neq(ci_eq, cc_eq, ci, cc)
2621
+ bool leaf;
2622
+ MAYBE_UNUSED(VALUE *) canary;
2623
+ MAYBE_UNUSED(CALL_CACHE) cc, cc_eq;
2624
+ MAYBE_UNUSED(CALL_INFO) ci, ci_eq;
2625
+ MAYBE_UNUSED(VALUE) obj, recv, val;
2626
+
2627
+ START_OF_ORIGINAL_INSN(opt_neq);
2628
+ ci_eq = (CALL_INFO)GET_OPERAND(1);
2629
+ cc_eq = (CALL_CACHE)GET_OPERAND(2);
2630
+ ci = (CALL_INFO)GET_OPERAND(3);
2631
+ cc = (CALL_CACHE)GET_OPERAND(4);
2632
+ recv = TOPN(1);
2633
+ obj = TOPN(0);
2634
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2635
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2636
+ SETUP_CANARY();
2637
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2638
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci_eq);
2639
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc_eq);
2640
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 2, ci);
2641
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 3, cc);
2642
+ #line 1137 "insns.def"
2643
+ {
2644
+ val = vm_opt_neq(ci, cc, ci_eq, cc_eq, recv, obj);
2645
+
2646
+ if (val == Qundef) {
2647
+ CALL_SIMPLE_METHOD();
2648
+ }
2649
+ }
2650
+ #line 2651 "vm.inc"
2651
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2652
+ CHECK_CANARY();
2653
+ INC_SP(INSN_ATTR(sp_inc));
2654
+ TOPN(0) = val;
2655
+ if (leaf) ADD_PC(INSN_ATTR(width));
2656
+ END_INSN(opt_neq);
2657
+ # undef INSN_ATTR
2658
+ # undef NAME_OF_CURRENT_INSN
2659
+ }
2660
+
2661
+ /* insn opt_lt(ci, cc)(recv, obj)(val) */
2662
+ INSN_ENTRY(opt_lt)
2663
+ {
2664
+ # define NAME_OF_CURRENT_INSN opt_lt
2665
+ # define INSN_ATTR(x) attr_ ## x ## _opt_lt(ci, cc)
2666
+ bool leaf;
2667
+ MAYBE_UNUSED(VALUE *) canary;
2668
+ MAYBE_UNUSED(CALL_CACHE) cc;
2669
+ MAYBE_UNUSED(CALL_INFO) ci;
2670
+ MAYBE_UNUSED(VALUE) obj, recv, val;
2671
+
2672
+ START_OF_ORIGINAL_INSN(opt_lt);
2673
+ ci = (CALL_INFO)GET_OPERAND(1);
2674
+ cc = (CALL_CACHE)GET_OPERAND(2);
2675
+ recv = TOPN(1);
2676
+ obj = TOPN(0);
2677
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2678
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2679
+ SETUP_CANARY();
2680
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2681
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
2682
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
2683
+ #line 1151 "insns.def"
2684
+ {
2685
+ val = vm_opt_lt(recv, obj);
2686
+
2687
+ if (val == Qundef) {
2688
+ CALL_SIMPLE_METHOD();
2689
+ }
2690
+ }
2691
+ #line 2692 "vm.inc"
2692
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2693
+ CHECK_CANARY();
2694
+ INC_SP(INSN_ATTR(sp_inc));
2695
+ TOPN(0) = val;
2696
+ if (leaf) ADD_PC(INSN_ATTR(width));
2697
+ END_INSN(opt_lt);
2698
+ # undef INSN_ATTR
2699
+ # undef NAME_OF_CURRENT_INSN
2700
+ }
2701
+
2702
+ /* insn opt_le(ci, cc)(recv, obj)(val) */
2703
+ INSN_ENTRY(opt_le)
2704
+ {
2705
+ # define NAME_OF_CURRENT_INSN opt_le
2706
+ # define INSN_ATTR(x) attr_ ## x ## _opt_le(ci, cc)
2707
+ bool leaf;
2708
+ MAYBE_UNUSED(VALUE *) canary;
2709
+ MAYBE_UNUSED(CALL_CACHE) cc;
2710
+ MAYBE_UNUSED(CALL_INFO) ci;
2711
+ MAYBE_UNUSED(VALUE) obj, recv, val;
2712
+
2713
+ START_OF_ORIGINAL_INSN(opt_le);
2714
+ ci = (CALL_INFO)GET_OPERAND(1);
2715
+ cc = (CALL_CACHE)GET_OPERAND(2);
2716
+ recv = TOPN(1);
2717
+ obj = TOPN(0);
2718
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2719
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2720
+ SETUP_CANARY();
2721
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2722
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
2723
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
2724
+ #line 1165 "insns.def"
2725
+ {
2726
+ val = vm_opt_le(recv, obj);
2727
+
2728
+ if (val == Qundef) {
2729
+ CALL_SIMPLE_METHOD();
2730
+ }
2731
+ }
2732
+ #line 2733 "vm.inc"
2733
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2734
+ CHECK_CANARY();
2735
+ INC_SP(INSN_ATTR(sp_inc));
2736
+ TOPN(0) = val;
2737
+ if (leaf) ADD_PC(INSN_ATTR(width));
2738
+ END_INSN(opt_le);
2739
+ # undef INSN_ATTR
2740
+ # undef NAME_OF_CURRENT_INSN
2741
+ }
2742
+
2743
+ /* insn opt_gt(ci, cc)(recv, obj)(val) */
2744
+ INSN_ENTRY(opt_gt)
2745
+ {
2746
+ # define NAME_OF_CURRENT_INSN opt_gt
2747
+ # define INSN_ATTR(x) attr_ ## x ## _opt_gt(ci, cc)
2748
+ bool leaf;
2749
+ MAYBE_UNUSED(VALUE *) canary;
2750
+ MAYBE_UNUSED(CALL_CACHE) cc;
2751
+ MAYBE_UNUSED(CALL_INFO) ci;
2752
+ MAYBE_UNUSED(VALUE) obj, recv, val;
2753
+
2754
+ START_OF_ORIGINAL_INSN(opt_gt);
2755
+ ci = (CALL_INFO)GET_OPERAND(1);
2756
+ cc = (CALL_CACHE)GET_OPERAND(2);
2757
+ recv = TOPN(1);
2758
+ obj = TOPN(0);
2759
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2760
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2761
+ SETUP_CANARY();
2762
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2763
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
2764
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
2765
+ #line 1179 "insns.def"
2766
+ {
2767
+ val = vm_opt_gt(recv, obj);
2768
+
2769
+ if (val == Qundef) {
2770
+ CALL_SIMPLE_METHOD();
2771
+ }
2772
+ }
2773
+ #line 2774 "vm.inc"
2774
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2775
+ CHECK_CANARY();
2776
+ INC_SP(INSN_ATTR(sp_inc));
2777
+ TOPN(0) = val;
2778
+ if (leaf) ADD_PC(INSN_ATTR(width));
2779
+ END_INSN(opt_gt);
2780
+ # undef INSN_ATTR
2781
+ # undef NAME_OF_CURRENT_INSN
2782
+ }
2783
+
2784
+ /* insn opt_ge(ci, cc)(recv, obj)(val) */
2785
+ INSN_ENTRY(opt_ge)
2786
+ {
2787
+ # define NAME_OF_CURRENT_INSN opt_ge
2788
+ # define INSN_ATTR(x) attr_ ## x ## _opt_ge(ci, cc)
2789
+ bool leaf;
2790
+ MAYBE_UNUSED(VALUE *) canary;
2791
+ MAYBE_UNUSED(CALL_CACHE) cc;
2792
+ MAYBE_UNUSED(CALL_INFO) ci;
2793
+ MAYBE_UNUSED(VALUE) obj, recv, val;
2794
+
2795
+ START_OF_ORIGINAL_INSN(opt_ge);
2796
+ ci = (CALL_INFO)GET_OPERAND(1);
2797
+ cc = (CALL_CACHE)GET_OPERAND(2);
2798
+ recv = TOPN(1);
2799
+ obj = TOPN(0);
2800
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2801
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2802
+ SETUP_CANARY();
2803
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2804
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
2805
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
2806
+ #line 1193 "insns.def"
2807
+ {
2808
+ val = vm_opt_ge(recv, obj);
2809
+
2810
+ if (val == Qundef) {
2811
+ CALL_SIMPLE_METHOD();
2812
+ }
2813
+ }
2814
+ #line 2815 "vm.inc"
2815
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2816
+ CHECK_CANARY();
2817
+ INC_SP(INSN_ATTR(sp_inc));
2818
+ TOPN(0) = val;
2819
+ if (leaf) ADD_PC(INSN_ATTR(width));
2820
+ END_INSN(opt_ge);
2821
+ # undef INSN_ATTR
2822
+ # undef NAME_OF_CURRENT_INSN
2823
+ }
2824
+
2825
+ /* insn opt_ltlt(ci, cc)(recv, obj)(val) */
2826
+ INSN_ENTRY(opt_ltlt)
2827
+ {
2828
+ # define NAME_OF_CURRENT_INSN opt_ltlt
2829
+ # define INSN_ATTR(x) attr_ ## x ## _opt_ltlt(ci, cc)
2830
+ bool leaf;
2831
+ MAYBE_UNUSED(VALUE *) canary;
2832
+ MAYBE_UNUSED(CALL_CACHE) cc;
2833
+ MAYBE_UNUSED(CALL_INFO) ci;
2834
+ MAYBE_UNUSED(VALUE) obj, recv, val;
2835
+
2836
+ START_OF_ORIGINAL_INSN(opt_ltlt);
2837
+ ci = (CALL_INFO)GET_OPERAND(1);
2838
+ cc = (CALL_CACHE)GET_OPERAND(2);
2839
+ recv = TOPN(1);
2840
+ obj = TOPN(0);
2841
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2842
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2843
+ SETUP_CANARY();
2844
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2845
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
2846
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
2847
+ #line 1207 "insns.def"
2848
+ {
2849
+ val = vm_opt_ltlt(recv, obj);
2850
+
2851
+ if (val == Qundef) {
2852
+ CALL_SIMPLE_METHOD();
2853
+ }
2854
+ }
2855
+ #line 2856 "vm.inc"
2856
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2857
+ CHECK_CANARY();
2858
+ INC_SP(INSN_ATTR(sp_inc));
2859
+ TOPN(0) = val;
2860
+ if (leaf) ADD_PC(INSN_ATTR(width));
2861
+ END_INSN(opt_ltlt);
2862
+ # undef INSN_ATTR
2863
+ # undef NAME_OF_CURRENT_INSN
2864
+ }
2865
+
2866
+ /* insn opt_and(ci, cc)(recv, obj)(val) */
2867
+ INSN_ENTRY(opt_and)
2868
+ {
2869
+ # define NAME_OF_CURRENT_INSN opt_and
2870
+ # define INSN_ATTR(x) attr_ ## x ## _opt_and(ci, cc)
2871
+ bool leaf;
2872
+ MAYBE_UNUSED(VALUE *) canary;
2873
+ MAYBE_UNUSED(CALL_CACHE) cc;
2874
+ MAYBE_UNUSED(CALL_INFO) ci;
2875
+ MAYBE_UNUSED(VALUE) obj, recv, val;
2876
+
2877
+ START_OF_ORIGINAL_INSN(opt_and);
2878
+ ci = (CALL_INFO)GET_OPERAND(1);
2879
+ cc = (CALL_CACHE)GET_OPERAND(2);
2880
+ recv = TOPN(1);
2881
+ obj = TOPN(0);
2882
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2883
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2884
+ SETUP_CANARY();
2885
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2886
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
2887
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
2888
+ #line 1221 "insns.def"
2889
+ {
2890
+ val = vm_opt_and(recv, obj);
2891
+
2892
+ if (val == Qundef) {
2893
+ CALL_SIMPLE_METHOD();
2894
+ }
2895
+ }
2896
+ #line 2897 "vm.inc"
2897
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2898
+ CHECK_CANARY();
2899
+ INC_SP(INSN_ATTR(sp_inc));
2900
+ TOPN(0) = val;
2901
+ if (leaf) ADD_PC(INSN_ATTR(width));
2902
+ END_INSN(opt_and);
2903
+ # undef INSN_ATTR
2904
+ # undef NAME_OF_CURRENT_INSN
2905
+ }
2906
+
2907
+ /* insn opt_or(ci, cc)(recv, obj)(val) */
2908
+ INSN_ENTRY(opt_or)
2909
+ {
2910
+ # define NAME_OF_CURRENT_INSN opt_or
2911
+ # define INSN_ATTR(x) attr_ ## x ## _opt_or(ci, cc)
2912
+ bool leaf;
2913
+ MAYBE_UNUSED(VALUE *) canary;
2914
+ MAYBE_UNUSED(CALL_CACHE) cc;
2915
+ MAYBE_UNUSED(CALL_INFO) ci;
2916
+ MAYBE_UNUSED(VALUE) obj, recv, val;
2917
+
2918
+ START_OF_ORIGINAL_INSN(opt_or);
2919
+ ci = (CALL_INFO)GET_OPERAND(1);
2920
+ cc = (CALL_CACHE)GET_OPERAND(2);
2921
+ recv = TOPN(1);
2922
+ obj = TOPN(0);
2923
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2924
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2925
+ SETUP_CANARY();
2926
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2927
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
2928
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
2929
+ #line 1235 "insns.def"
2930
+ {
2931
+ val = vm_opt_or(recv, obj);
2932
+
2933
+ if (val == Qundef) {
2934
+ CALL_SIMPLE_METHOD();
2935
+ }
2936
+ }
2937
+ #line 2938 "vm.inc"
2938
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2939
+ CHECK_CANARY();
2940
+ INC_SP(INSN_ATTR(sp_inc));
2941
+ TOPN(0) = val;
2942
+ if (leaf) ADD_PC(INSN_ATTR(width));
2943
+ END_INSN(opt_or);
2944
+ # undef INSN_ATTR
2945
+ # undef NAME_OF_CURRENT_INSN
2946
+ }
2947
+
2948
+ /* insn opt_aref(ci, cc)(recv, obj)(val) */
2949
+ INSN_ENTRY(opt_aref)
2950
+ {
2951
+ # define NAME_OF_CURRENT_INSN opt_aref
2952
+ # define INSN_ATTR(x) attr_ ## x ## _opt_aref(ci, cc)
2953
+ bool leaf;
2954
+ MAYBE_UNUSED(VALUE *) canary;
2955
+ MAYBE_UNUSED(CALL_CACHE) cc;
2956
+ MAYBE_UNUSED(CALL_INFO) ci;
2957
+ MAYBE_UNUSED(VALUE) obj, recv, val;
2958
+
2959
+ START_OF_ORIGINAL_INSN(opt_aref);
2960
+ ci = (CALL_INFO)GET_OPERAND(1);
2961
+ cc = (CALL_CACHE)GET_OPERAND(2);
2962
+ recv = TOPN(1);
2963
+ obj = TOPN(0);
2964
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
2965
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
2966
+ SETUP_CANARY();
2967
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
2968
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
2969
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
2970
+ #line 1254 "insns.def"
2971
+ {
2972
+ val = vm_opt_aref(recv, obj);
2973
+
2974
+ if (val == Qundef) {
2975
+ CALL_SIMPLE_METHOD();
2976
+ }
2977
+ }
2978
+ #line 2979 "vm.inc"
2979
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
2980
+ CHECK_CANARY();
2981
+ INC_SP(INSN_ATTR(sp_inc));
2982
+ TOPN(0) = val;
2983
+ if (leaf) ADD_PC(INSN_ATTR(width));
2984
+ END_INSN(opt_aref);
2985
+ # undef INSN_ATTR
2986
+ # undef NAME_OF_CURRENT_INSN
2987
+ }
2988
+
2989
+ /* insn opt_aset(ci, cc)(recv, obj, set)(val) */
2990
+ INSN_ENTRY(opt_aset)
2991
+ {
2992
+ # define NAME_OF_CURRENT_INSN opt_aset
2993
+ # define INSN_ATTR(x) attr_ ## x ## _opt_aset(ci, cc)
2994
+ bool leaf;
2995
+ MAYBE_UNUSED(VALUE *) canary;
2996
+ MAYBE_UNUSED(CALL_CACHE) cc;
2997
+ MAYBE_UNUSED(CALL_INFO) ci;
2998
+ MAYBE_UNUSED(VALUE) obj, recv, set, val;
2999
+
3000
+ START_OF_ORIGINAL_INSN(opt_aset);
3001
+ ci = (CALL_INFO)GET_OPERAND(1);
3002
+ cc = (CALL_CACHE)GET_OPERAND(2);
3003
+ recv = TOPN(2);
3004
+ obj = TOPN(1);
3005
+ set = TOPN(0);
3006
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3007
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3008
+ SETUP_CANARY();
3009
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3010
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
3011
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
3012
+ #line 1271 "insns.def"
3013
+ {
3014
+ val = vm_opt_aset(recv, obj, set);
3015
+
3016
+ if (val == Qundef) {
3017
+ CALL_SIMPLE_METHOD();
3018
+ }
3019
+ }
3020
+ #line 3021 "vm.inc"
3021
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3022
+ CHECK_CANARY();
3023
+ INC_SP(INSN_ATTR(sp_inc));
3024
+ TOPN(0) = val;
3025
+ if (leaf) ADD_PC(INSN_ATTR(width));
3026
+ END_INSN(opt_aset);
3027
+ # undef INSN_ATTR
3028
+ # undef NAME_OF_CURRENT_INSN
3029
+ }
3030
+
3031
+ /* insn opt_aset_with(key, ci, cc)(recv, val)(val) */
3032
+ INSN_ENTRY(opt_aset_with)
3033
+ {
3034
+ # define NAME_OF_CURRENT_INSN opt_aset_with
3035
+ # define INSN_ATTR(x) attr_ ## x ## _opt_aset_with(key, ci, cc)
3036
+ bool leaf;
3037
+ MAYBE_UNUSED(VALUE *) canary;
3038
+ MAYBE_UNUSED(CALL_CACHE) cc;
3039
+ MAYBE_UNUSED(CALL_INFO) ci;
3040
+ MAYBE_UNUSED(VALUE) key, recv, val;
3041
+
3042
+ START_OF_ORIGINAL_INSN(opt_aset_with);
3043
+ key = (VALUE)GET_OPERAND(1);
3044
+ ci = (CALL_INFO)GET_OPERAND(2);
3045
+ cc = (CALL_CACHE)GET_OPERAND(3);
3046
+ recv = TOPN(1);
3047
+ val = TOPN(0);
3048
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3049
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3050
+ SETUP_CANARY();
3051
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3052
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, key);
3053
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, ci);
3054
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 2, cc);
3055
+ #line 1287 "insns.def"
3056
+ {
3057
+ VALUE tmp = vm_opt_aset_with(recv, key, val);
3058
+
3059
+ if (tmp != Qundef) {
3060
+ val = tmp;
3061
+ }
3062
+ else {
3063
+ #ifndef MJIT_HEADER
3064
+ TOPN(0) = rb_str_resurrect(key);
3065
+ PUSH(val);
3066
+ #endif
3067
+ CALL_SIMPLE_METHOD();
3068
+ }
3069
+ }
3070
+ #line 3071 "vm.inc"
3071
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3072
+ CHECK_CANARY();
3073
+ INC_SP(INSN_ATTR(sp_inc));
3074
+ TOPN(0) = val;
3075
+ if (leaf) ADD_PC(INSN_ATTR(width));
3076
+ END_INSN(opt_aset_with);
3077
+ # undef INSN_ATTR
3078
+ # undef NAME_OF_CURRENT_INSN
3079
+ }
3080
+
3081
+ /* insn opt_aref_with(key, ci, cc)(recv)(val) */
3082
+ INSN_ENTRY(opt_aref_with)
3083
+ {
3084
+ # define NAME_OF_CURRENT_INSN opt_aref_with
3085
+ # define INSN_ATTR(x) attr_ ## x ## _opt_aref_with(key, ci, cc)
3086
+ bool leaf;
3087
+ MAYBE_UNUSED(VALUE *) canary;
3088
+ MAYBE_UNUSED(CALL_CACHE) cc;
3089
+ MAYBE_UNUSED(CALL_INFO) ci;
3090
+ MAYBE_UNUSED(VALUE) key, recv, val;
3091
+
3092
+ START_OF_ORIGINAL_INSN(opt_aref_with);
3093
+ key = (VALUE)GET_OPERAND(1);
3094
+ ci = (CALL_INFO)GET_OPERAND(2);
3095
+ cc = (CALL_CACHE)GET_OPERAND(3);
3096
+ recv = TOPN(0);
3097
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3098
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3099
+ SETUP_CANARY();
3100
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3101
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, key);
3102
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, ci);
3103
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 2, cc);
3104
+ #line 1310 "insns.def"
3105
+ {
3106
+ val = vm_opt_aref_with(recv, key);
3107
+
3108
+ if (val == Qundef) {
3109
+ #ifndef MJIT_HEADER
3110
+ PUSH(rb_str_resurrect(key));
3111
+ #endif
3112
+ CALL_SIMPLE_METHOD();
3113
+ }
3114
+ }
3115
+ #line 3116 "vm.inc"
3116
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3117
+ CHECK_CANARY();
3118
+ INC_SP(INSN_ATTR(sp_inc));
3119
+ TOPN(0) = val;
3120
+ if (leaf) ADD_PC(INSN_ATTR(width));
3121
+ END_INSN(opt_aref_with);
3122
+ # undef INSN_ATTR
3123
+ # undef NAME_OF_CURRENT_INSN
3124
+ }
3125
+
3126
+ /* insn opt_length(ci, cc)(recv)(val) */
3127
+ INSN_ENTRY(opt_length)
3128
+ {
3129
+ # define NAME_OF_CURRENT_INSN opt_length
3130
+ # define INSN_ATTR(x) attr_ ## x ## _opt_length(ci, cc)
3131
+ bool leaf;
3132
+ MAYBE_UNUSED(VALUE *) canary;
3133
+ MAYBE_UNUSED(CALL_CACHE) cc;
3134
+ MAYBE_UNUSED(CALL_INFO) ci;
3135
+ MAYBE_UNUSED(VALUE) recv, val;
3136
+
3137
+ START_OF_ORIGINAL_INSN(opt_length);
3138
+ ci = (CALL_INFO)GET_OPERAND(1);
3139
+ cc = (CALL_CACHE)GET_OPERAND(2);
3140
+ recv = TOPN(0);
3141
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3142
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3143
+ SETUP_CANARY();
3144
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3145
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
3146
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
3147
+ #line 1327 "insns.def"
3148
+ {
3149
+ val = vm_opt_length(recv, BOP_LENGTH);
3150
+
3151
+ if (val == Qundef) {
3152
+ CALL_SIMPLE_METHOD();
3153
+ }
3154
+ }
3155
+ #line 3156 "vm.inc"
3156
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3157
+ CHECK_CANARY();
3158
+ INC_SP(INSN_ATTR(sp_inc));
3159
+ TOPN(0) = val;
3160
+ if (leaf) ADD_PC(INSN_ATTR(width));
3161
+ END_INSN(opt_length);
3162
+ # undef INSN_ATTR
3163
+ # undef NAME_OF_CURRENT_INSN
3164
+ }
3165
+
3166
+ /* insn opt_size(ci, cc)(recv)(val) */
3167
+ INSN_ENTRY(opt_size)
3168
+ {
3169
+ # define NAME_OF_CURRENT_INSN opt_size
3170
+ # define INSN_ATTR(x) attr_ ## x ## _opt_size(ci, cc)
3171
+ bool leaf;
3172
+ MAYBE_UNUSED(VALUE *) canary;
3173
+ MAYBE_UNUSED(CALL_CACHE) cc;
3174
+ MAYBE_UNUSED(CALL_INFO) ci;
3175
+ MAYBE_UNUSED(VALUE) recv, val;
3176
+
3177
+ START_OF_ORIGINAL_INSN(opt_size);
3178
+ ci = (CALL_INFO)GET_OPERAND(1);
3179
+ cc = (CALL_CACHE)GET_OPERAND(2);
3180
+ recv = TOPN(0);
3181
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3182
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3183
+ SETUP_CANARY();
3184
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3185
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
3186
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
3187
+ #line 1341 "insns.def"
3188
+ {
3189
+ val = vm_opt_length(recv, BOP_SIZE);
3190
+
3191
+ if (val == Qundef) {
3192
+ CALL_SIMPLE_METHOD();
3193
+ }
3194
+ }
3195
+ #line 3196 "vm.inc"
3196
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3197
+ CHECK_CANARY();
3198
+ INC_SP(INSN_ATTR(sp_inc));
3199
+ TOPN(0) = val;
3200
+ if (leaf) ADD_PC(INSN_ATTR(width));
3201
+ END_INSN(opt_size);
3202
+ # undef INSN_ATTR
3203
+ # undef NAME_OF_CURRENT_INSN
3204
+ }
3205
+
3206
+ /* insn opt_empty_p(ci, cc)(recv)(val) */
3207
+ INSN_ENTRY(opt_empty_p)
3208
+ {
3209
+ # define NAME_OF_CURRENT_INSN opt_empty_p
3210
+ # define INSN_ATTR(x) attr_ ## x ## _opt_empty_p(ci, cc)
3211
+ bool leaf;
3212
+ MAYBE_UNUSED(VALUE *) canary;
3213
+ MAYBE_UNUSED(CALL_CACHE) cc;
3214
+ MAYBE_UNUSED(CALL_INFO) ci;
3215
+ MAYBE_UNUSED(VALUE) recv, val;
3216
+
3217
+ START_OF_ORIGINAL_INSN(opt_empty_p);
3218
+ ci = (CALL_INFO)GET_OPERAND(1);
3219
+ cc = (CALL_CACHE)GET_OPERAND(2);
3220
+ recv = TOPN(0);
3221
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3222
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3223
+ SETUP_CANARY();
3224
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3225
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
3226
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
3227
+ #line 1355 "insns.def"
3228
+ {
3229
+ val = vm_opt_empty_p(recv);
3230
+
3231
+ if (val == Qundef) {
3232
+ CALL_SIMPLE_METHOD();
3233
+ }
3234
+ }
3235
+ #line 3236 "vm.inc"
3236
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3237
+ CHECK_CANARY();
3238
+ INC_SP(INSN_ATTR(sp_inc));
3239
+ TOPN(0) = val;
3240
+ if (leaf) ADD_PC(INSN_ATTR(width));
3241
+ END_INSN(opt_empty_p);
3242
+ # undef INSN_ATTR
3243
+ # undef NAME_OF_CURRENT_INSN
3244
+ }
3245
+
3246
+ /* insn opt_succ(ci, cc)(recv)(val) */
3247
+ INSN_ENTRY(opt_succ)
3248
+ {
3249
+ # define NAME_OF_CURRENT_INSN opt_succ
3250
+ # define INSN_ATTR(x) attr_ ## x ## _opt_succ(ci, cc)
3251
+ bool leaf;
3252
+ MAYBE_UNUSED(VALUE *) canary;
3253
+ MAYBE_UNUSED(CALL_CACHE) cc;
3254
+ MAYBE_UNUSED(CALL_INFO) ci;
3255
+ MAYBE_UNUSED(VALUE) recv, val;
3256
+
3257
+ START_OF_ORIGINAL_INSN(opt_succ);
3258
+ ci = (CALL_INFO)GET_OPERAND(1);
3259
+ cc = (CALL_CACHE)GET_OPERAND(2);
3260
+ recv = TOPN(0);
3261
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3262
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3263
+ SETUP_CANARY();
3264
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3265
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
3266
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
3267
+ #line 1369 "insns.def"
3268
+ {
3269
+ val = vm_opt_succ(recv);
3270
+
3271
+ if (val == Qundef) {
3272
+ CALL_SIMPLE_METHOD();
3273
+ }
3274
+ }
3275
+ #line 3276 "vm.inc"
3276
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3277
+ CHECK_CANARY();
3278
+ INC_SP(INSN_ATTR(sp_inc));
3279
+ TOPN(0) = val;
3280
+ if (leaf) ADD_PC(INSN_ATTR(width));
3281
+ END_INSN(opt_succ);
3282
+ # undef INSN_ATTR
3283
+ # undef NAME_OF_CURRENT_INSN
3284
+ }
3285
+
3286
+ /* insn opt_not(ci, cc)(recv)(val) */
3287
+ INSN_ENTRY(opt_not)
3288
+ {
3289
+ # define NAME_OF_CURRENT_INSN opt_not
3290
+ # define INSN_ATTR(x) attr_ ## x ## _opt_not(ci, cc)
3291
+ bool leaf;
3292
+ MAYBE_UNUSED(VALUE *) canary;
3293
+ MAYBE_UNUSED(CALL_CACHE) cc;
3294
+ MAYBE_UNUSED(CALL_INFO) ci;
3295
+ MAYBE_UNUSED(VALUE) recv, val;
3296
+
3297
+ START_OF_ORIGINAL_INSN(opt_not);
3298
+ ci = (CALL_INFO)GET_OPERAND(1);
3299
+ cc = (CALL_CACHE)GET_OPERAND(2);
3300
+ recv = TOPN(0);
3301
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3302
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3303
+ SETUP_CANARY();
3304
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3305
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
3306
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
3307
+ #line 1383 "insns.def"
3308
+ {
3309
+ val = vm_opt_not(ci, cc, recv);
3310
+
3311
+ if (val == Qundef) {
3312
+ CALL_SIMPLE_METHOD();
3313
+ }
3314
+ }
3315
+ #line 3316 "vm.inc"
3316
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3317
+ CHECK_CANARY();
3318
+ INC_SP(INSN_ATTR(sp_inc));
3319
+ TOPN(0) = val;
3320
+ if (leaf) ADD_PC(INSN_ATTR(width));
3321
+ END_INSN(opt_not);
3322
+ # undef INSN_ATTR
3323
+ # undef NAME_OF_CURRENT_INSN
3324
+ }
3325
+
3326
+ /* insn opt_regexpmatch1(recv)(obj)(val) */
3327
+ INSN_ENTRY(opt_regexpmatch1)
3328
+ {
3329
+ # define NAME_OF_CURRENT_INSN opt_regexpmatch1
3330
+ # define INSN_ATTR(x) attr_ ## x ## _opt_regexpmatch1(recv)
3331
+ bool leaf;
3332
+ MAYBE_UNUSED(VALUE *) canary;
3333
+ MAYBE_UNUSED(VALUE) obj, recv, val;
3334
+
3335
+ START_OF_ORIGINAL_INSN(opt_regexpmatch1);
3336
+ recv = (VALUE)GET_OPERAND(1);
3337
+ obj = TOPN(0);
3338
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3339
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3340
+ SETUP_CANARY();
3341
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3342
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, recv);
3343
+ #line 1398 "insns.def"
3344
+ {
3345
+ val = vm_opt_regexpmatch1(recv, obj);
3346
+ }
3347
+ #line 3348 "vm.inc"
3348
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3349
+ CHECK_CANARY();
3350
+ INC_SP(INSN_ATTR(sp_inc));
3351
+ TOPN(0) = val;
3352
+ if (leaf) ADD_PC(INSN_ATTR(width));
3353
+ END_INSN(opt_regexpmatch1);
3354
+ # undef INSN_ATTR
3355
+ # undef NAME_OF_CURRENT_INSN
3356
+ }
3357
+
3358
+ /* insn opt_regexpmatch2(ci, cc)(obj2, obj1)(val) */
3359
+ INSN_ENTRY(opt_regexpmatch2)
3360
+ {
3361
+ # define NAME_OF_CURRENT_INSN opt_regexpmatch2
3362
+ # define INSN_ATTR(x) attr_ ## x ## _opt_regexpmatch2(ci, cc)
3363
+ bool leaf;
3364
+ MAYBE_UNUSED(VALUE *) canary;
3365
+ MAYBE_UNUSED(CALL_CACHE) cc;
3366
+ MAYBE_UNUSED(CALL_INFO) ci;
3367
+ MAYBE_UNUSED(VALUE) obj1, obj2, val;
3368
+
3369
+ START_OF_ORIGINAL_INSN(opt_regexpmatch2);
3370
+ ci = (CALL_INFO)GET_OPERAND(1);
3371
+ cc = (CALL_CACHE)GET_OPERAND(2);
3372
+ obj2 = TOPN(1);
3373
+ obj1 = TOPN(0);
3374
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3375
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3376
+ SETUP_CANARY();
3377
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3378
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, ci);
3379
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
3380
+ #line 1408 "insns.def"
3381
+ {
3382
+ val = vm_opt_regexpmatch2(obj2, obj1);
3383
+
3384
+ if (val == Qundef) {
3385
+ CALL_SIMPLE_METHOD();
3386
+ }
3387
+ }
3388
+ #line 3389 "vm.inc"
3389
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3390
+ CHECK_CANARY();
3391
+ INC_SP(INSN_ATTR(sp_inc));
3392
+ TOPN(0) = val;
3393
+ if (leaf) ADD_PC(INSN_ATTR(width));
3394
+ END_INSN(opt_regexpmatch2);
3395
+ # undef INSN_ATTR
3396
+ # undef NAME_OF_CURRENT_INSN
3397
+ }
3398
+
3399
+ /* insn opt_call_c_function(funcptr)()() */
3400
+ INSN_ENTRY(opt_call_c_function)
3401
+ {
3402
+ # define NAME_OF_CURRENT_INSN opt_call_c_function
3403
+ # define INSN_ATTR(x) attr_ ## x ## _opt_call_c_function(funcptr)
3404
+ bool leaf;
3405
+ MAYBE_UNUSED(VALUE *) canary;
3406
+ MAYBE_UNUSED(rb_insn_func_t) funcptr;
3407
+
3408
+ START_OF_ORIGINAL_INSN(opt_call_c_function);
3409
+ funcptr = (rb_insn_func_t)GET_OPERAND(1);
3410
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3411
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3412
+ POPN(INSN_ATTR(popn));
3413
+ SETUP_CANARY();
3414
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3415
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, funcptr);
3416
+ #line 1424 "insns.def"
3417
+ {
3418
+ reg_cfp = (funcptr)(ec, reg_cfp);
3419
+
3420
+ if (reg_cfp == 0) {
3421
+ VALUE err = ec->errinfo;
3422
+ ec->errinfo = Qnil;
3423
+ THROW_EXCEPTION(err);
3424
+ }
3425
+
3426
+ RESTORE_REGS();
3427
+ NEXT_INSN();
3428
+ }
3429
+ #line 3430 "vm.inc"
3430
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3431
+ CHECK_CANARY();
3432
+ if (leaf) ADD_PC(INSN_ATTR(width));
3433
+ END_INSN(opt_call_c_function);
3434
+ # undef INSN_ATTR
3435
+ # undef NAME_OF_CURRENT_INSN
3436
+ }
3437
+
3438
+ /* insn bitblt()()(ret) */
3439
+ INSN_ENTRY(bitblt)
3440
+ {
3441
+ # define NAME_OF_CURRENT_INSN bitblt
3442
+ # define INSN_ATTR(x) attr_ ## x ## _bitblt()
3443
+ bool leaf;
3444
+ MAYBE_UNUSED(VALUE *) canary;
3445
+ MAYBE_UNUSED(VALUE) ret;
3446
+
3447
+ START_OF_ORIGINAL_INSN(bitblt);
3448
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3449
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3450
+ SETUP_CANARY();
3451
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3452
+ #line 1443 "insns.def"
3453
+ {
3454
+ ret = rb_str_new2("a bit of bacon, lettuce and tomato");
3455
+ }
3456
+ #line 3457 "vm.inc"
3457
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3458
+ CHECK_CANARY();
3459
+ INC_SP(INSN_ATTR(sp_inc));
3460
+ TOPN(0) = ret;
3461
+ if (leaf) ADD_PC(INSN_ATTR(width));
3462
+ END_INSN(bitblt);
3463
+ # undef INSN_ATTR
3464
+ # undef NAME_OF_CURRENT_INSN
3465
+ }
3466
+
3467
+ /* insn answer()()(ret) */
3468
+ INSN_ENTRY(answer)
3469
+ {
3470
+ # define NAME_OF_CURRENT_INSN answer
3471
+ # define INSN_ATTR(x) attr_ ## x ## _answer()
3472
+ bool leaf;
3473
+ MAYBE_UNUSED(VALUE *) canary;
3474
+ MAYBE_UNUSED(VALUE) ret;
3475
+
3476
+ START_OF_ORIGINAL_INSN(answer);
3477
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3478
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3479
+ SETUP_CANARY();
3480
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3481
+ #line 1453 "insns.def"
3482
+ {
3483
+ ret = INT2FIX(42);
3484
+ }
3485
+ #line 3486 "vm.inc"
3486
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3487
+ CHECK_CANARY();
3488
+ INC_SP(INSN_ATTR(sp_inc));
3489
+ TOPN(0) = ret;
3490
+ if (leaf) ADD_PC(INSN_ATTR(width));
3491
+ END_INSN(answer);
3492
+ # undef INSN_ATTR
3493
+ # undef NAME_OF_CURRENT_INSN
3494
+ }
3495
+
3496
+ /* insn getlocal_WC_0(idx)()(val) */
3497
+ INSN_ENTRY(getlocal_WC_0)
3498
+ {
3499
+ # define NAME_OF_CURRENT_INSN getlocal_WC_0
3500
+ # define INSN_ATTR(x) attr_ ## x ## _getlocal_WC_0(idx)
3501
+ bool leaf;
3502
+ MAYBE_UNUSED(VALUE *) canary;
3503
+ MAYBE_UNUSED(VALUE) val;
3504
+ MAYBE_UNUSED(lindex_t) idx;
3505
+ MAYBE_UNUSED(rb_num_t) level;
3506
+
3507
+ START_OF_ORIGINAL_INSN(getlocal_WC_0);
3508
+ #line 10 "defs/opt_operand.def"
3509
+ level = 0;
3510
+ #line 3511 "vm.inc"
3511
+ idx = (lindex_t)GET_OPERAND(1);
3512
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3513
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3514
+ SETUP_CANARY();
3515
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3516
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, idx);
3517
+ #line 81 "insns.def"
3518
+ {
3519
+ val = *(vm_get_ep(GET_EP(), level) - idx);
3520
+ RB_DEBUG_COUNTER_INC(lvar_get);
3521
+ (void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
3522
+ }
3523
+ #line 3524 "vm.inc"
3524
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3525
+ CHECK_CANARY();
3526
+ INC_SP(INSN_ATTR(sp_inc));
3527
+ TOPN(0) = val;
3528
+ if (leaf) ADD_PC(INSN_ATTR(width));
3529
+ END_INSN(getlocal_WC_0);
3530
+ # undef INSN_ATTR
3531
+ # undef NAME_OF_CURRENT_INSN
3532
+ }
3533
+
3534
+ /* insn getlocal_WC_1(idx)()(val) */
3535
+ INSN_ENTRY(getlocal_WC_1)
3536
+ {
3537
+ # define NAME_OF_CURRENT_INSN getlocal_WC_1
3538
+ # define INSN_ATTR(x) attr_ ## x ## _getlocal_WC_1(idx)
3539
+ bool leaf;
3540
+ MAYBE_UNUSED(VALUE *) canary;
3541
+ MAYBE_UNUSED(VALUE) val;
3542
+ MAYBE_UNUSED(lindex_t) idx;
3543
+ MAYBE_UNUSED(rb_num_t) level;
3544
+
3545
+ START_OF_ORIGINAL_INSN(getlocal_WC_1);
3546
+ #line 11 "defs/opt_operand.def"
3547
+ level = 1;
3548
+ #line 3549 "vm.inc"
3549
+ idx = (lindex_t)GET_OPERAND(1);
3550
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3551
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3552
+ SETUP_CANARY();
3553
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3554
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, idx);
3555
+ #line 81 "insns.def"
3556
+ {
3557
+ val = *(vm_get_ep(GET_EP(), level) - idx);
3558
+ RB_DEBUG_COUNTER_INC(lvar_get);
3559
+ (void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
3560
+ }
3561
+ #line 3562 "vm.inc"
3562
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3563
+ CHECK_CANARY();
3564
+ INC_SP(INSN_ATTR(sp_inc));
3565
+ TOPN(0) = val;
3566
+ if (leaf) ADD_PC(INSN_ATTR(width));
3567
+ END_INSN(getlocal_WC_1);
3568
+ # undef INSN_ATTR
3569
+ # undef NAME_OF_CURRENT_INSN
3570
+ }
3571
+
3572
+ /* insn setlocal_WC_0(idx)(val)() */
3573
+ INSN_ENTRY(setlocal_WC_0)
3574
+ {
3575
+ # define NAME_OF_CURRENT_INSN setlocal_WC_0
3576
+ # define INSN_ATTR(x) attr_ ## x ## _setlocal_WC_0(idx)
3577
+ bool leaf;
3578
+ MAYBE_UNUSED(VALUE *) canary;
3579
+ MAYBE_UNUSED(VALUE) val;
3580
+ MAYBE_UNUSED(lindex_t) idx;
3581
+ MAYBE_UNUSED(rb_num_t) level;
3582
+
3583
+ START_OF_ORIGINAL_INSN(setlocal_WC_0);
3584
+ #line 12 "defs/opt_operand.def"
3585
+ level = 0;
3586
+ #line 3587 "vm.inc"
3587
+ idx = (lindex_t)GET_OPERAND(1);
3588
+ val = TOPN(0);
3589
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3590
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3591
+ SETUP_CANARY();
3592
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3593
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, idx);
3594
+ #line 95 "insns.def"
3595
+ {
3596
+ vm_env_write(vm_get_ep(GET_EP(), level), -(int)idx, val);
3597
+ RB_DEBUG_COUNTER_INC(lvar_set);
3598
+ (void)RB_DEBUG_COUNTER_INC_IF(lvar_set_dynamic, level > 0);
3599
+ }
3600
+ #line 3601 "vm.inc"
3601
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3602
+ CHECK_CANARY();
3603
+ INC_SP(INSN_ATTR(sp_inc));
3604
+ if (leaf) ADD_PC(INSN_ATTR(width));
3605
+ END_INSN(setlocal_WC_0);
3606
+ # undef INSN_ATTR
3607
+ # undef NAME_OF_CURRENT_INSN
3608
+ }
3609
+
3610
+ /* insn setlocal_WC_1(idx)(val)() */
3611
+ INSN_ENTRY(setlocal_WC_1)
3612
+ {
3613
+ # define NAME_OF_CURRENT_INSN setlocal_WC_1
3614
+ # define INSN_ATTR(x) attr_ ## x ## _setlocal_WC_1(idx)
3615
+ bool leaf;
3616
+ MAYBE_UNUSED(VALUE *) canary;
3617
+ MAYBE_UNUSED(VALUE) val;
3618
+ MAYBE_UNUSED(lindex_t) idx;
3619
+ MAYBE_UNUSED(rb_num_t) level;
3620
+
3621
+ START_OF_ORIGINAL_INSN(setlocal_WC_1);
3622
+ #line 13 "defs/opt_operand.def"
3623
+ level = 1;
3624
+ #line 3625 "vm.inc"
3625
+ idx = (lindex_t)GET_OPERAND(1);
3626
+ val = TOPN(0);
3627
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3628
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3629
+ SETUP_CANARY();
3630
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3631
+ COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, idx);
3632
+ #line 95 "insns.def"
3633
+ {
3634
+ vm_env_write(vm_get_ep(GET_EP(), level), -(int)idx, val);
3635
+ RB_DEBUG_COUNTER_INC(lvar_set);
3636
+ (void)RB_DEBUG_COUNTER_INC_IF(lvar_set_dynamic, level > 0);
3637
+ }
3638
+ #line 3639 "vm.inc"
3639
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3640
+ CHECK_CANARY();
3641
+ INC_SP(INSN_ATTR(sp_inc));
3642
+ if (leaf) ADD_PC(INSN_ATTR(width));
3643
+ END_INSN(setlocal_WC_1);
3644
+ # undef INSN_ATTR
3645
+ # undef NAME_OF_CURRENT_INSN
3646
+ }
3647
+
3648
+ /* insn putobject_INT2FIX_0_()()(val) */
3649
+ INSN_ENTRY(putobject_INT2FIX_0_)
3650
+ {
3651
+ # define NAME_OF_CURRENT_INSN putobject_INT2FIX_0_
3652
+ # define INSN_ATTR(x) attr_ ## x ## _putobject_INT2FIX_0_()
3653
+ bool leaf;
3654
+ MAYBE_UNUSED(VALUE *) canary;
3655
+ MAYBE_UNUSED(VALUE) val;
3656
+
3657
+ START_OF_ORIGINAL_INSN(putobject_INT2FIX_0_);
3658
+ #line 15 "defs/opt_operand.def"
3659
+ val = INT2FIX(0);
3660
+ #line 3661 "vm.inc"
3661
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3662
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3663
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3664
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3665
+ INC_SP(INSN_ATTR(sp_inc));
3666
+ TOPN(0) = val;
3667
+ if (leaf) ADD_PC(INSN_ATTR(width));
3668
+ END_INSN(putobject_INT2FIX_0_);
3669
+ # undef INSN_ATTR
3670
+ # undef NAME_OF_CURRENT_INSN
3671
+ }
3672
+
3673
+ /* insn putobject_INT2FIX_1_()()(val) */
3674
+ INSN_ENTRY(putobject_INT2FIX_1_)
3675
+ {
3676
+ # define NAME_OF_CURRENT_INSN putobject_INT2FIX_1_
3677
+ # define INSN_ATTR(x) attr_ ## x ## _putobject_INT2FIX_1_()
3678
+ bool leaf;
3679
+ MAYBE_UNUSED(VALUE *) canary;
3680
+ MAYBE_UNUSED(VALUE) val;
3681
+
3682
+ START_OF_ORIGINAL_INSN(putobject_INT2FIX_1_);
3683
+ #line 16 "defs/opt_operand.def"
3684
+ val = INT2FIX(1);
3685
+ #line 3686 "vm.inc"
3686
+ DEBUG_ENTER_INSN(INSN_ATTR(name));
3687
+ if (! (leaf = INSN_ATTR(leaf))) ADD_PC(INSN_ATTR(width));
3688
+ COLLECT_USAGE_INSN(INSN_ATTR(bin));
3689
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
3690
+ INC_SP(INSN_ATTR(sp_inc));
3691
+ TOPN(0) = val;
3692
+ if (leaf) ADD_PC(INSN_ATTR(width));
3693
+ END_INSN(putobject_INT2FIX_1_);
3694
+ # undef INSN_ATTR
3695
+ # undef NAME_OF_CURRENT_INSN
3696
+ }
3697
+
3698
+ /* insn trace_nop(...)(...)(...) */
3699
+ INSN_ENTRY(trace_nop)
3700
+ {
3701
+ vm_trace(ec, GET_CFP(), GET_PC());
3702
+ DISPATCH_ORIGINAL_INSN(nop);
3703
+ END_INSN(trace_nop);
3704
+ }
3705
+
3706
+ /* insn trace_getlocal(...)(...)(...) */
3707
+ INSN_ENTRY(trace_getlocal)
3708
+ {
3709
+ vm_trace(ec, GET_CFP(), GET_PC());
3710
+ DISPATCH_ORIGINAL_INSN(getlocal);
3711
+ END_INSN(trace_getlocal);
3712
+ }
3713
+
3714
+ /* insn trace_setlocal(...)(...)(...) */
3715
+ INSN_ENTRY(trace_setlocal)
3716
+ {
3717
+ vm_trace(ec, GET_CFP(), GET_PC());
3718
+ DISPATCH_ORIGINAL_INSN(setlocal);
3719
+ END_INSN(trace_setlocal);
3720
+ }
3721
+
3722
+ /* insn trace_getblockparam(...)(...)(...) */
3723
+ INSN_ENTRY(trace_getblockparam)
3724
+ {
3725
+ vm_trace(ec, GET_CFP(), GET_PC());
3726
+ DISPATCH_ORIGINAL_INSN(getblockparam);
3727
+ END_INSN(trace_getblockparam);
3728
+ }
3729
+
3730
+ /* insn trace_setblockparam(...)(...)(...) */
3731
+ INSN_ENTRY(trace_setblockparam)
3732
+ {
3733
+ vm_trace(ec, GET_CFP(), GET_PC());
3734
+ DISPATCH_ORIGINAL_INSN(setblockparam);
3735
+ END_INSN(trace_setblockparam);
3736
+ }
3737
+
3738
+ /* insn trace_getblockparamproxy(...)(...)(...) */
3739
+ INSN_ENTRY(trace_getblockparamproxy)
3740
+ {
3741
+ vm_trace(ec, GET_CFP(), GET_PC());
3742
+ DISPATCH_ORIGINAL_INSN(getblockparamproxy);
3743
+ END_INSN(trace_getblockparamproxy);
3744
+ }
3745
+
3746
+ /* insn trace_getspecial(...)(...)(...) */
3747
+ INSN_ENTRY(trace_getspecial)
3748
+ {
3749
+ vm_trace(ec, GET_CFP(), GET_PC());
3750
+ DISPATCH_ORIGINAL_INSN(getspecial);
3751
+ END_INSN(trace_getspecial);
3752
+ }
3753
+
3754
+ /* insn trace_setspecial(...)(...)(...) */
3755
+ INSN_ENTRY(trace_setspecial)
3756
+ {
3757
+ vm_trace(ec, GET_CFP(), GET_PC());
3758
+ DISPATCH_ORIGINAL_INSN(setspecial);
3759
+ END_INSN(trace_setspecial);
3760
+ }
3761
+
3762
+ /* insn trace_getinstancevariable(...)(...)(...) */
3763
+ INSN_ENTRY(trace_getinstancevariable)
3764
+ {
3765
+ vm_trace(ec, GET_CFP(), GET_PC());
3766
+ DISPATCH_ORIGINAL_INSN(getinstancevariable);
3767
+ END_INSN(trace_getinstancevariable);
3768
+ }
3769
+
3770
+ /* insn trace_setinstancevariable(...)(...)(...) */
3771
+ INSN_ENTRY(trace_setinstancevariable)
3772
+ {
3773
+ vm_trace(ec, GET_CFP(), GET_PC());
3774
+ DISPATCH_ORIGINAL_INSN(setinstancevariable);
3775
+ END_INSN(trace_setinstancevariable);
3776
+ }
3777
+
3778
+ /* insn trace_getclassvariable(...)(...)(...) */
3779
+ INSN_ENTRY(trace_getclassvariable)
3780
+ {
3781
+ vm_trace(ec, GET_CFP(), GET_PC());
3782
+ DISPATCH_ORIGINAL_INSN(getclassvariable);
3783
+ END_INSN(trace_getclassvariable);
3784
+ }
3785
+
3786
+ /* insn trace_setclassvariable(...)(...)(...) */
3787
+ INSN_ENTRY(trace_setclassvariable)
3788
+ {
3789
+ vm_trace(ec, GET_CFP(), GET_PC());
3790
+ DISPATCH_ORIGINAL_INSN(setclassvariable);
3791
+ END_INSN(trace_setclassvariable);
3792
+ }
3793
+
3794
+ /* insn trace_getconstant(...)(...)(...) */
3795
+ INSN_ENTRY(trace_getconstant)
3796
+ {
3797
+ vm_trace(ec, GET_CFP(), GET_PC());
3798
+ DISPATCH_ORIGINAL_INSN(getconstant);
3799
+ END_INSN(trace_getconstant);
3800
+ }
3801
+
3802
+ /* insn trace_setconstant(...)(...)(...) */
3803
+ INSN_ENTRY(trace_setconstant)
3804
+ {
3805
+ vm_trace(ec, GET_CFP(), GET_PC());
3806
+ DISPATCH_ORIGINAL_INSN(setconstant);
3807
+ END_INSN(trace_setconstant);
3808
+ }
3809
+
3810
+ /* insn trace_getglobal(...)(...)(...) */
3811
+ INSN_ENTRY(trace_getglobal)
3812
+ {
3813
+ vm_trace(ec, GET_CFP(), GET_PC());
3814
+ DISPATCH_ORIGINAL_INSN(getglobal);
3815
+ END_INSN(trace_getglobal);
3816
+ }
3817
+
3818
+ /* insn trace_setglobal(...)(...)(...) */
3819
+ INSN_ENTRY(trace_setglobal)
3820
+ {
3821
+ vm_trace(ec, GET_CFP(), GET_PC());
3822
+ DISPATCH_ORIGINAL_INSN(setglobal);
3823
+ END_INSN(trace_setglobal);
3824
+ }
3825
+
3826
+ /* insn trace_putnil(...)(...)(...) */
3827
+ INSN_ENTRY(trace_putnil)
3828
+ {
3829
+ vm_trace(ec, GET_CFP(), GET_PC());
3830
+ DISPATCH_ORIGINAL_INSN(putnil);
3831
+ END_INSN(trace_putnil);
3832
+ }
3833
+
3834
+ /* insn trace_putself(...)(...)(...) */
3835
+ INSN_ENTRY(trace_putself)
3836
+ {
3837
+ vm_trace(ec, GET_CFP(), GET_PC());
3838
+ DISPATCH_ORIGINAL_INSN(putself);
3839
+ END_INSN(trace_putself);
3840
+ }
3841
+
3842
+ /* insn trace_putobject(...)(...)(...) */
3843
+ INSN_ENTRY(trace_putobject)
3844
+ {
3845
+ vm_trace(ec, GET_CFP(), GET_PC());
3846
+ DISPATCH_ORIGINAL_INSN(putobject);
3847
+ END_INSN(trace_putobject);
3848
+ }
3849
+
3850
+ /* insn trace_putspecialobject(...)(...)(...) */
3851
+ INSN_ENTRY(trace_putspecialobject)
3852
+ {
3853
+ vm_trace(ec, GET_CFP(), GET_PC());
3854
+ DISPATCH_ORIGINAL_INSN(putspecialobject);
3855
+ END_INSN(trace_putspecialobject);
3856
+ }
3857
+
3858
+ /* insn trace_putiseq(...)(...)(...) */
3859
+ INSN_ENTRY(trace_putiseq)
3860
+ {
3861
+ vm_trace(ec, GET_CFP(), GET_PC());
3862
+ DISPATCH_ORIGINAL_INSN(putiseq);
3863
+ END_INSN(trace_putiseq);
3864
+ }
3865
+
3866
+ /* insn trace_putstring(...)(...)(...) */
3867
+ INSN_ENTRY(trace_putstring)
3868
+ {
3869
+ vm_trace(ec, GET_CFP(), GET_PC());
3870
+ DISPATCH_ORIGINAL_INSN(putstring);
3871
+ END_INSN(trace_putstring);
3872
+ }
3873
+
3874
+ /* insn trace_concatstrings(...)(...)(...) */
3875
+ INSN_ENTRY(trace_concatstrings)
3876
+ {
3877
+ vm_trace(ec, GET_CFP(), GET_PC());
3878
+ DISPATCH_ORIGINAL_INSN(concatstrings);
3879
+ END_INSN(trace_concatstrings);
3880
+ }
3881
+
3882
+ /* insn trace_tostring(...)(...)(...) */
3883
+ INSN_ENTRY(trace_tostring)
3884
+ {
3885
+ vm_trace(ec, GET_CFP(), GET_PC());
3886
+ DISPATCH_ORIGINAL_INSN(tostring);
3887
+ END_INSN(trace_tostring);
3888
+ }
3889
+
3890
+ /* insn trace_freezestring(...)(...)(...) */
3891
+ INSN_ENTRY(trace_freezestring)
3892
+ {
3893
+ vm_trace(ec, GET_CFP(), GET_PC());
3894
+ DISPATCH_ORIGINAL_INSN(freezestring);
3895
+ END_INSN(trace_freezestring);
3896
+ }
3897
+
3898
+ /* insn trace_toregexp(...)(...)(...) */
3899
+ INSN_ENTRY(trace_toregexp)
3900
+ {
3901
+ vm_trace(ec, GET_CFP(), GET_PC());
3902
+ DISPATCH_ORIGINAL_INSN(toregexp);
3903
+ END_INSN(trace_toregexp);
3904
+ }
3905
+
3906
+ /* insn trace_intern(...)(...)(...) */
3907
+ INSN_ENTRY(trace_intern)
3908
+ {
3909
+ vm_trace(ec, GET_CFP(), GET_PC());
3910
+ DISPATCH_ORIGINAL_INSN(intern);
3911
+ END_INSN(trace_intern);
3912
+ }
3913
+
3914
+ /* insn trace_newarray(...)(...)(...) */
3915
+ INSN_ENTRY(trace_newarray)
3916
+ {
3917
+ vm_trace(ec, GET_CFP(), GET_PC());
3918
+ DISPATCH_ORIGINAL_INSN(newarray);
3919
+ END_INSN(trace_newarray);
3920
+ }
3921
+
3922
+ /* insn trace_duparray(...)(...)(...) */
3923
+ INSN_ENTRY(trace_duparray)
3924
+ {
3925
+ vm_trace(ec, GET_CFP(), GET_PC());
3926
+ DISPATCH_ORIGINAL_INSN(duparray);
3927
+ END_INSN(trace_duparray);
3928
+ }
3929
+
3930
+ /* insn trace_duphash(...)(...)(...) */
3931
+ INSN_ENTRY(trace_duphash)
3932
+ {
3933
+ vm_trace(ec, GET_CFP(), GET_PC());
3934
+ DISPATCH_ORIGINAL_INSN(duphash);
3935
+ END_INSN(trace_duphash);
3936
+ }
3937
+
3938
+ /* insn trace_expandarray(...)(...)(...) */
3939
+ INSN_ENTRY(trace_expandarray)
3940
+ {
3941
+ vm_trace(ec, GET_CFP(), GET_PC());
3942
+ DISPATCH_ORIGINAL_INSN(expandarray);
3943
+ END_INSN(trace_expandarray);
3944
+ }
3945
+
3946
+ /* insn trace_concatarray(...)(...)(...) */
3947
+ INSN_ENTRY(trace_concatarray)
3948
+ {
3949
+ vm_trace(ec, GET_CFP(), GET_PC());
3950
+ DISPATCH_ORIGINAL_INSN(concatarray);
3951
+ END_INSN(trace_concatarray);
3952
+ }
3953
+
3954
+ /* insn trace_splatarray(...)(...)(...) */
3955
+ INSN_ENTRY(trace_splatarray)
3956
+ {
3957
+ vm_trace(ec, GET_CFP(), GET_PC());
3958
+ DISPATCH_ORIGINAL_INSN(splatarray);
3959
+ END_INSN(trace_splatarray);
3960
+ }
3961
+
3962
+ /* insn trace_newhash(...)(...)(...) */
3963
+ INSN_ENTRY(trace_newhash)
3964
+ {
3965
+ vm_trace(ec, GET_CFP(), GET_PC());
3966
+ DISPATCH_ORIGINAL_INSN(newhash);
3967
+ END_INSN(trace_newhash);
3968
+ }
3969
+
3970
+ /* insn trace_newrange(...)(...)(...) */
3971
+ INSN_ENTRY(trace_newrange)
3972
+ {
3973
+ vm_trace(ec, GET_CFP(), GET_PC());
3974
+ DISPATCH_ORIGINAL_INSN(newrange);
3975
+ END_INSN(trace_newrange);
3976
+ }
3977
+
3978
+ /* insn trace_pop(...)(...)(...) */
3979
+ INSN_ENTRY(trace_pop)
3980
+ {
3981
+ vm_trace(ec, GET_CFP(), GET_PC());
3982
+ DISPATCH_ORIGINAL_INSN(pop);
3983
+ END_INSN(trace_pop);
3984
+ }
3985
+
3986
+ /* insn trace_dup(...)(...)(...) */
3987
+ INSN_ENTRY(trace_dup)
3988
+ {
3989
+ vm_trace(ec, GET_CFP(), GET_PC());
3990
+ DISPATCH_ORIGINAL_INSN(dup);
3991
+ END_INSN(trace_dup);
3992
+ }
3993
+
3994
+ /* insn trace_dupn(...)(...)(...) */
3995
+ INSN_ENTRY(trace_dupn)
3996
+ {
3997
+ vm_trace(ec, GET_CFP(), GET_PC());
3998
+ DISPATCH_ORIGINAL_INSN(dupn);
3999
+ END_INSN(trace_dupn);
4000
+ }
4001
+
4002
+ /* insn trace_swap(...)(...)(...) */
4003
+ INSN_ENTRY(trace_swap)
4004
+ {
4005
+ vm_trace(ec, GET_CFP(), GET_PC());
4006
+ DISPATCH_ORIGINAL_INSN(swap);
4007
+ END_INSN(trace_swap);
4008
+ }
4009
+
4010
+ /* insn trace_reverse(...)(...)(...) */
4011
+ INSN_ENTRY(trace_reverse)
4012
+ {
4013
+ vm_trace(ec, GET_CFP(), GET_PC());
4014
+ DISPATCH_ORIGINAL_INSN(reverse);
4015
+ END_INSN(trace_reverse);
4016
+ }
4017
+
4018
+ /* insn trace_reput(...)(...)(...) */
4019
+ INSN_ENTRY(trace_reput)
4020
+ {
4021
+ vm_trace(ec, GET_CFP(), GET_PC());
4022
+ DISPATCH_ORIGINAL_INSN(reput);
4023
+ END_INSN(trace_reput);
4024
+ }
4025
+
4026
+ /* insn trace_topn(...)(...)(...) */
4027
+ INSN_ENTRY(trace_topn)
4028
+ {
4029
+ vm_trace(ec, GET_CFP(), GET_PC());
4030
+ DISPATCH_ORIGINAL_INSN(topn);
4031
+ END_INSN(trace_topn);
4032
+ }
4033
+
4034
+ /* insn trace_setn(...)(...)(...) */
4035
+ INSN_ENTRY(trace_setn)
4036
+ {
4037
+ vm_trace(ec, GET_CFP(), GET_PC());
4038
+ DISPATCH_ORIGINAL_INSN(setn);
4039
+ END_INSN(trace_setn);
4040
+ }
4041
+
4042
+ /* insn trace_adjuststack(...)(...)(...) */
4043
+ INSN_ENTRY(trace_adjuststack)
4044
+ {
4045
+ vm_trace(ec, GET_CFP(), GET_PC());
4046
+ DISPATCH_ORIGINAL_INSN(adjuststack);
4047
+ END_INSN(trace_adjuststack);
4048
+ }
4049
+
4050
+ /* insn trace_defined(...)(...)(...) */
4051
+ INSN_ENTRY(trace_defined)
4052
+ {
4053
+ vm_trace(ec, GET_CFP(), GET_PC());
4054
+ DISPATCH_ORIGINAL_INSN(defined);
4055
+ END_INSN(trace_defined);
4056
+ }
4057
+
4058
+ /* insn trace_checkmatch(...)(...)(...) */
4059
+ INSN_ENTRY(trace_checkmatch)
4060
+ {
4061
+ vm_trace(ec, GET_CFP(), GET_PC());
4062
+ DISPATCH_ORIGINAL_INSN(checkmatch);
4063
+ END_INSN(trace_checkmatch);
4064
+ }
4065
+
4066
+ /* insn trace_checkkeyword(...)(...)(...) */
4067
+ INSN_ENTRY(trace_checkkeyword)
4068
+ {
4069
+ vm_trace(ec, GET_CFP(), GET_PC());
4070
+ DISPATCH_ORIGINAL_INSN(checkkeyword);
4071
+ END_INSN(trace_checkkeyword);
4072
+ }
4073
+
4074
+ /* insn trace_checktype(...)(...)(...) */
4075
+ INSN_ENTRY(trace_checktype)
4076
+ {
4077
+ vm_trace(ec, GET_CFP(), GET_PC());
4078
+ DISPATCH_ORIGINAL_INSN(checktype);
4079
+ END_INSN(trace_checktype);
4080
+ }
4081
+
4082
+ /* insn trace_defineclass(...)(...)(...) */
4083
+ INSN_ENTRY(trace_defineclass)
4084
+ {
4085
+ vm_trace(ec, GET_CFP(), GET_PC());
4086
+ DISPATCH_ORIGINAL_INSN(defineclass);
4087
+ END_INSN(trace_defineclass);
4088
+ }
4089
+
4090
+ /* insn trace_send(...)(...)(...) */
4091
+ INSN_ENTRY(trace_send)
4092
+ {
4093
+ vm_trace(ec, GET_CFP(), GET_PC());
4094
+ DISPATCH_ORIGINAL_INSN(send);
4095
+ END_INSN(trace_send);
4096
+ }
4097
+
4098
+ /* insn trace_opt_send_without_block(...)(...)(...) */
4099
+ INSN_ENTRY(trace_opt_send_without_block)
4100
+ {
4101
+ vm_trace(ec, GET_CFP(), GET_PC());
4102
+ DISPATCH_ORIGINAL_INSN(opt_send_without_block);
4103
+ END_INSN(trace_opt_send_without_block);
4104
+ }
4105
+
4106
+ /* insn trace_opt_str_freeze(...)(...)(...) */
4107
+ INSN_ENTRY(trace_opt_str_freeze)
4108
+ {
4109
+ vm_trace(ec, GET_CFP(), GET_PC());
4110
+ DISPATCH_ORIGINAL_INSN(opt_str_freeze);
4111
+ END_INSN(trace_opt_str_freeze);
4112
+ }
4113
+
4114
+ /* insn trace_opt_str_uminus(...)(...)(...) */
4115
+ INSN_ENTRY(trace_opt_str_uminus)
4116
+ {
4117
+ vm_trace(ec, GET_CFP(), GET_PC());
4118
+ DISPATCH_ORIGINAL_INSN(opt_str_uminus);
4119
+ END_INSN(trace_opt_str_uminus);
4120
+ }
4121
+
4122
+ /* insn trace_opt_newarray_max(...)(...)(...) */
4123
+ INSN_ENTRY(trace_opt_newarray_max)
4124
+ {
4125
+ vm_trace(ec, GET_CFP(), GET_PC());
4126
+ DISPATCH_ORIGINAL_INSN(opt_newarray_max);
4127
+ END_INSN(trace_opt_newarray_max);
4128
+ }
4129
+
4130
+ /* insn trace_opt_newarray_min(...)(...)(...) */
4131
+ INSN_ENTRY(trace_opt_newarray_min)
4132
+ {
4133
+ vm_trace(ec, GET_CFP(), GET_PC());
4134
+ DISPATCH_ORIGINAL_INSN(opt_newarray_min);
4135
+ END_INSN(trace_opt_newarray_min);
4136
+ }
4137
+
4138
+ /* insn trace_invokesuper(...)(...)(...) */
4139
+ INSN_ENTRY(trace_invokesuper)
4140
+ {
4141
+ vm_trace(ec, GET_CFP(), GET_PC());
4142
+ DISPATCH_ORIGINAL_INSN(invokesuper);
4143
+ END_INSN(trace_invokesuper);
4144
+ }
4145
+
4146
+ /* insn trace_invokeblock(...)(...)(...) */
4147
+ INSN_ENTRY(trace_invokeblock)
4148
+ {
4149
+ vm_trace(ec, GET_CFP(), GET_PC());
4150
+ DISPATCH_ORIGINAL_INSN(invokeblock);
4151
+ END_INSN(trace_invokeblock);
4152
+ }
4153
+
4154
+ /* insn trace_leave(...)(...)(...) */
4155
+ INSN_ENTRY(trace_leave)
4156
+ {
4157
+ vm_trace(ec, GET_CFP(), GET_PC());
4158
+ DISPATCH_ORIGINAL_INSN(leave);
4159
+ END_INSN(trace_leave);
4160
+ }
4161
+
4162
+ /* insn trace_throw(...)(...)(...) */
4163
+ INSN_ENTRY(trace_throw)
4164
+ {
4165
+ vm_trace(ec, GET_CFP(), GET_PC());
4166
+ DISPATCH_ORIGINAL_INSN(throw);
4167
+ END_INSN(trace_throw);
4168
+ }
4169
+
4170
+ /* insn trace_jump(...)(...)(...) */
4171
+ INSN_ENTRY(trace_jump)
4172
+ {
4173
+ vm_trace(ec, GET_CFP(), GET_PC());
4174
+ DISPATCH_ORIGINAL_INSN(jump);
4175
+ END_INSN(trace_jump);
4176
+ }
4177
+
4178
+ /* insn trace_branchif(...)(...)(...) */
4179
+ INSN_ENTRY(trace_branchif)
4180
+ {
4181
+ vm_trace(ec, GET_CFP(), GET_PC());
4182
+ DISPATCH_ORIGINAL_INSN(branchif);
4183
+ END_INSN(trace_branchif);
4184
+ }
4185
+
4186
+ /* insn trace_branchunless(...)(...)(...) */
4187
+ INSN_ENTRY(trace_branchunless)
4188
+ {
4189
+ vm_trace(ec, GET_CFP(), GET_PC());
4190
+ DISPATCH_ORIGINAL_INSN(branchunless);
4191
+ END_INSN(trace_branchunless);
4192
+ }
4193
+
4194
+ /* insn trace_branchnil(...)(...)(...) */
4195
+ INSN_ENTRY(trace_branchnil)
4196
+ {
4197
+ vm_trace(ec, GET_CFP(), GET_PC());
4198
+ DISPATCH_ORIGINAL_INSN(branchnil);
4199
+ END_INSN(trace_branchnil);
4200
+ }
4201
+
4202
+ /* insn trace_opt_getinlinecache(...)(...)(...) */
4203
+ INSN_ENTRY(trace_opt_getinlinecache)
4204
+ {
4205
+ vm_trace(ec, GET_CFP(), GET_PC());
4206
+ DISPATCH_ORIGINAL_INSN(opt_getinlinecache);
4207
+ END_INSN(trace_opt_getinlinecache);
4208
+ }
4209
+
4210
+ /* insn trace_opt_setinlinecache(...)(...)(...) */
4211
+ INSN_ENTRY(trace_opt_setinlinecache)
4212
+ {
4213
+ vm_trace(ec, GET_CFP(), GET_PC());
4214
+ DISPATCH_ORIGINAL_INSN(opt_setinlinecache);
4215
+ END_INSN(trace_opt_setinlinecache);
4216
+ }
4217
+
4218
+ /* insn trace_once(...)(...)(...) */
4219
+ INSN_ENTRY(trace_once)
4220
+ {
4221
+ vm_trace(ec, GET_CFP(), GET_PC());
4222
+ DISPATCH_ORIGINAL_INSN(once);
4223
+ END_INSN(trace_once);
4224
+ }
4225
+
4226
+ /* insn trace_opt_case_dispatch(...)(...)(...) */
4227
+ INSN_ENTRY(trace_opt_case_dispatch)
4228
+ {
4229
+ vm_trace(ec, GET_CFP(), GET_PC());
4230
+ DISPATCH_ORIGINAL_INSN(opt_case_dispatch);
4231
+ END_INSN(trace_opt_case_dispatch);
4232
+ }
4233
+
4234
+ /* insn trace_opt_plus(...)(...)(...) */
4235
+ INSN_ENTRY(trace_opt_plus)
4236
+ {
4237
+ vm_trace(ec, GET_CFP(), GET_PC());
4238
+ DISPATCH_ORIGINAL_INSN(opt_plus);
4239
+ END_INSN(trace_opt_plus);
4240
+ }
4241
+
4242
+ /* insn trace_opt_minus(...)(...)(...) */
4243
+ INSN_ENTRY(trace_opt_minus)
4244
+ {
4245
+ vm_trace(ec, GET_CFP(), GET_PC());
4246
+ DISPATCH_ORIGINAL_INSN(opt_minus);
4247
+ END_INSN(trace_opt_minus);
4248
+ }
4249
+
4250
+ /* insn trace_opt_mult(...)(...)(...) */
4251
+ INSN_ENTRY(trace_opt_mult)
4252
+ {
4253
+ vm_trace(ec, GET_CFP(), GET_PC());
4254
+ DISPATCH_ORIGINAL_INSN(opt_mult);
4255
+ END_INSN(trace_opt_mult);
4256
+ }
4257
+
4258
+ /* insn trace_opt_div(...)(...)(...) */
4259
+ INSN_ENTRY(trace_opt_div)
4260
+ {
4261
+ vm_trace(ec, GET_CFP(), GET_PC());
4262
+ DISPATCH_ORIGINAL_INSN(opt_div);
4263
+ END_INSN(trace_opt_div);
4264
+ }
4265
+
4266
+ /* insn trace_opt_mod(...)(...)(...) */
4267
+ INSN_ENTRY(trace_opt_mod)
4268
+ {
4269
+ vm_trace(ec, GET_CFP(), GET_PC());
4270
+ DISPATCH_ORIGINAL_INSN(opt_mod);
4271
+ END_INSN(trace_opt_mod);
4272
+ }
4273
+
4274
+ /* insn trace_opt_eq(...)(...)(...) */
4275
+ INSN_ENTRY(trace_opt_eq)
4276
+ {
4277
+ vm_trace(ec, GET_CFP(), GET_PC());
4278
+ DISPATCH_ORIGINAL_INSN(opt_eq);
4279
+ END_INSN(trace_opt_eq);
4280
+ }
4281
+
4282
+ /* insn trace_opt_neq(...)(...)(...) */
4283
+ INSN_ENTRY(trace_opt_neq)
4284
+ {
4285
+ vm_trace(ec, GET_CFP(), GET_PC());
4286
+ DISPATCH_ORIGINAL_INSN(opt_neq);
4287
+ END_INSN(trace_opt_neq);
4288
+ }
4289
+
4290
+ /* insn trace_opt_lt(...)(...)(...) */
4291
+ INSN_ENTRY(trace_opt_lt)
4292
+ {
4293
+ vm_trace(ec, GET_CFP(), GET_PC());
4294
+ DISPATCH_ORIGINAL_INSN(opt_lt);
4295
+ END_INSN(trace_opt_lt);
4296
+ }
4297
+
4298
+ /* insn trace_opt_le(...)(...)(...) */
4299
+ INSN_ENTRY(trace_opt_le)
4300
+ {
4301
+ vm_trace(ec, GET_CFP(), GET_PC());
4302
+ DISPATCH_ORIGINAL_INSN(opt_le);
4303
+ END_INSN(trace_opt_le);
4304
+ }
4305
+
4306
+ /* insn trace_opt_gt(...)(...)(...) */
4307
+ INSN_ENTRY(trace_opt_gt)
4308
+ {
4309
+ vm_trace(ec, GET_CFP(), GET_PC());
4310
+ DISPATCH_ORIGINAL_INSN(opt_gt);
4311
+ END_INSN(trace_opt_gt);
4312
+ }
4313
+
4314
+ /* insn trace_opt_ge(...)(...)(...) */
4315
+ INSN_ENTRY(trace_opt_ge)
4316
+ {
4317
+ vm_trace(ec, GET_CFP(), GET_PC());
4318
+ DISPATCH_ORIGINAL_INSN(opt_ge);
4319
+ END_INSN(trace_opt_ge);
4320
+ }
4321
+
4322
+ /* insn trace_opt_ltlt(...)(...)(...) */
4323
+ INSN_ENTRY(trace_opt_ltlt)
4324
+ {
4325
+ vm_trace(ec, GET_CFP(), GET_PC());
4326
+ DISPATCH_ORIGINAL_INSN(opt_ltlt);
4327
+ END_INSN(trace_opt_ltlt);
4328
+ }
4329
+
4330
+ /* insn trace_opt_and(...)(...)(...) */
4331
+ INSN_ENTRY(trace_opt_and)
4332
+ {
4333
+ vm_trace(ec, GET_CFP(), GET_PC());
4334
+ DISPATCH_ORIGINAL_INSN(opt_and);
4335
+ END_INSN(trace_opt_and);
4336
+ }
4337
+
4338
+ /* insn trace_opt_or(...)(...)(...) */
4339
+ INSN_ENTRY(trace_opt_or)
4340
+ {
4341
+ vm_trace(ec, GET_CFP(), GET_PC());
4342
+ DISPATCH_ORIGINAL_INSN(opt_or);
4343
+ END_INSN(trace_opt_or);
4344
+ }
4345
+
4346
+ /* insn trace_opt_aref(...)(...)(...) */
4347
+ INSN_ENTRY(trace_opt_aref)
4348
+ {
4349
+ vm_trace(ec, GET_CFP(), GET_PC());
4350
+ DISPATCH_ORIGINAL_INSN(opt_aref);
4351
+ END_INSN(trace_opt_aref);
4352
+ }
4353
+
4354
+ /* insn trace_opt_aset(...)(...)(...) */
4355
+ INSN_ENTRY(trace_opt_aset)
4356
+ {
4357
+ vm_trace(ec, GET_CFP(), GET_PC());
4358
+ DISPATCH_ORIGINAL_INSN(opt_aset);
4359
+ END_INSN(trace_opt_aset);
4360
+ }
4361
+
4362
+ /* insn trace_opt_aset_with(...)(...)(...) */
4363
+ INSN_ENTRY(trace_opt_aset_with)
4364
+ {
4365
+ vm_trace(ec, GET_CFP(), GET_PC());
4366
+ DISPATCH_ORIGINAL_INSN(opt_aset_with);
4367
+ END_INSN(trace_opt_aset_with);
4368
+ }
4369
+
4370
+ /* insn trace_opt_aref_with(...)(...)(...) */
4371
+ INSN_ENTRY(trace_opt_aref_with)
4372
+ {
4373
+ vm_trace(ec, GET_CFP(), GET_PC());
4374
+ DISPATCH_ORIGINAL_INSN(opt_aref_with);
4375
+ END_INSN(trace_opt_aref_with);
4376
+ }
4377
+
4378
+ /* insn trace_opt_length(...)(...)(...) */
4379
+ INSN_ENTRY(trace_opt_length)
4380
+ {
4381
+ vm_trace(ec, GET_CFP(), GET_PC());
4382
+ DISPATCH_ORIGINAL_INSN(opt_length);
4383
+ END_INSN(trace_opt_length);
4384
+ }
4385
+
4386
+ /* insn trace_opt_size(...)(...)(...) */
4387
+ INSN_ENTRY(trace_opt_size)
4388
+ {
4389
+ vm_trace(ec, GET_CFP(), GET_PC());
4390
+ DISPATCH_ORIGINAL_INSN(opt_size);
4391
+ END_INSN(trace_opt_size);
4392
+ }
4393
+
4394
+ /* insn trace_opt_empty_p(...)(...)(...) */
4395
+ INSN_ENTRY(trace_opt_empty_p)
4396
+ {
4397
+ vm_trace(ec, GET_CFP(), GET_PC());
4398
+ DISPATCH_ORIGINAL_INSN(opt_empty_p);
4399
+ END_INSN(trace_opt_empty_p);
4400
+ }
4401
+
4402
+ /* insn trace_opt_succ(...)(...)(...) */
4403
+ INSN_ENTRY(trace_opt_succ)
4404
+ {
4405
+ vm_trace(ec, GET_CFP(), GET_PC());
4406
+ DISPATCH_ORIGINAL_INSN(opt_succ);
4407
+ END_INSN(trace_opt_succ);
4408
+ }
4409
+
4410
+ /* insn trace_opt_not(...)(...)(...) */
4411
+ INSN_ENTRY(trace_opt_not)
4412
+ {
4413
+ vm_trace(ec, GET_CFP(), GET_PC());
4414
+ DISPATCH_ORIGINAL_INSN(opt_not);
4415
+ END_INSN(trace_opt_not);
4416
+ }
4417
+
4418
+ /* insn trace_opt_regexpmatch1(...)(...)(...) */
4419
+ INSN_ENTRY(trace_opt_regexpmatch1)
4420
+ {
4421
+ vm_trace(ec, GET_CFP(), GET_PC());
4422
+ DISPATCH_ORIGINAL_INSN(opt_regexpmatch1);
4423
+ END_INSN(trace_opt_regexpmatch1);
4424
+ }
4425
+
4426
+ /* insn trace_opt_regexpmatch2(...)(...)(...) */
4427
+ INSN_ENTRY(trace_opt_regexpmatch2)
4428
+ {
4429
+ vm_trace(ec, GET_CFP(), GET_PC());
4430
+ DISPATCH_ORIGINAL_INSN(opt_regexpmatch2);
4431
+ END_INSN(trace_opt_regexpmatch2);
4432
+ }
4433
+
4434
+ /* insn trace_opt_call_c_function(...)(...)(...) */
4435
+ INSN_ENTRY(trace_opt_call_c_function)
4436
+ {
4437
+ vm_trace(ec, GET_CFP(), GET_PC());
4438
+ DISPATCH_ORIGINAL_INSN(opt_call_c_function);
4439
+ END_INSN(trace_opt_call_c_function);
4440
+ }
4441
+
4442
+ /* insn trace_bitblt(...)(...)(...) */
4443
+ INSN_ENTRY(trace_bitblt)
4444
+ {
4445
+ vm_trace(ec, GET_CFP(), GET_PC());
4446
+ DISPATCH_ORIGINAL_INSN(bitblt);
4447
+ END_INSN(trace_bitblt);
4448
+ }
4449
+
4450
+ /* insn trace_answer(...)(...)(...) */
4451
+ INSN_ENTRY(trace_answer)
4452
+ {
4453
+ vm_trace(ec, GET_CFP(), GET_PC());
4454
+ DISPATCH_ORIGINAL_INSN(answer);
4455
+ END_INSN(trace_answer);
4456
+ }
4457
+
4458
+ /* insn trace_getlocal_WC_0(...)(...)(...) */
4459
+ INSN_ENTRY(trace_getlocal_WC_0)
4460
+ {
4461
+ vm_trace(ec, GET_CFP(), GET_PC());
4462
+ DISPATCH_ORIGINAL_INSN(getlocal_WC_0);
4463
+ END_INSN(trace_getlocal_WC_0);
4464
+ }
4465
+
4466
+ /* insn trace_getlocal_WC_1(...)(...)(...) */
4467
+ INSN_ENTRY(trace_getlocal_WC_1)
4468
+ {
4469
+ vm_trace(ec, GET_CFP(), GET_PC());
4470
+ DISPATCH_ORIGINAL_INSN(getlocal_WC_1);
4471
+ END_INSN(trace_getlocal_WC_1);
4472
+ }
4473
+
4474
+ /* insn trace_setlocal_WC_0(...)(...)(...) */
4475
+ INSN_ENTRY(trace_setlocal_WC_0)
4476
+ {
4477
+ vm_trace(ec, GET_CFP(), GET_PC());
4478
+ DISPATCH_ORIGINAL_INSN(setlocal_WC_0);
4479
+ END_INSN(trace_setlocal_WC_0);
4480
+ }
4481
+
4482
+ /* insn trace_setlocal_WC_1(...)(...)(...) */
4483
+ INSN_ENTRY(trace_setlocal_WC_1)
4484
+ {
4485
+ vm_trace(ec, GET_CFP(), GET_PC());
4486
+ DISPATCH_ORIGINAL_INSN(setlocal_WC_1);
4487
+ END_INSN(trace_setlocal_WC_1);
4488
+ }
4489
+
4490
+ /* insn trace_putobject_INT2FIX_0_(...)(...)(...) */
4491
+ INSN_ENTRY(trace_putobject_INT2FIX_0_)
4492
+ {
4493
+ vm_trace(ec, GET_CFP(), GET_PC());
4494
+ DISPATCH_ORIGINAL_INSN(putobject_INT2FIX_0_);
4495
+ END_INSN(trace_putobject_INT2FIX_0_);
4496
+ }
4497
+
4498
+ /* insn trace_putobject_INT2FIX_1_(...)(...)(...) */
4499
+ INSN_ENTRY(trace_putobject_INT2FIX_1_)
4500
+ {
4501
+ vm_trace(ec, GET_CFP(), GET_PC());
4502
+ DISPATCH_ORIGINAL_INSN(putobject_INT2FIX_1_);
4503
+ END_INSN(trace_putobject_INT2FIX_1_);
4504
+ }