debase-ruby_core_source 0.8.3 → 0.8.4
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/debase/ruby_core_source.rb +0 -8
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/addr2line.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/ccan/build_assert/build_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/ccan/check_type/check_type.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/ccan/container_of/container_of.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/ccan/list/list.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/ccan/str/str.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/constant.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/dln.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/encindex.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/eval_intern.h +8 -29
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/gc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/id.h +1 -2
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/id_table.h +0 -0
- data/lib/debase/ruby_core_source/ruby-2.3.0-p0/insns.inc +110 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/insns_info.inc +7 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/internal.h +33 -2
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/iseq.h +69 -1
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/known_errors.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/method.h +7 -4
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/node.h +4 -5
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/node_name.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/opt_sc.inc +8 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/optinsn.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/optunifs.inc +1 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/parse.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/probes_helper.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/regenc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/regint.h +25 -10
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/regparse.h +5 -1
- data/lib/debase/ruby_core_source/ruby-2.3.0-p0/revision.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/ruby_atomic.h +2 -2
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/siphash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/symbol.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/thread_pthread.h +2 -2
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/thread_win32.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/timev.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/transcode_data.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/version.h +5 -5
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/vm.inc +174 -136
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/vm_call_iseq_optimized.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/vm_core.h +40 -20
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/vm_debug.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/vm_exec.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/vm_insnhelper.h +0 -19
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/vm_opts.h +2 -2
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/vmtc.inc +1 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +48 -48
- data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/insns.inc +0 -109
- data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/revision.h +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1974f1063e14dee6bd0227245378ebf72d96fcdd
|
4
|
+
data.tar.gz: e137f3a133e22858383b4093357ffb9f40c03f26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa493c8dd2907d50d9b51f6ef0a9f97f5d77c20ece202e8b869f6c052deccde3fb3090ab2e3a2588beaec46d3a871df3ecb7bd954dcdf4343d9ad194e951ebac
|
7
|
+
data.tar.gz: 37c06072a8f53973223cca9acc3d7a1cec10dbefc1d1fef3bddc7d151c6a3d364cde15acab104948ea479a504c231e5f86adbbf6431cfcc96f0ad8f73ac95cda
|
data/CHANGELOG.md
CHANGED
@@ -4,14 +4,6 @@ require 'rbconfig'
|
|
4
4
|
module Debase
|
5
5
|
module RubyCoreSource
|
6
6
|
REVISION_MAP = {
|
7
|
-
37411 => 'ruby-2.0.0-preview1',
|
8
|
-
38126 => 'ruby-2.0.0-preview2',
|
9
|
-
38733 => 'ruby-2.0.0-rc1',
|
10
|
-
39161 => 'ruby-2.0.0-rc2',
|
11
|
-
47618 => 'ruby-2.2.0-preview1',
|
12
|
-
48629 => 'ruby-2.2.0-preview2',
|
13
|
-
48887 => 'ruby-2.2.0-rc1',
|
14
|
-
52539 => 'ruby-2.3.0-preview1',
|
15
7
|
53028 => 'ruby-2.3.0-preview2',
|
16
8
|
}
|
17
9
|
|
File without changes
|
File without changes
|
data/lib/debase/ruby_core_source/{ruby-2.3.0-preview1 → ruby-2.3.0-p0}/ccan/check_type/check_type.h
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -179,8 +179,8 @@ rb_threadptr_tag_jump(rb_thread_t *th, int st)
|
|
179
179
|
|
180
180
|
/* CREF operators */
|
181
181
|
|
182
|
-
#define
|
183
|
-
#define
|
182
|
+
#define CREF_FL_PUSHED_BY_EVAL IMEMO_FL_USER1
|
183
|
+
#define CREF_FL_OMOD_SHARED IMEMO_FL_USER2
|
184
184
|
|
185
185
|
static inline VALUE
|
186
186
|
CREF_CLASS(const rb_cref_t *cref)
|
@@ -188,40 +188,18 @@ CREF_CLASS(const rb_cref_t *cref)
|
|
188
188
|
return cref->klass;
|
189
189
|
}
|
190
190
|
|
191
|
-
static inline void
|
192
|
-
CREF_CLASS_SET(rb_cref_t *cref, VALUE klass)
|
193
|
-
{
|
194
|
-
RB_OBJ_WRITE(cref, &cref->klass, klass);
|
195
|
-
}
|
196
|
-
|
197
191
|
static inline rb_cref_t *
|
198
192
|
CREF_NEXT(const rb_cref_t *cref)
|
199
193
|
{
|
200
194
|
return cref->next;
|
201
195
|
}
|
202
196
|
|
203
|
-
static inline void
|
204
|
-
CREF_NEXT_SET(rb_cref_t *cref, const rb_cref_t *next_cref)
|
205
|
-
{
|
206
|
-
RB_OBJ_WRITE(cref, &cref->next, next_cref);
|
207
|
-
}
|
208
|
-
|
209
197
|
static inline const rb_scope_visibility_t *
|
210
198
|
CREF_SCOPE_VISI(const rb_cref_t *cref)
|
211
199
|
{
|
212
200
|
return &cref->scope_visi;
|
213
201
|
}
|
214
202
|
|
215
|
-
static inline void
|
216
|
-
CREF_SCOPE_VISI_COPY(rb_cref_t *dst_cref, const rb_cref_t *src_cref)
|
217
|
-
{
|
218
|
-
const rb_scope_visibility_t *src = &src_cref->scope_visi;
|
219
|
-
rb_scope_visibility_t *dst = &dst_cref->scope_visi;
|
220
|
-
|
221
|
-
dst->method_visi = src->method_visi;
|
222
|
-
dst->module_func = src->module_func;
|
223
|
-
}
|
224
|
-
|
225
203
|
static inline VALUE
|
226
204
|
CREF_REFINEMENTS(const rb_cref_t *cref)
|
227
205
|
{
|
@@ -237,31 +215,31 @@ CREF_REFINEMENTS_SET(rb_cref_t *cref, VALUE refs)
|
|
237
215
|
static inline int
|
238
216
|
CREF_PUSHED_BY_EVAL(const rb_cref_t *cref)
|
239
217
|
{
|
240
|
-
return cref->flags &
|
218
|
+
return cref->flags & CREF_FL_PUSHED_BY_EVAL;
|
241
219
|
}
|
242
220
|
|
243
221
|
static inline void
|
244
222
|
CREF_PUSHED_BY_EVAL_SET(rb_cref_t *cref)
|
245
223
|
{
|
246
|
-
cref->flags |=
|
224
|
+
cref->flags |= CREF_FL_PUSHED_BY_EVAL;
|
247
225
|
}
|
248
226
|
|
249
227
|
static inline int
|
250
228
|
CREF_OMOD_SHARED(const rb_cref_t *cref)
|
251
229
|
{
|
252
|
-
return cref->flags &
|
230
|
+
return cref->flags & CREF_FL_OMOD_SHARED;
|
253
231
|
}
|
254
232
|
|
255
233
|
static inline void
|
256
234
|
CREF_OMOD_SHARED_SET(rb_cref_t *cref)
|
257
235
|
{
|
258
|
-
cref->flags |=
|
236
|
+
cref->flags |= CREF_FL_OMOD_SHARED;
|
259
237
|
}
|
260
238
|
|
261
239
|
static inline void
|
262
240
|
CREF_OMOD_SHARED_UNSET(rb_cref_t *cref)
|
263
241
|
{
|
264
|
-
cref->flags &= ~
|
242
|
+
cref->flags &= ~CREF_FL_OMOD_SHARED;
|
265
243
|
}
|
266
244
|
|
267
245
|
void rb_thread_cleanup(void);
|
@@ -296,6 +274,7 @@ NORETURN(void rb_raise_method_missing(rb_thread_t *th, int argc, const VALUE *ar
|
|
296
274
|
|
297
275
|
VALUE rb_vm_make_jump_tag_but_local_jump(int state, VALUE val);
|
298
276
|
rb_cref_t *rb_vm_cref(void);
|
277
|
+
rb_cref_t *rb_vm_cref_replace_with_duplicated_cref(void);
|
299
278
|
VALUE rb_vm_call_cfunc(VALUE recv, VALUE (*func)(VALUE), VALUE arg, const rb_block_t *blockptr, VALUE filename);
|
300
279
|
void rb_vm_set_progname(VALUE filename);
|
301
280
|
void rb_thread_terminate_all(void);
|
File without changes
|
File without changes
|
@@ -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
|
+
|
@@ -45,6 +45,7 @@ static const char *const insn_name_info[] = {
|
|
45
45
|
"putstring",
|
46
46
|
"concatstrings",
|
47
47
|
"tostring",
|
48
|
+
"freezestring",
|
48
49
|
"toregexp",
|
49
50
|
"newarray",
|
50
51
|
"duparray",
|
@@ -139,6 +140,7 @@ static const char *const insn_operand_info[] = {
|
|
139
140
|
"V",
|
140
141
|
"N",
|
141
142
|
"",
|
143
|
+
"V",
|
142
144
|
"NN",
|
143
145
|
"N",
|
144
146
|
"V",
|
@@ -233,6 +235,7 @@ static const int insn_len_info[] = {
|
|
233
235
|
2,
|
234
236
|
2,
|
235
237
|
1,
|
238
|
+
2,
|
236
239
|
3,
|
237
240
|
2,
|
238
241
|
2,
|
@@ -336,6 +339,7 @@ static const int insn_stack_push_num_info[] = {
|
|
336
339
|
1,
|
337
340
|
1,
|
338
341
|
1,
|
342
|
+
1,
|
339
343
|
0,
|
340
344
|
2,
|
341
345
|
1,
|
@@ -472,6 +476,9 @@ insn_stack_increase(int depth, int insn, VALUE *opes)
|
|
472
476
|
case BIN(tostring):{
|
473
477
|
return depth + 0;
|
474
478
|
}
|
479
|
+
case BIN(freezestring):{
|
480
|
+
return depth + 0;
|
481
|
+
}
|
475
482
|
case BIN(toregexp):{
|
476
483
|
int inc = 0;
|
477
484
|
int cnt = FIX2INT(opes[1]);
|
@@ -491,6 +491,7 @@ struct RClass {
|
|
491
491
|
|
492
492
|
void rb_class_subclass_add(VALUE super, VALUE klass);
|
493
493
|
void rb_class_remove_from_super_subclasses(VALUE);
|
494
|
+
int rb_singleton_class_internal_p(VALUE sklass);
|
494
495
|
|
495
496
|
#define RCLASS_EXT(c) (RCLASS(c)->ptr)
|
496
497
|
#define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
|
@@ -725,6 +726,7 @@ void rb_encdb_declare(const char *name);
|
|
725
726
|
void rb_enc_set_base(const char *name, const char *orig);
|
726
727
|
int rb_enc_set_dummy(int index);
|
727
728
|
void rb_encdb_set_unicode(int index);
|
729
|
+
int rb_data_is_encoding(VALUE obj);
|
728
730
|
|
729
731
|
/* enum.c */
|
730
732
|
VALUE rb_f_send(int argc, VALUE *argv, VALUE recv);
|
@@ -734,6 +736,8 @@ extern VALUE rb_eEAGAIN;
|
|
734
736
|
extern VALUE rb_eEWOULDBLOCK;
|
735
737
|
extern VALUE rb_eEINPROGRESS;
|
736
738
|
NORETURN(PRINTF_ARGS(void rb_compile_bug(const char*, int, const char*, ...), 3, 4));
|
739
|
+
NORETURN(PRINTF_ARGS(void rb_compile_bug_str(VALUE file, int line, const char *fmt, ...), 3, 4));
|
740
|
+
PRINTF_ARGS(void rb_compile_error_str(VALUE file, int line, void *enc, const char *fmt, ...), 4, 5);
|
737
741
|
VALUE rb_check_backtrace(VALUE);
|
738
742
|
NORETURN(void rb_async_bug_errno(const char *,int));
|
739
743
|
const char *rb_builtin_type_name(int t);
|
@@ -837,6 +841,7 @@ st_table *rb_init_identtable_with_size(st_index_t size);
|
|
837
841
|
#define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h)
|
838
842
|
VALUE rb_hash_keys(VALUE hash);
|
839
843
|
VALUE rb_hash_values(VALUE hash);
|
844
|
+
VALUE rb_hash_rehash(VALUE hash);
|
840
845
|
#define HASH_DELETED FL_USER1
|
841
846
|
#define HASH_PROC_DEFAULT FL_USER2
|
842
847
|
|
@@ -969,6 +974,7 @@ rb_float_new_inline(double d)
|
|
969
974
|
void rb_obj_copy_ivar(VALUE dest, VALUE obj);
|
970
975
|
VALUE rb_obj_equal(VALUE obj1, VALUE obj2);
|
971
976
|
VALUE rb_class_search_ancestor(VALUE klass, VALUE super);
|
977
|
+
NORETURN(void rb_undefined_alloc(VALUE klass));
|
972
978
|
double rb_num_to_dbl(VALUE val);
|
973
979
|
VALUE rb_obj_dig(int argc, VALUE *argv, VALUE self, VALUE notfound);
|
974
980
|
|
@@ -1136,11 +1142,31 @@ VALUE rb_sym_to_proc(VALUE sym);
|
|
1136
1142
|
|
1137
1143
|
/* symbol.c */
|
1138
1144
|
#ifdef RUBY_ENCODING_H
|
1139
|
-
VALUE
|
1145
|
+
VALUE rb_sym_intern(const char *ptr, long len, rb_encoding *enc);
|
1146
|
+
VALUE rb_sym_intern_cstr(const char *ptr, rb_encoding *enc);
|
1147
|
+
#ifdef __GNUC__
|
1148
|
+
#define rb_sym_intern_cstr(ptr, enc) __extension__ ( \
|
1149
|
+
{ \
|
1150
|
+
(__builtin_constant_p(ptr)) ? \
|
1151
|
+
rb_sym_intern((ptr), (long)strlen(ptr), (enc)) : \
|
1152
|
+
rb_sym_intern_cstr((ptr), (enc)); \
|
1153
|
+
})
|
1154
|
+
#endif
|
1155
|
+
#endif
|
1156
|
+
VALUE rb_sym_intern_ascii(const char *ptr, long len);
|
1157
|
+
VALUE rb_sym_intern_ascii_cstr(const char *ptr);
|
1158
|
+
#ifdef __GNUC__
|
1159
|
+
#define rb_sym_intern_ascii_cstr(ptr) __extension__ ( \
|
1160
|
+
{ \
|
1161
|
+
(__builtin_constant_p(ptr)) ? \
|
1162
|
+
rb_sym_intern_ascii((ptr), (long)strlen(ptr)) : \
|
1163
|
+
rb_sym_intern_ascii_cstr(ptr); \
|
1164
|
+
})
|
1140
1165
|
#endif
|
1141
1166
|
|
1142
1167
|
/* struct.c */
|
1143
1168
|
VALUE rb_struct_init_copy(VALUE copy, VALUE s);
|
1169
|
+
VALUE rb_struct_lookup(VALUE s, VALUE idx);
|
1144
1170
|
|
1145
1171
|
/* time.c */
|
1146
1172
|
struct timeval rb_time_timeval(VALUE);
|
@@ -1184,9 +1210,10 @@ size_t rb_generic_ivar_memsize(VALUE);
|
|
1184
1210
|
VALUE rb_search_class_path(VALUE);
|
1185
1211
|
VALUE rb_attr_delete(VALUE, ID);
|
1186
1212
|
VALUE rb_ivar_lookup(VALUE obj, ID id, VALUE undef);
|
1213
|
+
void rb_autoload_str(VALUE mod, ID id, VALUE file);
|
1187
1214
|
|
1188
1215
|
/* version.c */
|
1189
|
-
extern
|
1216
|
+
extern const char ruby_engine[];
|
1190
1217
|
|
1191
1218
|
/* vm_insnhelper.h */
|
1192
1219
|
rb_serial_t rb_next_class_serial(void);
|
@@ -1290,6 +1317,7 @@ VALUE rb_ident_hash_new(void);
|
|
1290
1317
|
|
1291
1318
|
/* io.c (export) */
|
1292
1319
|
void rb_maygvl_fd_fix_cloexec(int fd);
|
1320
|
+
int rb_gc_for_fd(int err);
|
1293
1321
|
|
1294
1322
|
/* numeric.c (export) */
|
1295
1323
|
VALUE rb_int_positive_pow(long x, unsigned long y);
|
@@ -1319,6 +1347,9 @@ VALUE rb_gcd_gmp(VALUE x, VALUE y);
|
|
1319
1347
|
VALUE rb_setup_fake_str(struct RString *fake_str, const char *name, long len, rb_encoding *enc);
|
1320
1348
|
#endif
|
1321
1349
|
|
1350
|
+
/* thread.c (export) */
|
1351
|
+
int ruby_thread_has_gvl_p(void); /* for ext/fiddle/closure.c */
|
1352
|
+
|
1322
1353
|
/* util.c (export) */
|
1323
1354
|
extern const signed char ruby_digit36_to_number_table[];
|
1324
1355
|
extern const char ruby_hexdigits[];
|
@@ -12,6 +12,9 @@
|
|
12
12
|
#ifndef RUBY_ISEQ_H
|
13
13
|
#define RUBY_ISEQ_H 1
|
14
14
|
|
15
|
+
#define ISEQ_MAJOR_VERSION 2
|
16
|
+
#define ISEQ_MINOR_VERSION 3
|
17
|
+
|
15
18
|
#ifndef rb_iseq_t
|
16
19
|
typedef struct rb_iseq_struct rb_iseq_t;
|
17
20
|
#define rb_iseq_t rb_iseq_t
|
@@ -23,6 +26,68 @@ rb_call_info_kw_arg_bytes(int keyword_len)
|
|
23
26
|
return sizeof(struct rb_call_info_kw_arg) + sizeof(VALUE) * (keyword_len - 1);
|
24
27
|
}
|
25
28
|
|
29
|
+
enum iseq_mark_ary_index {
|
30
|
+
ISEQ_MARK_ARY_COVERAGE = 0,
|
31
|
+
ISEQ_MARK_ARY_FLIP_CNT = 1,
|
32
|
+
ISEQ_MARK_ARY_ORIGINAL_ISEQ = 2,
|
33
|
+
};
|
34
|
+
|
35
|
+
static inline VALUE
|
36
|
+
iseq_mark_ary_create(int flip_cnt)
|
37
|
+
{
|
38
|
+
VALUE ary = rb_ary_tmp_new(3);
|
39
|
+
rb_ary_push(ary, Qnil); /* ISEQ_MARK_ARY_COVERAGE */
|
40
|
+
rb_ary_push(ary, INT2FIX(flip_cnt)); /* ISEQ_MARK_ARY_FLIP_CNT */
|
41
|
+
rb_ary_push(ary, Qnil); /* ISEQ_MARK_ARY_ORIGINAL_ISEQ */
|
42
|
+
return ary;
|
43
|
+
}
|
44
|
+
|
45
|
+
#define ISEQ_MARK_ARY(iseq) (iseq)->body->mark_ary
|
46
|
+
|
47
|
+
#define ISEQ_COVERAGE(iseq) RARRAY_AREF(ISEQ_MARK_ARY(iseq), ISEQ_MARK_ARY_COVERAGE)
|
48
|
+
#define ISEQ_COVERAGE_SET(iseq, cov) RARRAY_ASET(ISEQ_MARK_ARY(iseq), ISEQ_MARK_ARY_COVERAGE, cov)
|
49
|
+
|
50
|
+
#define ISEQ_FLIP_CNT(iseq) FIX2INT(RARRAY_AREF(ISEQ_MARK_ARY(iseq), ISEQ_MARK_ARY_FLIP_CNT))
|
51
|
+
|
52
|
+
static inline int
|
53
|
+
ISEQ_FLIP_CNT_INCREMENT(const rb_iseq_t *iseq)
|
54
|
+
{
|
55
|
+
int cnt = ISEQ_FLIP_CNT(iseq);
|
56
|
+
RARRAY_ASET(ISEQ_MARK_ARY(iseq), ISEQ_MARK_ARY_FLIP_CNT, INT2FIX(cnt+1));
|
57
|
+
return cnt;
|
58
|
+
}
|
59
|
+
|
60
|
+
static inline VALUE *
|
61
|
+
ISEQ_ORIGINAL_ISEQ(const rb_iseq_t *iseq)
|
62
|
+
{
|
63
|
+
VALUE str = RARRAY_AREF(ISEQ_MARK_ARY(iseq), ISEQ_MARK_ARY_ORIGINAL_ISEQ);
|
64
|
+
if (RTEST(str)) return (VALUE *)RSTRING_PTR(str);
|
65
|
+
return NULL;
|
66
|
+
}
|
67
|
+
|
68
|
+
static inline VALUE *
|
69
|
+
ISEQ_ORIGINAL_ISEQ_ALLOC(const rb_iseq_t *iseq, long size)
|
70
|
+
{
|
71
|
+
VALUE str = rb_str_tmp_new(size * sizeof(VALUE));
|
72
|
+
RARRAY_ASET(ISEQ_MARK_ARY(iseq), ISEQ_MARK_ARY_ORIGINAL_ISEQ, str);
|
73
|
+
return (VALUE *)RSTRING_PTR(str);
|
74
|
+
}
|
75
|
+
|
76
|
+
#define ISEQ_COMPILE_DATA(iseq) (iseq)->aux.compile_data
|
77
|
+
|
78
|
+
static inline rb_iseq_t *
|
79
|
+
iseq_imemo_alloc(void)
|
80
|
+
{
|
81
|
+
return (rb_iseq_t *)rb_imemo_new(imemo_iseq, 0, 0, 0, 0);
|
82
|
+
}
|
83
|
+
|
84
|
+
#define ISEQ_NOT_LOADED_YET IMEMO_FL_USER1
|
85
|
+
|
86
|
+
VALUE iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt);
|
87
|
+
void ibf_load_iseq_complete(rb_iseq_t *iseq);
|
88
|
+
const rb_iseq_t *iseq_ibf_load(VALUE str);
|
89
|
+
VALUE iseq_ibf_load_extra_data(VALUE str);
|
90
|
+
|
26
91
|
RUBY_SYMBOL_EXPORT_BEGIN
|
27
92
|
|
28
93
|
/* compile.c */
|
@@ -67,7 +132,7 @@ struct rb_compile_option_struct {
|
|
67
132
|
int stack_caching;
|
68
133
|
int trace_instruction;
|
69
134
|
int frozen_string_literal;
|
70
|
-
int
|
135
|
+
int debug_frozen_string_literal;
|
71
136
|
int debug_level;
|
72
137
|
};
|
73
138
|
|
@@ -176,6 +241,9 @@ enum defined_type {
|
|
176
241
|
VALUE rb_iseq_defined_string(enum defined_type type);
|
177
242
|
void rb_iseq_make_compile_option(struct rb_compile_option_struct *option, VALUE opt);
|
178
243
|
|
244
|
+
/* vm.c */
|
245
|
+
VALUE rb_iseq_local_variables(const rb_iseq_t *iseq);
|
246
|
+
|
179
247
|
RUBY_SYMBOL_EXPORT_END
|
180
248
|
|
181
249
|
#endif /* RUBY_ISEQ_H */
|