debase-ruby_core_source 0.9.8 → 0.9.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/addr2line.h +21 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/ccan/list/list.h +773 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/ccan/str/str.h +16 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/constant.h +50 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/dln.h +51 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/encindex.h +67 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/eval_intern.h +304 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/gc.h +114 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/id.h +211 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/id_table.h +30 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/insns.inc +110 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/insns_info.inc +776 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/internal.h +1407 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/iseq.h +249 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/known_errors.inc +746 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/method.h +213 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/node.h +520 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/node_name.inc +208 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/opt_sc.inc +758 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/optinsn.inc +83 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/optunifs.inc +127 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/parse.h +185 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/probes_helper.h +43 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/regenc.h +237 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/regint.h +987 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/regparse.h +367 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/revision.h +1 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/ruby_atomic.h +233 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/symbol.h +108 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/thread_pthread.h +54 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/thread_win32.h +36 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/timev.h +42 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/transcode_data.h +139 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/version.h +55 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/vm.inc +3414 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/vm_call_iseq_optimized.inc +212 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/vm_core.h +1240 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/vm_debug.h +37 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/vm_exec.h +182 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/vm_insnhelper.h +227 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/vm_opts.h +57 -0
- data/lib/debase/ruby_core_source/ruby-2.3.4-p301/vmtc.inc +108 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +48 -2
@@ -0,0 +1,114 @@
|
|
1
|
+
|
2
|
+
#ifndef RUBY_GC_H
|
3
|
+
#define RUBY_GC_H 1
|
4
|
+
|
5
|
+
#if defined(__x86_64__) && !defined(_ILP32) && defined(__GNUC__) && !defined(__native_client__)
|
6
|
+
#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movq\t%%rsp, %0" : "=r" (*(p)))
|
7
|
+
#elif defined(__i386) && defined(__GNUC__) && !defined(__native_client__)
|
8
|
+
#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movl\t%%esp, %0" : "=r" (*(p)))
|
9
|
+
#else
|
10
|
+
NOINLINE(void rb_gc_set_stack_end(VALUE **stack_end_p));
|
11
|
+
#define SET_MACHINE_STACK_END(p) rb_gc_set_stack_end(p)
|
12
|
+
#define USE_CONSERVATIVE_STACK_END
|
13
|
+
#endif
|
14
|
+
|
15
|
+
/* for GC debug */
|
16
|
+
|
17
|
+
#ifndef RUBY_MARK_FREE_DEBUG
|
18
|
+
#define RUBY_MARK_FREE_DEBUG 0
|
19
|
+
#endif
|
20
|
+
|
21
|
+
#if RUBY_MARK_FREE_DEBUG
|
22
|
+
extern int ruby_gc_debug_indent;
|
23
|
+
|
24
|
+
static inline void
|
25
|
+
rb_gc_debug_indent(void)
|
26
|
+
{
|
27
|
+
printf("%*s", ruby_gc_debug_indent, "");
|
28
|
+
}
|
29
|
+
|
30
|
+
static inline void
|
31
|
+
rb_gc_debug_body(const char *mode, const char *msg, int st, void *ptr)
|
32
|
+
{
|
33
|
+
if (st == 0) {
|
34
|
+
ruby_gc_debug_indent--;
|
35
|
+
}
|
36
|
+
rb_gc_debug_indent();
|
37
|
+
printf("%s: %s %s (%p)\n", mode, st ? "->" : "<-", msg, ptr);
|
38
|
+
|
39
|
+
if (st) {
|
40
|
+
ruby_gc_debug_indent++;
|
41
|
+
}
|
42
|
+
|
43
|
+
fflush(stdout);
|
44
|
+
}
|
45
|
+
|
46
|
+
#define RUBY_MARK_ENTER(msg) rb_gc_debug_body("mark", (msg), 1, ptr)
|
47
|
+
#define RUBY_MARK_LEAVE(msg) rb_gc_debug_body("mark", (msg), 0, ptr)
|
48
|
+
#define RUBY_FREE_ENTER(msg) rb_gc_debug_body("free", (msg), 1, ptr)
|
49
|
+
#define RUBY_FREE_LEAVE(msg) rb_gc_debug_body("free", (msg), 0, ptr)
|
50
|
+
#define RUBY_GC_INFO rb_gc_debug_indent(); printf
|
51
|
+
|
52
|
+
#else
|
53
|
+
#define RUBY_MARK_ENTER(msg)
|
54
|
+
#define RUBY_MARK_LEAVE(msg)
|
55
|
+
#define RUBY_FREE_ENTER(msg)
|
56
|
+
#define RUBY_FREE_LEAVE(msg)
|
57
|
+
#define RUBY_GC_INFO if(0)printf
|
58
|
+
#endif
|
59
|
+
|
60
|
+
#define RUBY_MARK_UNLESS_NULL(ptr) do { \
|
61
|
+
VALUE markobj = (ptr); \
|
62
|
+
if (RTEST(markobj)) {rb_gc_mark(markobj);} \
|
63
|
+
} while (0)
|
64
|
+
#define RUBY_FREE_UNLESS_NULL(ptr) if(ptr){ruby_xfree(ptr);(ptr)=NULL;}
|
65
|
+
|
66
|
+
#if STACK_GROW_DIRECTION > 0
|
67
|
+
# define STACK_UPPER(x, a, b) (a)
|
68
|
+
#elif STACK_GROW_DIRECTION < 0
|
69
|
+
# define STACK_UPPER(x, a, b) (b)
|
70
|
+
#else
|
71
|
+
RUBY_EXTERN int ruby_stack_grow_direction;
|
72
|
+
int ruby_get_stack_grow_direction(volatile VALUE *addr);
|
73
|
+
# define stack_growup_p(x) ( \
|
74
|
+
(ruby_stack_grow_direction ? \
|
75
|
+
ruby_stack_grow_direction : \
|
76
|
+
ruby_get_stack_grow_direction(x)) > 0)
|
77
|
+
# define STACK_UPPER(x, a, b) (stack_growup_p(x) ? (a) : (b))
|
78
|
+
#endif
|
79
|
+
|
80
|
+
#if STACK_GROW_DIRECTION
|
81
|
+
#define STACK_GROW_DIR_DETECTION
|
82
|
+
#define STACK_DIR_UPPER(a,b) STACK_UPPER(0, (a), (b))
|
83
|
+
#else
|
84
|
+
#define STACK_GROW_DIR_DETECTION VALUE stack_grow_dir_detection
|
85
|
+
#define STACK_DIR_UPPER(a,b) STACK_UPPER(&stack_grow_dir_detection, (a), (b))
|
86
|
+
#endif
|
87
|
+
#define IS_STACK_DIR_UPPER() STACK_DIR_UPPER(1,0)
|
88
|
+
|
89
|
+
const char *rb_obj_info(VALUE obj);
|
90
|
+
const char *rb_raw_obj_info(char *buff, const int buff_size, VALUE obj);
|
91
|
+
void rb_obj_info_dump(VALUE obj);
|
92
|
+
|
93
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
94
|
+
|
95
|
+
/* exports for objspace module */
|
96
|
+
size_t rb_objspace_data_type_memsize(VALUE obj);
|
97
|
+
void rb_objspace_reachable_objects_from(VALUE obj, void (func)(VALUE, void *), void *data);
|
98
|
+
void rb_objspace_reachable_objects_from_root(void (func)(const char *category, VALUE, void *), void *data);
|
99
|
+
int rb_objspace_markable_object_p(VALUE obj);
|
100
|
+
int rb_objspace_internal_object_p(VALUE obj);
|
101
|
+
int rb_objspace_marked_object_p(VALUE obj);
|
102
|
+
int rb_objspace_garbage_object_p(VALUE obj);
|
103
|
+
|
104
|
+
void rb_objspace_each_objects(
|
105
|
+
int (*callback)(void *start, void *end, size_t stride, void *data),
|
106
|
+
void *data);
|
107
|
+
|
108
|
+
void rb_objspace_each_objects_without_setup(
|
109
|
+
int (*callback)(void *, void *, size_t, void *),
|
110
|
+
void *data);
|
111
|
+
|
112
|
+
RUBY_SYMBOL_EXPORT_END
|
113
|
+
|
114
|
+
#endif /* RUBY_GC_H */
|
@@ -0,0 +1,211 @@
|
|
1
|
+
/* DO NOT EDIT THIS FILE DIRECTLY */
|
2
|
+
/**********************************************************************
|
3
|
+
|
4
|
+
id.h -
|
5
|
+
|
6
|
+
$Author: nobu $
|
7
|
+
created at: Sun Oct 19 21:12:51 2008
|
8
|
+
|
9
|
+
Copyright (C) 2007 Koichi Sasada
|
10
|
+
|
11
|
+
**********************************************************************/
|
12
|
+
|
13
|
+
#ifndef RUBY_ID_H
|
14
|
+
#define RUBY_ID_H
|
15
|
+
|
16
|
+
enum ruby_id_types {
|
17
|
+
RUBY_ID_STATIC_SYM = 0x01,
|
18
|
+
RUBY_ID_LOCAL = 0x00,
|
19
|
+
RUBY_ID_INSTANCE = (0x01<<1),
|
20
|
+
RUBY_ID_GLOBAL = (0x03<<1),
|
21
|
+
RUBY_ID_ATTRSET = (0x04<<1),
|
22
|
+
RUBY_ID_CONST = (0x05<<1),
|
23
|
+
RUBY_ID_CLASS = (0x06<<1),
|
24
|
+
RUBY_ID_JUNK = (0x07<<1),
|
25
|
+
RUBY_ID_INTERNAL = RUBY_ID_JUNK,
|
26
|
+
RUBY_ID_SCOPE_SHIFT = 4,
|
27
|
+
RUBY_ID_SCOPE_MASK = (~(~0U<<(RUBY_ID_SCOPE_SHIFT-1))<<1)
|
28
|
+
};
|
29
|
+
|
30
|
+
#define ID_STATIC_SYM RUBY_ID_STATIC_SYM
|
31
|
+
#define ID_SCOPE_SHIFT RUBY_ID_SCOPE_SHIFT
|
32
|
+
#define ID_SCOPE_MASK RUBY_ID_SCOPE_MASK
|
33
|
+
#define ID_LOCAL RUBY_ID_LOCAL
|
34
|
+
#define ID_INSTANCE RUBY_ID_INSTANCE
|
35
|
+
#define ID_GLOBAL RUBY_ID_GLOBAL
|
36
|
+
#define ID_ATTRSET RUBY_ID_ATTRSET
|
37
|
+
#define ID_CONST RUBY_ID_CONST
|
38
|
+
#define ID_CLASS RUBY_ID_CLASS
|
39
|
+
#define ID_JUNK RUBY_ID_JUNK
|
40
|
+
#define ID_INTERNAL RUBY_ID_INTERNAL
|
41
|
+
|
42
|
+
#define symIFUNC ID2SYM(idIFUNC)
|
43
|
+
#define symCFUNC ID2SYM(idCFUNC)
|
44
|
+
|
45
|
+
#define RUBY_TOKEN_DOT2 128
|
46
|
+
#define RUBY_TOKEN_DOT3 129
|
47
|
+
#define RUBY_TOKEN_UPLUS 130
|
48
|
+
#define RUBY_TOKEN_UMINUS 131
|
49
|
+
#define RUBY_TOKEN_POW 132
|
50
|
+
#define RUBY_TOKEN_DSTAR 133
|
51
|
+
#define RUBY_TOKEN_CMP 134
|
52
|
+
#define RUBY_TOKEN_LSHFT 135
|
53
|
+
#define RUBY_TOKEN_RSHFT 136
|
54
|
+
#define RUBY_TOKEN_LEQ 137
|
55
|
+
#define RUBY_TOKEN_GEQ 138
|
56
|
+
#define RUBY_TOKEN_EQ 139
|
57
|
+
#define RUBY_TOKEN_EQQ 140
|
58
|
+
#define RUBY_TOKEN_NEQ 141
|
59
|
+
#define RUBY_TOKEN_MATCH 142
|
60
|
+
#define RUBY_TOKEN_NMATCH 143
|
61
|
+
#define RUBY_TOKEN_AREF 144
|
62
|
+
#define RUBY_TOKEN_ASET 145
|
63
|
+
#define RUBY_TOKEN_COLON2 146
|
64
|
+
#define RUBY_TOKEN_COLON3 147
|
65
|
+
#define RUBY_TOKEN_ANDOP 148
|
66
|
+
#define RUBY_TOKEN_OROP 149
|
67
|
+
#define RUBY_TOKEN_ANDDOT 150
|
68
|
+
#define RUBY_TOKEN(t) RUBY_TOKEN_##t
|
69
|
+
|
70
|
+
enum ruby_method_ids {
|
71
|
+
idDot2 = RUBY_TOKEN(DOT2),
|
72
|
+
idDot3 = RUBY_TOKEN(DOT3),
|
73
|
+
idUPlus = RUBY_TOKEN(UPLUS),
|
74
|
+
idUMinus = RUBY_TOKEN(UMINUS),
|
75
|
+
idPow = RUBY_TOKEN(POW),
|
76
|
+
idCmp = RUBY_TOKEN(CMP),
|
77
|
+
idPLUS = '+',
|
78
|
+
idMINUS = '-',
|
79
|
+
idMULT = '*',
|
80
|
+
idDIV = '/',
|
81
|
+
idMOD = '%',
|
82
|
+
idLTLT = RUBY_TOKEN(LSHFT),
|
83
|
+
idGTGT = RUBY_TOKEN(RSHFT),
|
84
|
+
idLT = '<',
|
85
|
+
idLE = RUBY_TOKEN(LEQ),
|
86
|
+
idGT = '>',
|
87
|
+
idGE = RUBY_TOKEN(GEQ),
|
88
|
+
idEq = RUBY_TOKEN(EQ),
|
89
|
+
idEqq = RUBY_TOKEN(EQQ),
|
90
|
+
idNeq = RUBY_TOKEN(NEQ),
|
91
|
+
idNot = '!',
|
92
|
+
idBackquote = '`',
|
93
|
+
idEqTilde = RUBY_TOKEN(MATCH),
|
94
|
+
idNeqTilde = RUBY_TOKEN(NMATCH),
|
95
|
+
idAREF = RUBY_TOKEN(AREF),
|
96
|
+
idASET = RUBY_TOKEN(ASET),
|
97
|
+
idCOLON2 = RUBY_TOKEN(COLON2),
|
98
|
+
idANDOP = RUBY_TOKEN(ANDOP),
|
99
|
+
idOROP = RUBY_TOKEN(OROP),
|
100
|
+
idANDDOT = RUBY_TOKEN(ANDDOT),
|
101
|
+
tPRESERVED_ID_BEGIN = 150,
|
102
|
+
idNULL,
|
103
|
+
idEmptyP,
|
104
|
+
idEqlP,
|
105
|
+
idRespond_to,
|
106
|
+
idRespond_to_missing,
|
107
|
+
idIFUNC,
|
108
|
+
idCFUNC,
|
109
|
+
id_core_set_method_alias,
|
110
|
+
id_core_set_variable_alias,
|
111
|
+
id_core_undef_method,
|
112
|
+
id_core_define_method,
|
113
|
+
id_core_define_singleton_method,
|
114
|
+
id_core_set_postexe,
|
115
|
+
id_core_hash_from_ary,
|
116
|
+
id_core_hash_merge_ary,
|
117
|
+
id_core_hash_merge_ptr,
|
118
|
+
id_core_hash_merge_kwd,
|
119
|
+
id_debug_created_info,
|
120
|
+
tPRESERVED_ID_END,
|
121
|
+
tFreeze,
|
122
|
+
tInspect,
|
123
|
+
tIntern,
|
124
|
+
tObject_id,
|
125
|
+
tConst_missing,
|
126
|
+
tMethodMissing,
|
127
|
+
tMethod_added,
|
128
|
+
tSingleton_method_added,
|
129
|
+
tMethod_removed,
|
130
|
+
tSingleton_method_removed,
|
131
|
+
tMethod_undefined,
|
132
|
+
tSingleton_method_undefined,
|
133
|
+
tLength,
|
134
|
+
tSize,
|
135
|
+
tGets,
|
136
|
+
tSucc,
|
137
|
+
tEach,
|
138
|
+
tProc,
|
139
|
+
tLambda,
|
140
|
+
tSend,
|
141
|
+
t__send__,
|
142
|
+
t__attached__,
|
143
|
+
tInitialize,
|
144
|
+
tInitialize_copy,
|
145
|
+
tInitialize_clone,
|
146
|
+
tInitialize_dup,
|
147
|
+
tTo_int,
|
148
|
+
tTo_ary,
|
149
|
+
tTo_str,
|
150
|
+
tTo_sym,
|
151
|
+
tTo_hash,
|
152
|
+
tTo_proc,
|
153
|
+
tTo_io,
|
154
|
+
tTo_a,
|
155
|
+
tTo_s,
|
156
|
+
tTo_i,
|
157
|
+
tBt,
|
158
|
+
tBt_locations,
|
159
|
+
tCall,
|
160
|
+
tMesg,
|
161
|
+
tException,
|
162
|
+
tUScore,
|
163
|
+
tNEXT_ID,
|
164
|
+
#define TOKEN2LOCALID(n) id##n = ((t##n<<ID_SCOPE_SHIFT)|ID_LOCAL|ID_STATIC_SYM)
|
165
|
+
TOKEN2LOCALID(Freeze),
|
166
|
+
TOKEN2LOCALID(Inspect),
|
167
|
+
TOKEN2LOCALID(Intern),
|
168
|
+
TOKEN2LOCALID(Object_id),
|
169
|
+
TOKEN2LOCALID(Const_missing),
|
170
|
+
TOKEN2LOCALID(MethodMissing),
|
171
|
+
TOKEN2LOCALID(Method_added),
|
172
|
+
TOKEN2LOCALID(Singleton_method_added),
|
173
|
+
TOKEN2LOCALID(Method_removed),
|
174
|
+
TOKEN2LOCALID(Singleton_method_removed),
|
175
|
+
TOKEN2LOCALID(Method_undefined),
|
176
|
+
TOKEN2LOCALID(Singleton_method_undefined),
|
177
|
+
TOKEN2LOCALID(Length),
|
178
|
+
TOKEN2LOCALID(Size),
|
179
|
+
TOKEN2LOCALID(Gets),
|
180
|
+
TOKEN2LOCALID(Succ),
|
181
|
+
TOKEN2LOCALID(Each),
|
182
|
+
TOKEN2LOCALID(Proc),
|
183
|
+
TOKEN2LOCALID(Lambda),
|
184
|
+
TOKEN2LOCALID(Send),
|
185
|
+
TOKEN2LOCALID(__send__),
|
186
|
+
TOKEN2LOCALID(__attached__),
|
187
|
+
TOKEN2LOCALID(Initialize),
|
188
|
+
TOKEN2LOCALID(Initialize_copy),
|
189
|
+
TOKEN2LOCALID(Initialize_clone),
|
190
|
+
TOKEN2LOCALID(Initialize_dup),
|
191
|
+
TOKEN2LOCALID(To_int),
|
192
|
+
TOKEN2LOCALID(To_ary),
|
193
|
+
TOKEN2LOCALID(To_str),
|
194
|
+
TOKEN2LOCALID(To_sym),
|
195
|
+
TOKEN2LOCALID(To_hash),
|
196
|
+
TOKEN2LOCALID(To_proc),
|
197
|
+
TOKEN2LOCALID(To_io),
|
198
|
+
TOKEN2LOCALID(To_a),
|
199
|
+
TOKEN2LOCALID(To_s),
|
200
|
+
TOKEN2LOCALID(To_i),
|
201
|
+
TOKEN2LOCALID(Bt),
|
202
|
+
TOKEN2LOCALID(Bt_locations),
|
203
|
+
TOKEN2LOCALID(Call),
|
204
|
+
TOKEN2LOCALID(Mesg),
|
205
|
+
TOKEN2LOCALID(Exception),
|
206
|
+
TOKEN2LOCALID(UScore),
|
207
|
+
tLAST_OP_ID = tPRESERVED_ID_END-1,
|
208
|
+
idLAST_OP_ID = tLAST_OP_ID >> ID_SCOPE_SHIFT
|
209
|
+
};
|
210
|
+
|
211
|
+
#endif /* RUBY_ID_H */
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#ifndef RUBY_ID_TABLE_H
|
2
|
+
#define RUBY_ID_TABLE_H 1
|
3
|
+
#include "ruby/ruby.h"
|
4
|
+
|
5
|
+
struct rb_id_table;
|
6
|
+
|
7
|
+
/* compatible with ST_* */
|
8
|
+
enum rb_id_table_iterator_result {
|
9
|
+
ID_TABLE_CONTINUE = ST_CONTINUE,
|
10
|
+
ID_TABLE_STOP = ST_STOP,
|
11
|
+
ID_TABLE_DELETE = ST_DELETE,
|
12
|
+
};
|
13
|
+
|
14
|
+
struct rb_id_table *rb_id_table_create(size_t size);
|
15
|
+
void rb_id_table_free(struct rb_id_table *tbl);
|
16
|
+
void rb_id_table_clear(struct rb_id_table *tbl);
|
17
|
+
|
18
|
+
size_t rb_id_table_size(const struct rb_id_table *tbl);
|
19
|
+
size_t rb_id_table_memsize(const struct rb_id_table *tbl);
|
20
|
+
|
21
|
+
int rb_id_table_insert(struct rb_id_table *tbl, ID id, VALUE val);
|
22
|
+
int rb_id_table_lookup(struct rb_id_table *tbl, ID id, VALUE *valp);
|
23
|
+
int rb_id_table_delete(struct rb_id_table *tbl, ID id);
|
24
|
+
|
25
|
+
typedef enum rb_id_table_iterator_result rb_id_table_foreach_func_t(ID id, VALUE val, void *data);
|
26
|
+
typedef enum rb_id_table_iterator_result rb_id_table_foreach_values_func_t(VALUE val, void *data);
|
27
|
+
void rb_id_table_foreach(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, void *data);
|
28
|
+
void rb_id_table_foreach_values(struct rb_id_table *tbl, rb_id_table_foreach_values_func_t *func, void *data);
|
29
|
+
|
30
|
+
#endif /* RUBY_ID_TABLE_H */
|
@@ -0,0 +1,110 @@
|
|
1
|
+
/** -*-c-*-
|
2
|
+
This file contains YARV instructions list.
|
3
|
+
|
4
|
+
----
|
5
|
+
This file is auto generated by insns2vm.rb
|
6
|
+
DO NOT TOUCH!
|
7
|
+
|
8
|
+
If you want to fix something, you must edit 'template/insns.inc.tmpl'
|
9
|
+
or tool/insns2vm.rb
|
10
|
+
*/
|
11
|
+
|
12
|
+
|
13
|
+
/* BIN : Basic Instruction Name */
|
14
|
+
#define BIN(n) YARVINSN_##n
|
15
|
+
|
16
|
+
enum ruby_vminsn_type {
|
17
|
+
BIN(nop) = 0,
|
18
|
+
BIN(getlocal) = 1,
|
19
|
+
BIN(setlocal) = 2,
|
20
|
+
BIN(getspecial) = 3,
|
21
|
+
BIN(setspecial) = 4,
|
22
|
+
BIN(getinstancevariable) = 5,
|
23
|
+
BIN(setinstancevariable) = 6,
|
24
|
+
BIN(getclassvariable) = 7,
|
25
|
+
BIN(setclassvariable) = 8,
|
26
|
+
BIN(getconstant) = 9,
|
27
|
+
BIN(setconstant) = 10,
|
28
|
+
BIN(getglobal) = 11,
|
29
|
+
BIN(setglobal) = 12,
|
30
|
+
BIN(putnil) = 13,
|
31
|
+
BIN(putself) = 14,
|
32
|
+
BIN(putobject) = 15,
|
33
|
+
BIN(putspecialobject) = 16,
|
34
|
+
BIN(putiseq) = 17,
|
35
|
+
BIN(putstring) = 18,
|
36
|
+
BIN(concatstrings) = 19,
|
37
|
+
BIN(tostring) = 20,
|
38
|
+
BIN(freezestring) = 21,
|
39
|
+
BIN(toregexp) = 22,
|
40
|
+
BIN(newarray) = 23,
|
41
|
+
BIN(duparray) = 24,
|
42
|
+
BIN(expandarray) = 25,
|
43
|
+
BIN(concatarray) = 26,
|
44
|
+
BIN(splatarray) = 27,
|
45
|
+
BIN(newhash) = 28,
|
46
|
+
BIN(newrange) = 29,
|
47
|
+
BIN(pop) = 30,
|
48
|
+
BIN(dup) = 31,
|
49
|
+
BIN(dupn) = 32,
|
50
|
+
BIN(swap) = 33,
|
51
|
+
BIN(reverse) = 34,
|
52
|
+
BIN(reput) = 35,
|
53
|
+
BIN(topn) = 36,
|
54
|
+
BIN(setn) = 37,
|
55
|
+
BIN(adjuststack) = 38,
|
56
|
+
BIN(defined) = 39,
|
57
|
+
BIN(checkmatch) = 40,
|
58
|
+
BIN(checkkeyword) = 41,
|
59
|
+
BIN(trace) = 42,
|
60
|
+
BIN(defineclass) = 43,
|
61
|
+
BIN(send) = 44,
|
62
|
+
BIN(opt_str_freeze) = 45,
|
63
|
+
BIN(opt_send_without_block) = 46,
|
64
|
+
BIN(invokesuper) = 47,
|
65
|
+
BIN(invokeblock) = 48,
|
66
|
+
BIN(leave) = 49,
|
67
|
+
BIN(throw) = 50,
|
68
|
+
BIN(jump) = 51,
|
69
|
+
BIN(branchif) = 52,
|
70
|
+
BIN(branchunless) = 53,
|
71
|
+
BIN(branchnil) = 54,
|
72
|
+
BIN(getinlinecache) = 55,
|
73
|
+
BIN(setinlinecache) = 56,
|
74
|
+
BIN(once) = 57,
|
75
|
+
BIN(opt_case_dispatch) = 58,
|
76
|
+
BIN(opt_plus) = 59,
|
77
|
+
BIN(opt_minus) = 60,
|
78
|
+
BIN(opt_mult) = 61,
|
79
|
+
BIN(opt_div) = 62,
|
80
|
+
BIN(opt_mod) = 63,
|
81
|
+
BIN(opt_eq) = 64,
|
82
|
+
BIN(opt_neq) = 65,
|
83
|
+
BIN(opt_lt) = 66,
|
84
|
+
BIN(opt_le) = 67,
|
85
|
+
BIN(opt_gt) = 68,
|
86
|
+
BIN(opt_ge) = 69,
|
87
|
+
BIN(opt_ltlt) = 70,
|
88
|
+
BIN(opt_aref) = 71,
|
89
|
+
BIN(opt_aset) = 72,
|
90
|
+
BIN(opt_aset_with) = 73,
|
91
|
+
BIN(opt_aref_with) = 74,
|
92
|
+
BIN(opt_length) = 75,
|
93
|
+
BIN(opt_size) = 76,
|
94
|
+
BIN(opt_empty_p) = 77,
|
95
|
+
BIN(opt_succ) = 78,
|
96
|
+
BIN(opt_not) = 79,
|
97
|
+
BIN(opt_regexpmatch1) = 80,
|
98
|
+
BIN(opt_regexpmatch2) = 81,
|
99
|
+
BIN(opt_call_c_function) = 82,
|
100
|
+
BIN(bitblt) = 83,
|
101
|
+
BIN(answer) = 84,
|
102
|
+
BIN(getlocal_OP__WC__0) = 85,
|
103
|
+
BIN(getlocal_OP__WC__1) = 86,
|
104
|
+
BIN(setlocal_OP__WC__0) = 87,
|
105
|
+
BIN(setlocal_OP__WC__1) = 88,
|
106
|
+
BIN(putobject_OP_INT2FIX_O_0_C_) = 89,
|
107
|
+
BIN(putobject_OP_INT2FIX_O_1_C_) = 90,
|
108
|
+
VM_INSTRUCTION_SIZE = 91
|
109
|
+
};
|
110
|
+
|