debase-ruby_core_source 0.10.17 → 0.10.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/addr2line.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/builtin.h +121 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/ccan/list/list.h +789 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/ccan/str/str.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/constant.h +55 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/darray.h +179 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/debug_counter.h +468 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/dln.h +31 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/encindex.h +70 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/eval_intern.h +339 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/gc.h +147 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/hrtime.h +227 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/id.h +295 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/id_table.h +36 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/insns.inc +249 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/insns_info.inc +9061 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/array.h +163 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/bignum.h +246 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/bits.h +565 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/class.h +181 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/cmdlineopt.h +61 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/compar.h +49 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/compile.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/compilers.h +107 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/cont.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/dir.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/enc.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/encoding.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/enum.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/enumerator.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/error.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/eval.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/file.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/fixnum.h +184 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/gc.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/hash.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/imemo.h +242 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/inits.h +50 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/io.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/load.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/loadpath.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/math.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/missing.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/numeric.h +275 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/object.h +61 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/parse.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/proc.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/process.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/ractor.h +6 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/random.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/range.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/rational.h +72 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/re.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/sanitizers.h +190 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/serial.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/signal.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/static_assert.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/string.h +147 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/struct.h +153 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/symbol.h +42 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/thread.h +55 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/time.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/transcode.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/util.h +27 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/variable.h +88 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/vm.h +134 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal/warnings.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/internal.h +113 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/iseq.h +329 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/known_errors.inc +791 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/method.h +254 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/mjit.h +132 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/mjit_compile_attr.inc +430 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/mjit_compiler.h +58 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/mjit_unit.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/node.h +511 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/node_name.inc +210 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/opt_sc.inc +109 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/parse.h +215 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/probes_helper.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/ractor_core.h +343 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/regenc.h +254 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/regint.h +984 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/regparse.h +370 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/revision.h +5 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/ruby_assert.h +14 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/ruby_atomic.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/shape.h +194 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/symbol.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/thread_none.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/thread_pthread.h +132 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/thread_win32.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/timev.h +57 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/transcode_data.h +138 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/transient_heap.h +65 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/variable.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/version.h +65 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vm.inc +5476 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vm_call_iseq_optimized.inc +244 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vm_callinfo.h +550 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vm_core.h +2137 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vm_debug.h +122 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vm_exec.h +197 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vm_insnhelper.h +266 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vm_opts.h +73 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vm_sync.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/vmtc.inc +243 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview3/yjit.h +72 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +118 -3
@@ -0,0 +1,34 @@
|
|
1
|
+
#ifndef INTERNAL_TIME_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_TIME_H
|
3
|
+
/**
|
4
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
5
|
+
* @copyright This file is a part of the programming language Ruby.
|
6
|
+
* Permission is hereby granted, to either redistribute and/or
|
7
|
+
* modify this file, provided that the conditions mentioned in the
|
8
|
+
* file COPYING are met. Consult the file for details.
|
9
|
+
* @brief Internal header for Time.
|
10
|
+
*/
|
11
|
+
#include "ruby/internal/config.h" /* for SIGNEDNESS_OF_TIME_T */
|
12
|
+
#include "internal/bits.h" /* for SIGNED_INTEGER_MAX */
|
13
|
+
#include "ruby/ruby.h" /* for VALUE */
|
14
|
+
|
15
|
+
#if SIGNEDNESS_OF_TIME_T < 0 /* signed */
|
16
|
+
# define TIMET_MAX SIGNED_INTEGER_MAX(time_t)
|
17
|
+
# define TIMET_MIN SIGNED_INTEGER_MIN(time_t)
|
18
|
+
#elif SIGNEDNESS_OF_TIME_T > 0 /* unsigned */
|
19
|
+
# define TIMET_MAX UNSIGNED_INTEGER_MAX(time_t)
|
20
|
+
# define TIMET_MIN ((time_t)0)
|
21
|
+
#endif
|
22
|
+
|
23
|
+
struct timeval; /* <- in <sys/time.h> or <winsock2.h> */
|
24
|
+
|
25
|
+
/* time.c */
|
26
|
+
struct timeval rb_time_timeval(VALUE);
|
27
|
+
|
28
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
29
|
+
/* time.c (export) */
|
30
|
+
void ruby_reset_leap_second_info(void);
|
31
|
+
void ruby_reset_timezone(void);
|
32
|
+
RUBY_SYMBOL_EXPORT_END
|
33
|
+
|
34
|
+
#endif /* INTERNAL_TIME_H */
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#ifndef INTERNAL_TRANSCODE_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_TRANSCODE_H
|
3
|
+
/**
|
4
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
5
|
+
* @copyright This file is a part of the programming language Ruby.
|
6
|
+
* Permission is hereby granted, to either redistribute and/or
|
7
|
+
* modify this file, provided that the conditions mentioned in the
|
8
|
+
* file COPYING are met. Consult the file for details.
|
9
|
+
* @brief Internal header for Encoding::Converter.
|
10
|
+
*/
|
11
|
+
#include "ruby/internal/config.h"
|
12
|
+
#include <stddef.h> /* for size_t */
|
13
|
+
#include "ruby/ruby.h" /* for VALUE */
|
14
|
+
#include "ruby/encoding.h" /* for rb_econv_t */
|
15
|
+
|
16
|
+
/* transcode.c */
|
17
|
+
extern VALUE rb_cEncodingConverter;
|
18
|
+
size_t rb_econv_memsize(rb_econv_t *);
|
19
|
+
|
20
|
+
#endif /* INTERNAL_TRANSCODE_H */
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#ifndef INTERNAL_UTIL_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_UTIL_H
|
3
|
+
/**
|
4
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
5
|
+
* @copyright This file is a part of the programming language Ruby.
|
6
|
+
* Permission is hereby granted, to either redistribute and/or
|
7
|
+
* modify this file, provided that the conditions mentioned in the
|
8
|
+
* file COPYING are met. Consult the file for details.
|
9
|
+
* @brief Internal header corresponding util.c.
|
10
|
+
* @warning DO NOT ADD RANDOM GARBAGE HERE THIS FILE IS FOR util.c
|
11
|
+
*/
|
12
|
+
#include "ruby/internal/config.h"
|
13
|
+
#include <stddef.h> /* for size_t */
|
14
|
+
|
15
|
+
#ifdef HAVE_SYS_TYPES_H
|
16
|
+
# include <sys/types.h> /* for ssize_t (note: on Windows ssize_t is */
|
17
|
+
#endif /* `#define`d in ruby/config.h) */
|
18
|
+
|
19
|
+
/* util.c */
|
20
|
+
char *ruby_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve);
|
21
|
+
char *ruby_hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign, char **rve);
|
22
|
+
|
23
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
24
|
+
/* util.c (export) */
|
25
|
+
RUBY_SYMBOL_EXPORT_END
|
26
|
+
|
27
|
+
#endif /* INTERNAL_UTIL_H */
|
@@ -0,0 +1,88 @@
|
|
1
|
+
#ifndef INTERNAL_VARIABLE_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_VARIABLE_H
|
3
|
+
/**
|
4
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
5
|
+
* @copyright This file is a part of the programming language Ruby.
|
6
|
+
* Permission is hereby granted, to either redistribute and/or
|
7
|
+
* modify this file, provided that the conditions mentioned in the
|
8
|
+
* file COPYING are met. Consult the file for details.
|
9
|
+
* @brief Internal header for variables.
|
10
|
+
*/
|
11
|
+
#include "ruby/internal/config.h"
|
12
|
+
#include <stddef.h> /* for size_t */
|
13
|
+
#include "constant.h" /* for rb_const_entry_t */
|
14
|
+
#include "ruby/internal/stdbool.h" /* for bool */
|
15
|
+
#include "ruby/ruby.h" /* for VALUE */
|
16
|
+
#include "shape.h" /* for rb_shape_t */
|
17
|
+
|
18
|
+
/* global variable */
|
19
|
+
|
20
|
+
#define ROBJECT_TRANSIENT_FLAG FL_USER2
|
21
|
+
|
22
|
+
/* variable.c */
|
23
|
+
void rb_gc_mark_global_tbl(void);
|
24
|
+
void rb_gc_update_global_tbl(void);
|
25
|
+
size_t rb_generic_ivar_memsize(VALUE);
|
26
|
+
VALUE rb_search_class_path(VALUE);
|
27
|
+
VALUE rb_attr_delete(VALUE, ID);
|
28
|
+
void rb_autoload_str(VALUE mod, ID id, VALUE file);
|
29
|
+
VALUE rb_autoload_at_p(VALUE, ID, int);
|
30
|
+
NORETURN(VALUE rb_mod_const_missing(VALUE,VALUE));
|
31
|
+
rb_gvar_getter_t *rb_gvar_getter_function_of(ID);
|
32
|
+
rb_gvar_setter_t *rb_gvar_setter_function_of(ID);
|
33
|
+
void rb_gvar_readonly_setter(VALUE v, ID id, VALUE *_);
|
34
|
+
void rb_gvar_ractor_local(const char *name);
|
35
|
+
static inline bool ROBJ_TRANSIENT_P(VALUE obj);
|
36
|
+
static inline void ROBJ_TRANSIENT_SET(VALUE obj);
|
37
|
+
static inline void ROBJ_TRANSIENT_UNSET(VALUE obj);
|
38
|
+
|
39
|
+
struct gen_ivtbl;
|
40
|
+
int rb_gen_ivtbl_get(VALUE obj, ID id, struct gen_ivtbl **ivtbl);
|
41
|
+
|
42
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
43
|
+
/* variable.c (export) */
|
44
|
+
void rb_mark_generic_ivar(VALUE);
|
45
|
+
void rb_mv_generic_ivar(VALUE src, VALUE dst);
|
46
|
+
VALUE rb_const_missing(VALUE klass, VALUE name);
|
47
|
+
int rb_class_ivar_set(VALUE klass, ID vid, VALUE value);
|
48
|
+
void rb_iv_tbl_copy(VALUE dst, VALUE src);
|
49
|
+
RUBY_SYMBOL_EXPORT_END
|
50
|
+
|
51
|
+
MJIT_SYMBOL_EXPORT_BEGIN
|
52
|
+
VALUE rb_ivar_lookup(VALUE obj, ID id, VALUE undef);
|
53
|
+
VALUE rb_gvar_get(ID);
|
54
|
+
VALUE rb_gvar_set(ID, VALUE);
|
55
|
+
VALUE rb_gvar_defined(ID);
|
56
|
+
void rb_const_warn_if_deprecated(const rb_const_entry_t *, VALUE, ID);
|
57
|
+
rb_shape_t * rb_grow_iv_list(VALUE obj);
|
58
|
+
void rb_ensure_iv_list_size(VALUE obj, uint32_t len, uint32_t newsize);
|
59
|
+
struct gen_ivtbl * rb_ensure_generic_iv_list_size(VALUE obj, uint32_t newsize);
|
60
|
+
MJIT_SYMBOL_EXPORT_END
|
61
|
+
|
62
|
+
static inline bool
|
63
|
+
ROBJ_TRANSIENT_P(VALUE obj)
|
64
|
+
{
|
65
|
+
#if USE_TRANSIENT_HEAP
|
66
|
+
return FL_TEST_RAW(obj, ROBJECT_TRANSIENT_FLAG);
|
67
|
+
#else
|
68
|
+
return false;
|
69
|
+
#endif
|
70
|
+
}
|
71
|
+
|
72
|
+
static inline void
|
73
|
+
ROBJ_TRANSIENT_SET(VALUE obj)
|
74
|
+
{
|
75
|
+
#if USE_TRANSIENT_HEAP
|
76
|
+
FL_SET_RAW(obj, ROBJECT_TRANSIENT_FLAG);
|
77
|
+
#endif
|
78
|
+
}
|
79
|
+
|
80
|
+
static inline void
|
81
|
+
ROBJ_TRANSIENT_UNSET(VALUE obj)
|
82
|
+
{
|
83
|
+
#if USE_TRANSIENT_HEAP
|
84
|
+
FL_UNSET_RAW(obj, ROBJECT_TRANSIENT_FLAG);
|
85
|
+
#endif
|
86
|
+
}
|
87
|
+
|
88
|
+
#endif /* INTERNAL_VARIABLE_H */
|
@@ -0,0 +1,134 @@
|
|
1
|
+
#ifndef INTERNAL_VM_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_VM_H
|
3
|
+
/**
|
4
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
5
|
+
* @copyright This file is a part of the programming language Ruby.
|
6
|
+
* Permission is hereby granted, to either redistribute and/or
|
7
|
+
* modify this file, provided that the conditions mentioned in the
|
8
|
+
* file COPYING are met. Consult the file for details.
|
9
|
+
* @brief Internal header for RubyVM.
|
10
|
+
*/
|
11
|
+
#include "ruby/internal/stdbool.h" /* for bool */
|
12
|
+
#include "internal/serial.h" /* for rb_serial_t */
|
13
|
+
#include "internal/static_assert.h" /* for STATIC_ASSERT */
|
14
|
+
#include "ruby/ruby.h" /* for ID */
|
15
|
+
#include "ruby/st.h" /* for st_table */
|
16
|
+
|
17
|
+
#ifdef rb_funcallv
|
18
|
+
# undef rb_funcallv
|
19
|
+
#endif
|
20
|
+
|
21
|
+
#ifdef rb_method_basic_definition_p
|
22
|
+
# undef rb_method_basic_definition_p
|
23
|
+
#endif
|
24
|
+
|
25
|
+
struct rb_callable_method_entry_struct; /* in method.h */
|
26
|
+
struct rb_method_definition_struct; /* in method.h */
|
27
|
+
struct rb_execution_context_struct; /* in vm_core.h */
|
28
|
+
struct rb_control_frame_struct; /* in vm_core.h */
|
29
|
+
struct rb_callinfo; /* in vm_core.h */
|
30
|
+
|
31
|
+
enum method_missing_reason {
|
32
|
+
MISSING_NOENTRY = 0x00,
|
33
|
+
MISSING_PRIVATE = 0x01,
|
34
|
+
MISSING_PROTECTED = 0x02,
|
35
|
+
MISSING_FCALL = 0x04,
|
36
|
+
MISSING_VCALL = 0x08,
|
37
|
+
MISSING_SUPER = 0x10,
|
38
|
+
MISSING_MISSING = 0x20,
|
39
|
+
MISSING_NONE = 0x40
|
40
|
+
};
|
41
|
+
|
42
|
+
/* vm_insnhelper.h */
|
43
|
+
VALUE rb_vm_push_frame_fname(struct rb_execution_context_struct *ec, VALUE fname);
|
44
|
+
|
45
|
+
/* vm.c */
|
46
|
+
VALUE rb_obj_is_thread(VALUE obj);
|
47
|
+
void rb_vm_mark(void *ptr);
|
48
|
+
void rb_vm_each_stack_value(void *ptr, void (*cb)(VALUE, void*), void *ctx);
|
49
|
+
PUREFUNC(VALUE rb_vm_top_self(void));
|
50
|
+
const void **rb_vm_get_insns_address_table(void);
|
51
|
+
VALUE rb_source_location(int *pline);
|
52
|
+
const char *rb_source_location_cstr(int *pline);
|
53
|
+
MJIT_STATIC void rb_vm_pop_cfunc_frame(void);
|
54
|
+
int rb_vm_add_root_module(VALUE module);
|
55
|
+
void rb_vm_check_redefinition_by_prepend(VALUE klass);
|
56
|
+
int rb_vm_check_optimizable_mid(VALUE mid);
|
57
|
+
VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
|
58
|
+
MJIT_STATIC VALUE ruby_vm_special_exception_copy(VALUE);
|
59
|
+
PUREFUNC(st_table *rb_vm_fstring_table(void));
|
60
|
+
|
61
|
+
MJIT_SYMBOL_EXPORT_BEGIN
|
62
|
+
VALUE vm_exec(struct rb_execution_context_struct *, bool); /* used in JIT-ed code */
|
63
|
+
MJIT_SYMBOL_EXPORT_END
|
64
|
+
|
65
|
+
/* vm_eval.c */
|
66
|
+
VALUE rb_current_realfilepath(void);
|
67
|
+
VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE);
|
68
|
+
typedef void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE);
|
69
|
+
VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv,
|
70
|
+
rb_check_funcall_hook *hook, VALUE arg);
|
71
|
+
VALUE rb_check_funcall_with_hook_kw(VALUE recv, ID mid, int argc, const VALUE *argv,
|
72
|
+
rb_check_funcall_hook *hook, VALUE arg, int kw_splat);
|
73
|
+
const char *rb_type_str(enum ruby_value_type type);
|
74
|
+
VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE);
|
75
|
+
VALUE rb_check_funcall_basic_kw(VALUE, ID, VALUE, int, const VALUE*, int);
|
76
|
+
VALUE rb_yield_1(VALUE val);
|
77
|
+
VALUE rb_yield_force_blockarg(VALUE values);
|
78
|
+
VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
|
79
|
+
rb_block_call_func_t bl_proc, int min_argc, int max_argc,
|
80
|
+
VALUE data2);
|
81
|
+
void rb_check_stack_overflow(void);
|
82
|
+
|
83
|
+
/* vm_insnhelper.c */
|
84
|
+
VALUE rb_equal_opt(VALUE obj1, VALUE obj2);
|
85
|
+
VALUE rb_eql_opt(VALUE obj1, VALUE obj2);
|
86
|
+
|
87
|
+
struct rb_iseq_struct;
|
88
|
+
MJIT_SYMBOL_EXPORT_BEGIN
|
89
|
+
const struct rb_callcache *rb_vm_search_method_slowpath(const struct rb_callinfo *ci, VALUE klass);
|
90
|
+
MJIT_SYMBOL_EXPORT_END
|
91
|
+
|
92
|
+
/* vm_method.c */
|
93
|
+
struct rb_execution_context_struct;
|
94
|
+
MJIT_SYMBOL_EXPORT_BEGIN
|
95
|
+
int rb_ec_obj_respond_to(struct rb_execution_context_struct *ec, VALUE obj, ID id, int priv);
|
96
|
+
MJIT_SYMBOL_EXPORT_END
|
97
|
+
|
98
|
+
void rb_clear_constant_cache(void);
|
99
|
+
|
100
|
+
/* vm_dump.c */
|
101
|
+
void rb_print_backtrace(void);
|
102
|
+
|
103
|
+
/* vm_backtrace.c */
|
104
|
+
VALUE rb_vm_thread_backtrace(int argc, const VALUE *argv, VALUE thval);
|
105
|
+
VALUE rb_vm_thread_backtrace_locations(int argc, const VALUE *argv, VALUE thval);
|
106
|
+
VALUE rb_vm_backtrace(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
|
107
|
+
VALUE rb_vm_backtrace_locations(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
|
108
|
+
VALUE rb_make_backtrace(void);
|
109
|
+
void rb_backtrace_print_as_bugreport(void);
|
110
|
+
int rb_backtrace_p(VALUE obj);
|
111
|
+
VALUE rb_backtrace_to_str_ary(VALUE obj);
|
112
|
+
VALUE rb_backtrace_to_location_ary(VALUE obj);
|
113
|
+
void rb_backtrace_each(VALUE (*iter)(VALUE recv, VALUE str), VALUE output);
|
114
|
+
int rb_frame_info_p(VALUE obj);
|
115
|
+
int rb_get_node_id_from_frame_info(VALUE obj);
|
116
|
+
const struct rb_iseq_struct *rb_get_iseq_from_frame_info(VALUE obj);
|
117
|
+
|
118
|
+
MJIT_SYMBOL_EXPORT_BEGIN
|
119
|
+
VALUE rb_ec_backtrace_object(const struct rb_execution_context_struct *ec);
|
120
|
+
void rb_backtrace_use_iseq_first_lineno_for_last_location(VALUE self);
|
121
|
+
MJIT_SYMBOL_EXPORT_END
|
122
|
+
|
123
|
+
#define RUBY_DTRACE_CREATE_HOOK(name, arg) \
|
124
|
+
RUBY_DTRACE_HOOK(name##_CREATE, arg)
|
125
|
+
#define RUBY_DTRACE_HOOK(name, arg) \
|
126
|
+
do { \
|
127
|
+
if (UNLIKELY(RUBY_DTRACE_##name##_ENABLED())) { \
|
128
|
+
int dtrace_line; \
|
129
|
+
const char *dtrace_file = rb_source_location_cstr(&dtrace_line); \
|
130
|
+
if (!dtrace_file) dtrace_file = ""; \
|
131
|
+
RUBY_DTRACE_##name(arg, dtrace_file, dtrace_line); \
|
132
|
+
} \
|
133
|
+
} while (0)
|
134
|
+
#endif /* INTERNAL_VM_H */
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#ifndef INTERNAL_WARNINGS_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_WARNINGS_H
|
3
|
+
/**
|
4
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
5
|
+
* @copyright This file is a part of the programming language Ruby.
|
6
|
+
* Permission is hereby granted, to either redistribute and/or
|
7
|
+
* modify this file, provided that the conditions mentioned in the
|
8
|
+
* file COPYING are met. Consult the file for details.
|
9
|
+
* @brief Internal header to suppress / mandate warnings.
|
10
|
+
*/
|
11
|
+
#include "ruby/internal/warning_push.h"
|
12
|
+
#define COMPILER_WARNING_PUSH RBIMPL_WARNING_PUSH()
|
13
|
+
#define COMPILER_WARNING_POP RBIMPL_WARNING_POP()
|
14
|
+
#define COMPILER_WARNING_ERROR(flag) RBIMPL_WARNING_ERROR(flag)
|
15
|
+
#define COMPILER_WARNING_IGNORED(flag) RBIMPL_WARNING_IGNORED(flag)
|
16
|
+
#endif /* INTERNAL_WARNINGS_H */
|
@@ -0,0 +1,113 @@
|
|
1
|
+
#ifndef RUBY_INTERNAL_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define RUBY_INTERNAL_H 1
|
3
|
+
/**
|
4
|
+
* @author $Author$
|
5
|
+
* @date Tue May 17 11:42:20 JST 2011
|
6
|
+
* @copyright Copyright (C) 2011 Yukihiro Matsumoto
|
7
|
+
* @copyright This file is a part of the programming language Ruby.
|
8
|
+
* Permission is hereby granted, to either redistribute and/or
|
9
|
+
* modify this file, provided that the conditions mentioned in the
|
10
|
+
* file COPYING are met. Consult the file for details.
|
11
|
+
*/
|
12
|
+
#include "ruby/internal/config.h"
|
13
|
+
|
14
|
+
#ifdef __cplusplus
|
15
|
+
# error not for C++
|
16
|
+
#endif
|
17
|
+
|
18
|
+
#define LIKELY(x) RB_LIKELY(x)
|
19
|
+
#define UNLIKELY(x) RB_UNLIKELY(x)
|
20
|
+
|
21
|
+
#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
|
22
|
+
#define roomof(x, y) (((x) + (y) - 1) / (y))
|
23
|
+
#define type_roomof(x, y) roomof(sizeof(x), sizeof(y))
|
24
|
+
|
25
|
+
/* Prevent compiler from reordering access */
|
26
|
+
#define ACCESS_ONCE(type,x) (*((volatile type *)&(x)))
|
27
|
+
|
28
|
+
#define UNDEF_P RB_UNDEF_P
|
29
|
+
#define NIL_OR_UNDEF_P RB_NIL_OR_UNDEF_P
|
30
|
+
|
31
|
+
#include "ruby/ruby.h"
|
32
|
+
|
33
|
+
/* Following macros were formerly defined in this header but moved to somewhere
|
34
|
+
* else. In order to detect them we undef here. */
|
35
|
+
|
36
|
+
/* internal/array.h */
|
37
|
+
#undef RARRAY_AREF
|
38
|
+
|
39
|
+
/* internal/class.h */
|
40
|
+
#undef RClass
|
41
|
+
#undef RCLASS_SUPER
|
42
|
+
|
43
|
+
/* internal/gc.h */
|
44
|
+
#undef NEWOBJ_OF
|
45
|
+
#undef RB_NEWOBJ_OF
|
46
|
+
#undef RB_OBJ_WRITE
|
47
|
+
|
48
|
+
/* internal/hash.h */
|
49
|
+
#undef RHASH_IFNONE
|
50
|
+
#undef RHASH_SIZE
|
51
|
+
#undef RHASH_TBL
|
52
|
+
#undef RHASH_EMPTY_P
|
53
|
+
|
54
|
+
/* internal/struct.h */
|
55
|
+
#undef RSTRUCT_LEN
|
56
|
+
#undef RSTRUCT_PTR
|
57
|
+
#undef RSTRUCT_SET
|
58
|
+
#undef RSTRUCT_GET
|
59
|
+
|
60
|
+
/* Also, we keep the following macros here. They are expected to be
|
61
|
+
* overridden in each headers. */
|
62
|
+
|
63
|
+
/* internal/array.h */
|
64
|
+
#define rb_ary_new_from_args(...) rb_nonexistent_symbol(__VA_ARGS__)
|
65
|
+
|
66
|
+
/* internal/io.h */
|
67
|
+
#define rb_io_fptr_finalize(...) rb_nonexistent_symbol(__VA_ARGS__)
|
68
|
+
|
69
|
+
/* internal/string.h */
|
70
|
+
#define rb_fstring_cstr(...) rb_nonexistent_symbol(__VA_ARGS__)
|
71
|
+
|
72
|
+
/* internal/symbol.h */
|
73
|
+
#define rb_sym_intern_ascii_cstr(...) rb_nonexistent_symbol(__VA_ARGS__)
|
74
|
+
|
75
|
+
/* internal/vm.h */
|
76
|
+
#define rb_funcallv(...) rb_nonexistent_symbol(__VA_ARGS__)
|
77
|
+
#define rb_method_basic_definition_p(...) rb_nonexistent_symbol(__VA_ARGS__)
|
78
|
+
|
79
|
+
|
80
|
+
/* MRI debug support */
|
81
|
+
|
82
|
+
/* gc.c */
|
83
|
+
void rb_obj_info_dump(VALUE obj);
|
84
|
+
void rb_obj_info_dump_loc(VALUE obj, const char *file, int line, const char *func);
|
85
|
+
|
86
|
+
/* debug.c */
|
87
|
+
|
88
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
89
|
+
void ruby_debug_breakpoint(void);
|
90
|
+
PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2);
|
91
|
+
RUBY_SYMBOL_EXPORT_END
|
92
|
+
|
93
|
+
// show obj data structure without any side-effect
|
94
|
+
#define rp(obj) rb_obj_info_dump_loc((VALUE)(obj), __FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING)
|
95
|
+
|
96
|
+
// same as rp, but add message header
|
97
|
+
#define rp_m(msg, obj) do { \
|
98
|
+
fputs((msg), stderr); \
|
99
|
+
rb_obj_info_dump((VALUE)(obj)); \
|
100
|
+
} while (0)
|
101
|
+
|
102
|
+
// `ruby_debug_breakpoint()` does nothing,
|
103
|
+
// but breakpoint is set in run.gdb, so `make gdb` can stop here.
|
104
|
+
#define bp() ruby_debug_breakpoint()
|
105
|
+
|
106
|
+
#define RBOOL(v) ((v) ? Qtrue : Qfalse)
|
107
|
+
#define RB_BIGNUM_TYPE_P(x) RB_TYPE_P((x), T_BIGNUM)
|
108
|
+
|
109
|
+
#ifndef __MINGW32__
|
110
|
+
#undef memcpy
|
111
|
+
#define memcpy ruby_nonempty_memcpy
|
112
|
+
#endif
|
113
|
+
#endif /* RUBY_INTERNAL_H */
|