debase-ruby_core_source 0.7.5 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/CONTRIBUTING.md +2 -1
  4. data/Rakefile +3 -2
  5. data/lib/debase/ruby_core_source/ruby-2.2.1/addr2line.h +21 -0
  6. data/lib/debase/ruby_core_source/ruby-2.2.1/ccan/build_assert/build_assert.h +40 -0
  7. data/lib/debase/ruby_core_source/ruby-2.2.1/ccan/check_type/check_type.h +63 -0
  8. data/lib/debase/ruby_core_source/ruby-2.2.1/ccan/container_of/container_of.h +142 -0
  9. data/lib/debase/ruby_core_source/ruby-2.2.1/ccan/list/list.h +635 -0
  10. data/lib/debase/ruby_core_source/ruby-2.2.1/ccan/str/str.h +16 -0
  11. data/lib/debase/ruby_core_source/ruby-2.2.1/constant.h +43 -0
  12. data/lib/debase/ruby_core_source/ruby-2.2.1/dln.h +51 -0
  13. data/lib/debase/ruby_core_source/ruby-2.2.1/eval_intern.h +275 -0
  14. data/lib/debase/ruby_core_source/ruby-2.2.1/gc.h +107 -0
  15. data/lib/debase/ruby_core_source/ruby-2.2.1/id.h +210 -0
  16. data/lib/debase/ruby_core_source/ruby-2.2.1/insns.inc +107 -0
  17. data/lib/debase/ruby_core_source/ruby-2.2.1/insns_info.inc +752 -0
  18. data/lib/debase/ruby_core_source/ruby-2.2.1/internal.h +1185 -0
  19. data/lib/debase/ruby_core_source/ruby-2.2.1/iseq.h +158 -0
  20. data/lib/debase/ruby_core_source/ruby-2.2.1/known_errors.inc +746 -0
  21. data/lib/debase/ruby_core_source/ruby-2.2.1/method.h +144 -0
  22. data/lib/debase/ruby_core_source/ruby-2.2.1/node.h +544 -0
  23. data/lib/debase/ruby_core_source/ruby-2.2.1/node_name.inc +212 -0
  24. data/lib/debase/ruby_core_source/ruby-2.2.1/opt_sc.inc +734 -0
  25. data/lib/debase/ruby_core_source/ruby-2.2.1/optinsn.inc +83 -0
  26. data/lib/debase/ruby_core_source/ruby-2.2.1/optunifs.inc +124 -0
  27. data/lib/debase/ruby_core_source/ruby-2.2.1/parse.h +203 -0
  28. data/lib/debase/ruby_core_source/ruby-2.2.1/probes_helper.h +67 -0
  29. data/lib/debase/ruby_core_source/ruby-2.2.1/regenc.h +234 -0
  30. data/lib/debase/ruby_core_source/ruby-2.2.1/regint.h +972 -0
  31. data/lib/debase/ruby_core_source/ruby-2.2.1/regparse.h +363 -0
  32. data/lib/debase/ruby_core_source/ruby-2.2.1/revision.h +1 -0
  33. data/lib/debase/ruby_core_source/ruby-2.2.1/ruby_atomic.h +170 -0
  34. data/lib/debase/ruby_core_source/ruby-2.2.1/siphash.h +48 -0
  35. data/lib/debase/ruby_core_source/ruby-2.2.1/symbol.h +87 -0
  36. data/lib/debase/ruby_core_source/ruby-2.2.1/thread_pthread.h +54 -0
  37. data/lib/debase/ruby_core_source/ruby-2.2.1/thread_win32.h +36 -0
  38. data/lib/debase/ruby_core_source/ruby-2.2.1/timev.h +42 -0
  39. data/lib/debase/ruby_core_source/ruby-2.2.1/transcode_data.h +123 -0
  40. data/lib/debase/ruby_core_source/ruby-2.2.1/version.h +52 -0
  41. data/lib/debase/ruby_core_source/ruby-2.2.1/vm.inc +3353 -0
  42. data/lib/debase/ruby_core_source/ruby-2.2.1/vm_core.h +1161 -0
  43. data/lib/debase/ruby_core_source/ruby-2.2.1/vm_debug.h +37 -0
  44. data/lib/debase/ruby_core_source/ruby-2.2.1/vm_exec.h +182 -0
  45. data/lib/debase/ruby_core_source/ruby-2.2.1/vm_insnhelper.h +233 -0
  46. data/lib/debase/ruby_core_source/ruby-2.2.1/vm_opts.h +56 -0
  47. data/lib/debase/ruby_core_source/ruby-2.2.1/vmtc.inc +105 -0
  48. data/lib/debase/ruby_core_source/version.rb +1 -1
  49. metadata +45 -2
@@ -0,0 +1,158 @@
1
+ /**********************************************************************
2
+
3
+ iseq.h -
4
+
5
+ $Author: normal $
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
+ RUBY_SYMBOL_EXPORT_BEGIN
16
+
17
+ /* compile.c */
18
+ VALUE rb_iseq_compile_node(VALUE self, NODE *node);
19
+ int rb_iseq_translate_threaded_code(rb_iseq_t *iseq);
20
+ VALUE *rb_iseq_original_iseq(rb_iseq_t *iseq);
21
+ VALUE rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc,
22
+ VALUE locals, VALUE args,
23
+ VALUE exception, VALUE body);
24
+
25
+ /* iseq.c */
26
+ void rb_iseq_add_mark_object(rb_iseq_t *iseq, VALUE obj);
27
+ VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);
28
+ VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc);
29
+ struct st_table *ruby_insn_make_insn_table(void);
30
+ unsigned int rb_iseq_line_no(const rb_iseq_t *iseq, size_t pos);
31
+
32
+ int rb_iseq_line_trace_each(VALUE iseqval, int (*func)(int line, rb_event_flag_t *events_ptr, void *d), void *data);
33
+ VALUE rb_iseq_line_trace_all(VALUE iseqval);
34
+ VALUE rb_iseq_line_trace_specify(VALUE iseqval, VALUE pos, VALUE set);
35
+
36
+ /* proc.c */
37
+ rb_iseq_t *rb_method_get_iseq(VALUE body);
38
+ rb_iseq_t *rb_proc_get_iseq(VALUE proc, int *is_proc);
39
+
40
+ struct rb_compile_option_struct {
41
+ int inline_const_cache;
42
+ int peephole_optimization;
43
+ int tailcall_optimization;
44
+ int specialized_instruction;
45
+ int operands_unification;
46
+ int instructions_unification;
47
+ int stack_caching;
48
+ int trace_instruction;
49
+ int debug_level;
50
+ };
51
+
52
+ struct iseq_line_info_entry {
53
+ unsigned int position;
54
+ unsigned int line_no;
55
+ };
56
+
57
+ struct iseq_catch_table_entry {
58
+ enum catch_type {
59
+ CATCH_TYPE_RESCUE = INT2FIX(1),
60
+ CATCH_TYPE_ENSURE = INT2FIX(2),
61
+ CATCH_TYPE_RETRY = INT2FIX(3),
62
+ CATCH_TYPE_BREAK = INT2FIX(4),
63
+ CATCH_TYPE_REDO = INT2FIX(5),
64
+ CATCH_TYPE_NEXT = INT2FIX(6)
65
+ } type;
66
+ VALUE iseq;
67
+ unsigned int start;
68
+ unsigned int end;
69
+ unsigned int cont;
70
+ unsigned int sp;
71
+ };
72
+
73
+ PACKED_STRUCT_UNALIGNED(struct iseq_catch_table {
74
+ int size;
75
+ struct iseq_catch_table_entry entries[1]; /* flexible array */
76
+ });
77
+
78
+ static inline int
79
+ iseq_catch_table_bytes(int n)
80
+ {
81
+ enum {
82
+ catch_table_entries_max = (INT_MAX - sizeof(struct iseq_catch_table)) / sizeof(struct iseq_catch_table_entry)
83
+ };
84
+ if (n > catch_table_entries_max) rb_fatal("too large iseq_catch_table - %d", n);
85
+ return (int)(sizeof(struct iseq_catch_table) +
86
+ (n - 1) * sizeof(struct iseq_catch_table_entry));
87
+ }
88
+
89
+ #define INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512)
90
+
91
+ struct iseq_compile_data_storage {
92
+ struct iseq_compile_data_storage *next;
93
+ unsigned int pos;
94
+ unsigned int size;
95
+ char buff[1]; /* flexible array */
96
+ };
97
+
98
+ /* account for flexible array */
99
+ #define SIZEOF_ISEQ_COMPILE_DATA_STORAGE \
100
+ (sizeof(struct iseq_compile_data_storage) - 1)
101
+
102
+ struct iseq_compile_data {
103
+ /* GC is needed */
104
+ const VALUE err_info;
105
+ VALUE mark_ary;
106
+ const VALUE catch_table_ary; /* Array */
107
+
108
+ /* GC is not needed */
109
+ struct iseq_label_data *start_label;
110
+ struct iseq_label_data *end_label;
111
+ struct iseq_label_data *redo_label;
112
+ VALUE current_block;
113
+ VALUE ensure_node;
114
+ VALUE for_iseq;
115
+ struct iseq_compile_data_ensure_node_stack *ensure_node_stack;
116
+ int loopval_popped; /* used by NODE_BREAK */
117
+ int cached_const;
118
+ struct iseq_compile_data_storage *storage_head;
119
+ struct iseq_compile_data_storage *storage_current;
120
+ int last_line;
121
+ int last_coverable_line;
122
+ int label_no;
123
+ int node_level;
124
+ const rb_compile_option_t *option;
125
+ #if SUPPORT_JOKE
126
+ st_table *labels_table;
127
+ #endif
128
+ };
129
+
130
+ /* defined? */
131
+
132
+ enum defined_type {
133
+ DEFINED_NIL = 1,
134
+ DEFINED_IVAR,
135
+ DEFINED_LVAR,
136
+ DEFINED_GVAR,
137
+ DEFINED_CVAR,
138
+ DEFINED_CONST,
139
+ DEFINED_METHOD,
140
+ DEFINED_YIELD,
141
+ DEFINED_ZSUPER,
142
+ DEFINED_SELF,
143
+ DEFINED_TRUE,
144
+ DEFINED_FALSE,
145
+ DEFINED_ASGN,
146
+ DEFINED_EXPR,
147
+ DEFINED_IVAR2,
148
+ DEFINED_REF,
149
+ DEFINED_FUNC
150
+ };
151
+
152
+ VALUE rb_iseq_defined_string(enum defined_type type);
153
+
154
+ #define DEFAULT_SPECIAL_VAR_COUNT 2
155
+
156
+ RUBY_SYMBOL_EXPORT_END
157
+
158
+ #endif /* RUBY_COMPILE_H */