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
@@ -841,12 +841,12 @@ enum ruby_rhash_flags {
|
|
841
841
|
#define RHASH_AR_TABLE_SIZE_RAW(h) \
|
842
842
|
((unsigned int)((RBASIC(h)->flags & RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT))
|
843
843
|
|
844
|
-
int rb_hash_ar_table_p(VALUE hash);
|
845
|
-
struct ar_table_struct *rb_hash_ar_table(VALUE hash);
|
846
|
-
st_table *rb_hash_st_table(VALUE hash);
|
847
844
|
void rb_hash_st_table_set(VALUE hash, st_table *st);
|
848
845
|
|
849
846
|
#if 0 /* for debug */
|
847
|
+
int rb_hash_ar_table_p(VALUE hash);
|
848
|
+
struct ar_table_struct *rb_hash_ar_table(VALUE hash);
|
849
|
+
st_table *rb_hash_st_table(VALUE hash);
|
850
850
|
#define RHASH_AR_TABLE_P(hash) rb_hash_ar_table_p(hash)
|
851
851
|
#define RHASH_AR_TABLE(h) rb_hash_ar_table(h)
|
852
852
|
#define RHASH_ST_TABLE(h) rb_hash_st_table(h)
|
@@ -1004,19 +1004,25 @@ struct rb_subclass_entry {
|
|
1004
1004
|
typedef unsigned LONG_LONG rb_serial_t;
|
1005
1005
|
#define SERIALT2NUM ULL2NUM
|
1006
1006
|
#define PRI_SERIALT_PREFIX PRI_LL_PREFIX
|
1007
|
+
#define SIZEOF_SERIAL_T SIZEOF_LONG_LONG
|
1007
1008
|
#elif defined(HAVE_UINT64_T)
|
1008
1009
|
typedef uint64_t rb_serial_t;
|
1009
1010
|
#define SERIALT2NUM SIZET2NUM
|
1010
1011
|
#define PRI_SERIALT_PREFIX PRI_64_PREFIX
|
1012
|
+
#define SIZEOF_SERIAL_T SIZEOF_UINT64_T
|
1011
1013
|
#else
|
1012
1014
|
typedef unsigned long rb_serial_t;
|
1013
1015
|
#define SERIALT2NUM ULONG2NUM
|
1014
1016
|
#define PRI_SERIALT_PREFIX PRI_LONG_PREFIX
|
1017
|
+
#define SIZEOF_SERIAL_T SIZEOF_LONG
|
1015
1018
|
#endif
|
1016
1019
|
|
1017
1020
|
struct rb_classext_struct {
|
1018
1021
|
struct st_table *iv_index_tbl;
|
1019
1022
|
struct st_table *iv_tbl;
|
1023
|
+
#if SIZEOF_SERIAL_T == SIZEOF_VALUE /* otherwise m_tbl is in struct RClass */
|
1024
|
+
struct rb_id_table *m_tbl;
|
1025
|
+
#endif
|
1020
1026
|
struct rb_id_table *const_tbl;
|
1021
1027
|
struct rb_id_table *callable_m_tbl;
|
1022
1028
|
rb_subclass_entry_t *subclasses;
|
@@ -1027,10 +1033,13 @@ struct rb_classext_struct {
|
|
1027
1033
|
* included. Hopefully that makes sense.
|
1028
1034
|
*/
|
1029
1035
|
rb_subclass_entry_t **module_subclasses;
|
1036
|
+
#if SIZEOF_SERIAL_T != SIZEOF_VALUE /* otherwise class_serial is in struct RClass */
|
1030
1037
|
rb_serial_t class_serial;
|
1038
|
+
#endif
|
1031
1039
|
const VALUE origin_;
|
1032
1040
|
const VALUE refined_class;
|
1033
1041
|
rb_alloc_func_t allocator;
|
1042
|
+
const VALUE includer;
|
1034
1043
|
};
|
1035
1044
|
|
1036
1045
|
typedef struct rb_classext_struct rb_classext_t;
|
@@ -1040,7 +1049,13 @@ struct RClass {
|
|
1040
1049
|
struct RBasic basic;
|
1041
1050
|
VALUE super;
|
1042
1051
|
rb_classext_t *ptr;
|
1052
|
+
#if SIZEOF_SERIAL_T == SIZEOF_VALUE
|
1053
|
+
/* Class serial is as wide as VALUE. Place it here. */
|
1054
|
+
rb_serial_t class_serial;
|
1055
|
+
#else
|
1056
|
+
/* Class serial does not fit into struct RClass. Place m_tbl instead. */
|
1043
1057
|
struct rb_id_table *m_tbl;
|
1058
|
+
#endif
|
1044
1059
|
};
|
1045
1060
|
|
1046
1061
|
void rb_class_subclass_add(VALUE super, VALUE klass);
|
@@ -1050,15 +1065,25 @@ int rb_singleton_class_internal_p(VALUE sklass);
|
|
1050
1065
|
#define RCLASS_EXT(c) (RCLASS(c)->ptr)
|
1051
1066
|
#define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
|
1052
1067
|
#define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
|
1053
|
-
#
|
1068
|
+
#if SIZEOF_SERIAL_T == SIZEOF_VALUE
|
1069
|
+
# define RCLASS_M_TBL(c) (RCLASS_EXT(c)->m_tbl)
|
1070
|
+
#else
|
1071
|
+
# define RCLASS_M_TBL(c) (RCLASS(c)->m_tbl)
|
1072
|
+
#endif
|
1054
1073
|
#define RCLASS_CALLABLE_M_TBL(c) (RCLASS_EXT(c)->callable_m_tbl)
|
1055
1074
|
#define RCLASS_IV_INDEX_TBL(c) (RCLASS_EXT(c)->iv_index_tbl)
|
1056
1075
|
#define RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin_)
|
1057
1076
|
#define RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
|
1058
|
-
#
|
1077
|
+
#if SIZEOF_SERIAL_T == SIZEOF_VALUE
|
1078
|
+
# define RCLASS_SERIAL(c) (RCLASS(c)->class_serial)
|
1079
|
+
#else
|
1080
|
+
# define RCLASS_SERIAL(c) (RCLASS_EXT(c)->class_serial)
|
1081
|
+
#endif
|
1082
|
+
#define RCLASS_INCLUDER(c) (RCLASS_EXT(c)->includer)
|
1059
1083
|
|
1060
1084
|
#define RCLASS_CLONED FL_USER6
|
1061
1085
|
#define RICLASS_IS_ORIGIN FL_USER5
|
1086
|
+
#define RCLASS_REFINED_BY_ANY FL_USER7
|
1062
1087
|
|
1063
1088
|
static inline void
|
1064
1089
|
RCLASS_SET_ORIGIN(VALUE klass, VALUE origin)
|
@@ -1067,6 +1092,12 @@ RCLASS_SET_ORIGIN(VALUE klass, VALUE origin)
|
|
1067
1092
|
if (klass != origin) FL_SET(origin, RICLASS_IS_ORIGIN);
|
1068
1093
|
}
|
1069
1094
|
|
1095
|
+
static inline void
|
1096
|
+
RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass)
|
1097
|
+
{
|
1098
|
+
RB_OBJ_WRITE(iclass, &RCLASS_INCLUDER(iclass), klass);
|
1099
|
+
}
|
1100
|
+
|
1070
1101
|
#undef RCLASS_SUPER
|
1071
1102
|
static inline VALUE
|
1072
1103
|
RCLASS_SUPER(VALUE klass)
|
@@ -1206,7 +1237,6 @@ typedef struct rb_imemo_tmpbuf_struct {
|
|
1206
1237
|
} rb_imemo_tmpbuf_t;
|
1207
1238
|
|
1208
1239
|
#define rb_imemo_tmpbuf_auto_free_pointer() rb_imemo_new(imemo_tmpbuf, 0, 0, 0, 0)
|
1209
|
-
VALUE rb_imemo_tmpbuf_auto_free_maybe_mark_buffer(void *buf, size_t cnt);
|
1210
1240
|
rb_imemo_tmpbuf_t *rb_imemo_tmpbuf_parser_heap(void *buf, rb_imemo_tmpbuf_t *old_heap, size_t cnt);
|
1211
1241
|
|
1212
1242
|
#define RB_IMEMO_TMPBUF_PTR(v) \
|
@@ -1364,7 +1394,6 @@ void rb_ary_delete_same(VALUE, VALUE);
|
|
1364
1394
|
VALUE rb_ary_tmp_new_fill(long capa);
|
1365
1395
|
VALUE rb_ary_at(VALUE, VALUE);
|
1366
1396
|
VALUE rb_ary_aref1(VALUE ary, VALUE i);
|
1367
|
-
VALUE rb_ary_aref2(VALUE ary, VALUE b, VALUE e);
|
1368
1397
|
size_t rb_ary_memsize(VALUE);
|
1369
1398
|
VALUE rb_to_array_type(VALUE obj);
|
1370
1399
|
VALUE rb_check_to_array(VALUE ary);
|
@@ -1425,7 +1454,6 @@ VALUE rb_big_even_p(VALUE);
|
|
1425
1454
|
size_t rb_big_size(VALUE);
|
1426
1455
|
VALUE rb_integer_float_cmp(VALUE x, VALUE y);
|
1427
1456
|
VALUE rb_integer_float_eq(VALUE x, VALUE y);
|
1428
|
-
VALUE rb_cstr_parse_inum(const char *str, ssize_t len, char **endp, int base);
|
1429
1457
|
VALUE rb_str_convert_to_inum(VALUE str, int base, int badcheck, int raise_exception);
|
1430
1458
|
VALUE rb_big_comp(VALUE x);
|
1431
1459
|
VALUE rb_big_aref(VALUE x, VALUE y);
|
@@ -1516,24 +1544,25 @@ extern VALUE rb_eEAGAIN;
|
|
1516
1544
|
extern VALUE rb_eEWOULDBLOCK;
|
1517
1545
|
extern VALUE rb_eEINPROGRESS;
|
1518
1546
|
void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args);
|
1519
|
-
VALUE rb_check_backtrace(VALUE);
|
1520
1547
|
NORETURN(void rb_async_bug_errno(const char *,int));
|
1521
1548
|
const char *rb_builtin_type_name(int t);
|
1522
1549
|
const char *rb_builtin_class_name(VALUE x);
|
1523
|
-
PRINTF_ARGS(void
|
1524
|
-
PRINTF_ARGS(void rb_syserr_warn(int err, const char *fmt, ...), 2, 3);
|
1525
|
-
PRINTF_ARGS(void rb_sys_warning(const char *fmt, ...), 1, 2);
|
1526
|
-
PRINTF_ARGS(void rb_syserr_warning(int err, const char *fmt, ...), 2, 3);
|
1550
|
+
PRINTF_ARGS(void rb_warn_deprecated(const char *fmt, const char *suggest, ...), 1, 3);
|
1527
1551
|
#ifdef RUBY_ENCODING_H
|
1528
1552
|
VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list);
|
1529
1553
|
PRINTF_ARGS(void rb_enc_warn(rb_encoding *enc, const char *fmt, ...), 2, 3);
|
1530
|
-
PRINTF_ARGS(void rb_sys_enc_warn(rb_encoding *enc, const char *fmt, ...), 2, 3);
|
1531
|
-
PRINTF_ARGS(void rb_syserr_enc_warn(int err, rb_encoding *enc, const char *fmt, ...), 3, 4);
|
1532
|
-
PRINTF_ARGS(void rb_enc_warning(rb_encoding *enc, const char *fmt, ...), 2, 3);
|
1533
1554
|
PRINTF_ARGS(void rb_sys_enc_warning(rb_encoding *enc, const char *fmt, ...), 2, 3);
|
1534
1555
|
PRINTF_ARGS(void rb_syserr_enc_warning(int err, rb_encoding *enc, const char *fmt, ...), 3, 4);
|
1535
1556
|
#endif
|
1536
1557
|
|
1558
|
+
typedef enum {
|
1559
|
+
RB_WARN_CATEGORY_NONE,
|
1560
|
+
RB_WARN_CATEGORY_DEPRECATED,
|
1561
|
+
RB_WARN_CATEGORY_EXPERIMENTAL,
|
1562
|
+
} rb_warning_category_t;
|
1563
|
+
rb_warning_category_t rb_warning_category_from_name(VALUE category);
|
1564
|
+
bool rb_warning_category_enabled_p(rb_warning_category_t category);
|
1565
|
+
|
1537
1566
|
#define rb_raise_cstr(etype, mesg) \
|
1538
1567
|
rb_exc_raise(rb_exc_new_str(etype, rb_str_new_cstr(mesg)))
|
1539
1568
|
#define rb_raise_static(etype, mesg) \
|
@@ -1548,10 +1577,6 @@ VALUE rb_nomethod_err_new(VALUE mesg, VALUE recv, VALUE method, VALUE args, int
|
|
1548
1577
|
VALUE rb_key_err_new(VALUE mesg, VALUE recv, VALUE name);
|
1549
1578
|
#define rb_key_err_raise(mesg, recv, name) \
|
1550
1579
|
rb_exc_raise(rb_key_err_new(mesg, recv, name))
|
1551
|
-
NORETURN(void ruby_deprecated_internal_feature(const char *));
|
1552
|
-
#define DEPRECATED_INTERNAL_FEATURE(func) \
|
1553
|
-
(ruby_deprecated_internal_feature(func), UNREACHABLE)
|
1554
|
-
VALUE rb_warning_warn(VALUE mod, VALUE str);
|
1555
1580
|
PRINTF_ARGS(VALUE rb_warning_string(const char *fmt, ...), 1, 2);
|
1556
1581
|
NORETURN(void rb_vraise(VALUE, const char *, va_list));
|
1557
1582
|
|
@@ -1575,14 +1600,15 @@ extern const char ruby_null_device[];
|
|
1575
1600
|
VALUE rb_home_dir_of(VALUE user, VALUE result);
|
1576
1601
|
VALUE rb_default_home_dir(VALUE result);
|
1577
1602
|
VALUE rb_realpath_internal(VALUE basedir, VALUE path, int strict);
|
1578
|
-
|
1603
|
+
#ifdef RUBY_ENCODING_H
|
1604
|
+
VALUE rb_check_realpath(VALUE basedir, VALUE path, rb_encoding *origenc);
|
1605
|
+
#endif
|
1579
1606
|
void rb_file_const(const char*, VALUE);
|
1580
1607
|
int rb_file_load_ok(const char *);
|
1581
1608
|
VALUE rb_file_expand_path_fast(VALUE, VALUE);
|
1582
1609
|
VALUE rb_file_expand_path_internal(VALUE, VALUE, int, int, VALUE);
|
1583
|
-
VALUE rb_get_path_check_to_string(VALUE
|
1584
|
-
VALUE rb_get_path_check_convert(VALUE
|
1585
|
-
VALUE rb_get_path_check(VALUE, int);
|
1610
|
+
VALUE rb_get_path_check_to_string(VALUE);
|
1611
|
+
VALUE rb_get_path_check_convert(VALUE);
|
1586
1612
|
void Init_File(void);
|
1587
1613
|
int ruby_is_fd_loadable(int fd);
|
1588
1614
|
|
@@ -1606,7 +1632,7 @@ NORETURN(void rb_syserr_fail_path_in(const char *func_name, int err, VALUE path)
|
|
1606
1632
|
extern VALUE *ruby_initial_gc_stress_ptr;
|
1607
1633
|
extern int ruby_disable_gc;
|
1608
1634
|
void Init_heap(void);
|
1609
|
-
void *ruby_mimmalloc(size_t size);
|
1635
|
+
void *ruby_mimmalloc(size_t size) RUBY_ATTR_MALLOC;
|
1610
1636
|
void ruby_mimfree(void *ptr);
|
1611
1637
|
void rb_objspace_set_event_hook(const rb_event_flag_t event);
|
1612
1638
|
#if USE_RGENGC
|
@@ -1614,7 +1640,7 @@ void rb_gc_writebarrier_remember(VALUE obj);
|
|
1614
1640
|
#else
|
1615
1641
|
#define rb_gc_writebarrier_remember(obj) 0
|
1616
1642
|
#endif
|
1617
|
-
void ruby_gc_set_params(
|
1643
|
+
void ruby_gc_set_params(void);
|
1618
1644
|
void rb_copy_wb_protected_attribute(VALUE dest, VALUE obj);
|
1619
1645
|
|
1620
1646
|
#if defined(HAVE_MALLOC_USABLE_SIZE) || defined(HAVE_MALLOC_SIZE) || defined(_WIN32)
|
@@ -1624,8 +1650,8 @@ void rb_copy_wb_protected_attribute(VALUE dest, VALUE obj);
|
|
1624
1650
|
#define SIZED_REALLOC_N(var,type,n,old_n) REALLOC_N(var, type, n)
|
1625
1651
|
#else
|
1626
1652
|
RUBY_SYMBOL_EXPORT_BEGIN
|
1627
|
-
void *ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_ALLOC_SIZE((2));
|
1628
|
-
void *ruby_sized_xrealloc2(void *ptr, size_t new_count, size_t element_size, size_t old_count) RUBY_ATTR_ALLOC_SIZE((2, 3));
|
1653
|
+
void *ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2));
|
1654
|
+
void *ruby_sized_xrealloc2(void *ptr, size_t new_count, size_t element_size, size_t old_count) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2, 3));
|
1629
1655
|
void ruby_sized_xfree(void *x, size_t size);
|
1630
1656
|
RUBY_SYMBOL_EXPORT_END
|
1631
1657
|
#define SIZED_REALLOC_N(var,type,n,old_n) ((var)=(type*)ruby_sized_xrealloc2((void*)(var), (n), sizeof(type), (old_n)))
|
@@ -1646,7 +1672,6 @@ __attribute__((__alloc_align__(1)))
|
|
1646
1672
|
#endif
|
1647
1673
|
#endif
|
1648
1674
|
void *rb_aligned_malloc(size_t, size_t) RUBY_ATTR_MALLOC RUBY_ATTR_ALLOC_SIZE((2));
|
1649
|
-
void rb_aligned_free(void *);
|
1650
1675
|
|
1651
1676
|
size_t rb_size_mul_or_raise(size_t, size_t, VALUE); /* used in compile.c */
|
1652
1677
|
size_t rb_size_mul_add_or_raise(size_t, size_t, size_t, VALUE); /* used in iseq.h */
|
@@ -1668,10 +1693,8 @@ VALUE rb_hash_new_with_size(st_index_t size);
|
|
1668
1693
|
VALUE rb_hash_has_key(VALUE hash, VALUE key);
|
1669
1694
|
VALUE rb_hash_default_value(VALUE hash, VALUE key);
|
1670
1695
|
VALUE rb_hash_set_default_proc(VALUE hash, VALUE proc);
|
1671
|
-
long rb_objid_hash(st_index_t index);
|
1672
1696
|
long rb_dbl_long_hash(double d);
|
1673
1697
|
st_table *rb_init_identtable(void);
|
1674
|
-
st_table *rb_init_identtable_with_size(st_index_t size);
|
1675
1698
|
VALUE rb_hash_compare_by_id_p(VALUE hash);
|
1676
1699
|
VALUE rb_to_hash_type(VALUE obj);
|
1677
1700
|
VALUE rb_hash_key_str(VALUE);
|
@@ -1694,9 +1717,7 @@ int rb_hash_stlike_update(VALUE hash, st_data_t key, st_update_callback_func fun
|
|
1694
1717
|
void rb_call_inits(void);
|
1695
1718
|
|
1696
1719
|
/* io.c */
|
1697
|
-
const char *ruby_get_inplace_mode(void);
|
1698
1720
|
void ruby_set_inplace_mode(const char *);
|
1699
|
-
ssize_t rb_io_bufread(VALUE io, void *buf, size_t size);
|
1700
1721
|
void rb_stdio_set_default_encoding(void);
|
1701
1722
|
VALUE rb_io_flush_raw(VALUE, int);
|
1702
1723
|
#ifdef RUBY_IO_H
|
@@ -1707,9 +1728,8 @@ void rb_io_fptr_finalize_internal(void *ptr);
|
|
1707
1728
|
#define rb_io_fptr_finalize rb_io_fptr_finalize_internal
|
1708
1729
|
|
1709
1730
|
/* load.c */
|
1710
|
-
VALUE rb_get_load_path(void);
|
1711
1731
|
VALUE rb_get_expanded_load_path(void);
|
1712
|
-
int rb_require_internal(VALUE fname
|
1732
|
+
int rb_require_internal(VALUE fname);
|
1713
1733
|
NORETURN(void rb_load_fail(VALUE, const char*));
|
1714
1734
|
|
1715
1735
|
/* loadpath.c */
|
@@ -1728,7 +1748,6 @@ VALUE rb_math_hypot(VALUE, VALUE);
|
|
1728
1748
|
VALUE rb_math_log(int argc, const VALUE *argv);
|
1729
1749
|
VALUE rb_math_sin(VALUE);
|
1730
1750
|
VALUE rb_math_sinh(VALUE);
|
1731
|
-
VALUE rb_math_sqrt(VALUE);
|
1732
1751
|
|
1733
1752
|
/* mjit.c */
|
1734
1753
|
|
@@ -1782,7 +1801,6 @@ int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl, int allow_endles
|
|
1782
1801
|
double ruby_float_mod(double x, double y);
|
1783
1802
|
int rb_num_negative_p(VALUE);
|
1784
1803
|
VALUE rb_int_succ(VALUE num);
|
1785
|
-
VALUE rb_int_pred(VALUE num);
|
1786
1804
|
VALUE rb_int_uminus(VALUE num);
|
1787
1805
|
VALUE rb_float_uminus(VALUE num);
|
1788
1806
|
VALUE rb_int_plus(VALUE x, VALUE y);
|
@@ -1793,9 +1811,7 @@ VALUE rb_float_mul(VALUE x, VALUE y);
|
|
1793
1811
|
VALUE rb_float_div(VALUE x, VALUE y);
|
1794
1812
|
VALUE rb_int_idiv(VALUE x, VALUE y);
|
1795
1813
|
VALUE rb_int_modulo(VALUE x, VALUE y);
|
1796
|
-
VALUE rb_int_round(VALUE num, int ndigits, enum ruby_num_rounding_mode mode);
|
1797
1814
|
VALUE rb_int2str(VALUE num, int base);
|
1798
|
-
VALUE rb_dbl_hash(double d);
|
1799
1815
|
VALUE rb_fix_plus(VALUE x, VALUE y);
|
1800
1816
|
VALUE rb_fix_aref(VALUE fix, VALUE idx);
|
1801
1817
|
VALUE rb_int_gt(VALUE x, VALUE y);
|
@@ -1973,7 +1989,6 @@ struct RBasicRaw {
|
|
1973
1989
|
#ifndef USE_SYMBOL_GC
|
1974
1990
|
#define USE_SYMBOL_GC 1
|
1975
1991
|
#endif
|
1976
|
-
VALUE rb_parser_get_yydebug(VALUE);
|
1977
1992
|
VALUE rb_parser_set_yydebug(VALUE, VALUE);
|
1978
1993
|
RUBY_SYMBOL_EXPORT_BEGIN
|
1979
1994
|
VALUE rb_parser_set_context(VALUE, const struct rb_iseq_struct *, int);
|
@@ -1981,23 +1996,12 @@ RUBY_SYMBOL_EXPORT_END
|
|
1981
1996
|
void *rb_parser_load_file(VALUE parser, VALUE name);
|
1982
1997
|
int rb_is_const_name(VALUE name);
|
1983
1998
|
int rb_is_class_name(VALUE name);
|
1984
|
-
int rb_is_global_name(VALUE name);
|
1985
1999
|
int rb_is_instance_name(VALUE name);
|
1986
|
-
int rb_is_attrset_name(VALUE name);
|
1987
2000
|
int rb_is_local_name(VALUE name);
|
1988
|
-
int rb_is_method_name(VALUE name);
|
1989
|
-
int rb_is_junk_name(VALUE name);
|
1990
2001
|
PUREFUNC(int rb_is_const_sym(VALUE sym));
|
1991
|
-
PUREFUNC(int rb_is_class_sym(VALUE sym));
|
1992
|
-
PUREFUNC(int rb_is_global_sym(VALUE sym));
|
1993
|
-
PUREFUNC(int rb_is_instance_sym(VALUE sym));
|
1994
2002
|
PUREFUNC(int rb_is_attrset_sym(VALUE sym));
|
1995
|
-
PUREFUNC(int rb_is_local_sym(VALUE sym));
|
1996
|
-
PUREFUNC(int rb_is_method_sym(VALUE sym));
|
1997
|
-
PUREFUNC(int rb_is_junk_sym(VALUE sym));
|
1998
2003
|
ID rb_make_internal_id(void);
|
1999
2004
|
void rb_gc_free_dsymbol(VALUE);
|
2000
|
-
ID rb_id_attrget(ID id);
|
2001
2005
|
|
2002
2006
|
/* proc.c */
|
2003
2007
|
VALUE rb_proc_location(VALUE self);
|
@@ -2130,14 +2134,6 @@ VALUE rb_fstring_cstr(const char *str);
|
|
2130
2134
|
VALUE rb_fstring_enc_new(const char *ptr, long len, rb_encoding *enc);
|
2131
2135
|
#define rb_fstring_enc_lit(str, enc) rb_fstring_enc_new((str), rb_strlen_lit(str), (enc))
|
2132
2136
|
#define rb_fstring_enc_literal(str, enc) rb_fstring_enc_lit(str, enc)
|
2133
|
-
VALUE rb_fstring_enc_cstr(const char *ptr, rb_encoding *enc);
|
2134
|
-
# ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P
|
2135
|
-
# define rb_fstring_enc_cstr(str, enc) RB_GNUC_EXTENSION_BLOCK( \
|
2136
|
-
(__builtin_constant_p(str)) ? \
|
2137
|
-
rb_fstring_enc_new((str), (long)strlen(str), (enc)) : \
|
2138
|
-
rb_fstring_enc_cstr(str, enc) \
|
2139
|
-
)
|
2140
|
-
# endif
|
2141
2137
|
#endif
|
2142
2138
|
int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p);
|
2143
2139
|
int rb_str_symname_p(VALUE);
|
@@ -2190,15 +2186,6 @@ rb_str_eql_internal(const VALUE str1, const VALUE str2)
|
|
2190
2186
|
/* symbol.c */
|
2191
2187
|
#ifdef RUBY_ENCODING_H
|
2192
2188
|
VALUE rb_sym_intern(const char *ptr, long len, rb_encoding *enc);
|
2193
|
-
VALUE rb_sym_intern_cstr(const char *ptr, rb_encoding *enc);
|
2194
|
-
#ifdef __GNUC__
|
2195
|
-
#define rb_sym_intern_cstr(ptr, enc) __extension__ ( \
|
2196
|
-
{ \
|
2197
|
-
(__builtin_constant_p(ptr)) ? \
|
2198
|
-
rb_sym_intern((ptr), (long)strlen(ptr), (enc)) : \
|
2199
|
-
rb_sym_intern_cstr((ptr), (enc)); \
|
2200
|
-
})
|
2201
|
-
#endif
|
2202
2189
|
#endif
|
2203
2190
|
VALUE rb_sym_intern_ascii(const char *ptr, long len);
|
2204
2191
|
VALUE rb_sym_intern_ascii_cstr(const char *ptr);
|
@@ -2286,6 +2273,7 @@ NORETURN(VALUE rb_mod_const_missing(VALUE,VALUE));
|
|
2286
2273
|
rb_gvar_getter_t *rb_gvar_getter_function_of(const struct rb_global_entry *);
|
2287
2274
|
rb_gvar_setter_t *rb_gvar_setter_function_of(const struct rb_global_entry *);
|
2288
2275
|
bool rb_gvar_is_traced(const struct rb_global_entry *);
|
2276
|
+
void rb_gvar_readonly_setter(VALUE v, ID id, VALUE *_);
|
2289
2277
|
|
2290
2278
|
/* vm_insnhelper.h */
|
2291
2279
|
rb_serial_t rb_next_class_serial(void);
|
@@ -2296,9 +2284,6 @@ void rb_vm_mark(void *ptr);
|
|
2296
2284
|
void Init_BareVM(void);
|
2297
2285
|
void Init_vm_objects(void);
|
2298
2286
|
PUREFUNC(VALUE rb_vm_top_self(void));
|
2299
|
-
void rb_thread_recycle_stack_release(VALUE *);
|
2300
|
-
VALUE *rb_thread_recycle_stack(size_t);
|
2301
|
-
void rb_vm_change_state(void);
|
2302
2287
|
void rb_vm_inc_const_missing_count(void);
|
2303
2288
|
const void **rb_vm_get_insns_address_table(void);
|
2304
2289
|
VALUE rb_source_location(int *pline);
|
@@ -2306,6 +2291,7 @@ const char *rb_source_location_cstr(int *pline);
|
|
2306
2291
|
MJIT_STATIC void rb_vm_pop_cfunc_frame(void);
|
2307
2292
|
int rb_vm_add_root_module(ID id, VALUE module);
|
2308
2293
|
void rb_vm_check_redefinition_by_prepend(VALUE klass);
|
2294
|
+
int rb_vm_check_optimizable_mid(VALUE mid);
|
2309
2295
|
VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
|
2310
2296
|
MJIT_STATIC VALUE ruby_vm_special_exception_copy(VALUE);
|
2311
2297
|
PUREFUNC(st_table *rb_vm_fstring_table(void));
|
@@ -2326,7 +2312,6 @@ VALUE rb_check_funcall_with_hook_kw(VALUE recv, ID mid, int argc, const VALUE *a
|
|
2326
2312
|
rb_check_funcall_hook *hook, VALUE arg, int kw_splat);
|
2327
2313
|
const char *rb_type_str(enum ruby_value_type type);
|
2328
2314
|
VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE);
|
2329
|
-
VALUE rb_check_funcall_default_kw(VALUE, ID, int, const VALUE *, VALUE, int);
|
2330
2315
|
VALUE rb_yield_1(VALUE val);
|
2331
2316
|
VALUE rb_yield_force_blockarg(VALUE values);
|
2332
2317
|
VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
|
@@ -2356,47 +2341,77 @@ struct rb_method_definition_struct;
|
|
2356
2341
|
struct rb_execution_context_struct;
|
2357
2342
|
struct rb_control_frame_struct;
|
2358
2343
|
struct rb_calling_info;
|
2359
|
-
struct
|
2344
|
+
struct rb_call_data;
|
2345
|
+
/* I have several reasons to chose 64 here:
|
2346
|
+
*
|
2347
|
+
* - A cache line must be a power-of-two size.
|
2348
|
+
* - Setting this to anything less than or equal to 32 boosts nothing.
|
2349
|
+
* - I have never seen an architecture that has 128 byte L1 cache line.
|
2350
|
+
* - I know Intel Core and Sparc T4 at least uses 64.
|
2351
|
+
* - I know jemalloc internally has this exact same `#define CACHE_LINE 64`.
|
2352
|
+
* https://github.com/jemalloc/jemalloc/blob/dev/include/jemalloc/internal/jemalloc_internal_types.h
|
2353
|
+
*/
|
2354
|
+
#define CACHELINE 64
|
2360
2355
|
struct rb_call_cache {
|
2361
2356
|
/* inline cache: keys */
|
2362
2357
|
rb_serial_t method_state;
|
2363
|
-
rb_serial_t class_serial
|
2358
|
+
rb_serial_t class_serial[
|
2359
|
+
(CACHELINE
|
2360
|
+
- sizeof(rb_serial_t) /* method_state */
|
2361
|
+
- sizeof(struct rb_callable_method_entry_struct *) /* me */
|
2362
|
+
- sizeof(uintptr_t) /* method_serial */
|
2363
|
+
- sizeof(enum method_missing_reason) /* aux */
|
2364
|
+
- sizeof(VALUE (*)( /* call */
|
2365
|
+
struct rb_execution_context_struct *e,
|
2366
|
+
struct rb_control_frame_struct *,
|
2367
|
+
struct rb_calling_info *,
|
2368
|
+
const struct rb_call_data *)))
|
2369
|
+
/ sizeof(rb_serial_t)
|
2370
|
+
];
|
2364
2371
|
|
2365
2372
|
/* inline cache: values */
|
2366
2373
|
const struct rb_callable_method_entry_struct *me;
|
2367
|
-
|
2374
|
+
uintptr_t method_serial; /* me->def->method_serial */
|
2368
2375
|
|
2369
2376
|
VALUE (*call)(struct rb_execution_context_struct *ec,
|
2370
2377
|
struct rb_control_frame_struct *cfp,
|
2371
2378
|
struct rb_calling_info *calling,
|
2372
|
-
|
2373
|
-
struct rb_call_cache *cc);
|
2379
|
+
struct rb_call_data *cd);
|
2374
2380
|
|
2375
2381
|
union {
|
2376
2382
|
unsigned int index; /* used by ivar */
|
2377
2383
|
enum method_missing_reason method_missing_reason; /* used by method_missing */
|
2378
|
-
int inc_sp; /* used by cfunc */
|
2379
2384
|
} aux;
|
2380
2385
|
};
|
2381
|
-
struct
|
2382
|
-
|
2386
|
+
STATIC_ASSERT(cachelined, sizeof(struct rb_call_cache) <= CACHELINE);
|
2387
|
+
struct rb_call_info {
|
2388
|
+
/* fixed at compile time */
|
2383
2389
|
ID mid;
|
2390
|
+
unsigned int flag;
|
2391
|
+
int orig_argc;
|
2392
|
+
};
|
2393
|
+
struct rb_call_data {
|
2394
|
+
struct rb_call_cache cc;
|
2395
|
+
struct rb_call_info ci;
|
2384
2396
|
};
|
2385
|
-
|
2386
|
-
|
2387
|
-
|
2397
|
+
RUBY_FUNC_EXPORTED
|
2398
|
+
RUBY_FUNC_NONNULL(1, VALUE rb_funcallv_with_cc(struct rb_call_data*, VALUE, ID, int, const VALUE*));
|
2399
|
+
RUBY_FUNC_EXPORTED
|
2400
|
+
RUBY_FUNC_NONNULL(1, bool rb_method_basic_definition_p_with_cc(struct rb_call_data *, VALUE, ID));
|
2401
|
+
|
2402
|
+
#ifdef __GNUC__
|
2388
2403
|
# define rb_funcallv(recv, mid, argc, argv) \
|
2389
2404
|
__extension__({ \
|
2390
|
-
static struct
|
2391
|
-
|
2392
|
-
|
2393
|
-
|
2405
|
+
static struct rb_call_data rb_funcallv_data; \
|
2406
|
+
rb_funcallv_with_cc(&rb_funcallv_data, recv, mid, argc, argv); \
|
2407
|
+
})
|
2408
|
+
# define rb_method_basic_definition_p(klass, mid) \
|
2409
|
+
__extension__({ \
|
2410
|
+
static struct rb_call_data rb_mbdp; \
|
2411
|
+
(klass == Qfalse) ? /* hidden object cannot be overridden */ true : \
|
2412
|
+
rb_method_basic_definition_p_with_cc(&rb_mbdp, klass, mid); \
|
2394
2413
|
})
|
2395
2414
|
#endif
|
2396
|
-
;
|
2397
|
-
|
2398
|
-
/* miniprelude.c, prelude.c */
|
2399
|
-
void Init_prelude(void);
|
2400
2415
|
|
2401
2416
|
/* vm_backtrace.c */
|
2402
2417
|
void Init_vm_backtrace(void);
|