kanayago 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +261 -0
  3. data/README.md +1 -1
  4. data/Rakefile +5 -48
  5. data/ext/kanayago/extconf.rb +8 -0
  6. data/ext/kanayago/kanayago.c +30 -185
  7. data/ext/kanayago/scope_node.c +2 -16
  8. data/ext/kanayago/variable_node.c +2 -1
  9. data/lib/kanayago/call_node.rb +19 -0
  10. data/lib/kanayago/constant_node.rb +15 -0
  11. data/lib/kanayago/literal_node.rb +4 -0
  12. data/lib/kanayago/scope_node.rb +14 -0
  13. data/lib/kanayago/statement_node.rb +16 -0
  14. data/lib/kanayago/variable_node.rb +4 -0
  15. data/lib/kanayago/version.rb +1 -1
  16. data/lib/kanayago.rb +3 -16
  17. data/script/setup_parser.rb +136 -0
  18. metadata +6 -64
  19. data/ext/kanayago/ccan/check_type/check_type.h +0 -63
  20. data/ext/kanayago/ccan/container_of/container_of.h +0 -142
  21. data/ext/kanayago/ccan/list/list.h +0 -791
  22. data/ext/kanayago/ccan/str/str.h +0 -17
  23. data/ext/kanayago/constant.h +0 -53
  24. data/ext/kanayago/id.h +0 -354
  25. data/ext/kanayago/id_table.h +0 -54
  26. data/ext/kanayago/include/ruby/st.h +0 -199
  27. data/ext/kanayago/internal/array.h +0 -154
  28. data/ext/kanayago/internal/basic_operators.h +0 -65
  29. data/ext/kanayago/internal/bignum.h +0 -245
  30. data/ext/kanayago/internal/bits.h +0 -650
  31. data/ext/kanayago/internal/compile.h +0 -34
  32. data/ext/kanayago/internal/compilers.h +0 -107
  33. data/ext/kanayago/internal/complex.h +0 -29
  34. data/ext/kanayago/internal/encoding.h +0 -39
  35. data/ext/kanayago/internal/error.h +0 -251
  36. data/ext/kanayago/internal/fixnum.h +0 -185
  37. data/ext/kanayago/internal/gc.h +0 -358
  38. data/ext/kanayago/internal/hash.h +0 -194
  39. data/ext/kanayago/internal/imemo.h +0 -322
  40. data/ext/kanayago/internal/io.h +0 -163
  41. data/ext/kanayago/internal/namespace.h +0 -81
  42. data/ext/kanayago/internal/numeric.h +0 -275
  43. data/ext/kanayago/internal/parse.h +0 -131
  44. data/ext/kanayago/internal/rational.h +0 -71
  45. data/ext/kanayago/internal/re.h +0 -33
  46. data/ext/kanayago/internal/ruby_parser.h +0 -125
  47. data/ext/kanayago/internal/sanitizers.h +0 -346
  48. data/ext/kanayago/internal/serial.h +0 -23
  49. data/ext/kanayago/internal/set_table.h +0 -70
  50. data/ext/kanayago/internal/static_assert.h +0 -16
  51. data/ext/kanayago/internal/string.h +0 -203
  52. data/ext/kanayago/internal/symbol.h +0 -46
  53. data/ext/kanayago/internal/thread.h +0 -112
  54. data/ext/kanayago/internal/variable.h +0 -74
  55. data/ext/kanayago/internal/vm.h +0 -136
  56. data/ext/kanayago/internal/warnings.h +0 -16
  57. data/ext/kanayago/internal.h +0 -105
  58. data/ext/kanayago/lex.c +0 -302
  59. data/ext/kanayago/method.h +0 -271
  60. data/ext/kanayago/node.c +0 -446
  61. data/ext/kanayago/node.h +0 -122
  62. data/ext/kanayago/node_name.inc +0 -224
  63. data/ext/kanayago/parse.c +0 -27377
  64. data/ext/kanayago/parse.h +0 -244
  65. data/ext/kanayago/parser_bits.h +0 -564
  66. data/ext/kanayago/parser_node.h +0 -32
  67. data/ext/kanayago/parser_st.c +0 -165
  68. data/ext/kanayago/parser_st.h +0 -162
  69. data/ext/kanayago/parser_value.h +0 -106
  70. data/ext/kanayago/probes.h +0 -4
  71. data/ext/kanayago/ruby_assert.h +0 -14
  72. data/ext/kanayago/ruby_atomic.h +0 -66
  73. data/ext/kanayago/ruby_parser.c +0 -1137
  74. data/ext/kanayago/rubyparser.h +0 -1394
  75. data/ext/kanayago/shape.h +0 -444
  76. data/ext/kanayago/st.c +0 -3223
  77. data/ext/kanayago/symbol.h +0 -116
  78. data/ext/kanayago/thread_pthread.h +0 -175
  79. data/ext/kanayago/universal_parser.c +0 -211
  80. data/ext/kanayago/vm_core.h +0 -2349
  81. data/ext/kanayago/vm_opts.h +0 -67
@@ -1,116 +0,0 @@
1
- #ifndef RUBY_SYMBOL_H
2
- #define RUBY_SYMBOL_H 1
3
- /**********************************************************************
4
-
5
- symbol.h -
6
-
7
- $Author$
8
- created at: Tue Jul 8 15:49:54 JST 2014
9
-
10
- Copyright (C) 2014 Yukihiro Matsumoto
11
-
12
- **********************************************************************/
13
-
14
- #include "id.h"
15
- #include "ruby/encoding.h"
16
-
17
- #define DYNAMIC_ID_P(id) (!(id&ID_STATIC_SYM)&&id>tLAST_OP_ID)
18
- #define STATIC_ID2SYM(id) (((VALUE)(id)<<RUBY_SPECIAL_SHIFT)|SYMBOL_FLAG)
19
-
20
- #ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P
21
- #define rb_id2sym(id) \
22
- RB_GNUC_EXTENSION_BLOCK(__builtin_constant_p(id) && !DYNAMIC_ID_P(id) ? \
23
- STATIC_ID2SYM(id) : rb_id2sym(id))
24
- #endif
25
-
26
- struct RSymbol {
27
- struct RBasic basic;
28
- st_index_t hashval;
29
- VALUE fstr;
30
- ID id;
31
- };
32
-
33
- #define RSYMBOL(obj) ((struct RSymbol *)(obj))
34
-
35
- #define is_notop_id(id) ((id)>tLAST_OP_ID)
36
- #define is_local_id(id) (id_type(id)==ID_LOCAL)
37
- #define is_global_id(id) (id_type(id)==ID_GLOBAL)
38
- #define is_instance_id(id) (id_type(id)==ID_INSTANCE)
39
- #define is_attrset_id(id) ((id)==idASET||id_type(id)==ID_ATTRSET)
40
- #define is_const_id(id) (id_type(id)==ID_CONST)
41
- #define is_class_id(id) (id_type(id)==ID_CLASS)
42
- #define is_internal_id(id) (id_type(id)==ID_INTERNAL)
43
-
44
- static inline int
45
- id_type(ID id)
46
- {
47
- if (is_notop_id(id)) {
48
- return (int)(id&ID_SCOPE_MASK);
49
- }
50
- else {
51
- return -1;
52
- }
53
- }
54
-
55
- typedef uint32_t rb_id_serial_t;
56
- static const uint32_t RB_ID_SERIAL_MAX = /* 256M on LP32 */
57
- UINT32_MAX >>
58
- ((sizeof(ID)-sizeof(rb_id_serial_t))*CHAR_BIT < RUBY_ID_SCOPE_SHIFT ?
59
- RUBY_ID_SCOPE_SHIFT : 0);
60
-
61
- static inline rb_id_serial_t
62
- rb_id_to_serial(ID id)
63
- {
64
- if (is_notop_id(id)) {
65
- return (rb_id_serial_t)(id >> ID_SCOPE_SHIFT);
66
- }
67
- else {
68
- return (rb_id_serial_t)id;
69
- }
70
- }
71
-
72
- static inline int
73
- sym_type(VALUE sym)
74
- {
75
- ID id;
76
- if (STATIC_SYM_P(sym)) {
77
- id = RSHIFT(sym, RUBY_SPECIAL_SHIFT);
78
- if (id<=tLAST_OP_ID) {
79
- return -1;
80
- }
81
- }
82
- else {
83
- id = RSYMBOL(sym)->id;
84
- }
85
- return (int)(id&ID_SCOPE_MASK);
86
- }
87
-
88
- #define is_local_sym(sym) (sym_type(sym)==ID_LOCAL)
89
- #define is_global_sym(sym) (sym_type(sym)==ID_GLOBAL)
90
- #define is_instance_sym(sym) (sym_type(sym)==ID_INSTANCE)
91
- #define is_attrset_sym(sym) (sym_type(sym)==ID_ATTRSET)
92
- #define is_const_sym(sym) (sym_type(sym)==ID_CONST)
93
- #define is_class_sym(sym) (sym_type(sym)==ID_CLASS)
94
- #define is_internal_sym(sym) (sym_type(sym)==ID_INTERNAL)
95
-
96
- #ifndef RIPPER
97
- RUBY_FUNC_EXPORTED
98
- #else
99
- RUBY_EXTERN
100
- #endif
101
- const uint_least32_t ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
102
-
103
- static inline int
104
- is_global_name_punct(const int c)
105
- {
106
- if (c <= 0x20 || 0x7e < c) return 0;
107
- return (ruby_global_name_punct_bits[(c - 0x20) / 32] >> (c % 32)) & 1;
108
- }
109
-
110
- RUBY_SYMBOL_EXPORT_BEGIN
111
-
112
- int rb_enc_symname_type(const char *name, long len, rb_encoding *enc, unsigned int allowed_attrset);
113
- size_t rb_sym_immortal_count(void);
114
-
115
- RUBY_SYMBOL_EXPORT_END
116
- #endif
@@ -1,175 +0,0 @@
1
- #ifndef RUBY_THREAD_PTHREAD_H
2
- #define RUBY_THREAD_PTHREAD_H
3
- /**********************************************************************
4
-
5
- thread_pthread.h -
6
-
7
- $Author$
8
-
9
- Copyright (C) 2004-2007 Koichi Sasada
10
-
11
- **********************************************************************/
12
-
13
- #ifdef HAVE_PTHREAD_NP_H
14
- #include <pthread_np.h>
15
- #endif
16
-
17
- #define RB_NATIVETHREAD_LOCK_INIT PTHREAD_MUTEX_INITIALIZER
18
- #define RB_NATIVETHREAD_COND_INIT PTHREAD_COND_INITIALIZER
19
-
20
- // TLS can not be accessed across .so on arm64 and perhaps ppc64le too.
21
- #if defined(__arm64__) || defined(__aarch64__) || defined(__powerpc64__)
22
- # define RB_THREAD_CURRENT_EC_NOINLINE
23
- #endif
24
-
25
- // this data should be protected by timer_th.waiting_lock
26
- struct rb_thread_sched_waiting {
27
- enum thread_sched_waiting_flag {
28
- thread_sched_waiting_none = 0x00,
29
- thread_sched_waiting_timeout = 0x01,
30
- thread_sched_waiting_io_read = 0x02,
31
- thread_sched_waiting_io_write = 0x08,
32
- thread_sched_waiting_io_force = 0x40, // ignore readable
33
- } flags;
34
-
35
- struct {
36
- // should be compat with hrtime.h
37
- #ifdef MY_RUBY_BUILD_MAY_TIME_TRAVEL
38
- int128_t timeout;
39
- #else
40
- uint64_t timeout;
41
- #endif
42
- int fd; // -1 for timeout only
43
- int result;
44
- } data;
45
-
46
- // connected to timer_th.waiting
47
- struct ccan_list_node node;
48
- };
49
-
50
- // per-Thead scheduler helper data
51
- struct rb_thread_sched_item {
52
- struct {
53
- struct ccan_list_node ubf;
54
-
55
- // connected to ractor->threads.sched.reqdyq
56
- // locked by ractor->threads.sched.lock
57
- struct ccan_list_node readyq;
58
-
59
- // connected to vm->ractor.sched.timeslice_threads
60
- // locked by vm->ractor.sched.lock
61
- struct ccan_list_node timeslice_threads;
62
-
63
- // connected to vm->ractor.sched.running_threads
64
- // locked by vm->ractor.sched.lock
65
- struct ccan_list_node running_threads;
66
-
67
- // connected to vm->ractor.sched.zombie_threads
68
- struct ccan_list_node zombie_threads;
69
- } node;
70
-
71
- struct rb_thread_sched_waiting waiting_reason;
72
-
73
- bool finished;
74
- bool malloc_stack;
75
- void *context_stack;
76
- struct coroutine_context *context;
77
- };
78
-
79
- struct rb_native_thread {
80
- rb_atomic_t serial;
81
- struct rb_vm_struct *vm;
82
-
83
- rb_nativethread_id_t thread_id;
84
-
85
- #ifdef RB_THREAD_T_HAS_NATIVE_ID
86
- int tid;
87
- #endif
88
-
89
- struct rb_thread_struct *running_thread;
90
-
91
- // to control native thread
92
- #if defined(__GLIBC__) || defined(__FreeBSD__)
93
- union
94
- #else
95
- /*
96
- * assume the platform condvars are badly implemented and have a
97
- * "memory" of which mutex they're associated with
98
- */
99
- struct
100
- #endif
101
- {
102
- rb_nativethread_cond_t intr; /* th->interrupt_lock */
103
- rb_nativethread_cond_t readyq; /* use sched->lock */
104
- } cond;
105
-
106
- #ifdef USE_SIGALTSTACK
107
- void *altstack;
108
- #endif
109
-
110
- struct coroutine_context *nt_context;
111
- int dedicated;
112
-
113
- size_t machine_stack_maxsize;
114
- };
115
-
116
- #undef except
117
- #undef try
118
- #undef leave
119
- #undef finally
120
-
121
- // per-Ractor
122
- struct rb_thread_sched {
123
- rb_nativethread_lock_t lock_;
124
- #if VM_CHECK_MODE
125
- struct rb_thread_struct *lock_owner;
126
- #endif
127
- struct rb_thread_struct *running; // running thread or NULL
128
- bool is_running;
129
- bool is_running_timeslice;
130
- bool enable_mn_threads;
131
-
132
- struct ccan_list_head readyq;
133
- int readyq_cnt;
134
- // ractor scheduling
135
- struct ccan_list_node grq_node;
136
- };
137
-
138
- #ifdef RB_THREAD_LOCAL_SPECIFIER
139
- NOINLINE(void rb_current_ec_set(struct rb_execution_context_struct *));
140
-
141
- # ifdef RB_THREAD_CURRENT_EC_NOINLINE
142
- NOINLINE(struct rb_execution_context_struct *rb_current_ec(void));
143
- # else
144
- RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
145
-
146
- // for RUBY_DEBUG_LOG()
147
- RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER rb_atomic_t ruby_nt_serial;
148
- #define RUBY_NT_SERIAL 1
149
- # endif
150
- #else
151
- typedef pthread_key_t native_tls_key_t;
152
-
153
- static inline void *
154
- native_tls_get(native_tls_key_t key)
155
- {
156
- // return value should be checked by caller
157
- return pthread_getspecific(key);
158
- }
159
-
160
- static inline void
161
- native_tls_set(native_tls_key_t key, void *ptr)
162
- {
163
- if (UNLIKELY(pthread_setspecific(key, ptr) != 0)) {
164
- rb_bug("pthread_setspecific error");
165
- }
166
- }
167
-
168
- RUBY_EXTERN native_tls_key_t ruby_current_ec_key;
169
- #endif
170
-
171
- struct rb_ractor_struct;
172
- void rb_ractor_sched_wait(struct rb_execution_context_struct *ec, struct rb_ractor_struct *cr, rb_unblock_function_t *ubf, void *ptr);
173
- void rb_ractor_sched_wakeup(struct rb_ractor_struct *r, struct rb_thread_struct *th);
174
-
175
- #endif /* RUBY_THREAD_PTHREAD_H */
@@ -1,211 +0,0 @@
1
- #include <alloca.h>
2
- #include <string.h>
3
- #include <stdarg.h>
4
- #include <stdbool.h>
5
- #include <stddef.h>
6
-
7
- /* Dependency */
8
- #include "internal/parse.h"
9
- #include "node.h"
10
- #include "id.h"
11
-
12
- #include "internal/compilers.h"
13
- #include "ruby/backward/2/inttypes.h"
14
- #include "probes.h"
15
-
16
- #define UNLIKELY(x) RB_UNLIKELY(x)
17
- #ifndef TRUE
18
- # define TRUE 1
19
- #endif
20
-
21
- #ifndef FALSE
22
- # define FALSE 0
23
- #endif
24
- #define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
25
- #define rb_strlen_lit(str) ((sizeof(str "") / sizeof(str ""[0])) - 1)
26
- #undef FIXNUM_MAX
27
- #define FIXNUM_MAX (LONG_MAX / 2)
28
-
29
- /* parser_st */
30
- #define st_table parser_st_table
31
- #define st_data_t parser_st_data_t
32
- #define st_hash_type parser_st_hash_type
33
- #define ST_CONTINUE ST2_CONTINUE
34
- #define ST_STOP ST2_STOP
35
- #define ST_DELETE ST2_DELETE
36
- #define ST_CHECK ST2_CHECK
37
- #define ST_REPLACE ST2_REPLACE
38
- #undef st_init_numtable
39
- #define st_init_numtable rb_parser_st_init_numtable
40
- #undef st_free_table
41
- #define st_free_table rb_parser_st_free_table
42
- #undef st_init_table_with_size
43
- #define st_init_table_with_size rb_parser_st_init_table_with_size
44
- #undef st_insert
45
- #define st_insert rb_parser_st_insert
46
- #undef st_foreach
47
- #define st_foreach rb_parser_st_foreach
48
- #undef st_delete
49
- #define st_delete rb_parser_st_delete
50
- #undef st_is_member
51
- #define st_is_member parser_st_is_member
52
- #undef st_init_table
53
- #define st_init_table rb_parser_st_init_table
54
- #undef st_lookup
55
- #define st_lookup rb_parser_st_lookup
56
-
57
- #define rb_encoding const void
58
-
59
- #undef xmalloc
60
- #define xmalloc p->config->malloc
61
- #undef xcalloc
62
- #define xcalloc p->config->calloc
63
- #undef xrealloc
64
- #define xrealloc p->config->realloc
65
- #undef ALLOC_N
66
- #define ALLOC_N(type,n) ((type *)p->config->alloc_n((n), sizeof(type)))
67
- #undef ALLOC
68
- #define ALLOC(type) ((type *)p->config->alloc(sizeof(type)))
69
- #undef xfree
70
- #define xfree p->config->free
71
- #undef ALLOCA_N
72
- // alloca(rbimpl_size_mul_or_raise(x, y));
73
- #define ALLOCA_N(type,n) ((type *)alloca(sizeof(type) * (n)))
74
- #undef REALLOC_N
75
- #define REALLOC_N(var,type,n) ((var) = (type *)p->config->realloc_n((void *)var, n, sizeof(type)))
76
- #undef ZALLOC
77
- #define ZALLOC(type) ((type *)p->config->zalloc(sizeof(type)))
78
- #undef MEMMOVE
79
- #define MEMMOVE(p1,p2,type,n) (p->config->rb_memmove((p1), (p2), sizeof(type), (n)))
80
- #undef MEMCPY
81
- #define MEMCPY(p1,p2,type,n) (p->config->nonempty_memcpy((p1), (p2), sizeof(type), (n)))
82
-
83
- #define compile_callback p->config->compile_callback
84
- #define reg_named_capture_assign p->config->reg_named_capture_assign
85
-
86
- #define rb_attr_get p->config->attr_get
87
-
88
- #undef rb_ary_new_from_args
89
- #define rb_ary_new_from_args p->config->ary_new_from_args
90
- #define rb_ary_unshift p->config->ary_unshift
91
-
92
- #define rb_make_temporary_id p->config->make_temporary_id
93
- #define is_local_id p->config->is_local_id
94
- #define is_attrset_id p->config->is_attrset_id
95
- #define is_global_name_punct p->config->is_global_name_punct
96
- #define id_type p->config->id_type
97
- #define rb_id_attrset p->config->id_attrset
98
- #undef rb_intern
99
- #define rb_intern p->config->intern
100
- #define rb_intern2 p->config->intern2
101
- #define rb_intern3 p->config->intern3
102
- #define rb_intern_str p->config->intern_str
103
- #define is_notop_id p->config->is_notop_id
104
- #define rb_enc_symname_type p->config->enc_symname_type
105
- #define rb_id2name p->config->id2name
106
- #define rb_id2str p->config->id2str
107
- #undef ID2SYM
108
- #define ID2SYM p->config->id2sym
109
-
110
- #define rb_str_catf p->config->str_catf
111
- #undef rb_str_cat_cstr
112
- #define rb_str_cat_cstr p->config->str_cat_cstr
113
- #define rb_str_resize p->config->str_resize
114
- #undef rb_str_new
115
- #define rb_str_new p->config->str_new
116
- #undef rb_str_new_cstr
117
- #define rb_str_new_cstr p->config->str_new_cstr
118
- #define rb_str_to_interned_str p->config->str_to_interned_str
119
- #define rb_enc_str_new p->config->enc_str_new
120
- #define rb_str_vcatf p->config->str_vcatf
121
- #define rb_sprintf p->config->rb_sprintf
122
- #undef RSTRING_PTR
123
- #define RSTRING_PTR p->config->rstring_ptr
124
- #undef RSTRING_LEN
125
- #define RSTRING_LEN p->config->rstring_len
126
-
127
- #undef INT2NUM
128
- #define INT2NUM p->config->int2num
129
-
130
- #define rb_stderr_tty_p p->config->stderr_tty_p
131
- #define rb_write_error_str p->config->write_error_str
132
- #define rb_io_write p->config->io_write
133
- #define rb_io_flush p->config->io_flush
134
- #define rb_io_puts p->config->io_puts
135
-
136
- #define rb_ractor_stdout p->config->debug_output_stdout
137
- #define rb_ractor_stderr p->config->debug_output_stderr
138
-
139
- #define rb_is_usascii_enc p->config->is_usascii_enc
140
- #define rb_enc_isalnum p->config->enc_isalnum
141
- #define rb_enc_precise_mbclen p->config->enc_precise_mbclen
142
- #define MBCLEN_CHARFOUND_P p->config->mbclen_charfound_p
143
- #define MBCLEN_CHARFOUND_LEN p->config->mbclen_charfound_len
144
- #define rb_enc_name p->config->enc_name
145
- #define rb_enc_prev_char p->config->enc_prev_char
146
- #define rb_enc_get p->config->enc_get
147
- #define rb_enc_asciicompat p->config->enc_asciicompat
148
- #define rb_utf8_encoding p->config->utf8_encoding
149
- #define rb_ascii8bit_encoding p->config->ascii8bit_encoding
150
- #define rb_enc_codelen p->config->enc_codelen
151
- #define rb_enc_mbcput p->config->enc_mbcput
152
- #define rb_enc_find_index p->config->enc_find_index
153
- #define rb_enc_from_index p->config->enc_from_index
154
- #define rb_enc_isspace p->config->enc_isspace
155
- #define ENC_CODERANGE_7BIT p->config->enc_coderange_7bit
156
- #define ENC_CODERANGE_UNKNOWN p->config->enc_coderange_unknown
157
-
158
- #define rb_local_defined p->config->local_defined
159
- #define rb_dvar_defined p->config->dvar_defined
160
-
161
- #define rb_syntax_error_append p->config->syntax_error_append
162
- #define rb_raise p->config->raise
163
- #define syntax_error_new p->config->syntax_error_new
164
-
165
- #define rb_errinfo p->config->errinfo
166
- #define rb_set_errinfo p->config->set_errinfo
167
- #define rb_make_exception p->config->make_exception
168
-
169
- #define ruby_sized_xfree p->config->sized_xfree
170
- #define SIZED_REALLOC_N(v, T, m, n) ((v) = (T *)p->config->sized_realloc_n((void *)(v), (m), sizeof(T), (n)))
171
- #undef RB_GC_GUARD
172
- #define RB_GC_GUARD p->config->gc_guard
173
- #define rb_gc_mark p->config->gc_mark
174
-
175
- #define rb_reg_compile p->config->reg_compile
176
- #define rb_reg_check_preprocess p->config->reg_check_preprocess
177
- #define rb_memcicmp p->config->memcicmp
178
-
179
- #define rb_compile_warn p->config->compile_warn
180
- #define rb_compile_warning p->config->compile_warning
181
- #define rb_bug p->config->bug
182
- #define rb_fatal p->config->fatal
183
- #undef ruby_verbose
184
- #define ruby_verbose p->config->verbose()
185
- #undef errno
186
- #define errno (*p->config->errno_ptr())
187
-
188
- #define rb_make_backtrace p->config->make_backtrace
189
-
190
- #define ruby_scan_hex p->config->scan_hex
191
- #define ruby_scan_oct p->config->scan_oct
192
- #define ruby_scan_digits p->config->scan_digits
193
- #define strtod p->config->strtod
194
-
195
- #undef RTEST
196
- #define RTEST p->config->rtest
197
- #undef NIL_P
198
- #define NIL_P p->config->nil_p
199
- #undef Qnil
200
- #define Qnil p->config->qnil
201
- #undef Qfalse
202
- #define Qfalse p->config->qfalse
203
- #define rb_eArgError p->config->eArgError()
204
- #undef rb_long2int
205
- #define rb_long2int p->config->long2int
206
- #define rb_enc_mbminlen p->config->enc_mbminlen
207
- #define rb_enc_isascii p->config->enc_isascii
208
- #define rb_enc_mbc_to_codepoint p->config->enc_mbc_to_codepoint
209
-
210
- #define rb_ast_new() \
211
- rb_ast_new(p->config)