debase-ruby_core_source 0.10.12 → 0.10.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/addr2line.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/builtin.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/ccan/list/list.h +788 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/ccan/str/str.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/constant.h +55 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/darray.h +198 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/debug_counter.h +467 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/dln.h +31 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/encindex.h +70 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/eval_intern.h +304 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/gc.h +142 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/hrtime.h +168 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/id.h +293 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/id_table.h +36 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/insns.inc +247 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/insns_info.inc +8978 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/array.h +113 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/bignum.h +246 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/bits.h +565 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/class.h +188 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/compar.h +49 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/compile.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/compilers.h +107 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/cont.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/dir.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/enc.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/encoding.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/enum.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/enumerator.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/error.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/eval.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/file.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/fixnum.h +184 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/gc.h +175 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/hash.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/imemo.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/inits.h +50 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/io.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/load.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/loadpath.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/math.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/missing.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/numeric.h +271 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/object.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/parse.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/proc.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/process.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/random.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/range.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/rational.h +72 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/re.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/sanitizers.h +190 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/serial.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/signal.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/static_assert.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/string.h +141 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/struct.h +153 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/symbol.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/thread.h +53 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/time.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/transcode.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/util.h +27 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/variable.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/vm.h +132 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/warnings.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal.h +109 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/iseq.h +320 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/known_errors.inc +791 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/method.h +245 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/mjit.h +231 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/mjit_compile.inc +8265 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/node.h +499 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/node_name.inc +210 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/opt_sc.inc +107 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/parse.h +214 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/probes_helper.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/ractor_core.h +346 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/regenc.h +254 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/regint.h +942 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/regparse.h +370 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/revision.h +2 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/ruby_assert.h +14 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/ruby_atomic.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/symbol.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/thread_pthread.h +115 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/thread_win32.h +61 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/timev.h +57 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/transcode_data.h +138 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/transient_heap.h +65 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/variable.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/version.h +88 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm.inc +5415 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_call_iseq_optimized.inc +244 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_callinfo.h +454 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_core.h +2103 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_debug.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_exec.h +197 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_insnhelper.h +265 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_opts.h +73 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_sync.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vmtc.inc +241 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit_asm.h +392 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit_codegen.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit_core.h +302 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit_iface.h +38 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +116 -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,83 @@
|
|
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
|
+
|
17
|
+
/* global variable */
|
18
|
+
|
19
|
+
#define ROBJECT_TRANSIENT_FLAG FL_USER13
|
20
|
+
|
21
|
+
/* variable.c */
|
22
|
+
void rb_gc_mark_global_tbl(void);
|
23
|
+
void rb_gc_update_global_tbl(void);
|
24
|
+
size_t rb_generic_ivar_memsize(VALUE);
|
25
|
+
VALUE rb_search_class_path(VALUE);
|
26
|
+
VALUE rb_attr_delete(VALUE, ID);
|
27
|
+
VALUE rb_ivar_lookup(VALUE obj, ID id, VALUE undef);
|
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
|
+
uint32_t rb_obj_ensure_iv_index_mapping(VALUE obj, ID id);
|
39
|
+
|
40
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
41
|
+
/* variable.c (export) */
|
42
|
+
void rb_mark_generic_ivar(VALUE);
|
43
|
+
void rb_mv_generic_ivar(VALUE src, VALUE dst);
|
44
|
+
VALUE rb_const_missing(VALUE klass, VALUE name);
|
45
|
+
int rb_class_ivar_set(VALUE klass, ID vid, VALUE value);
|
46
|
+
void rb_iv_tbl_copy(VALUE dst, VALUE src);
|
47
|
+
RUBY_SYMBOL_EXPORT_END
|
48
|
+
|
49
|
+
MJIT_SYMBOL_EXPORT_BEGIN
|
50
|
+
VALUE rb_gvar_get(ID);
|
51
|
+
VALUE rb_gvar_set(ID, VALUE);
|
52
|
+
VALUE rb_gvar_defined(ID);
|
53
|
+
void rb_const_warn_if_deprecated(const rb_const_entry_t *, VALUE, ID);
|
54
|
+
void rb_init_iv_list(VALUE obj);
|
55
|
+
MJIT_SYMBOL_EXPORT_END
|
56
|
+
|
57
|
+
static inline bool
|
58
|
+
ROBJ_TRANSIENT_P(VALUE obj)
|
59
|
+
{
|
60
|
+
#if USE_TRANSIENT_HEAP
|
61
|
+
return FL_TEST_RAW(obj, ROBJECT_TRANSIENT_FLAG);
|
62
|
+
#else
|
63
|
+
return false;
|
64
|
+
#endif
|
65
|
+
}
|
66
|
+
|
67
|
+
static inline void
|
68
|
+
ROBJ_TRANSIENT_SET(VALUE obj)
|
69
|
+
{
|
70
|
+
#if USE_TRANSIENT_HEAP
|
71
|
+
FL_SET_RAW(obj, ROBJECT_TRANSIENT_FLAG);
|
72
|
+
#endif
|
73
|
+
}
|
74
|
+
|
75
|
+
static inline void
|
76
|
+
ROBJ_TRANSIENT_UNSET(VALUE obj)
|
77
|
+
{
|
78
|
+
#if USE_TRANSIENT_HEAP
|
79
|
+
FL_UNSET_RAW(obj, ROBJECT_TRANSIENT_FLAG);
|
80
|
+
#endif
|
81
|
+
}
|
82
|
+
|
83
|
+
#endif /* INTERNAL_VARIABLE_H */
|
@@ -0,0 +1,132 @@
|
|
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
|
+
rb_serial_t rb_next_class_serial(void);
|
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
|
+
void rb_vm_inc_const_missing_count(void);
|
51
|
+
const void **rb_vm_get_insns_address_table(void);
|
52
|
+
VALUE rb_source_location(int *pline);
|
53
|
+
const char *rb_source_location_cstr(int *pline);
|
54
|
+
MJIT_STATIC void rb_vm_pop_cfunc_frame(void);
|
55
|
+
int rb_vm_add_root_module(VALUE module);
|
56
|
+
void rb_vm_check_redefinition_by_prepend(VALUE klass);
|
57
|
+
int rb_vm_check_optimizable_mid(VALUE mid);
|
58
|
+
VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
|
59
|
+
MJIT_STATIC VALUE ruby_vm_special_exception_copy(VALUE);
|
60
|
+
PUREFUNC(st_table *rb_vm_fstring_table(void));
|
61
|
+
|
62
|
+
MJIT_SYMBOL_EXPORT_BEGIN
|
63
|
+
VALUE vm_exec(struct rb_execution_context_struct *, bool); /* used in JIT-ed code */
|
64
|
+
MJIT_SYMBOL_EXPORT_END
|
65
|
+
|
66
|
+
/* vm_eval.c */
|
67
|
+
VALUE rb_current_realfilepath(void);
|
68
|
+
VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE);
|
69
|
+
typedef void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE);
|
70
|
+
VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv,
|
71
|
+
rb_check_funcall_hook *hook, VALUE arg);
|
72
|
+
VALUE rb_check_funcall_with_hook_kw(VALUE recv, ID mid, int argc, const VALUE *argv,
|
73
|
+
rb_check_funcall_hook *hook, VALUE arg, int kw_splat);
|
74
|
+
const char *rb_type_str(enum ruby_value_type type);
|
75
|
+
VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE);
|
76
|
+
VALUE rb_check_funcall_basic_kw(VALUE, ID, VALUE, int, const VALUE*, int);
|
77
|
+
VALUE rb_yield_1(VALUE val);
|
78
|
+
VALUE rb_yield_force_blockarg(VALUE values);
|
79
|
+
VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
|
80
|
+
rb_block_call_func_t bl_proc, int min_argc, int max_argc,
|
81
|
+
VALUE data2);
|
82
|
+
void rb_check_stack_overflow(void);
|
83
|
+
|
84
|
+
/* vm_insnhelper.c */
|
85
|
+
VALUE rb_equal_opt(VALUE obj1, VALUE obj2);
|
86
|
+
VALUE rb_eql_opt(VALUE obj1, VALUE obj2);
|
87
|
+
|
88
|
+
struct rb_iseq_struct;
|
89
|
+
MJIT_SYMBOL_EXPORT_BEGIN
|
90
|
+
const struct rb_callcache *rb_vm_search_method_slowpath(const struct rb_callinfo *ci, VALUE klass);
|
91
|
+
MJIT_SYMBOL_EXPORT_END
|
92
|
+
|
93
|
+
/* vm_method.c */
|
94
|
+
struct rb_execution_context_struct;
|
95
|
+
MJIT_SYMBOL_EXPORT_BEGIN
|
96
|
+
int rb_ec_obj_respond_to(struct rb_execution_context_struct *ec, VALUE obj, ID id, int priv);
|
97
|
+
MJIT_SYMBOL_EXPORT_END
|
98
|
+
|
99
|
+
/* vm_dump.c */
|
100
|
+
void rb_print_backtrace(void);
|
101
|
+
|
102
|
+
/* vm_backtrace.c */
|
103
|
+
VALUE rb_vm_thread_backtrace(int argc, const VALUE *argv, VALUE thval);
|
104
|
+
VALUE rb_vm_thread_backtrace_locations(int argc, const VALUE *argv, VALUE thval);
|
105
|
+
VALUE rb_vm_backtrace(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
|
106
|
+
VALUE rb_vm_backtrace_locations(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
|
107
|
+
VALUE rb_make_backtrace(void);
|
108
|
+
void rb_backtrace_print_as_bugreport(void);
|
109
|
+
int rb_backtrace_p(VALUE obj);
|
110
|
+
VALUE rb_backtrace_to_str_ary(VALUE obj);
|
111
|
+
VALUE rb_backtrace_to_location_ary(VALUE obj);
|
112
|
+
void rb_backtrace_each(VALUE (*iter)(VALUE recv, VALUE str), VALUE output);
|
113
|
+
int rb_frame_info_p(VALUE obj);
|
114
|
+
void rb_frame_info_get(VALUE obj, VALUE *path, VALUE *script_lines, int *node_id);
|
115
|
+
|
116
|
+
MJIT_SYMBOL_EXPORT_BEGIN
|
117
|
+
VALUE rb_ec_backtrace_object(const struct rb_execution_context_struct *ec);
|
118
|
+
void rb_backtrace_use_iseq_first_lineno_for_last_location(VALUE self);
|
119
|
+
MJIT_SYMBOL_EXPORT_END
|
120
|
+
|
121
|
+
#define RUBY_DTRACE_CREATE_HOOK(name, arg) \
|
122
|
+
RUBY_DTRACE_HOOK(name##_CREATE, arg)
|
123
|
+
#define RUBY_DTRACE_HOOK(name, arg) \
|
124
|
+
do { \
|
125
|
+
if (UNLIKELY(RUBY_DTRACE_##name##_ENABLED())) { \
|
126
|
+
int dtrace_line; \
|
127
|
+
const char *dtrace_file = rb_source_location_cstr(&dtrace_line); \
|
128
|
+
if (!dtrace_file) dtrace_file = ""; \
|
129
|
+
RUBY_DTRACE_##name(arg, dtrace_file, dtrace_line); \
|
130
|
+
} \
|
131
|
+
} while (0)
|
132
|
+
#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,109 @@
|
|
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
|
+
#include "ruby/ruby.h"
|
29
|
+
|
30
|
+
/* Following macros were formerly defined in this header but moved to somewhere
|
31
|
+
* else. In order to detect them we undef here. */
|
32
|
+
|
33
|
+
/* internal/array.h */
|
34
|
+
#undef RARRAY_AREF
|
35
|
+
|
36
|
+
/* internal/class.h */
|
37
|
+
#undef RClass
|
38
|
+
#undef RCLASS_SUPER
|
39
|
+
|
40
|
+
/* internal/gc.h */
|
41
|
+
#undef NEWOBJ_OF
|
42
|
+
#undef RB_NEWOBJ_OF
|
43
|
+
#undef RB_OBJ_WRITE
|
44
|
+
|
45
|
+
/* internal/hash.h */
|
46
|
+
#undef RHASH_IFNONE
|
47
|
+
#undef RHASH_SIZE
|
48
|
+
#undef RHASH_TBL
|
49
|
+
#undef RHASH_EMPTY_P
|
50
|
+
|
51
|
+
/* internal/object.h */
|
52
|
+
#undef ROBJECT_IV_INDEX_TBL
|
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
|
+
#endif /* RUBY_INTERNAL_H */
|