debugger-ruby_core_source 1.1.9 → 1.2.0

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