debase-ruby_core_source 0.10.7 → 0.10.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +1 -1
- data/Rakefile +6 -3
- data/debase-ruby_core_source.gemspec +2 -1
- data/lib/debase/ruby_core_source.rb +0 -1
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/addr2line.h +0 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/builtin.h +78 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/ccan/build_assert/build_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/ccan/check_type/check_type.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/ccan/container_of/container_of.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/ccan/list/list.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/ccan/str/str.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/constant.h +0 -4
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/debug_counter.h +21 -9
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/dln.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/encindex.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/eval_intern.h +1 -3
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/gc.h +2 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/hrtime.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/id.h +1 -3
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/id_table.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/insns.inc +6 -2
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/insns_info.inc +1471 -1888
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/internal.h +106 -91
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/iseq.h +5 -5
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/known_errors.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/method.h +1 -4
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/mjit.h +3 -5
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/mjit_compile.inc +768 -872
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/node.h +4 -11
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/node_name.inc +0 -2
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/opt_sc.inc +109 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/optinsn.inc +0 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/parse.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/probes_helper.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/regenc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/regint.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/regparse.h +0 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/revision.h +2 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/ruby_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/ruby_atomic.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/siphash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/symbol.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/thread_pthread.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/thread_win32.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/timev.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/transcode_data.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/transient_heap.h +0 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/variable.h +9 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/version.h +4 -4
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/vm.inc +604 -407
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/vm_call_iseq_optimized.inc +49 -49
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/vm_core.h +42 -29
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/vm_debug.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/vm_exec.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/vm_insnhelper.h +16 -4
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/vm_opts.h +2 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/vmtc.inc +6 -2
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/addr2line.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/builtin.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/list/list.h +788 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/str/str.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/constant.h +55 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/debug_counter.h +457 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/dln.h +36 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/encindex.h +70 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/eval_intern.h +323 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/gc.h +140 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/hrtime.h +168 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/id.h +290 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/id_table.h +36 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/insns.inc +249 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/insns_info.inc +8983 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal.h +107 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/array.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/bignum.h +246 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/bits.h +566 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/class.h +174 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compar.h +50 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compile.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compilers.h +108 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/cont.h +25 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/dir.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enc.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/encoding.h +28 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enum.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enumerator.h +22 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/error.h +124 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/eval.h +33 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/file.h +39 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/fixnum.h +185 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/gc.h +161 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/hash.h +241 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/imemo.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/inits.h +51 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/io.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/load.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/loadpath.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/math.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/missing.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/numeric.h +255 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/object.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/parse.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/proc.h +33 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/process.h +136 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/random.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/range.h +41 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/rational.h +71 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/re.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/sanitizers.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/scheduler.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/serial.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/signal.h +22 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/static_assert.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/string.h +140 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/struct.h +154 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/symbol.h +41 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/thread.h +54 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/time.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/transcode.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/util.h +31 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/variable.h +84 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/vm.h +136 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/warnings.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/iseq.h +305 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/known_errors.inc +791 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/method.h +245 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/mjit.h +220 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/mjit_compile.inc +8240 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/node.h +484 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/node_name.inc +210 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/opt_sc.inc +0 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/optunifs.inc +0 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/parse.h +211 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/probes_helper.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ractor_core.h +343 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/regenc.h +254 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/regint.h +938 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/regparse.h +370 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/revision.h +2 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ruby_assert.h +15 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ruby_atomic.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/symbol.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/thread_pthread.h +115 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/thread_win32.h +61 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/timev.h +57 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/transcode_data.h +138 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/transient_heap.h +65 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/variable.h +22 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/version.h +89 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm.inc +5355 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_call_iseq_optimized.inc +244 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_callinfo.h +456 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_core.h +2023 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_debug.h +116 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_exec.h +196 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_insnhelper.h +257 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_opts.h +73 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_sync.h +136 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vmtc.inc +243 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +181 -57
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/revision.h +0 -2
@@ -0,0 +1,51 @@
|
|
1
|
+
#ifndef INTERNAL_INITS_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_INITS_H
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
6
|
+
* @copyright This file is a part of the programming language Ruby.
|
7
|
+
* Permission is hereby granted, to either redistribute and/or
|
8
|
+
* modify this file, provided that the conditions mentioned in the
|
9
|
+
* file COPYING are met. Consult the file for details.
|
10
|
+
* @brief Internal header aggregating init functions.
|
11
|
+
*/
|
12
|
+
|
13
|
+
/* class.c */
|
14
|
+
void Init_class_hierarchy(void);
|
15
|
+
|
16
|
+
/* dmyext.c */
|
17
|
+
void Init_enc(void);
|
18
|
+
void Init_ext(void);
|
19
|
+
|
20
|
+
/* file.c */
|
21
|
+
void Init_File(void);
|
22
|
+
|
23
|
+
/* gc.c */
|
24
|
+
void Init_heap(void);
|
25
|
+
|
26
|
+
/* localeinit.c */
|
27
|
+
int Init_enc_set_filesystem_encoding(void);
|
28
|
+
|
29
|
+
/* newline.c */
|
30
|
+
void Init_newline(void);
|
31
|
+
|
32
|
+
/* vm.c */
|
33
|
+
void Init_BareVM(void);
|
34
|
+
void Init_vm_objects(void);
|
35
|
+
|
36
|
+
/* vm_backtrace.c */
|
37
|
+
void Init_vm_backtrace(void);
|
38
|
+
|
39
|
+
/* vm_eval.c */
|
40
|
+
void Init_vm_eval(void);
|
41
|
+
|
42
|
+
/* vm_insnhelper.c */
|
43
|
+
void Init_vm_stack_canary(void);
|
44
|
+
|
45
|
+
/* vm_method.c */
|
46
|
+
void Init_eval_method(void);
|
47
|
+
|
48
|
+
/* inits.c */
|
49
|
+
void rb_call_inits(void);
|
50
|
+
|
51
|
+
#endif /* INTERNAL_INITS_H */
|
@@ -0,0 +1,35 @@
|
|
1
|
+
#ifndef INTERNAL_IO_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_IO_H
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
6
|
+
* @copyright This file is a part of the programming language Ruby.
|
7
|
+
* Permission is hereby granted, to either redistribute and/or
|
8
|
+
* modify this file, provided that the conditions mentioned in the
|
9
|
+
* file COPYING are met. Consult the file for details.
|
10
|
+
* @brief Internal header for IO.
|
11
|
+
*/
|
12
|
+
#include "ruby/ruby.h" /* for VALUE */
|
13
|
+
#include "ruby/io.h" /* for rb_io_t */
|
14
|
+
|
15
|
+
/* io.c */
|
16
|
+
void ruby_set_inplace_mode(const char *);
|
17
|
+
void rb_stdio_set_default_encoding(void);
|
18
|
+
VALUE rb_io_flush_raw(VALUE, int);
|
19
|
+
size_t rb_io_memsize(const rb_io_t *);
|
20
|
+
int rb_stderr_tty_p(void);
|
21
|
+
void rb_io_fptr_finalize_internal(void *ptr);
|
22
|
+
#ifdef rb_io_fptr_finalize
|
23
|
+
# undef rb_io_fptr_finalize
|
24
|
+
#endif
|
25
|
+
#define rb_io_fptr_finalize rb_io_fptr_finalize_internal
|
26
|
+
VALUE rb_io_popen(VALUE pname, VALUE pmode, VALUE env, VALUE opt);
|
27
|
+
|
28
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
29
|
+
/* io.c (export) */
|
30
|
+
void rb_maygvl_fd_fix_cloexec(int fd);
|
31
|
+
int rb_gc_for_fd(int err);
|
32
|
+
void rb_write_error_str(VALUE mesg);
|
33
|
+
RUBY_SYMBOL_EXPORT_END
|
34
|
+
|
35
|
+
#endif /* INTERNAL_IO_H */
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#ifndef INTERNAL_LOAD_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_LOAD_H
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
6
|
+
* @copyright This file is a part of the programming language Ruby.
|
7
|
+
* Permission is hereby granted, to either redistribute and/or
|
8
|
+
* modify this file, provided that the conditions mentioned in the
|
9
|
+
* file COPYING are met. Consult the file for details.
|
10
|
+
* @brief Internal header for require.
|
11
|
+
*/
|
12
|
+
#include "ruby/ruby.h" /* for VALUE */
|
13
|
+
|
14
|
+
/* load.c */
|
15
|
+
VALUE rb_get_expanded_load_path(void);
|
16
|
+
int rb_require_internal(VALUE fname);
|
17
|
+
NORETURN(void rb_load_fail(VALUE, const char*));
|
18
|
+
|
19
|
+
#endif /* INTERNAL_LOAD_H */
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#ifndef INTERNAL_LOADPATH_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_LOADPATH_H
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
6
|
+
* @copyright This file is a part of the programming language Ruby.
|
7
|
+
* Permission is hereby granted, to either redistribute and/or
|
8
|
+
* modify this file, provided that the conditions mentioned in the
|
9
|
+
* file COPYING are met. Consult the file for details.
|
10
|
+
* @brief Internal header for $LOAD_PATH.
|
11
|
+
*/
|
12
|
+
|
13
|
+
/* loadpath.c */
|
14
|
+
extern const char ruby_exec_prefix[];
|
15
|
+
extern const char ruby_initial_load_paths[];
|
16
|
+
|
17
|
+
#endif /* INTERNAL_LOADPATH_H */
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#ifndef INTERNAL_MATH_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_MATH_H
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
6
|
+
* @copyright This file is a part of the programming language Ruby.
|
7
|
+
* Permission is hereby granted, to either redistribute and/or
|
8
|
+
* modify this file, provided that the conditions mentioned in the
|
9
|
+
* file COPYING are met. Consult the file for details.
|
10
|
+
* @brief Internal header for Math.
|
11
|
+
*/
|
12
|
+
#include "ruby/ruby.h" /* for VALUE */
|
13
|
+
|
14
|
+
/* math.c */
|
15
|
+
VALUE rb_math_atan2(VALUE, VALUE);
|
16
|
+
VALUE rb_math_cos(VALUE);
|
17
|
+
VALUE rb_math_cosh(VALUE);
|
18
|
+
VALUE rb_math_exp(VALUE);
|
19
|
+
VALUE rb_math_hypot(VALUE, VALUE);
|
20
|
+
VALUE rb_math_log(int argc, const VALUE *argv);
|
21
|
+
VALUE rb_math_sin(VALUE);
|
22
|
+
VALUE rb_math_sinh(VALUE);
|
23
|
+
|
24
|
+
#endif /* INTERNAL_MATH_H */
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#ifndef INTERNAL_MISSING_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_MISSING_H
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
6
|
+
* @copyright This file is a part of the programming language Ruby.
|
7
|
+
* Permission is hereby granted, to either redistribute and/or
|
8
|
+
* modify this file, provided that the conditions mentioned in the
|
9
|
+
* file COPYING are met. Consult the file for details.
|
10
|
+
* @brief Internal header corresponding missing.
|
11
|
+
*/
|
12
|
+
#include "ruby/internal/config.h" /* for HAVE_SETPROCTITLE */
|
13
|
+
|
14
|
+
/* missing/setproctitle.c */
|
15
|
+
#ifndef HAVE_SETPROCTITLE
|
16
|
+
extern void ruby_init_setproctitle(int argc, char *argv[]);
|
17
|
+
#endif
|
18
|
+
|
19
|
+
#endif /* INTERNAL_MISSING_H */
|
@@ -0,0 +1,255 @@
|
|
1
|
+
#ifndef INTERNAL_NUMERIC_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_NUMERIC_H
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
6
|
+
* @copyright This file is a part of the programming language Ruby.
|
7
|
+
* Permission is hereby granted, to either redistribute and/or
|
8
|
+
* modify this file, provided that the conditions mentioned in the
|
9
|
+
* file COPYING are met. Consult the file for details.
|
10
|
+
* @brief Internal header for Numeric.
|
11
|
+
*/
|
12
|
+
#include "internal/bignum.h" /* for BIGNUM_POSITIVE_P */
|
13
|
+
#include "internal/bits.h" /* for RUBY_BIT_ROTL */
|
14
|
+
#include "internal/fixnum.h" /* for FIXNUM_POSITIVE_P */
|
15
|
+
#include "internal/vm.h" /* for rb_method_basic_definition_p */
|
16
|
+
#include "ruby/intern.h" /* for rb_cmperr */
|
17
|
+
#include "ruby/ruby.h" /* for USE_FLONUM */
|
18
|
+
|
19
|
+
#define ROUND_TO(mode, even, up, down) \
|
20
|
+
((mode) == RUBY_NUM_ROUND_HALF_EVEN ? even : \
|
21
|
+
(mode) == RUBY_NUM_ROUND_HALF_UP ? up : down)
|
22
|
+
#define ROUND_FUNC(mode, name) \
|
23
|
+
ROUND_TO(mode, name##_half_even, name##_half_up, name##_half_down)
|
24
|
+
#define ROUND_CALL(mode, name, args) \
|
25
|
+
ROUND_TO(mode, name##_half_even args, \
|
26
|
+
name##_half_up args, name##_half_down args)
|
27
|
+
|
28
|
+
#ifndef ROUND_DEFAULT
|
29
|
+
# define ROUND_DEFAULT RUBY_NUM_ROUND_HALF_UP
|
30
|
+
#endif
|
31
|
+
|
32
|
+
enum ruby_num_rounding_mode {
|
33
|
+
RUBY_NUM_ROUND_HALF_UP,
|
34
|
+
RUBY_NUM_ROUND_HALF_EVEN,
|
35
|
+
RUBY_NUM_ROUND_HALF_DOWN,
|
36
|
+
RUBY_NUM_ROUND_DEFAULT = ROUND_DEFAULT,
|
37
|
+
};
|
38
|
+
|
39
|
+
struct RFloat {
|
40
|
+
struct RBasic basic;
|
41
|
+
double float_value;
|
42
|
+
};
|
43
|
+
|
44
|
+
#define RFLOAT(obj) ((struct RFloat *)(obj))
|
45
|
+
|
46
|
+
/* numeric.c */
|
47
|
+
int rb_num_to_uint(VALUE val, unsigned int *ret);
|
48
|
+
VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl);
|
49
|
+
double ruby_float_step_size(double beg, double end, double unit, int excl);
|
50
|
+
int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl, int allow_endless);
|
51
|
+
int rb_num_negative_p(VALUE);
|
52
|
+
VALUE rb_int_succ(VALUE num);
|
53
|
+
VALUE rb_float_uminus(VALUE num);
|
54
|
+
VALUE rb_int_plus(VALUE x, VALUE y);
|
55
|
+
VALUE rb_float_plus(VALUE x, VALUE y);
|
56
|
+
VALUE rb_int_minus(VALUE x, VALUE y);
|
57
|
+
VALUE rb_float_minus(VALUE x, VALUE y);
|
58
|
+
VALUE rb_int_mul(VALUE x, VALUE y);
|
59
|
+
VALUE rb_float_mul(VALUE x, VALUE y);
|
60
|
+
VALUE rb_float_div(VALUE x, VALUE y);
|
61
|
+
VALUE rb_int_idiv(VALUE x, VALUE y);
|
62
|
+
VALUE rb_int_modulo(VALUE x, VALUE y);
|
63
|
+
VALUE rb_int2str(VALUE num, int base);
|
64
|
+
VALUE rb_fix_plus(VALUE x, VALUE y);
|
65
|
+
VALUE rb_int_gt(VALUE x, VALUE y);
|
66
|
+
VALUE rb_float_gt(VALUE x, VALUE y);
|
67
|
+
VALUE rb_int_ge(VALUE x, VALUE y);
|
68
|
+
enum ruby_num_rounding_mode rb_num_get_rounding_option(VALUE opts);
|
69
|
+
double rb_int_fdiv_double(VALUE x, VALUE y);
|
70
|
+
VALUE rb_int_pow(VALUE x, VALUE y);
|
71
|
+
VALUE rb_float_pow(VALUE x, VALUE y);
|
72
|
+
VALUE rb_int_cmp(VALUE x, VALUE y);
|
73
|
+
VALUE rb_int_equal(VALUE x, VALUE y);
|
74
|
+
VALUE rb_int_divmod(VALUE x, VALUE y);
|
75
|
+
VALUE rb_int_and(VALUE x, VALUE y);
|
76
|
+
VALUE rb_int_lshift(VALUE x, VALUE y);
|
77
|
+
VALUE rb_int_div(VALUE x, VALUE y);
|
78
|
+
int rb_int_positive_p(VALUE num);
|
79
|
+
int rb_int_negative_p(VALUE num);
|
80
|
+
VALUE rb_num_pow(VALUE x, VALUE y);
|
81
|
+
VALUE rb_float_ceil(VALUE num, int ndigits);
|
82
|
+
VALUE rb_float_floor(VALUE x, int ndigits);
|
83
|
+
VALUE rb_float_abs(VALUE flt);
|
84
|
+
static inline VALUE rb_num_compare_with_zero(VALUE num, ID mid);
|
85
|
+
static inline int rb_num_positive_int_p(VALUE num);
|
86
|
+
static inline int rb_num_negative_int_p(VALUE num);
|
87
|
+
static inline double rb_float_flonum_value(VALUE v);
|
88
|
+
static inline double rb_float_noflonum_value(VALUE v);
|
89
|
+
static inline double rb_float_value_inline(VALUE v);
|
90
|
+
static inline VALUE rb_float_new_inline(double d);
|
91
|
+
static inline bool INT_POSITIVE_P(VALUE num);
|
92
|
+
static inline bool INT_NEGATIVE_P(VALUE num);
|
93
|
+
static inline bool FLOAT_ZERO_P(VALUE num);
|
94
|
+
#define rb_float_value rb_float_value_inline
|
95
|
+
#define rb_float_new rb_float_new_inline
|
96
|
+
|
97
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
98
|
+
/* numeric.c (export) */
|
99
|
+
VALUE rb_int_positive_pow(long x, unsigned long y);
|
100
|
+
RUBY_SYMBOL_EXPORT_END
|
101
|
+
|
102
|
+
MJIT_SYMBOL_EXPORT_BEGIN
|
103
|
+
VALUE rb_flo_div_flo(VALUE x, VALUE y);
|
104
|
+
double ruby_float_mod(double x, double y);
|
105
|
+
VALUE rb_float_equal(VALUE x, VALUE y);
|
106
|
+
int rb_float_cmp(VALUE x, VALUE y);
|
107
|
+
VALUE rb_float_eql(VALUE x, VALUE y);
|
108
|
+
VALUE rb_fix_aref(VALUE fix, VALUE idx);
|
109
|
+
VALUE rb_int_zero_p(VALUE num);
|
110
|
+
VALUE rb_int_even_p(VALUE num);
|
111
|
+
VALUE rb_int_odd_p(VALUE num);
|
112
|
+
VALUE rb_int_abs(VALUE num);
|
113
|
+
VALUE rb_int_bit_length(VALUE num);
|
114
|
+
VALUE rb_int_uminus(VALUE num);
|
115
|
+
VALUE rb_int_comp(VALUE num);
|
116
|
+
MJIT_SYMBOL_EXPORT_END
|
117
|
+
|
118
|
+
static inline bool
|
119
|
+
INT_POSITIVE_P(VALUE num)
|
120
|
+
{
|
121
|
+
if (FIXNUM_P(num)) {
|
122
|
+
return FIXNUM_POSITIVE_P(num);
|
123
|
+
}
|
124
|
+
else {
|
125
|
+
return BIGNUM_POSITIVE_P(num);
|
126
|
+
}
|
127
|
+
}
|
128
|
+
|
129
|
+
static inline bool
|
130
|
+
INT_NEGATIVE_P(VALUE num)
|
131
|
+
{
|
132
|
+
if (FIXNUM_P(num)) {
|
133
|
+
return FIXNUM_NEGATIVE_P(num);
|
134
|
+
}
|
135
|
+
else {
|
136
|
+
return BIGNUM_NEGATIVE_P(num);
|
137
|
+
}
|
138
|
+
}
|
139
|
+
|
140
|
+
static inline bool
|
141
|
+
FLOAT_ZERO_P(VALUE num)
|
142
|
+
{
|
143
|
+
return RFLOAT_VALUE(num) == 0.0;
|
144
|
+
}
|
145
|
+
|
146
|
+
static inline VALUE
|
147
|
+
rb_num_compare_with_zero(VALUE num, ID mid)
|
148
|
+
{
|
149
|
+
VALUE zero = INT2FIX(0);
|
150
|
+
VALUE r = rb_check_funcall(num, mid, 1, &zero);
|
151
|
+
if (r == Qundef) {
|
152
|
+
rb_cmperr(num, zero);
|
153
|
+
}
|
154
|
+
return r;
|
155
|
+
}
|
156
|
+
|
157
|
+
static inline int
|
158
|
+
rb_num_positive_int_p(VALUE num)
|
159
|
+
{
|
160
|
+
const ID mid = '>';
|
161
|
+
|
162
|
+
if (FIXNUM_P(num)) {
|
163
|
+
if (rb_method_basic_definition_p(rb_cInteger, mid))
|
164
|
+
return FIXNUM_POSITIVE_P(num);
|
165
|
+
}
|
166
|
+
else if (RB_TYPE_P(num, T_BIGNUM)) {
|
167
|
+
if (rb_method_basic_definition_p(rb_cInteger, mid))
|
168
|
+
return BIGNUM_POSITIVE_P(num);
|
169
|
+
}
|
170
|
+
return RTEST(rb_num_compare_with_zero(num, mid));
|
171
|
+
}
|
172
|
+
|
173
|
+
static inline int
|
174
|
+
rb_num_negative_int_p(VALUE num)
|
175
|
+
{
|
176
|
+
const ID mid = '<';
|
177
|
+
|
178
|
+
if (FIXNUM_P(num)) {
|
179
|
+
if (rb_method_basic_definition_p(rb_cInteger, mid))
|
180
|
+
return FIXNUM_NEGATIVE_P(num);
|
181
|
+
}
|
182
|
+
else if (RB_TYPE_P(num, T_BIGNUM)) {
|
183
|
+
if (rb_method_basic_definition_p(rb_cInteger, mid))
|
184
|
+
return BIGNUM_NEGATIVE_P(num);
|
185
|
+
}
|
186
|
+
return RTEST(rb_num_compare_with_zero(num, mid));
|
187
|
+
}
|
188
|
+
|
189
|
+
static inline double
|
190
|
+
rb_float_flonum_value(VALUE v)
|
191
|
+
{
|
192
|
+
#if USE_FLONUM
|
193
|
+
if (v != (VALUE)0x8000000000000002) { /* LIKELY */
|
194
|
+
union {
|
195
|
+
double d;
|
196
|
+
VALUE v;
|
197
|
+
} t;
|
198
|
+
|
199
|
+
VALUE b63 = (v >> 63);
|
200
|
+
/* e: xx1... -> 011... */
|
201
|
+
/* xx0... -> 100... */
|
202
|
+
/* ^b63 */
|
203
|
+
t.v = RUBY_BIT_ROTR((2 - b63) | (v & ~(VALUE)0x03), 3);
|
204
|
+
return t.d;
|
205
|
+
}
|
206
|
+
#endif
|
207
|
+
return 0.0;
|
208
|
+
}
|
209
|
+
|
210
|
+
static inline double
|
211
|
+
rb_float_noflonum_value(VALUE v)
|
212
|
+
{
|
213
|
+
return RFLOAT(v)->float_value;
|
214
|
+
}
|
215
|
+
|
216
|
+
static inline double
|
217
|
+
rb_float_value_inline(VALUE v)
|
218
|
+
{
|
219
|
+
if (FLONUM_P(v)) {
|
220
|
+
return rb_float_flonum_value(v);
|
221
|
+
}
|
222
|
+
return rb_float_noflonum_value(v);
|
223
|
+
}
|
224
|
+
|
225
|
+
static inline VALUE
|
226
|
+
rb_float_new_inline(double d)
|
227
|
+
{
|
228
|
+
#if USE_FLONUM
|
229
|
+
union {
|
230
|
+
double d;
|
231
|
+
VALUE v;
|
232
|
+
} t;
|
233
|
+
int bits;
|
234
|
+
|
235
|
+
t.d = d;
|
236
|
+
bits = (int)((VALUE)(t.v >> 60) & 0x7);
|
237
|
+
/* bits contains 3 bits of b62..b60. */
|
238
|
+
/* bits - 3 = */
|
239
|
+
/* b011 -> b000 */
|
240
|
+
/* b100 -> b001 */
|
241
|
+
|
242
|
+
if (t.v != 0x3000000000000000 /* 1.72723e-77 */ &&
|
243
|
+
!((bits-3) & ~0x01)) {
|
244
|
+
return (RUBY_BIT_ROTL(t.v, 3) & ~(VALUE)0x01) | 0x02;
|
245
|
+
}
|
246
|
+
else if (t.v == (VALUE)0) {
|
247
|
+
/* +0.0 */
|
248
|
+
return 0x8000000000000002;
|
249
|
+
}
|
250
|
+
/* out of range */
|
251
|
+
#endif
|
252
|
+
return rb_float_new_in_heap(d);
|
253
|
+
}
|
254
|
+
|
255
|
+
#endif /* INTERNAL_NUMERIC_H */
|
@@ -0,0 +1,83 @@
|
|
1
|
+
#ifndef INTERNAL_OBJECT_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_OBJECT_H
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
6
|
+
* @copyright This file is a part of the programming language Ruby.
|
7
|
+
* Permission is hereby granted, to either redistribute and/or
|
8
|
+
* modify this file, provided that the conditions mentioned in the
|
9
|
+
* file COPYING are met. Consult the file for details.
|
10
|
+
* @brief Internal header for Object.
|
11
|
+
*/
|
12
|
+
#include "ruby/ruby.h" /* for VALUE */
|
13
|
+
#include "internal/class.h" /* for RCLASS_IV_INDEX_TBL */
|
14
|
+
|
15
|
+
#ifdef ROBJECT_IV_INDEX_TBL
|
16
|
+
# undef ROBJECT_IV_INDEX_TBL
|
17
|
+
#endif
|
18
|
+
|
19
|
+
/* object.c */
|
20
|
+
VALUE rb_class_search_ancestor(VALUE klass, VALUE super);
|
21
|
+
NORETURN(void rb_undefined_alloc(VALUE klass));
|
22
|
+
double rb_num_to_dbl(VALUE val);
|
23
|
+
VALUE rb_obj_dig(int argc, VALUE *argv, VALUE self, VALUE notfound);
|
24
|
+
VALUE rb_immutable_obj_clone(int, VALUE *, VALUE);
|
25
|
+
VALUE rb_check_convert_type_with_id(VALUE,int,const char*,ID);
|
26
|
+
int rb_bool_expected(VALUE, const char *);
|
27
|
+
static inline void RBASIC_CLEAR_CLASS(VALUE obj);
|
28
|
+
static inline void RBASIC_SET_CLASS_RAW(VALUE obj, VALUE klass);
|
29
|
+
static inline void RBASIC_SET_CLASS(VALUE obj, VALUE klass);
|
30
|
+
static inline struct st_table *ROBJECT_IV_INDEX_TBL_inline(VALUE obj);
|
31
|
+
|
32
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
33
|
+
/* object.c (export) */
|
34
|
+
int rb_opts_exception_p(VALUE opts, int default_value);
|
35
|
+
RUBY_SYMBOL_EXPORT_END
|
36
|
+
|
37
|
+
MJIT_SYMBOL_EXPORT_BEGIN
|
38
|
+
CONSTFUNC(VALUE rb_obj_equal(VALUE obj1, VALUE obj2));
|
39
|
+
CONSTFUNC(VALUE rb_obj_not(VALUE obj));
|
40
|
+
VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2);
|
41
|
+
void rb_obj_copy_ivar(VALUE dest, VALUE obj);
|
42
|
+
VALUE rb_false(VALUE obj);
|
43
|
+
VALUE rb_convert_type_with_id(VALUE v, int t, const char* nam, ID mid);
|
44
|
+
VALUE rb_obj_size(VALUE self, VALUE args, VALUE obj);
|
45
|
+
MJIT_SYMBOL_EXPORT_END
|
46
|
+
|
47
|
+
static inline void
|
48
|
+
RBASIC_SET_CLASS_RAW(VALUE obj, VALUE klass)
|
49
|
+
{
|
50
|
+
struct { VALUE flags; VALUE klass; } *ptr = (void *)obj;
|
51
|
+
ptr->klass = klass;
|
52
|
+
}
|
53
|
+
|
54
|
+
static inline void
|
55
|
+
RBASIC_CLEAR_CLASS(VALUE obj)
|
56
|
+
{
|
57
|
+
RBASIC_SET_CLASS_RAW(obj, 0);
|
58
|
+
}
|
59
|
+
|
60
|
+
static inline void
|
61
|
+
RBASIC_SET_CLASS(VALUE obj, VALUE klass)
|
62
|
+
{
|
63
|
+
VALUE oldv = RBASIC_CLASS(obj);
|
64
|
+
RBASIC_SET_CLASS_RAW(obj, klass);
|
65
|
+
RB_OBJ_WRITTEN(obj, oldv, klass);
|
66
|
+
}
|
67
|
+
|
68
|
+
RBIMPL_ATTR_PURE()
|
69
|
+
static inline struct st_table *
|
70
|
+
ROBJECT_IV_INDEX_TBL_inline(VALUE obj)
|
71
|
+
{
|
72
|
+
if (RB_FL_ANY_RAW(obj, ROBJECT_EMBED)) {
|
73
|
+
VALUE klass = rb_obj_class(obj);
|
74
|
+
return RCLASS_IV_INDEX_TBL(klass);
|
75
|
+
}
|
76
|
+
else {
|
77
|
+
const struct RObject *const ptr = ROBJECT(obj);
|
78
|
+
return ptr->as.heap.iv_index_tbl;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
#define ROBJECT_IV_INDEX_TBL ROBJECT_IV_INDEX_TBL_inline
|
82
|
+
|
83
|
+
#endif /* INTERNAL_OBJECT_H */
|