did_you_mean 0.9.0 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.travis.yml +1 -1
  4. data/CHANGELOG.md +150 -0
  5. data/README.md +14 -1
  6. data/did_you_mean.gemspec +0 -1
  7. data/ext/did_you_mean/extconf.rb +14 -11
  8. data/ext/did_you_mean/ruby_headers/215/id.h +173 -0
  9. data/ext/did_you_mean/ruby_headers/215/internal.h +892 -0
  10. data/ext/did_you_mean/ruby_headers/215/method.h +142 -0
  11. data/ext/did_you_mean/ruby_headers/215/node.h +543 -0
  12. data/ext/did_you_mean/ruby_headers/215/ruby_atomic.h +170 -0
  13. data/ext/did_you_mean/ruby_headers/215/thread_native.h +23 -0
  14. data/ext/did_you_mean/ruby_headers/215/thread_pthread.h +56 -0
  15. data/ext/did_you_mean/ruby_headers/215/thread_win32.h +45 -0
  16. data/ext/did_you_mean/ruby_headers/215/vm_core.h +1055 -0
  17. data/ext/did_you_mean/ruby_headers/215/vm_debug.h +37 -0
  18. data/ext/did_you_mean/ruby_headers/215/vm_opts.h +56 -0
  19. data/ext/did_you_mean/ruby_headers/220/internal.h +11 -6
  20. data/ext/did_you_mean/ruby_headers/220/vm_core.h +1 -0
  21. data/lib/did_you_mean/finders.rb +1 -1
  22. data/lib/did_you_mean/test_helper.rb +0 -4
  23. data/lib/did_you_mean/version.rb +1 -1
  24. data/test/no_method_error_extension_test.rb +0 -6
  25. data/test/test_helper.rb +0 -1
  26. metadata +18 -196
  27. data/docs/did_you_mean_example.png +0 -0
  28. data/ext/did_you_mean/ruby_headers/193/addr2line.h +0 -21
  29. data/ext/did_you_mean/ruby_headers/193/constant.h +0 -34
  30. data/ext/did_you_mean/ruby_headers/193/dln.h +0 -50
  31. data/ext/did_you_mean/ruby_headers/193/encdb.h +0 -170
  32. data/ext/did_you_mean/ruby_headers/193/eval_intern.h +0 -234
  33. data/ext/did_you_mean/ruby_headers/193/gc.h +0 -99
  34. data/ext/did_you_mean/ruby_headers/193/iseq.h +0 -126
  35. data/ext/did_you_mean/ruby_headers/193/parse.h +0 -183
  36. data/ext/did_you_mean/ruby_headers/193/probes.h +0 -83
  37. data/ext/did_you_mean/ruby_headers/193/regenc.h +0 -219
  38. data/ext/did_you_mean/ruby_headers/193/regint.h +0 -850
  39. data/ext/did_you_mean/ruby_headers/193/regparse.h +0 -362
  40. data/ext/did_you_mean/ruby_headers/193/revision.h +0 -1
  41. data/ext/did_you_mean/ruby_headers/193/siphash.h +0 -48
  42. data/ext/did_you_mean/ruby_headers/193/timev.h +0 -21
  43. data/ext/did_you_mean/ruby_headers/193/transcode_data.h +0 -117
  44. data/ext/did_you_mean/ruby_headers/193/transdb.h +0 -190
  45. data/ext/did_you_mean/ruby_headers/193/verconf.h +0 -13
  46. data/ext/did_you_mean/ruby_headers/193/version.h +0 -52
  47. data/ext/did_you_mean/ruby_headers/193/vm_exec.h +0 -184
  48. data/ext/did_you_mean/ruby_headers/193/vm_insnhelper.h +0 -220
  49. data/ext/did_you_mean/ruby_headers/200/addr2line.h +0 -21
  50. data/ext/did_you_mean/ruby_headers/200/constant.h +0 -36
  51. data/ext/did_you_mean/ruby_headers/200/dln.h +0 -50
  52. data/ext/did_you_mean/ruby_headers/200/encdb.h +0 -170
  53. data/ext/did_you_mean/ruby_headers/200/eval_intern.h +0 -213
  54. data/ext/did_you_mean/ruby_headers/200/gc.h +0 -104
  55. data/ext/did_you_mean/ruby_headers/200/iseq.h +0 -140
  56. data/ext/did_you_mean/ruby_headers/200/parse.h +0 -183
  57. data/ext/did_you_mean/ruby_headers/200/probes.h +0 -83
  58. data/ext/did_you_mean/ruby_headers/200/probes_helper.h +0 -67
  59. data/ext/did_you_mean/ruby_headers/200/regenc.h +0 -227
  60. data/ext/did_you_mean/ruby_headers/200/regint.h +0 -915
  61. data/ext/did_you_mean/ruby_headers/200/regparse.h +0 -367
  62. data/ext/did_you_mean/ruby_headers/200/revision.h +0 -1
  63. data/ext/did_you_mean/ruby_headers/200/siphash.h +0 -48
  64. data/ext/did_you_mean/ruby_headers/200/timev.h +0 -21
  65. data/ext/did_you_mean/ruby_headers/200/transcode_data.h +0 -127
  66. data/ext/did_you_mean/ruby_headers/200/transdb.h +0 -190
  67. data/ext/did_you_mean/ruby_headers/200/verconf.h +0 -13
  68. data/ext/did_you_mean/ruby_headers/200/version.h +0 -52
  69. data/ext/did_you_mean/ruby_headers/200/vm_exec.h +0 -173
  70. data/ext/did_you_mean/ruby_headers/200/vm_insnhelper.h +0 -274
  71. data/ext/did_you_mean/ruby_headers/210/addr2line.h +0 -21
  72. data/ext/did_you_mean/ruby_headers/210/constant.h +0 -36
  73. data/ext/did_you_mean/ruby_headers/210/dln.h +0 -51
  74. data/ext/did_you_mean/ruby_headers/210/encdb.h +0 -170
  75. data/ext/did_you_mean/ruby_headers/210/eval_intern.h +0 -260
  76. data/ext/did_you_mean/ruby_headers/210/gc.h +0 -101
  77. data/ext/did_you_mean/ruby_headers/210/iseq.h +0 -136
  78. data/ext/did_you_mean/ruby_headers/210/parse.h +0 -183
  79. data/ext/did_you_mean/ruby_headers/210/probes.h +0 -83
  80. data/ext/did_you_mean/ruby_headers/210/probes_helper.h +0 -67
  81. data/ext/did_you_mean/ruby_headers/210/regenc.h +0 -223
  82. data/ext/did_you_mean/ruby_headers/210/regint.h +0 -911
  83. data/ext/did_you_mean/ruby_headers/210/regparse.h +0 -363
  84. data/ext/did_you_mean/ruby_headers/210/revision.h +0 -1
  85. data/ext/did_you_mean/ruby_headers/210/siphash.h +0 -48
  86. data/ext/did_you_mean/ruby_headers/210/timev.h +0 -42
  87. data/ext/did_you_mean/ruby_headers/210/transcode_data.h +0 -123
  88. data/ext/did_you_mean/ruby_headers/210/transdb.h +0 -190
  89. data/ext/did_you_mean/ruby_headers/210/verconf.h +0 -13
  90. data/ext/did_you_mean/ruby_headers/210/version.h +0 -52
  91. data/ext/did_you_mean/ruby_headers/210/vm_exec.h +0 -182
  92. data/ext/did_you_mean/ruby_headers/210/vm_insnhelper.h +0 -273
  93. data/ext/did_you_mean/ruby_headers/211/addr2line.h +0 -21
  94. data/ext/did_you_mean/ruby_headers/211/constant.h +0 -36
  95. data/ext/did_you_mean/ruby_headers/211/dln.h +0 -51
  96. data/ext/did_you_mean/ruby_headers/211/encdb.h +0 -170
  97. data/ext/did_you_mean/ruby_headers/211/eval_intern.h +0 -260
  98. data/ext/did_you_mean/ruby_headers/211/gc.h +0 -101
  99. data/ext/did_you_mean/ruby_headers/211/iseq.h +0 -136
  100. data/ext/did_you_mean/ruby_headers/211/parse.h +0 -183
  101. data/ext/did_you_mean/ruby_headers/211/probes.h +0 -83
  102. data/ext/did_you_mean/ruby_headers/211/probes_helper.h +0 -67
  103. data/ext/did_you_mean/ruby_headers/211/regenc.h +0 -223
  104. data/ext/did_you_mean/ruby_headers/211/regint.h +0 -911
  105. data/ext/did_you_mean/ruby_headers/211/regparse.h +0 -363
  106. data/ext/did_you_mean/ruby_headers/211/revision.h +0 -1
  107. data/ext/did_you_mean/ruby_headers/211/siphash.h +0 -48
  108. data/ext/did_you_mean/ruby_headers/211/timev.h +0 -42
  109. data/ext/did_you_mean/ruby_headers/211/transcode_data.h +0 -123
  110. data/ext/did_you_mean/ruby_headers/211/transdb.h +0 -190
  111. data/ext/did_you_mean/ruby_headers/211/verconf.h +0 -13
  112. data/ext/did_you_mean/ruby_headers/211/version.h +0 -52
  113. data/ext/did_you_mean/ruby_headers/211/vm_exec.h +0 -182
  114. data/ext/did_you_mean/ruby_headers/211/vm_insnhelper.h +0 -273
  115. data/ext/did_you_mean/ruby_headers/212/addr2line.h +0 -21
  116. data/ext/did_you_mean/ruby_headers/212/constant.h +0 -36
  117. data/ext/did_you_mean/ruby_headers/212/dln.h +0 -51
  118. data/ext/did_you_mean/ruby_headers/212/encdb.h +0 -170
  119. data/ext/did_you_mean/ruby_headers/212/eval_intern.h +0 -260
  120. data/ext/did_you_mean/ruby_headers/212/gc.h +0 -101
  121. data/ext/did_you_mean/ruby_headers/212/iseq.h +0 -136
  122. data/ext/did_you_mean/ruby_headers/212/parse.h +0 -183
  123. data/ext/did_you_mean/ruby_headers/212/probes.h +0 -83
  124. data/ext/did_you_mean/ruby_headers/212/probes_helper.h +0 -67
  125. data/ext/did_you_mean/ruby_headers/212/regenc.h +0 -223
  126. data/ext/did_you_mean/ruby_headers/212/regint.h +0 -911
  127. data/ext/did_you_mean/ruby_headers/212/regparse.h +0 -363
  128. data/ext/did_you_mean/ruby_headers/212/revision.h +0 -1
  129. data/ext/did_you_mean/ruby_headers/212/siphash.h +0 -48
  130. data/ext/did_you_mean/ruby_headers/212/timev.h +0 -42
  131. data/ext/did_you_mean/ruby_headers/212/transcode_data.h +0 -123
  132. data/ext/did_you_mean/ruby_headers/212/transdb.h +0 -190
  133. data/ext/did_you_mean/ruby_headers/212/verconf.h +0 -13
  134. data/ext/did_you_mean/ruby_headers/212/version.h +0 -52
  135. data/ext/did_you_mean/ruby_headers/212/vm_exec.h +0 -182
  136. data/ext/did_you_mean/ruby_headers/212/vm_insnhelper.h +0 -273
  137. data/ext/did_you_mean/ruby_headers/213/addr2line.h +0 -21
  138. data/ext/did_you_mean/ruby_headers/213/constant.h +0 -36
  139. data/ext/did_you_mean/ruby_headers/213/dln.h +0 -51
  140. data/ext/did_you_mean/ruby_headers/213/encdb.h +0 -170
  141. data/ext/did_you_mean/ruby_headers/213/eval_intern.h +0 -270
  142. data/ext/did_you_mean/ruby_headers/213/gc.h +0 -101
  143. data/ext/did_you_mean/ruby_headers/213/iseq.h +0 -136
  144. data/ext/did_you_mean/ruby_headers/213/parse.h +0 -183
  145. data/ext/did_you_mean/ruby_headers/213/probes.h +0 -83
  146. data/ext/did_you_mean/ruby_headers/213/probes_helper.h +0 -67
  147. data/ext/did_you_mean/ruby_headers/213/regenc.h +0 -223
  148. data/ext/did_you_mean/ruby_headers/213/regint.h +0 -911
  149. data/ext/did_you_mean/ruby_headers/213/regparse.h +0 -363
  150. data/ext/did_you_mean/ruby_headers/213/revision.h +0 -1
  151. data/ext/did_you_mean/ruby_headers/213/siphash.h +0 -48
  152. data/ext/did_you_mean/ruby_headers/213/timev.h +0 -42
  153. data/ext/did_you_mean/ruby_headers/213/transcode_data.h +0 -123
  154. data/ext/did_you_mean/ruby_headers/213/transdb.h +0 -190
  155. data/ext/did_you_mean/ruby_headers/213/verconf.h +0 -13
  156. data/ext/did_you_mean/ruby_headers/213/version.h +0 -52
  157. data/ext/did_you_mean/ruby_headers/213/vm_exec.h +0 -182
  158. data/ext/did_you_mean/ruby_headers/213/vm_insnhelper.h +0 -273
  159. data/ext/did_you_mean/ruby_headers/214/addr2line.h +0 -21
  160. data/ext/did_you_mean/ruby_headers/214/constant.h +0 -36
  161. data/ext/did_you_mean/ruby_headers/214/dln.h +0 -51
  162. data/ext/did_you_mean/ruby_headers/214/encdb.h +0 -170
  163. data/ext/did_you_mean/ruby_headers/214/eval_intern.h +0 -270
  164. data/ext/did_you_mean/ruby_headers/214/gc.h +0 -101
  165. data/ext/did_you_mean/ruby_headers/214/iseq.h +0 -136
  166. data/ext/did_you_mean/ruby_headers/214/parse.h +0 -183
  167. data/ext/did_you_mean/ruby_headers/214/probes.h +0 -83
  168. data/ext/did_you_mean/ruby_headers/214/probes_helper.h +0 -67
  169. data/ext/did_you_mean/ruby_headers/214/regenc.h +0 -223
  170. data/ext/did_you_mean/ruby_headers/214/regint.h +0 -911
  171. data/ext/did_you_mean/ruby_headers/214/regparse.h +0 -363
  172. data/ext/did_you_mean/ruby_headers/214/revision.h +0 -1
  173. data/ext/did_you_mean/ruby_headers/214/siphash.h +0 -48
  174. data/ext/did_you_mean/ruby_headers/214/timev.h +0 -42
  175. data/ext/did_you_mean/ruby_headers/214/transcode_data.h +0 -123
  176. data/ext/did_you_mean/ruby_headers/214/transdb.h +0 -190
  177. data/ext/did_you_mean/ruby_headers/214/verconf.h +0 -13
  178. data/ext/did_you_mean/ruby_headers/214/version.h +0 -52
  179. data/ext/did_you_mean/ruby_headers/214/vm_exec.h +0 -182
  180. data/ext/did_you_mean/ruby_headers/214/vm_insnhelper.h +0 -273
  181. data/ext/did_you_mean/ruby_headers/220/addr2line.h +0 -21
  182. data/ext/did_you_mean/ruby_headers/220/ccan/build_assert/build_assert.h +0 -40
  183. data/ext/did_you_mean/ruby_headers/220/ccan/licenses/BSD-MIT +0 -17
  184. data/ext/did_you_mean/ruby_headers/220/ccan/licenses/CC0 +0 -28
  185. data/ext/did_you_mean/ruby_headers/220/constant.h +0 -43
  186. data/ext/did_you_mean/ruby_headers/220/dln.h +0 -51
  187. data/ext/did_you_mean/ruby_headers/220/encdb.h +0 -170
  188. data/ext/did_you_mean/ruby_headers/220/eval_intern.h +0 -275
  189. data/ext/did_you_mean/ruby_headers/220/gc.h +0 -107
  190. data/ext/did_you_mean/ruby_headers/220/iseq.h +0 -157
  191. data/ext/did_you_mean/ruby_headers/220/parse.h +0 -183
  192. data/ext/did_you_mean/ruby_headers/220/probes.h +0 -83
  193. data/ext/did_you_mean/ruby_headers/220/probes_helper.h +0 -67
  194. data/ext/did_you_mean/ruby_headers/220/regenc.h +0 -234
  195. data/ext/did_you_mean/ruby_headers/220/regint.h +0 -972
  196. data/ext/did_you_mean/ruby_headers/220/regparse.h +0 -363
  197. data/ext/did_you_mean/ruby_headers/220/revision.h +0 -1
  198. data/ext/did_you_mean/ruby_headers/220/siphash.h +0 -48
  199. data/ext/did_you_mean/ruby_headers/220/timev.h +0 -42
  200. data/ext/did_you_mean/ruby_headers/220/transcode_data.h +0 -123
  201. data/ext/did_you_mean/ruby_headers/220/transdb.h +0 -190
  202. data/ext/did_you_mean/ruby_headers/220/verconf.h +0 -13
  203. data/ext/did_you_mean/ruby_headers/220/version.h +0 -53
  204. data/ext/did_you_mean/ruby_headers/220/vm_exec.h +0 -182
  205. data/ext/did_you_mean/ruby_headers/220/vm_insnhelper.h +0 -233
@@ -1,233 +0,0 @@
1
- /**********************************************************************
2
-
3
- insnhelper.h - helper macros to implement each instructions
4
-
5
- $Author$
6
- created at: 04/01/01 15:50:34 JST
7
-
8
- Copyright (C) 2004-2007 Koichi Sasada
9
-
10
- **********************************************************************/
11
-
12
- #ifndef RUBY_INSNHELPER_H
13
- #define RUBY_INSNHELPER_H
14
-
15
- /**
16
- * VM Debug Level
17
- *
18
- * debug level:
19
- * 0: no debug output
20
- * 1: show instruction name
21
- * 2: show stack frame when control stack frame is changed
22
- * 3: show stack status
23
- * 4: show register
24
- * 5:
25
- * 10: gc check
26
- */
27
-
28
- #ifndef VMDEBUG
29
- #define VMDEBUG 0
30
- #endif
31
-
32
- #if 0
33
- #undef VMDEBUG
34
- #define VMDEBUG 3
35
- #endif
36
-
37
- extern VALUE ruby_vm_const_missing_count;
38
-
39
- #if VM_COLLECT_USAGE_DETAILS
40
- #define COLLECT_USAGE_INSN(insn) vm_collect_usage_insn(insn)
41
- #define COLLECT_USAGE_OPERAND(insn, n, op) vm_collect_usage_operand((insn), (n), ((VALUE)(op)))
42
-
43
- #define COLLECT_USAGE_REGISTER(reg, s) vm_collect_usage_register((reg), (s))
44
- #else
45
- #define COLLECT_USAGE_INSN(insn) /* none */
46
- #define COLLECT_USAGE_OPERAND(insn, n, op) /* none */
47
- #define COLLECT_USAGE_REGISTER(reg, s) /* none */
48
- #endif
49
-
50
- /**********************************************************/
51
- /* deal with stack */
52
- /**********************************************************/
53
-
54
- #define PUSH(x) (SET_SV(x), INC_SP(1))
55
- #define TOPN(n) (*(GET_SP()-(n)-1))
56
- #define POPN(n) (DEC_SP(n))
57
- #define POP() (DEC_SP(1))
58
- #define STACK_ADDR_FROM_TOP(n) (GET_SP()-(n))
59
-
60
- #define GET_TOS() (tos) /* dummy */
61
-
62
- /**********************************************************/
63
- /* deal with registers */
64
- /**********************************************************/
65
-
66
- #define REG_CFP (reg_cfp)
67
- #define REG_PC (REG_CFP->pc)
68
- #define REG_SP (REG_CFP->sp)
69
- #define REG_EP (REG_CFP->ep)
70
-
71
- #define RESTORE_REGS() do { \
72
- REG_CFP = th->cfp; \
73
- } while (0)
74
-
75
- #define REG_A reg_a
76
- #define REG_B reg_b
77
-
78
- enum vm_regan_regtype {
79
- VM_REGAN_PC = 0,
80
- VM_REGAN_SP = 1,
81
- VM_REGAN_EP = 2,
82
- VM_REGAN_CFP = 3,
83
- VM_REGAN_SELF = 4,
84
- VM_REGAN_ISEQ = 5,
85
- };
86
- enum vm_regan_acttype {
87
- VM_REGAN_ACT_GET = 0,
88
- VM_REGAN_ACT_SET = 1,
89
- };
90
-
91
- #if VM_COLLECT_USAGE_DETAILS
92
- #define COLLECT_USAGE_REGISTER_HELPER(a, b, v) \
93
- (COLLECT_USAGE_REGISTER((VM_REGAN_##a), (VM_REGAN_ACT_##b)), (v))
94
- #else
95
- #define COLLECT_USAGE_REGISTER_HELPER(a, b, v) (v)
96
- #endif
97
-
98
- /* PC */
99
- #define GET_PC() (COLLECT_USAGE_REGISTER_HELPER(PC, GET, REG_PC))
100
- #define SET_PC(x) (REG_PC = (COLLECT_USAGE_REGISTER_HELPER(PC, SET, (x))))
101
- #define GET_CURRENT_INSN() (*GET_PC())
102
- #define GET_OPERAND(n) (GET_PC()[(n)])
103
- #define ADD_PC(n) (SET_PC(REG_PC + (n)))
104
-
105
- #define GET_PC_COUNT() (REG_PC - GET_ISEQ()->iseq_encoded)
106
- #define JUMP(dst) (REG_PC += (dst))
107
-
108
- /* frame pointer, environment pointer */
109
- #define GET_CFP() (COLLECT_USAGE_REGISTER_HELPER(CFP, GET, REG_CFP))
110
- #define GET_EP() (COLLECT_USAGE_REGISTER_HELPER(EP, GET, REG_EP))
111
- #define SET_EP(x) (REG_EP = (COLLECT_USAGE_REGISTER_HELPER(EP, SET, (x))))
112
- #define GET_LEP() (VM_EP_LEP(GET_EP()))
113
-
114
- /* SP */
115
- #define GET_SP() (COLLECT_USAGE_REGISTER_HELPER(SP, GET, REG_SP))
116
- #define SET_SP(x) (REG_SP = (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
117
- #define INC_SP(x) (REG_SP += (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
118
- #define DEC_SP(x) (REG_SP -= (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
119
- #define SET_SV(x) (*GET_SP() = (x))
120
- /* set current stack value as x */
121
-
122
- #define GET_SP_COUNT() (REG_SP - th->stack)
123
-
124
- /* instruction sequence C struct */
125
- #define GET_ISEQ() (GET_CFP()->iseq)
126
-
127
- /**********************************************************/
128
- /* deal with variables */
129
- /**********************************************************/
130
-
131
- #define GET_PREV_EP(ep) ((VALUE *)((ep)[0] & ~0x03))
132
-
133
- #define GET_GLOBAL(entry) rb_gvar_get((struct rb_global_entry*)(entry))
134
- #define SET_GLOBAL(entry, val) rb_gvar_set((struct rb_global_entry*)(entry), (val))
135
-
136
- #define GET_CONST_INLINE_CACHE(dst) ((IC) * (GET_PC() + (dst) + 2))
137
-
138
- /**********************************************************/
139
- /* deal with values */
140
- /**********************************************************/
141
-
142
- #define GET_SELF() (COLLECT_USAGE_REGISTER_HELPER(SELF, GET, GET_CFP()->self))
143
-
144
- /**********************************************************/
145
- /* deal with control flow 2: method/iterator */
146
- /**********************************************************/
147
-
148
- #define COPY_CREF_OMOD(c1, c2) do { \
149
- RB_OBJ_WRITE((c1), &(c1)->nd_refinements, (c2)->nd_refinements); \
150
- if (!NIL_P((c2)->nd_refinements)) { \
151
- (c1)->flags |= NODE_FL_CREF_OMOD_SHARED; \
152
- (c2)->flags |= NODE_FL_CREF_OMOD_SHARED; \
153
- } \
154
- } while (0)
155
-
156
- #define COPY_CREF(c1, c2) do { \
157
- NODE *__tmp_c2 = (c2); \
158
- COPY_CREF_OMOD(c1, __tmp_c2); \
159
- RB_OBJ_WRITE((c1), &(c1)->nd_clss, __tmp_c2->nd_clss); \
160
- (c1)->nd_visi = __tmp_c2->nd_visi;\
161
- RB_OBJ_WRITE((c1), &(c1)->nd_next, __tmp_c2->nd_next); \
162
- if (__tmp_c2->flags & NODE_FL_CREF_PUSHED_BY_EVAL) { \
163
- (c1)->flags |= NODE_FL_CREF_PUSHED_BY_EVAL; \
164
- } \
165
- } while (0)
166
-
167
- #define CALL_METHOD(ci) do { \
168
- VALUE v = (*(ci)->call)(th, GET_CFP(), (ci)); \
169
- if (v == Qundef) { \
170
- RESTORE_REGS(); \
171
- NEXT_INSN(); \
172
- } \
173
- else { \
174
- val = v; \
175
- } \
176
- } while (0)
177
-
178
- /* set fastpath when cached method is *NOT* protected
179
- * because inline method cache does not care about receiver.
180
- */
181
-
182
- #ifndef OPT_CALL_FASTPATH
183
- #define OPT_CALL_FASTPATH 1
184
- #endif
185
-
186
- #if OPT_CALL_FASTPATH
187
- #define CI_SET_FASTPATH(ci, func, enabled) do { \
188
- if (LIKELY(enabled)) ((ci)->call = (func)); \
189
- } while (0)
190
- #else
191
- #define CI_SET_FASTPATH(ci, func, enabled) /* do nothing */
192
- #endif
193
-
194
- #define GET_BLOCK_PTR() ((rb_block_t *)(GC_GUARDED_PTR_REF(GET_LEP()[0])))
195
-
196
- /**********************************************************/
197
- /* deal with control flow 3: exception */
198
- /**********************************************************/
199
-
200
-
201
- /**********************************************************/
202
- /* others */
203
- /**********************************************************/
204
-
205
- /* optimize insn */
206
- #define FIXNUM_2_P(a, b) ((a) & (b) & 1)
207
- #if USE_FLONUM
208
- #define FLONUM_2_P(a, b) (((((a)^2) | ((b)^2)) & 3) == 0) /* (FLONUM_P(a) && FLONUM_P(b)) */
209
- #else
210
- #define FLONUM_2_P(a, b) 0
211
- #endif
212
-
213
- #ifndef USE_IC_FOR_SPECIALIZED_METHOD
214
- #define USE_IC_FOR_SPECIALIZED_METHOD 1
215
- #endif
216
-
217
- #define CALL_SIMPLE_METHOD(recv_) do { \
218
- ci->blockptr = 0; ci->argc = ci->orig_argc; \
219
- vm_search_method(ci, ci->recv = (recv_)); \
220
- CALL_METHOD(ci); \
221
- } while (0)
222
-
223
- #define NEXT_CLASS_SERIAL() (++ruby_vm_class_serial)
224
- #define GET_GLOBAL_METHOD_STATE() (ruby_vm_global_method_state)
225
- #define INC_GLOBAL_METHOD_STATE() (++ruby_vm_global_method_state)
226
- #define GET_GLOBAL_CONSTANT_STATE() (ruby_vm_global_constant_state)
227
- #define INC_GLOBAL_CONSTANT_STATE() (++ruby_vm_global_constant_state)
228
-
229
- static VALUE make_no_method_exception(VALUE exc, const char *format,
230
- VALUE obj, int argc, const VALUE *argv);
231
-
232
-
233
- #endif /* RUBY_INSNHELPER_H */