debugger-ruby_core_source 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/addr2line.h +21 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/constant.h +34 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/debug.h +41 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/dln.h +50 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/encdb.h +167 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/eval_intern.h +234 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/gc.h +99 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/id.h +175 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/insns.inc +179 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/insns_info.inc +695 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/internal.h +239 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/iseq.h +126 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/known_errors.inc +731 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/method.h +105 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/node.h +503 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/node_name.inc +208 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/opt_sc.inc +670 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/optinsn.inc +30 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/optunifs.inc +116 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/parse.h +302 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/regenc.h +219 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/regint.h +850 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/regparse.h +362 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/revision.h +1 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/ruby_atomic.h +115 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/siphash.h +48 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/thread_pthread.h +51 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/thread_win32.h +40 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/timev.h +21 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/transcode_data.h +117 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/transdb.h +189 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/version.h +52 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/vm.inc +3054 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/vm_core.h +763 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/vm_exec.h +184 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/vm_insnhelper.h +220 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/vm_opts.h +51 -0
- data/lib/debugger/ruby_core_source/ruby-1.9.3-p426/vmtc.inc +97 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/addr2line.h +21 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/constant.h +36 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/dln.h +50 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/encdb.h +169 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/eval_intern.h +213 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/gc.h +104 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/id.h +133 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/insns.inc +187 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/insns_info.inc +724 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/internal.h +389 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/iseq.h +139 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/known_errors.inc +731 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/method.h +138 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/node.h +539 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/node_name.inc +212 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/opt_sc.inc +702 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/optinsn.inc +83 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/optunifs.inc +120 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/parse.h +292 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/probes_helper.h +67 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/regenc.h +227 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/regint.h +915 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/regparse.h +367 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/revision.h +1 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/ruby_atomic.h +121 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/siphash.h +48 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/thread_pthread.h +56 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/thread_win32.h +45 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/timev.h +21 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/transcode_data.h +127 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/transdb.h +193 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/version.h +52 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/vm.inc +3196 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/vm_core.h +1009 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/vm_debug.h +41 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/vm_exec.h +173 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/vm_insnhelper.h +274 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/vm_opts.h +56 -0
- data/lib/debugger/ruby_core_source/ruby-2.0.0-p195/vmtc.inc +101 -0
- data/lib/debugger/ruby_core_source/version.rb +1 -1
- metadata +79 -2
@@ -0,0 +1,389 @@
|
|
1
|
+
/**********************************************************************
|
2
|
+
|
3
|
+
internal.h -
|
4
|
+
|
5
|
+
$Author$
|
6
|
+
created at: Tue May 17 11:42:20 JST 2011
|
7
|
+
|
8
|
+
Copyright (C) 2011 Yukihiro Matsumoto
|
9
|
+
|
10
|
+
**********************************************************************/
|
11
|
+
|
12
|
+
#ifndef RUBY_INTERNAL_H
|
13
|
+
#define RUBY_INTERNAL_H 1
|
14
|
+
|
15
|
+
#if defined(__cplusplus)
|
16
|
+
extern "C" {
|
17
|
+
#if 0
|
18
|
+
} /* satisfy cc-mode */
|
19
|
+
#endif
|
20
|
+
#endif
|
21
|
+
|
22
|
+
#define MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, min, max) ( \
|
23
|
+
(a) == 0 ? 0 : \
|
24
|
+
(a) == -1 ? (b) < -(max) : \
|
25
|
+
(a) > 0 ? \
|
26
|
+
((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : \
|
27
|
+
((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b)))
|
28
|
+
#define MUL_OVERFLOW_FIXNUM_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, FIXNUM_MIN, FIXNUM_MAX)
|
29
|
+
#define MUL_OVERFLOW_LONG_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, LONG_MIN, LONG_MAX)
|
30
|
+
|
31
|
+
struct rb_deprecated_classext_struct {
|
32
|
+
char conflict[sizeof(VALUE) * 3];
|
33
|
+
};
|
34
|
+
|
35
|
+
struct rb_classext_struct {
|
36
|
+
VALUE super;
|
37
|
+
struct st_table *iv_tbl;
|
38
|
+
struct st_table *const_tbl;
|
39
|
+
VALUE origin;
|
40
|
+
VALUE refined_class;
|
41
|
+
rb_alloc_func_t allocator;
|
42
|
+
};
|
43
|
+
|
44
|
+
#undef RCLASS_SUPER
|
45
|
+
#define RCLASS_EXT(c) (RCLASS(c)->ptr)
|
46
|
+
#define RCLASS_SUPER(c) (RCLASS_EXT(c)->super)
|
47
|
+
#define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
|
48
|
+
#define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
|
49
|
+
#define RCLASS_M_TBL(c) (RCLASS(c)->m_tbl)
|
50
|
+
#define RCLASS_IV_INDEX_TBL(c) (RCLASS(c)->iv_index_tbl)
|
51
|
+
#define RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin)
|
52
|
+
#define RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
|
53
|
+
|
54
|
+
struct vtm; /* defined by timev.h */
|
55
|
+
|
56
|
+
/* array.c */
|
57
|
+
VALUE rb_ary_last(int, VALUE *, VALUE);
|
58
|
+
void rb_ary_set_len(VALUE, long);
|
59
|
+
VALUE rb_ary_cat(VALUE, const VALUE *, long);
|
60
|
+
void rb_ary_delete_same(VALUE, VALUE);
|
61
|
+
|
62
|
+
/* bignum.c */
|
63
|
+
VALUE rb_big_fdiv(VALUE x, VALUE y);
|
64
|
+
VALUE rb_big_uminus(VALUE x);
|
65
|
+
VALUE rb_integer_float_cmp(VALUE x, VALUE y);
|
66
|
+
VALUE rb_integer_float_eq(VALUE x, VALUE y);
|
67
|
+
|
68
|
+
/* class.c */
|
69
|
+
VALUE rb_obj_methods(int argc, VALUE *argv, VALUE obj);
|
70
|
+
VALUE rb_obj_protected_methods(int argc, VALUE *argv, VALUE obj);
|
71
|
+
VALUE rb_obj_private_methods(int argc, VALUE *argv, VALUE obj);
|
72
|
+
VALUE rb_obj_public_methods(int argc, VALUE *argv, VALUE obj);
|
73
|
+
int rb_obj_basic_to_s_p(VALUE);
|
74
|
+
VALUE rb_special_singleton_class(VALUE);
|
75
|
+
VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach);
|
76
|
+
void Init_class_hierarchy(void);
|
77
|
+
|
78
|
+
/* compar.c */
|
79
|
+
VALUE rb_invcmp(VALUE, VALUE);
|
80
|
+
|
81
|
+
/* compile.c */
|
82
|
+
int rb_dvar_defined(ID);
|
83
|
+
int rb_local_defined(ID);
|
84
|
+
int rb_parse_in_eval(void);
|
85
|
+
int rb_parse_in_main(void);
|
86
|
+
const char * rb_insns_name(int i);
|
87
|
+
VALUE rb_insns_name_array(void);
|
88
|
+
|
89
|
+
/* cont.c */
|
90
|
+
VALUE rb_obj_is_fiber(VALUE);
|
91
|
+
void rb_fiber_reset_root_local_storage(VALUE);
|
92
|
+
|
93
|
+
/* debug.c */
|
94
|
+
PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2);
|
95
|
+
|
96
|
+
/* dmyext.c */
|
97
|
+
void Init_ext(void);
|
98
|
+
|
99
|
+
/* encoding.c */
|
100
|
+
ID rb_id_encoding(void);
|
101
|
+
|
102
|
+
/* encoding.c */
|
103
|
+
void rb_gc_mark_encodings(void);
|
104
|
+
|
105
|
+
/* error.c */
|
106
|
+
NORETURN(PRINTF_ARGS(void rb_compile_bug(const char*, int, const char*, ...), 3, 4));
|
107
|
+
VALUE rb_check_backtrace(VALUE);
|
108
|
+
NORETURN(void rb_async_bug_errno(const char *,int));
|
109
|
+
const char *rb_builtin_type_name(int t);
|
110
|
+
const char *rb_builtin_class_name(VALUE x);
|
111
|
+
|
112
|
+
/* eval.c */
|
113
|
+
VALUE rb_refinement_module_get_refined_class(VALUE module);
|
114
|
+
|
115
|
+
/* eval_error.c */
|
116
|
+
void ruby_error_print(void);
|
117
|
+
VALUE rb_get_backtrace(VALUE info);
|
118
|
+
|
119
|
+
/* eval_jump.c */
|
120
|
+
void rb_call_end_proc(VALUE data);
|
121
|
+
void rb_mark_end_proc(void);
|
122
|
+
|
123
|
+
/* file.c */
|
124
|
+
VALUE rb_home_dir(const char *user, VALUE result);
|
125
|
+
VALUE rb_realpath_internal(VALUE basedir, VALUE path, int strict);
|
126
|
+
void rb_file_const(const char*, VALUE);
|
127
|
+
int rb_file_load_ok(const char *);
|
128
|
+
VALUE rb_file_expand_path_fast(VALUE, VALUE);
|
129
|
+
VALUE rb_file_expand_path_internal(VALUE, VALUE, int, int, VALUE);
|
130
|
+
VALUE rb_get_path_check_to_string(VALUE, int);
|
131
|
+
VALUE rb_get_path_check_convert(VALUE, VALUE, int);
|
132
|
+
void Init_File(void);
|
133
|
+
|
134
|
+
#ifdef _WIN32
|
135
|
+
/* file.c, win32/file.c */
|
136
|
+
void rb_w32_init_file(void);
|
137
|
+
#endif
|
138
|
+
|
139
|
+
/* gc.c */
|
140
|
+
void Init_heap(void);
|
141
|
+
void *ruby_mimmalloc(size_t size);
|
142
|
+
|
143
|
+
/* inits.c */
|
144
|
+
void rb_call_inits(void);
|
145
|
+
|
146
|
+
/* io.c */
|
147
|
+
const char *ruby_get_inplace_mode(void);
|
148
|
+
void ruby_set_inplace_mode(const char *);
|
149
|
+
ssize_t rb_io_bufread(VALUE io, void *buf, size_t size);
|
150
|
+
void rb_stdio_set_default_encoding(void);
|
151
|
+
void rb_write_error_str(VALUE mesg);
|
152
|
+
|
153
|
+
/* iseq.c */
|
154
|
+
VALUE rb_iseq_clone(VALUE iseqval, VALUE newcbase);
|
155
|
+
|
156
|
+
/* load.c */
|
157
|
+
VALUE rb_get_load_path(void);
|
158
|
+
VALUE rb_get_expanded_load_path(void);
|
159
|
+
NORETURN(void rb_load_fail(VALUE, const char*));
|
160
|
+
|
161
|
+
/* math.c */
|
162
|
+
VALUE rb_math_atan2(VALUE, VALUE);
|
163
|
+
VALUE rb_math_cos(VALUE);
|
164
|
+
VALUE rb_math_cosh(VALUE);
|
165
|
+
VALUE rb_math_exp(VALUE);
|
166
|
+
VALUE rb_math_hypot(VALUE, VALUE);
|
167
|
+
VALUE rb_math_log(int argc, VALUE *argv);
|
168
|
+
VALUE rb_math_sin(VALUE);
|
169
|
+
VALUE rb_math_sinh(VALUE);
|
170
|
+
VALUE rb_math_sqrt(VALUE);
|
171
|
+
|
172
|
+
/* newline.c */
|
173
|
+
void Init_newline(void);
|
174
|
+
|
175
|
+
/* numeric.c */
|
176
|
+
int rb_num_to_uint(VALUE val, unsigned int *ret);
|
177
|
+
VALUE num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl);
|
178
|
+
int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl);
|
179
|
+
double ruby_float_mod(double x, double y);
|
180
|
+
int rb_num_negative_p(VALUE);
|
181
|
+
|
182
|
+
/* object.c */
|
183
|
+
VALUE rb_obj_equal(VALUE obj1, VALUE obj2);
|
184
|
+
|
185
|
+
/* parse.y */
|
186
|
+
VALUE rb_parser_get_yydebug(VALUE);
|
187
|
+
VALUE rb_parser_set_yydebug(VALUE, VALUE);
|
188
|
+
int rb_is_const_name(VALUE name);
|
189
|
+
int rb_is_class_name(VALUE name);
|
190
|
+
int rb_is_global_name(VALUE name);
|
191
|
+
int rb_is_instance_name(VALUE name);
|
192
|
+
int rb_is_attrset_name(VALUE name);
|
193
|
+
int rb_is_local_name(VALUE name);
|
194
|
+
int rb_is_method_name(VALUE name);
|
195
|
+
int rb_is_junk_name(VALUE name);
|
196
|
+
void rb_gc_mark_parser(void);
|
197
|
+
void rb_gc_mark_symbols(void);
|
198
|
+
|
199
|
+
/* proc.c */
|
200
|
+
VALUE rb_proc_location(VALUE self);
|
201
|
+
st_index_t rb_hash_proc(st_index_t hash, VALUE proc);
|
202
|
+
|
203
|
+
/* process.c */
|
204
|
+
#define RB_MAX_GROUPS (65536)
|
205
|
+
|
206
|
+
struct rb_execarg {
|
207
|
+
int use_shell;
|
208
|
+
union {
|
209
|
+
struct {
|
210
|
+
VALUE shell_script;
|
211
|
+
} sh;
|
212
|
+
struct {
|
213
|
+
VALUE command_name;
|
214
|
+
VALUE command_abspath; /* full path string or nil */
|
215
|
+
VALUE argv_str;
|
216
|
+
VALUE argv_buf;
|
217
|
+
} cmd;
|
218
|
+
} invoke;
|
219
|
+
VALUE redirect_fds;
|
220
|
+
VALUE envp_str;
|
221
|
+
VALUE envp_buf;
|
222
|
+
VALUE dup2_tmpbuf;
|
223
|
+
unsigned pgroup_given : 1;
|
224
|
+
unsigned umask_given : 1;
|
225
|
+
unsigned unsetenv_others_given : 1;
|
226
|
+
unsigned unsetenv_others_do : 1;
|
227
|
+
unsigned close_others_given : 1;
|
228
|
+
unsigned close_others_do : 1;
|
229
|
+
unsigned chdir_given : 1;
|
230
|
+
unsigned new_pgroup_given : 1;
|
231
|
+
unsigned new_pgroup_flag : 1;
|
232
|
+
unsigned uid_given : 1;
|
233
|
+
unsigned gid_given : 1;
|
234
|
+
rb_pid_t pgroup_pgid; /* asis(-1), new pgroup(0), specified pgroup (0<V). */
|
235
|
+
VALUE rlimit_limits; /* Qfalse or [[rtype, softlim, hardlim], ...] */
|
236
|
+
mode_t umask_mask;
|
237
|
+
rb_uid_t uid;
|
238
|
+
rb_gid_t gid;
|
239
|
+
VALUE fd_dup2;
|
240
|
+
VALUE fd_close;
|
241
|
+
VALUE fd_open;
|
242
|
+
VALUE fd_dup2_child;
|
243
|
+
int close_others_maxhint;
|
244
|
+
VALUE env_modification; /* Qfalse or [[k1,v1], ...] */
|
245
|
+
VALUE chdir_dir;
|
246
|
+
};
|
247
|
+
|
248
|
+
/* argv_str contains extra two elements.
|
249
|
+
* The beginning one is for /bin/sh used by exec_with_sh.
|
250
|
+
* The last one for terminating NULL used by execve.
|
251
|
+
* See rb_exec_fillarg() in process.c. */
|
252
|
+
#define ARGVSTR2ARGC(argv_str) (RSTRING_LEN(argv_str) / sizeof(char *) - 2)
|
253
|
+
#define ARGVSTR2ARGV(argv_str) ((char **)RSTRING_PTR(argv_str) + 1)
|
254
|
+
|
255
|
+
rb_pid_t rb_fork_ruby(int *status);
|
256
|
+
void rb_last_status_clear(void);
|
257
|
+
|
258
|
+
/* rational.c */
|
259
|
+
VALUE rb_lcm(VALUE x, VALUE y);
|
260
|
+
VALUE rb_rational_reciprocal(VALUE x);
|
261
|
+
|
262
|
+
/* re.c */
|
263
|
+
VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline);
|
264
|
+
VALUE rb_reg_check_preprocess(VALUE);
|
265
|
+
|
266
|
+
/* signal.c */
|
267
|
+
int rb_get_next_signal(void);
|
268
|
+
int rb_sigaltstack_size(void);
|
269
|
+
|
270
|
+
/* strftime.c */
|
271
|
+
#ifdef RUBY_ENCODING_H
|
272
|
+
size_t rb_strftime_timespec(char *s, size_t maxsize, const char *format, rb_encoding *enc,
|
273
|
+
const struct vtm *vtm, struct timespec *ts, int gmt);
|
274
|
+
size_t rb_strftime(char *s, size_t maxsize, const char *format, rb_encoding *enc,
|
275
|
+
const struct vtm *vtm, VALUE timev, int gmt);
|
276
|
+
#endif
|
277
|
+
|
278
|
+
/* string.c */
|
279
|
+
int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p);
|
280
|
+
int rb_str_symname_p(VALUE);
|
281
|
+
VALUE rb_str_quote_unprintable(VALUE);
|
282
|
+
VALUE rb_id_quote_unprintable(ID);
|
283
|
+
#define QUOTE(str) rb_str_quote_unprintable(str)
|
284
|
+
#define QUOTE_ID(id) rb_id_quote_unprintable(id)
|
285
|
+
|
286
|
+
/* struct.c */
|
287
|
+
VALUE rb_struct_init_copy(VALUE copy, VALUE s);
|
288
|
+
|
289
|
+
/* time.c */
|
290
|
+
struct timeval rb_time_timeval(VALUE);
|
291
|
+
|
292
|
+
/* thread.c */
|
293
|
+
VALUE rb_obj_is_mutex(VALUE obj);
|
294
|
+
VALUE rb_suppress_tracing(VALUE (*func)(VALUE), VALUE arg);
|
295
|
+
void rb_thread_execute_interrupts(VALUE th);
|
296
|
+
void rb_clear_trace_func(void);
|
297
|
+
VALUE rb_get_coverages(void);
|
298
|
+
VALUE rb_thread_shield_new(void);
|
299
|
+
VALUE rb_thread_shield_wait(VALUE self);
|
300
|
+
VALUE rb_thread_shield_release(VALUE self);
|
301
|
+
VALUE rb_thread_shield_destroy(VALUE self);
|
302
|
+
void rb_mutex_allow_trap(VALUE self, int val);
|
303
|
+
VALUE rb_uninterruptible(VALUE (*b_proc)(ANYARGS), VALUE data);
|
304
|
+
VALUE rb_mutex_owned_p(VALUE self);
|
305
|
+
|
306
|
+
/* thread_pthread.c, thread_win32.c */
|
307
|
+
void Init_native_thread(void);
|
308
|
+
|
309
|
+
/* vm.c */
|
310
|
+
VALUE rb_obj_is_thread(VALUE obj);
|
311
|
+
void rb_vm_mark(void *ptr);
|
312
|
+
void Init_BareVM(void);
|
313
|
+
VALUE rb_vm_top_self(void);
|
314
|
+
void rb_thread_recycle_stack_release(VALUE *);
|
315
|
+
void rb_vm_change_state(void);
|
316
|
+
void rb_vm_inc_const_missing_count(void);
|
317
|
+
void rb_thread_mark(void *th);
|
318
|
+
const void **rb_vm_get_insns_address_table(void);
|
319
|
+
VALUE rb_sourcefilename(void);
|
320
|
+
|
321
|
+
/* vm_dump.c */
|
322
|
+
void rb_vm_bugreport(void);
|
323
|
+
|
324
|
+
/* vm_eval.c */
|
325
|
+
void Init_vm_eval(void);
|
326
|
+
VALUE rb_current_realfilepath(void);
|
327
|
+
VALUE rb_check_block_call(VALUE, ID, int, VALUE *, VALUE (*)(ANYARGS), VALUE);
|
328
|
+
typedef void rb_check_funcall_hook(int, VALUE, ID, int, VALUE *, VALUE);
|
329
|
+
VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, VALUE *argv,
|
330
|
+
rb_check_funcall_hook *hook, VALUE arg);
|
331
|
+
|
332
|
+
/* vm_method.c */
|
333
|
+
void Init_eval_method(void);
|
334
|
+
int rb_method_defined_by(VALUE obj, ID mid, VALUE (*cfunc)(ANYARGS));
|
335
|
+
|
336
|
+
/* miniprelude.c, prelude.c */
|
337
|
+
void Init_prelude(void);
|
338
|
+
|
339
|
+
/* vm_backtrace.c */
|
340
|
+
void Init_vm_backtrace(void);
|
341
|
+
VALUE vm_thread_backtrace(int argc, VALUE *argv, VALUE thval);
|
342
|
+
VALUE vm_thread_backtrace_locations(int argc, VALUE *argv, VALUE thval);
|
343
|
+
|
344
|
+
VALUE rb_make_backtrace(void);
|
345
|
+
void rb_backtrace_print_as_bugreport(void);
|
346
|
+
int rb_backtrace_p(VALUE obj);
|
347
|
+
VALUE rb_backtrace_to_str_ary(VALUE obj);
|
348
|
+
VALUE rb_vm_backtrace_object();
|
349
|
+
|
350
|
+
#if defined __GNUC__ && __GNUC__ >= 4
|
351
|
+
#pragma GCC visibility push(default)
|
352
|
+
#endif
|
353
|
+
const char *rb_objspace_data_type_name(VALUE obj);
|
354
|
+
|
355
|
+
/* Temporary. This API will be removed (renamed). */
|
356
|
+
VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd);
|
357
|
+
|
358
|
+
/* io.c */
|
359
|
+
void rb_maygvl_fd_fix_cloexec(int fd);
|
360
|
+
|
361
|
+
/* process.c */
|
362
|
+
int rb_exec_async_signal_safe(const struct rb_execarg *e, char *errmsg, size_t errmsg_buflen);
|
363
|
+
rb_pid_t rb_fork_async_signal_safe(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALUE fds, char *errmsg, size_t errmsg_buflen);
|
364
|
+
VALUE rb_execarg_new(int argc, VALUE *argv, int accept_shell);
|
365
|
+
struct rb_execarg *rb_execarg_get(VALUE execarg_obj); /* dangerous. needs GC guard. */
|
366
|
+
VALUE rb_execarg_init(int argc, VALUE *argv, int accept_shell, VALUE execarg_obj);
|
367
|
+
int rb_execarg_addopt(VALUE execarg_obj, VALUE key, VALUE val);
|
368
|
+
void rb_execarg_fixup(VALUE execarg_obj);
|
369
|
+
int rb_execarg_run_options(const struct rb_execarg *e, struct rb_execarg *s, char* errmsg, size_t errmsg_buflen);
|
370
|
+
VALUE rb_execarg_extract_options(VALUE execarg_obj, VALUE opthash);
|
371
|
+
void rb_execarg_setenv(VALUE execarg_obj, VALUE env);
|
372
|
+
|
373
|
+
/* variable.c */
|
374
|
+
void rb_gc_mark_global_tbl(void);
|
375
|
+
void rb_mark_generic_ivar(VALUE);
|
376
|
+
void rb_mark_generic_ivar_tbl(void);
|
377
|
+
|
378
|
+
#if defined __GNUC__ && __GNUC__ >= 4
|
379
|
+
#pragma GCC visibility pop
|
380
|
+
#endif
|
381
|
+
|
382
|
+
#if defined(__cplusplus)
|
383
|
+
#if 0
|
384
|
+
{ /* satisfy cc-mode */
|
385
|
+
#endif
|
386
|
+
} /* extern "C" { */
|
387
|
+
#endif
|
388
|
+
|
389
|
+
#endif /* RUBY_INTERNAL_H */
|
@@ -0,0 +1,139 @@
|
|
1
|
+
/**********************************************************************
|
2
|
+
|
3
|
+
iseq.h -
|
4
|
+
|
5
|
+
$Author: nobu $
|
6
|
+
created at: 04/01/01 23:36:57 JST
|
7
|
+
|
8
|
+
Copyright (C) 2004-2008 Koichi Sasada
|
9
|
+
|
10
|
+
**********************************************************************/
|
11
|
+
|
12
|
+
#ifndef RUBY_COMPILE_H
|
13
|
+
#define RUBY_COMPILE_H
|
14
|
+
|
15
|
+
#if defined __GNUC__ && __GNUC__ >= 4
|
16
|
+
#pragma GCC visibility push(default)
|
17
|
+
#endif
|
18
|
+
|
19
|
+
/* compile.c */
|
20
|
+
VALUE rb_iseq_compile_node(VALUE self, NODE *node);
|
21
|
+
int rb_iseq_translate_threaded_code(rb_iseq_t *iseq);
|
22
|
+
VALUE rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE locals, VALUE args,
|
23
|
+
VALUE exception, VALUE body);
|
24
|
+
|
25
|
+
/* iseq.c */
|
26
|
+
VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);
|
27
|
+
VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc);
|
28
|
+
struct st_table *ruby_insn_make_insn_table(void);
|
29
|
+
unsigned int rb_iseq_line_no(const rb_iseq_t *iseq, size_t pos);
|
30
|
+
|
31
|
+
int rb_iseq_line_trace_each(VALUE iseqval, int (*func)(int line, rb_event_flag_t *events_ptr, void *d), void *data);
|
32
|
+
VALUE rb_iseq_line_trace_all(VALUE iseqval);
|
33
|
+
VALUE rb_iseq_line_trace_specify(VALUE iseqval, VALUE pos, VALUE set);
|
34
|
+
|
35
|
+
/* proc.c */
|
36
|
+
rb_iseq_t *rb_method_get_iseq(VALUE body);
|
37
|
+
rb_iseq_t *rb_proc_get_iseq(VALUE proc, int *is_proc);
|
38
|
+
|
39
|
+
struct rb_compile_option_struct {
|
40
|
+
int inline_const_cache;
|
41
|
+
int peephole_optimization;
|
42
|
+
int tailcall_optimization;
|
43
|
+
int specialized_instruction;
|
44
|
+
int operands_unification;
|
45
|
+
int instructions_unification;
|
46
|
+
int stack_caching;
|
47
|
+
int trace_instruction;
|
48
|
+
int debug_level;
|
49
|
+
};
|
50
|
+
|
51
|
+
struct iseq_line_info_entry {
|
52
|
+
unsigned int position;
|
53
|
+
unsigned int line_no;
|
54
|
+
};
|
55
|
+
|
56
|
+
struct iseq_catch_table_entry {
|
57
|
+
enum catch_type {
|
58
|
+
CATCH_TYPE_RESCUE = INT2FIX(1),
|
59
|
+
CATCH_TYPE_ENSURE = INT2FIX(2),
|
60
|
+
CATCH_TYPE_RETRY = INT2FIX(3),
|
61
|
+
CATCH_TYPE_BREAK = INT2FIX(4),
|
62
|
+
CATCH_TYPE_REDO = INT2FIX(5),
|
63
|
+
CATCH_TYPE_NEXT = INT2FIX(6)
|
64
|
+
} type;
|
65
|
+
VALUE iseq;
|
66
|
+
unsigned long start;
|
67
|
+
unsigned long end;
|
68
|
+
unsigned long cont;
|
69
|
+
unsigned long sp;
|
70
|
+
};
|
71
|
+
|
72
|
+
#define INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512)
|
73
|
+
|
74
|
+
struct iseq_compile_data_storage {
|
75
|
+
struct iseq_compile_data_storage *next;
|
76
|
+
unsigned long pos;
|
77
|
+
unsigned long size;
|
78
|
+
char *buff;
|
79
|
+
};
|
80
|
+
|
81
|
+
struct iseq_compile_data {
|
82
|
+
/* GC is needed */
|
83
|
+
VALUE err_info;
|
84
|
+
VALUE mark_ary;
|
85
|
+
VALUE catch_table_ary; /* Array */
|
86
|
+
|
87
|
+
/* GC is not needed */
|
88
|
+
struct iseq_label_data *start_label;
|
89
|
+
struct iseq_label_data *end_label;
|
90
|
+
struct iseq_label_data *redo_label;
|
91
|
+
VALUE current_block;
|
92
|
+
VALUE ensure_node;
|
93
|
+
VALUE for_iseq;
|
94
|
+
struct iseq_compile_data_ensure_node_stack *ensure_node_stack;
|
95
|
+
int loopval_popped; /* used by NODE_BREAK */
|
96
|
+
int cached_const;
|
97
|
+
struct iseq_compile_data_storage *storage_head;
|
98
|
+
struct iseq_compile_data_storage *storage_current;
|
99
|
+
int last_line;
|
100
|
+
int last_coverable_line;
|
101
|
+
int label_no;
|
102
|
+
int node_level;
|
103
|
+
const rb_compile_option_t *option;
|
104
|
+
#if SUPPORT_JOKE
|
105
|
+
st_table *labels_table;
|
106
|
+
#endif
|
107
|
+
};
|
108
|
+
|
109
|
+
/* defined? */
|
110
|
+
|
111
|
+
enum defined_type {
|
112
|
+
DEFINED_NIL = 1,
|
113
|
+
DEFINED_IVAR,
|
114
|
+
DEFINED_LVAR,
|
115
|
+
DEFINED_GVAR,
|
116
|
+
DEFINED_CVAR,
|
117
|
+
DEFINED_CONST,
|
118
|
+
DEFINED_METHOD,
|
119
|
+
DEFINED_YIELD,
|
120
|
+
DEFINED_ZSUPER,
|
121
|
+
DEFINED_SELF,
|
122
|
+
DEFINED_TRUE,
|
123
|
+
DEFINED_FALSE,
|
124
|
+
DEFINED_ASGN,
|
125
|
+
DEFINED_EXPR,
|
126
|
+
DEFINED_IVAR2,
|
127
|
+
DEFINED_REF,
|
128
|
+
DEFINED_FUNC
|
129
|
+
};
|
130
|
+
|
131
|
+
VALUE rb_iseq_defined_string(enum defined_type type);
|
132
|
+
|
133
|
+
#define DEFAULT_SPECIAL_VAR_COUNT 2
|
134
|
+
|
135
|
+
#if defined __GNUC__ && __GNUC__ >= 4
|
136
|
+
#pragma GCC visibility pop
|
137
|
+
#endif
|
138
|
+
|
139
|
+
#endif /* RUBY_COMPILE_H */
|