debase-ruby_core_source 0.10.9 → 0.10.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/README.md +1 -1
  4. data/debase-ruby_core_source.gemspec +3 -2
  5. data/lib/debase/ruby_core_source.rb +0 -2
  6. data/lib/debase/ruby_core_source/version.rb +1 -1
  7. metadata +22 -113
  8. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/addr2line.h +0 -21
  9. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/ccan/build_assert/build_assert.h +0 -40
  10. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/ccan/check_type/check_type.h +0 -63
  11. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/ccan/container_of/container_of.h +0 -142
  12. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/ccan/list/list.h +0 -788
  13. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/ccan/str/str.h +0 -16
  14. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/constant.h +0 -54
  15. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/debug_counter.h +0 -378
  16. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/dln.h +0 -51
  17. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/encindex.h +0 -69
  18. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/eval_intern.h +0 -314
  19. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/gc.h +0 -129
  20. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/hrtime.h +0 -168
  21. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/id.h +0 -292
  22. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/id_table.h +0 -34
  23. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/insns.inc +0 -249
  24. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/insns_info.inc +0 -9614
  25. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/internal.h +0 -2682
  26. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/iseq.h +0 -312
  27. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/known_errors.inc +0 -791
  28. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/method.h +0 -232
  29. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/mjit.h +0 -179
  30. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/mjit_compile.inc +0 -7883
  31. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/node.h +0 -483
  32. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/node_name.inc +0 -210
  33. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/opt_sc.inc +0 -109
  34. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/optinsn.inc +0 -128
  35. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/optunifs.inc +0 -43
  36. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/parse.h +0 -210
  37. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/probes_helper.h +0 -42
  38. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/regenc.h +0 -254
  39. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/regint.h +0 -938
  40. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/regparse.h +0 -370
  41. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/revision.h +0 -2
  42. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/ruby_assert.h +0 -15
  43. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/ruby_atomic.h +0 -244
  44. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/siphash.h +0 -48
  45. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/symbol.h +0 -119
  46. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/thread_pthread.h +0 -75
  47. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/thread_win32.h +0 -36
  48. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/timev.h +0 -56
  49. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/transcode_data.h +0 -139
  50. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/transient_heap.h +0 -62
  51. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/version.h +0 -77
  52. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/vm.inc +0 -5269
  53. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/vm_call_iseq_optimized.inc +0 -237
  54. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/vm_core.h +0 -1955
  55. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/vm_debug.h +0 -34
  56. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/vm_exec.h +0 -193
  57. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/vm_insnhelper.h +0 -255
  58. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/vm_opts.h +0 -70
  59. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/vmtc.inc +0 -243
  60. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/addr2line.h +0 -21
  61. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/builtin.h +0 -68
  62. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/ccan/build_assert/build_assert.h +0 -40
  63. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/ccan/check_type/check_type.h +0 -63
  64. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/ccan/container_of/container_of.h +0 -142
  65. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/ccan/list/list.h +0 -788
  66. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/ccan/str/str.h +0 -16
  67. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/constant.h +0 -50
  68. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/debug_counter.h +0 -378
  69. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/dln.h +0 -51
  70. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/encindex.h +0 -69
  71. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/eval_intern.h +0 -311
  72. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/gc.h +0 -129
  73. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/hrtime.h +0 -168
  74. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/id.h +0 -290
  75. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/id_table.h +0 -34
  76. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/insns.inc +0 -253
  77. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/insns_info.inc +0 -9196
  78. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/internal.h +0 -2657
  79. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/iseq.h +0 -311
  80. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/known_errors.inc +0 -791
  81. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/method.h +0 -228
  82. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/mjit.h +0 -175
  83. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/mjit_compile.inc +0 -7782
  84. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/node.h +0 -476
  85. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/node_name.inc +0 -208
  86. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/opt_sc.inc +0 -109
  87. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/optinsn.inc +0 -128
  88. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/optunifs.inc +0 -43
  89. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/parse.h +0 -210
  90. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/probes_helper.h +0 -42
  91. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/regenc.h +0 -254
  92. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/regint.h +0 -938
  93. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/regparse.h +0 -370
  94. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/revision.h +0 -2
  95. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/ruby_assert.h +0 -15
  96. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/ruby_atomic.h +0 -244
  97. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/siphash.h +0 -48
  98. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/symbol.h +0 -119
  99. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/thread_pthread.h +0 -75
  100. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/thread_win32.h +0 -36
  101. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/timev.h +0 -56
  102. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/transcode_data.h +0 -139
  103. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/transient_heap.h +0 -62
  104. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/version.h +0 -77
  105. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/vm.inc +0 -5319
  106. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/vm_call_iseq_optimized.inc +0 -237
  107. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/vm_core.h +0 -1957
  108. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/vm_debug.h +0 -34
  109. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/vm_exec.h +0 -193
  110. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/vm_insnhelper.h +0 -255
  111. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/vm_opts.h +0 -72
  112. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/vmtc.inc +0 -247
@@ -1,476 +0,0 @@
1
- /**********************************************************************
2
-
3
- node.h -
4
-
5
- $Author$
6
- created at: Fri May 28 15:14:02 JST 1993
7
-
8
- Copyright (C) 1993-2007 Yukihiro Matsumoto
9
-
10
- **********************************************************************/
11
-
12
- #ifndef RUBY_NODE_H
13
- #define RUBY_NODE_H 1
14
-
15
- #if defined(__cplusplus)
16
- extern "C" {
17
- #if 0
18
- } /* satisfy cc-mode */
19
- #endif
20
- #endif
21
-
22
- enum node_type {
23
- NODE_SCOPE,
24
- NODE_BLOCK,
25
- NODE_IF,
26
- NODE_UNLESS,
27
- NODE_CASE,
28
- NODE_CASE2,
29
- NODE_CASE3,
30
- NODE_WHEN,
31
- NODE_IN,
32
- NODE_WHILE,
33
- NODE_UNTIL,
34
- NODE_ITER,
35
- NODE_FOR,
36
- NODE_FOR_MASGN,
37
- NODE_BREAK,
38
- NODE_NEXT,
39
- NODE_REDO,
40
- NODE_RETRY,
41
- NODE_BEGIN,
42
- NODE_RESCUE,
43
- NODE_RESBODY,
44
- NODE_ENSURE,
45
- NODE_AND,
46
- NODE_OR,
47
- NODE_MASGN,
48
- NODE_LASGN,
49
- NODE_DASGN,
50
- NODE_DASGN_CURR,
51
- NODE_GASGN,
52
- NODE_IASGN,
53
- NODE_CDECL,
54
- NODE_CVASGN,
55
- NODE_OP_ASGN1,
56
- NODE_OP_ASGN2,
57
- NODE_OP_ASGN_AND,
58
- NODE_OP_ASGN_OR,
59
- NODE_OP_CDECL,
60
- NODE_CALL,
61
- NODE_OPCALL,
62
- NODE_FCALL,
63
- NODE_VCALL,
64
- NODE_QCALL,
65
- NODE_SUPER,
66
- NODE_ZSUPER,
67
- NODE_LIST,
68
- NODE_ZLIST,
69
- NODE_VALUES,
70
- NODE_HASH,
71
- NODE_RETURN,
72
- NODE_YIELD,
73
- NODE_LVAR,
74
- NODE_DVAR,
75
- NODE_GVAR,
76
- NODE_IVAR,
77
- NODE_CONST,
78
- NODE_CVAR,
79
- NODE_NTH_REF,
80
- NODE_BACK_REF,
81
- NODE_MATCH,
82
- NODE_MATCH2,
83
- NODE_MATCH3,
84
- NODE_LIT,
85
- NODE_STR,
86
- NODE_DSTR,
87
- NODE_XSTR,
88
- NODE_DXSTR,
89
- NODE_EVSTR,
90
- NODE_DREGX,
91
- NODE_ONCE,
92
- NODE_ARGS,
93
- NODE_ARGS_AUX,
94
- NODE_OPT_ARG,
95
- NODE_KW_ARG,
96
- NODE_POSTARG,
97
- NODE_ARGSCAT,
98
- NODE_ARGSPUSH,
99
- NODE_SPLAT,
100
- NODE_BLOCK_PASS,
101
- NODE_DEFN,
102
- NODE_DEFS,
103
- NODE_ALIAS,
104
- NODE_VALIAS,
105
- NODE_UNDEF,
106
- NODE_CLASS,
107
- NODE_MODULE,
108
- NODE_SCLASS,
109
- NODE_COLON2,
110
- NODE_COLON3,
111
- NODE_DOT2,
112
- NODE_DOT3,
113
- NODE_FLIP2,
114
- NODE_FLIP3,
115
- NODE_SELF,
116
- NODE_NIL,
117
- NODE_TRUE,
118
- NODE_FALSE,
119
- NODE_ERRINFO,
120
- NODE_DEFINED,
121
- NODE_POSTEXE,
122
- NODE_DSYM,
123
- NODE_ATTRASGN,
124
- NODE_LAMBDA,
125
- NODE_ARYPTN,
126
- NODE_HSHPTN,
127
- NODE_LAST
128
- };
129
-
130
- typedef struct rb_code_position_struct {
131
- int lineno;
132
- int column;
133
- } rb_code_position_t;
134
-
135
- typedef struct rb_code_location_struct {
136
- rb_code_position_t beg_pos;
137
- rb_code_position_t end_pos;
138
- } rb_code_location_t;
139
-
140
- static inline rb_code_location_t
141
- code_loc_gen(rb_code_location_t *loc1, rb_code_location_t *loc2)
142
- {
143
- rb_code_location_t loc;
144
- loc.beg_pos = loc1->beg_pos;
145
- loc.end_pos = loc2->end_pos;
146
- return loc;
147
- }
148
-
149
- typedef struct RNode {
150
- VALUE flags;
151
- union {
152
- struct RNode *node;
153
- ID id;
154
- VALUE value;
155
- ID *tbl;
156
- } u1;
157
- union {
158
- struct RNode *node;
159
- ID id;
160
- long argc;
161
- VALUE value;
162
- } u2;
163
- union {
164
- struct RNode *node;
165
- ID id;
166
- long state;
167
- struct rb_global_entry *entry;
168
- struct rb_args_info *args;
169
- struct rb_ary_pattern_info *apinfo;
170
- VALUE value;
171
- } u3;
172
- rb_code_location_t nd_loc;
173
- int node_id;
174
- } NODE;
175
-
176
- #define RNODE(obj) (R_CAST(RNode)(obj))
177
-
178
- /* FL : 0..4: T_TYPES, 5: KEEP_WB, 6: PROMOTED, 7: FINALIZE, 8: UNUSED, 9: UNUSED, 10: EXIVAR, 11: FREEZE */
179
- /* NODE_FL: 0..4: T_TYPES, 5: KEEP_WB, 6: PROMOTED, 7: NODE_FL_NEWLINE,
180
- * 8..14: nd_type,
181
- * 15..: nd_line
182
- */
183
- #define NODE_FL_NEWLINE (((VALUE)1)<<7)
184
-
185
- #define NODE_TYPESHIFT 8
186
- #define NODE_TYPEMASK (((VALUE)0x7f)<<NODE_TYPESHIFT)
187
-
188
- #define nd_type(n) ((int) (((n)->flags & NODE_TYPEMASK)>>NODE_TYPESHIFT))
189
- #define nd_set_type(n,t) \
190
- (n)->flags=(((n)->flags&~NODE_TYPEMASK)|((((unsigned long)(t))<<NODE_TYPESHIFT)&NODE_TYPEMASK))
191
-
192
- #define NODE_LSHIFT (NODE_TYPESHIFT+7)
193
- #define NODE_LMASK (((SIGNED_VALUE)1<<(sizeof(VALUE)*CHAR_BIT-NODE_LSHIFT))-1)
194
- #define nd_line(n) (int)(((SIGNED_VALUE)(n)->flags)>>NODE_LSHIFT)
195
- #define nd_set_line(n,l) \
196
- (n)->flags=(((n)->flags&~((VALUE)(-1)<<NODE_LSHIFT))|((VALUE)((l)&NODE_LMASK)<<NODE_LSHIFT))
197
-
198
- #define nd_first_column(n) ((int)((n)->nd_loc.beg_pos.column))
199
- #define nd_set_first_column(n, v) ((n)->nd_loc.beg_pos.column = (v))
200
- #define nd_first_lineno(n) ((int)((n)->nd_loc.beg_pos.lineno))
201
- #define nd_set_first_lineno(n, v) ((n)->nd_loc.beg_pos.lineno = (v))
202
- #define nd_first_loc(n) ((n)->nd_loc.beg_pos)
203
- #define nd_set_first_loc(n, v) (nd_first_loc(n) = (v))
204
-
205
- #define nd_last_column(n) ((int)((n)->nd_loc.end_pos.column))
206
- #define nd_set_last_column(n, v) ((n)->nd_loc.end_pos.column = (v))
207
- #define nd_last_lineno(n) ((int)((n)->nd_loc.end_pos.lineno))
208
- #define nd_set_last_lineno(n, v) ((n)->nd_loc.end_pos.lineno = (v))
209
- #define nd_last_loc(n) ((n)->nd_loc.end_pos)
210
- #define nd_set_last_loc(n, v) (nd_last_loc(n) = (v))
211
- #define nd_node_id(n) ((n)->node_id)
212
- #define nd_set_node_id(n,id) ((n)->node_id = (id))
213
-
214
- #define nd_head u1.node
215
- #define nd_alen u2.argc
216
- #define nd_next u3.node
217
-
218
- #define nd_cond u1.node
219
- #define nd_body u2.node
220
- #define nd_else u3.node
221
-
222
- #define nd_resq u2.node
223
- #define nd_ensr u3.node
224
-
225
- #define nd_1st u1.node
226
- #define nd_2nd u2.node
227
-
228
- #define nd_stts u1.node
229
-
230
- #define nd_entry u3.entry
231
- #define nd_vid u1.id
232
- #define nd_cflag u2.id
233
- #define nd_cval u3.value
234
-
235
- #define nd_oid u1.id
236
- #define nd_tbl u1.tbl
237
-
238
- #define nd_var u1.node
239
- #define nd_iter u3.node
240
-
241
- #define nd_value u2.node
242
- #define nd_aid u3.id
243
-
244
- #define nd_lit u1.value
245
-
246
- #define nd_rest u1.id
247
- #define nd_opt u1.node
248
- #define nd_pid u1.id
249
- #define nd_plen u2.argc
250
-
251
- #define nd_recv u1.node
252
- #define nd_mid u2.id
253
- #define nd_args u3.node
254
- #define nd_ainfo u3.args
255
-
256
- #define nd_defn u3.node
257
-
258
- #define nd_cpath u1.node
259
- #define nd_super u3.node
260
-
261
- #define nd_beg u1.node
262
- #define nd_end u2.node
263
- #define nd_state u3.state
264
- #define nd_rval u2.value
265
-
266
- #define nd_nth u2.argc
267
-
268
- #define nd_tag u1.id
269
-
270
- #define nd_alias u1.id
271
- #define nd_orig u2.id
272
- #define nd_undef u2.node
273
-
274
- #define nd_brace u2.argc
275
-
276
- #define nd_pconst u1.node
277
- #define nd_pkwargs u2.node
278
- #define nd_pkwrestarg u3.node
279
-
280
- #define nd_apinfo u3.apinfo
281
-
282
- #define NEW_NODE(t,a0,a1,a2,loc) rb_node_newnode((t),(VALUE)(a0),(VALUE)(a1),(VALUE)(a2),loc)
283
- #define NEW_NODE_WITH_LOCALS(t,a1,a2,loc) node_newnode_with_locals(p, (t),(VALUE)(a1),(VALUE)(a2),loc)
284
-
285
- #define NEW_DEFN(i,a,d,loc) NEW_NODE(NODE_DEFN,0,i,NEW_SCOPE(a,d,loc),loc)
286
- #define NEW_DEFS(r,i,a,d,loc) NEW_NODE(NODE_DEFS,r,i,NEW_SCOPE(a,d,loc),loc)
287
- #define NEW_SCOPE(a,b,loc) NEW_NODE_WITH_LOCALS(NODE_SCOPE,b,a,loc)
288
- #define NEW_BLOCK(a,loc) NEW_NODE(NODE_BLOCK,a,0,0,loc)
289
- #define NEW_IF(c,t,e,loc) NEW_NODE(NODE_IF,c,t,e,loc)
290
- #define NEW_UNLESS(c,t,e,loc) NEW_NODE(NODE_UNLESS,c,t,e,loc)
291
- #define NEW_CASE(h,b,loc) NEW_NODE(NODE_CASE,h,b,0,loc)
292
- #define NEW_CASE2(b,loc) NEW_NODE(NODE_CASE2,0,b,0,loc)
293
- #define NEW_CASE3(h,b,loc) NEW_NODE(NODE_CASE3,h,b,0,loc)
294
- #define NEW_WHEN(c,t,e,loc) NEW_NODE(NODE_WHEN,c,t,e,loc)
295
- #define NEW_IN(c,t,e,loc) NEW_NODE(NODE_IN,c,t,e,loc)
296
- #define NEW_WHILE(c,b,n,loc) NEW_NODE(NODE_WHILE,c,b,n,loc)
297
- #define NEW_UNTIL(c,b,n,loc) NEW_NODE(NODE_UNTIL,c,b,n,loc)
298
- #define NEW_FOR(i,b,loc) NEW_NODE(NODE_FOR,0,b,i,loc)
299
- #define NEW_FOR_MASGN(v,loc) NEW_NODE(NODE_FOR_MASGN,v,0,0,loc)
300
- #define NEW_ITER(a,b,loc) NEW_NODE(NODE_ITER,0,NEW_SCOPE(a,b,loc),0,loc)
301
- #define NEW_LAMBDA(a,b,loc) NEW_NODE(NODE_LAMBDA,0,NEW_SCOPE(a,b,loc),0,loc)
302
- #define NEW_BREAK(s,loc) NEW_NODE(NODE_BREAK,s,0,0,loc)
303
- #define NEW_NEXT(s,loc) NEW_NODE(NODE_NEXT,s,0,0,loc)
304
- #define NEW_REDO(loc) NEW_NODE(NODE_REDO,0,0,0,loc)
305
- #define NEW_RETRY(loc) NEW_NODE(NODE_RETRY,0,0,0,loc)
306
- #define NEW_BEGIN(b,loc) NEW_NODE(NODE_BEGIN,0,b,0,loc)
307
- #define NEW_RESCUE(b,res,e,loc) NEW_NODE(NODE_RESCUE,b,res,e,loc)
308
- #define NEW_RESBODY(a,ex,n,loc) NEW_NODE(NODE_RESBODY,n,ex,a,loc)
309
- #define NEW_ENSURE(b,en,loc) NEW_NODE(NODE_ENSURE,b,0,en,loc)
310
- #define NEW_RETURN(s,loc) NEW_NODE(NODE_RETURN,s,0,0,loc)
311
- #define NEW_YIELD(a,loc) NEW_NODE(NODE_YIELD,a,0,0,loc)
312
- #define NEW_LIST(a,loc) NEW_NODE(NODE_LIST,a,1,0,loc)
313
- #define NEW_ZLIST(loc) NEW_NODE(NODE_ZLIST,0,0,0,loc)
314
- #define NEW_HASH(a,loc) NEW_NODE(NODE_HASH,a,0,0,loc)
315
- #define NEW_MASGN(l,r,loc) NEW_NODE(NODE_MASGN,l,0,r,loc)
316
- #define NEW_GASGN(v,val,loc) NEW_NODE(NODE_GASGN,v,val,rb_global_entry(v),loc)
317
- #define NEW_LASGN(v,val,loc) NEW_NODE(NODE_LASGN,v,val,0,loc)
318
- #define NEW_DASGN(v,val,loc) NEW_NODE(NODE_DASGN,v,val,0,loc)
319
- #define NEW_DASGN_CURR(v,val,loc) NEW_NODE(NODE_DASGN_CURR,v,val,0,loc)
320
- #define NEW_IASGN(v,val,loc) NEW_NODE(NODE_IASGN,v,val,0,loc)
321
- #define NEW_CDECL(v,val,path,loc) NEW_NODE(NODE_CDECL,v,val,path,loc)
322
- #define NEW_CVASGN(v,val,loc) NEW_NODE(NODE_CVASGN,v,val,0,loc)
323
- #define NEW_OP_ASGN1(p,id,a,loc) NEW_NODE(NODE_OP_ASGN1,p,id,a,loc)
324
- #define NEW_OP_ASGN2(r,t,i,o,val,loc) NEW_NODE(NODE_OP_ASGN2,r,val,NEW_OP_ASGN22(i,o,t,loc),loc)
325
- #define NEW_OP_ASGN22(i,o,t,loc) NEW_NODE(NODE_OP_ASGN2,i,o,t,loc)
326
- #define NEW_OP_ASGN_OR(i,val,loc) NEW_NODE(NODE_OP_ASGN_OR,i,val,0,loc)
327
- #define NEW_OP_ASGN_AND(i,val,loc) NEW_NODE(NODE_OP_ASGN_AND,i,val,0,loc)
328
- #define NEW_OP_CDECL(v,op,val,loc) NEW_NODE(NODE_OP_CDECL,v,val,op,loc)
329
- #define NEW_GVAR(v,loc) NEW_NODE(NODE_GVAR,v,0,rb_global_entry(v),loc)
330
- #define NEW_LVAR(v,loc) NEW_NODE(NODE_LVAR,v,0,0,loc)
331
- #define NEW_DVAR(v,loc) NEW_NODE(NODE_DVAR,v,0,0,loc)
332
- #define NEW_IVAR(v,loc) NEW_NODE(NODE_IVAR,v,0,0,loc)
333
- #define NEW_CONST(v,loc) NEW_NODE(NODE_CONST,v,0,0,loc)
334
- #define NEW_CVAR(v,loc) NEW_NODE(NODE_CVAR,v,0,0,loc)
335
- #define NEW_NTH_REF(n,loc) NEW_NODE(NODE_NTH_REF,0,n,0,loc)
336
- #define NEW_BACK_REF(n,loc) NEW_NODE(NODE_BACK_REF,0,n,0,loc)
337
- #define NEW_MATCH(c,loc) NEW_NODE(NODE_MATCH,c,0,0,loc)
338
- #define NEW_MATCH2(n1,n2,loc) NEW_NODE(NODE_MATCH2,n1,n2,0,loc)
339
- #define NEW_MATCH3(r,n2,loc) NEW_NODE(NODE_MATCH3,r,n2,0,loc)
340
- #define NEW_LIT(l,loc) NEW_NODE(NODE_LIT,l,0,0,loc)
341
- #define NEW_STR(s,loc) NEW_NODE(NODE_STR,s,0,0,loc)
342
- #define NEW_DSTR(s,loc) NEW_NODE(NODE_DSTR,s,1,0,loc)
343
- #define NEW_XSTR(s,loc) NEW_NODE(NODE_XSTR,s,0,0,loc)
344
- #define NEW_DXSTR(s,loc) NEW_NODE(NODE_DXSTR,s,0,0,loc)
345
- #define NEW_DSYM(s,loc) NEW_NODE(NODE_DSYM,s,0,0,loc)
346
- #define NEW_EVSTR(n,loc) NEW_NODE(NODE_EVSTR,0,(n),0,loc)
347
- #define NEW_CALL(r,m,a,loc) NEW_NODE(NODE_CALL,r,m,a,loc)
348
- #define NEW_OPCALL(r,m,a,loc) NEW_NODE(NODE_OPCALL,r,m,a,loc)
349
- #define NEW_FCALL(m,a,loc) NEW_NODE(NODE_FCALL,0,m,a,loc)
350
- #define NEW_VCALL(m,loc) NEW_NODE(NODE_VCALL,0,m,0,loc)
351
- #define NEW_SUPER(a,loc) NEW_NODE(NODE_SUPER,0,0,a,loc)
352
- #define NEW_ZSUPER(loc) NEW_NODE(NODE_ZSUPER,0,0,0,loc)
353
- #define NEW_ARGS_AUX(r,b,loc) NEW_NODE(NODE_ARGS_AUX,r,b,0,loc)
354
- #define NEW_OPT_ARG(i,v,loc) NEW_NODE(NODE_OPT_ARG,i,v,0,loc)
355
- #define NEW_KW_ARG(i,v,loc) NEW_NODE(NODE_KW_ARG,i,v,0,loc)
356
- #define NEW_POSTARG(i,v,loc) NEW_NODE(NODE_POSTARG,i,v,0,loc)
357
- #define NEW_ARGSCAT(a,b,loc) NEW_NODE(NODE_ARGSCAT,a,b,0,loc)
358
- #define NEW_ARGSPUSH(a,b,loc) NEW_NODE(NODE_ARGSPUSH,a,b,0,loc)
359
- #define NEW_SPLAT(a,loc) NEW_NODE(NODE_SPLAT,a,0,0,loc)
360
- #define NEW_BLOCK_PASS(b,loc) NEW_NODE(NODE_BLOCK_PASS,0,b,0,loc)
361
- #define NEW_ALIAS(n,o,loc) NEW_NODE(NODE_ALIAS,n,o,0,loc)
362
- #define NEW_VALIAS(n,o,loc) NEW_NODE(NODE_VALIAS,n,o,0,loc)
363
- #define NEW_UNDEF(i,loc) NEW_NODE(NODE_UNDEF,0,i,0,loc)
364
- #define NEW_CLASS(n,b,s,loc) NEW_NODE(NODE_CLASS,n,NEW_SCOPE(0,b,loc),(s),loc)
365
- #define NEW_SCLASS(r,b,loc) NEW_NODE(NODE_SCLASS,r,NEW_SCOPE(0,b,loc),0,loc)
366
- #define NEW_MODULE(n,b,loc) NEW_NODE(NODE_MODULE,n,NEW_SCOPE(0,b,loc),0,loc)
367
- #define NEW_COLON2(c,i,loc) NEW_NODE(NODE_COLON2,c,i,0,loc)
368
- #define NEW_COLON3(i,loc) NEW_NODE(NODE_COLON3,0,i,0,loc)
369
- #define NEW_DOT2(b,e,loc) NEW_NODE(NODE_DOT2,b,e,0,loc)
370
- #define NEW_DOT3(b,e,loc) NEW_NODE(NODE_DOT3,b,e,0,loc)
371
- #define NEW_SELF(loc) NEW_NODE(NODE_SELF,0,0,1,loc)
372
- #define NEW_NIL(loc) NEW_NODE(NODE_NIL,0,0,0,loc)
373
- #define NEW_TRUE(loc) NEW_NODE(NODE_TRUE,0,0,0,loc)
374
- #define NEW_FALSE(loc) NEW_NODE(NODE_FALSE,0,0,0,loc)
375
- #define NEW_ERRINFO(loc) NEW_NODE(NODE_ERRINFO,0,0,0,loc)
376
- #define NEW_DEFINED(e,loc) NEW_NODE(NODE_DEFINED,e,0,0,loc)
377
- #define NEW_PREEXE(b,loc) NEW_SCOPE(b,loc)
378
- #define NEW_POSTEXE(b,loc) NEW_NODE(NODE_POSTEXE,0,b,0,loc)
379
- #define NEW_ATTRASGN(r,m,a,loc) NEW_NODE(NODE_ATTRASGN,r,m,a,loc)
380
-
381
- #define NODE_SPECIAL_REQUIRED_KEYWORD ((NODE *)-1)
382
- #define NODE_REQUIRED_KEYWORD_P(node) ((node)->nd_value == NODE_SPECIAL_REQUIRED_KEYWORD)
383
- #define NODE_SPECIAL_NO_NAME_REST ((NODE *)-1)
384
- #define NODE_NAMED_REST_P(node) ((node) != NODE_SPECIAL_NO_NAME_REST)
385
- #define NODE_SPECIAL_EXCESSIVE_COMMA ((ID)1)
386
- #define NODE_SPECIAL_NO_REST_KEYWORD ((NODE *)-1)
387
-
388
- VALUE rb_node_case_when_optimizable_literal(const NODE *const node);
389
-
390
- RUBY_SYMBOL_EXPORT_BEGIN
391
-
392
- typedef struct node_buffer_struct node_buffer_t;
393
- /* T_IMEMO/ast */
394
- typedef struct rb_ast_body_struct {
395
- const NODE *root;
396
- VALUE compile_option;
397
- int line_count;
398
- } rb_ast_body_t;
399
- typedef struct rb_ast_struct {
400
- VALUE flags;
401
- node_buffer_t *node_buffer;
402
- rb_ast_body_t body;
403
- } rb_ast_t;
404
- rb_ast_t *rb_ast_new(void);
405
- void rb_ast_mark(rb_ast_t*);
406
- void rb_ast_update_references(rb_ast_t*);
407
- void rb_ast_dispose(rb_ast_t*);
408
- void rb_ast_free(rb_ast_t*);
409
- size_t rb_ast_memsize(const rb_ast_t*);
410
- void rb_ast_add_mark_object(rb_ast_t*, VALUE);
411
- NODE *rb_ast_newnode(rb_ast_t*, enum node_type type);
412
- void rb_ast_delete_node(rb_ast_t*, NODE *n);
413
-
414
- VALUE rb_parser_new(void);
415
- VALUE rb_parser_end_seen_p(VALUE);
416
- VALUE rb_parser_encoding(VALUE);
417
- VALUE rb_parser_set_yydebug(VALUE, VALUE);
418
- VALUE rb_parser_dump_tree(const NODE *node, int comment);
419
- void rb_parser_set_options(VALUE, int, int, int, int);
420
-
421
- rb_ast_t *rb_parser_compile_string(VALUE, const char*, VALUE, int);
422
- rb_ast_t *rb_parser_compile_string_path(VALUE vparser, VALUE fname, VALUE src, int line);
423
- rb_ast_t *rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE input, int line);
424
- rb_ast_t *rb_parser_compile_generic(VALUE vparser, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int line);
425
-
426
- void rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2);
427
- const char *ruby_node_name(int node);
428
-
429
- const struct kwtable *rb_reserved_word(const char *, unsigned int);
430
-
431
- struct rb_args_info {
432
- NODE *pre_init;
433
- NODE *post_init;
434
-
435
- int pre_args_num; /* count of mandatory pre-arguments */
436
- int post_args_num; /* count of mandatory post-arguments */
437
-
438
- ID first_post_arg;
439
-
440
- ID rest_arg;
441
- ID block_arg;
442
-
443
- NODE *kw_args;
444
- NODE *kw_rest_arg;
445
-
446
- NODE *opt_args;
447
- unsigned int no_kwarg: 1;
448
- unsigned int ruby2_keywords: 1;
449
-
450
- VALUE imemo;
451
- };
452
-
453
- struct rb_ary_pattern_info {
454
- NODE *pre_args;
455
- NODE *rest_arg;
456
- NODE *post_args;
457
- VALUE imemo;
458
- };
459
-
460
- struct parser_params;
461
- void *rb_parser_malloc(struct parser_params *, size_t);
462
- void *rb_parser_realloc(struct parser_params *, void *, size_t);
463
- void *rb_parser_calloc(struct parser_params *, size_t, size_t);
464
- void rb_parser_free(struct parser_params *, void *);
465
- PRINTF_ARGS(void rb_parser_printf(struct parser_params *parser, const char *fmt, ...), 2, 3);
466
-
467
- RUBY_SYMBOL_EXPORT_END
468
-
469
- #if defined(__cplusplus)
470
- #if 0
471
- { /* satisfy cc-mode */
472
- #endif
473
- } /* extern "C" { */
474
- #endif
475
-
476
- #endif /* RUBY_NODE_H */