debase-ruby_core_source 3.3.1 → 3.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/.idea/vcs.xml +28 -0
- data/CHANGELOG.md +8 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/addr2line.h +22 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/builtin.h +117 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/list/list.h +791 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/str/str.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/constant.h +53 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/darray.h +246 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/debug_counter.h +423 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/dln.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/encindex.h +70 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/eval_intern.h +343 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/hrtime.h +227 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/id.h +343 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/id_table.h +39 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/insns.inc +251 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/insns_info.inc +9215 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/array.h +151 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/basic_operators.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/bignum.h +244 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/bits.h +568 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/class.h +277 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/cmdlineopt.h +65 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/compar.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/compile.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/compilers.h +107 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/cont.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/dir.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/enc.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/encoding.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/enum.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/enumerator.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/error.h +216 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/eval.h +33 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/file.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/fixnum.h +184 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/gc.h +364 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/hash.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/imemo.h +240 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/inits.h +50 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/io.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/load.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/loadpath.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/math.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/missing.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/numeric.h +273 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/object.h +62 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/parse.h +108 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/proc.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/process.h +124 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/ractor.h +6 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/random.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/range.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/rational.h +71 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/re.h +28 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/ruby_parser.h +69 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/sanitizers.h +186 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/serial.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/signal.h +25 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/static_assert.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/string.h +160 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/struct.h +127 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/symbol.h +45 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/thread.h +78 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/time.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/transcode.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/util.h +27 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/variable.h +72 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/vm.h +136 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/warnings.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal.h +112 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/iseq.h +338 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/known_errors.inc +791 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/method.h +254 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/node.h +128 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/node_name.inc +212 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parse.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parser_bits.h +564 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parser_node.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parser_st.h +162 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parser_value.h +106 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/ast.h +4612 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/defines.h +94 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/diagnostic.h +297 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/encoding.h +248 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/extension.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/node.h +57 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/options.h +204 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/pack.h +152 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/parser.h +716 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/prettyprint.h +26 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/prism.h +272 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/regexp.h +33 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_buffer.h +146 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_char.h +205 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_constant_pool.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_list.h +97 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_memchr.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_newline_list.h +104 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_state_stack.h +42 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_string.h +150 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_string_list.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_strncasecmp.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_strpbrk.h +43 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/version.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism_compile.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/probes_helper.h +42 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ractor_core.h +393 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/regenc.h +254 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/regint.h +1006 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/regparse.h +371 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/revision.h +5 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/rjit.h +101 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/rjit_c.h +164 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ruby_assert.h +14 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ruby_atomic.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/rubyparser.h +1405 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/shape.h +233 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/symbol.h +118 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/thread_none.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/thread_pthread.h +166 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/thread_win32.h +58 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/timev.h +58 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/transcode_data.h +138 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/variable.h +39 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/version.h +69 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm.inc +5436 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_call_iseq_optimized.inc +244 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_callinfo.h +614 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_core.h +2202 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_debug.h +122 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_exec.h +199 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_insnhelper.h +261 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_opts.h +67 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_sync.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vmtc.inc +245 -0
- data/lib/debase/ruby_core_source/ruby-3.3.5-p100/yjit.h +72 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/addr2line.h +22 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/builtin.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/list/list.h +791 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/str/str.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/constant.h +53 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/darray.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/debug_counter.h +423 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/dln.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/encindex.h +70 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/eval_intern.h +324 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/hrtime.h +237 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/id.h +343 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/id_table.h +39 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/insns.inc +259 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/insns_info.inc +9530 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/array.h +151 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/basic_operators.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/bignum.h +244 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/bits.h +568 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/class.h +283 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/cmdlineopt.h +65 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/compar.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/compile.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/compilers.h +107 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/cont.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/dir.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/enc.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/encoding.h +36 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/enum.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/enumerator.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/error.h +216 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/eval.h +33 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/file.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/fixnum.h +184 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/gc.h +334 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/hash.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/imemo.h +260 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/inits.h +47 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/io.h +140 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/load.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/loadpath.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/math.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/missing.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/numeric.h +274 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/object.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/parse.h +117 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/proc.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/process.h +124 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/ractor.h +6 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/random.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/range.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/rational.h +71 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/re.h +28 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/ruby_parser.h +102 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/sanitizers.h +297 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/serial.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/signal.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/st.h +11 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/static_assert.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/string.h +182 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/struct.h +127 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/symbol.h +45 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/thread.h +79 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/time.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/transcode.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/util.h +27 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/variable.h +72 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/vm.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/warnings.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal.h +108 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/iseq.h +340 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/known_errors.inc +1419 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/method.h +255 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/node.h +111 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/node_name.inc +224 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parse.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parser_bits.h +564 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parser_node.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parser_st.h +162 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parser_value.h +106 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/ast.h +6245 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/defines.h +206 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/diagnostic.h +433 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/encoding.h +283 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/extension.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/node.h +150 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/options.h +305 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/pack.h +163 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/parser.h +891 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/prettyprint.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/prism.h +347 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/regexp.h +33 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/static_literals.h +120 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_buffer.h +218 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_char.h +205 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_constant_pool.h +226 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_integer.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_list.h +97 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_memchr.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_newline_list.h +102 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_string.h +174 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_string_list.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_strncasecmp.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_strpbrk.h +46 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/version.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism_compile.h +88 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/probes_helper.h +42 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ractor_core.h +393 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/regenc.h +254 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/regint.h +1010 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/regparse.h +371 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/revision.h +5 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/rjit.h +101 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/rjit_c.h +165 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ruby_assert.h +14 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ruby_atomic.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/rubyparser.h +1430 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/shape.h +233 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/symbol.h +118 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/thread_none.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/thread_pthread.h +166 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/thread_win32.h +58 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/timev.h +58 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/transcode_data.h +138 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/variable.h +39 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/version.h +69 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm.inc +5643 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_call_iseq_optimized.inc +244 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_callinfo.h +605 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_core.h +2236 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_debug.h +124 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_exec.h +199 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_insnhelper.h +272 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_opts.h +67 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_sync.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vmtc.inc +253 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/yjit.h +79 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/addr2line.h +22 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/builtin.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ccan/list/list.h +791 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ccan/str/str.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/constant.h +53 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/darray.h +209 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/debug_counter.h +423 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/dln.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/encindex.h +70 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/eval_intern.h +324 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/hrtime.h +237 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/id.h +347 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/id_table.h +39 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/insns.inc +265 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/insns_info.inc +9902 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/array.h +152 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/basic_operators.h +64 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/bignum.h +244 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/bits.h +568 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/class.h +283 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/cmdlineopt.h +65 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/compar.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/compile.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/compilers.h +107 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/cont.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/dir.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/enc.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/encoding.h +36 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/enum.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/enumerator.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/error.h +218 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/eval.h +33 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/file.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/fixnum.h +184 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/gc.h +322 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/hash.h +192 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/imemo.h +261 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/inits.h +47 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/io.h +143 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/load.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/loadpath.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/math.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/missing.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/numeric.h +274 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/object.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/parse.h +129 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/proc.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/process.h +124 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/ractor.h +6 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/random.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/range.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/rational.h +71 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/re.h +28 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/ruby_parser.h +102 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/sanitizers.h +326 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/serial.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/signal.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/st.h +11 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/static_assert.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/string.h +186 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/struct.h +127 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/symbol.h +45 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/thread.h +85 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/time.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/transcode.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/util.h +27 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/variable.h +72 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/vm.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/warnings.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal.h +108 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/iseq.h +340 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/known_errors.inc +1419 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/method.h +255 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/node.h +111 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/node_name.inc +224 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/parse.h +244 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/parser_bits.h +564 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/parser_node.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/parser_st.h +162 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/parser_value.h +106 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/ast.h +7524 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/defines.h +242 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/diagnostic.h +450 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/encoding.h +283 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/extension.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/node.h +129 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/options.h +396 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/pack.h +163 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/parser.h +933 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/prettyprint.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/prism.h +336 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/regexp.h +43 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/static_literals.h +121 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_buffer.h +218 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_char.h +204 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_constant_pool.h +218 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_integer.h +126 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_list.h +97 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_memchr.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_newline_list.h +113 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_string.h +190 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_strncasecmp.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_strpbrk.h +46 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/version.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism_compile.h +99 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/probes_helper.h +42 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ractor_core.h +382 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/regenc.h +254 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/regint.h +1006 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/regparse.h +371 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/revision.h +5 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/rjit.h +101 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/rjit_c.h +165 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ruby_assert.h +14 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ruby_atomic.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/rubyparser.h +1350 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/shape.h +234 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/symbol.h +123 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/thread_none.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/thread_pthread.h +168 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/thread_win32.h +58 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/timev.h +58 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/transcode_data.h +138 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/variable.h +39 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/version.h +69 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/vm.inc +5840 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/vm_call_iseq_optimized.inc +244 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/vm_callinfo.h +627 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/vm_core.h +2222 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/vm_debug.h +124 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/vm_exec.h +199 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/vm_insnhelper.h +277 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/vm_opts.h +67 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/vm_sync.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/vmtc.inc +259 -0
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/yjit.h +79 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +436 -6
@@ -0,0 +1,334 @@
|
|
1
|
+
#ifndef INTERNAL_GC_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_GC_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 GC.
|
10
|
+
*/
|
11
|
+
#include "ruby/internal/config.h"
|
12
|
+
|
13
|
+
#include <stddef.h> /* for size_t */
|
14
|
+
|
15
|
+
#include "internal/compilers.h" /* for __has_attribute */
|
16
|
+
#include "ruby/ruby.h" /* for rb_event_flag_t */
|
17
|
+
#include "vm_core.h" /* for GET_EC() */
|
18
|
+
|
19
|
+
#ifndef USE_SHARED_GC
|
20
|
+
# define USE_SHARED_GC 0
|
21
|
+
#endif
|
22
|
+
|
23
|
+
#if defined(__x86_64__) && !defined(_ILP32) && defined(__GNUC__)
|
24
|
+
#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movq\t%%rsp, %0" : "=r" (*(p)))
|
25
|
+
#elif defined(__i386) && defined(__GNUC__)
|
26
|
+
#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movl\t%%esp, %0" : "=r" (*(p)))
|
27
|
+
#elif (defined(__powerpc__) || defined(__powerpc64__)) && defined(__GNUC__) && !defined(_AIX) && !defined(__APPLE__) // Not Apple is NEEDED to unbreak ppc64 build on Darwin. Don't ask.
|
28
|
+
#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("mr\t%0, %%r1" : "=r" (*(p)))
|
29
|
+
#elif (defined(__powerpc__) || defined(__powerpc64__)) && defined(__GNUC__) && defined(_AIX)
|
30
|
+
#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("mr %0,1" : "=r" (*(p)))
|
31
|
+
#elif defined(__POWERPC__) && defined(__APPLE__) // Darwin ppc and ppc64
|
32
|
+
#define SET_MACHINE_STACK_END(p) __asm__ volatile("mr %0, r1" : "=r" (*(p)))
|
33
|
+
#elif defined(__aarch64__) && defined(__GNUC__)
|
34
|
+
#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("mov\t%0, sp" : "=r" (*(p)))
|
35
|
+
#else
|
36
|
+
NOINLINE(void rb_gc_set_stack_end(VALUE **stack_end_p));
|
37
|
+
#define SET_MACHINE_STACK_END(p) rb_gc_set_stack_end(p)
|
38
|
+
#define USE_CONSERVATIVE_STACK_END
|
39
|
+
#endif
|
40
|
+
|
41
|
+
/* for GC debug */
|
42
|
+
|
43
|
+
#ifndef RUBY_MARK_FREE_DEBUG
|
44
|
+
#define RUBY_MARK_FREE_DEBUG 0
|
45
|
+
#endif
|
46
|
+
|
47
|
+
#if RUBY_MARK_FREE_DEBUG
|
48
|
+
extern int ruby_gc_debug_indent;
|
49
|
+
|
50
|
+
static inline void
|
51
|
+
rb_gc_debug_indent(void)
|
52
|
+
{
|
53
|
+
ruby_debug_printf("%*s", ruby_gc_debug_indent, "");
|
54
|
+
}
|
55
|
+
|
56
|
+
static inline void
|
57
|
+
rb_gc_debug_body(const char *mode, const char *msg, int st, void *ptr)
|
58
|
+
{
|
59
|
+
if (st == 0) {
|
60
|
+
ruby_gc_debug_indent--;
|
61
|
+
}
|
62
|
+
rb_gc_debug_indent();
|
63
|
+
ruby_debug_printf("%s: %s %s (%p)\n", mode, st ? "->" : "<-", msg, ptr);
|
64
|
+
|
65
|
+
if (st) {
|
66
|
+
ruby_gc_debug_indent++;
|
67
|
+
}
|
68
|
+
|
69
|
+
fflush(stdout);
|
70
|
+
}
|
71
|
+
|
72
|
+
#define RUBY_MARK_ENTER(msg) rb_gc_debug_body("mark", (msg), 1, ptr)
|
73
|
+
#define RUBY_MARK_LEAVE(msg) rb_gc_debug_body("mark", (msg), 0, ptr)
|
74
|
+
#define RUBY_FREE_ENTER(msg) rb_gc_debug_body("free", (msg), 1, ptr)
|
75
|
+
#define RUBY_FREE_LEAVE(msg) rb_gc_debug_body("free", (msg), 0, ptr)
|
76
|
+
#define RUBY_GC_INFO rb_gc_debug_indent(), ruby_debug_printf
|
77
|
+
|
78
|
+
#else
|
79
|
+
#define RUBY_MARK_ENTER(msg)
|
80
|
+
#define RUBY_MARK_LEAVE(msg)
|
81
|
+
#define RUBY_FREE_ENTER(msg)
|
82
|
+
#define RUBY_FREE_LEAVE(msg)
|
83
|
+
#define RUBY_GC_INFO if(0)printf
|
84
|
+
#endif
|
85
|
+
|
86
|
+
#define RUBY_FREE_UNLESS_NULL(ptr) if(ptr){ruby_xfree(ptr);(ptr)=NULL;}
|
87
|
+
|
88
|
+
#if STACK_GROW_DIRECTION > 0
|
89
|
+
# define STACK_UPPER(x, a, b) (a)
|
90
|
+
#elif STACK_GROW_DIRECTION < 0
|
91
|
+
# define STACK_UPPER(x, a, b) (b)
|
92
|
+
#else
|
93
|
+
RUBY_EXTERN int ruby_stack_grow_direction;
|
94
|
+
int ruby_get_stack_grow_direction(volatile VALUE *addr);
|
95
|
+
# define stack_growup_p(x) ( \
|
96
|
+
(ruby_stack_grow_direction ? \
|
97
|
+
ruby_stack_grow_direction : \
|
98
|
+
ruby_get_stack_grow_direction(x)) > 0)
|
99
|
+
# define STACK_UPPER(x, a, b) (stack_growup_p(x) ? (a) : (b))
|
100
|
+
#endif
|
101
|
+
|
102
|
+
/*
|
103
|
+
STACK_GROW_DIR_DETECTION is used with STACK_DIR_UPPER.
|
104
|
+
|
105
|
+
On most normal systems, stacks grow from high address to lower address. In
|
106
|
+
this case, STACK_DIR_UPPER(a, b) will return (b), but on exotic systems where
|
107
|
+
the stack grows UP (from low address to high address), it will return (a).
|
108
|
+
*/
|
109
|
+
|
110
|
+
#if STACK_GROW_DIRECTION
|
111
|
+
#define STACK_GROW_DIR_DETECTION
|
112
|
+
#define STACK_DIR_UPPER(a,b) STACK_UPPER(0, (a), (b))
|
113
|
+
#else
|
114
|
+
#define STACK_GROW_DIR_DETECTION VALUE stack_grow_dir_detection
|
115
|
+
#define STACK_DIR_UPPER(a,b) STACK_UPPER(&stack_grow_dir_detection, (a), (b))
|
116
|
+
#endif
|
117
|
+
#define IS_STACK_DIR_UPPER() STACK_DIR_UPPER(1,0)
|
118
|
+
|
119
|
+
const char *rb_obj_info(VALUE obj);
|
120
|
+
const char *rb_raw_obj_info(char *const buff, const size_t buff_size, VALUE obj);
|
121
|
+
|
122
|
+
struct rb_execution_context_struct; /* in vm_core.h */
|
123
|
+
struct rb_objspace; /* in vm_core.h */
|
124
|
+
|
125
|
+
#define NEWOBJ_OF(var, T, c, f, s, ec) \
|
126
|
+
T *(var) = (T *)(((f) & FL_WB_PROTECTED) ? \
|
127
|
+
rb_wb_protected_newobj_of((ec ? ec : GET_EC()), (c), (f) & ~FL_WB_PROTECTED, s) : \
|
128
|
+
rb_wb_unprotected_newobj_of((c), (f), s))
|
129
|
+
|
130
|
+
#define RB_OBJ_GC_FLAGS_MAX 6 /* used in ext/objspace */
|
131
|
+
|
132
|
+
#ifndef USE_UNALIGNED_MEMBER_ACCESS
|
133
|
+
# define UNALIGNED_MEMBER_ACCESS(expr) (expr)
|
134
|
+
#elif ! USE_UNALIGNED_MEMBER_ACCESS
|
135
|
+
# define UNALIGNED_MEMBER_ACCESS(expr) (expr)
|
136
|
+
#elif ! (__has_warning("-Waddress-of-packed-member") || GCC_VERSION_SINCE(9, 0, 0))
|
137
|
+
# define UNALIGNED_MEMBER_ACCESS(expr) (expr)
|
138
|
+
#else
|
139
|
+
# include "internal/warnings.h"
|
140
|
+
# define UNALIGNED_MEMBER_ACCESS(expr) __extension__({ \
|
141
|
+
COMPILER_WARNING_PUSH; \
|
142
|
+
COMPILER_WARNING_IGNORED(-Waddress-of-packed-member); \
|
143
|
+
__typeof__(expr) unaligned_member_access_result = (expr); \
|
144
|
+
COMPILER_WARNING_POP; \
|
145
|
+
unaligned_member_access_result; \
|
146
|
+
})
|
147
|
+
|
148
|
+
# define UNALIGNED_MEMBER_PTR(ptr, mem) __extension__({ \
|
149
|
+
COMPILER_WARNING_PUSH; \
|
150
|
+
COMPILER_WARNING_IGNORED(-Waddress-of-packed-member); \
|
151
|
+
const volatile void *unaligned_member_ptr_result = &(ptr)->mem; \
|
152
|
+
COMPILER_WARNING_POP; \
|
153
|
+
(__typeof__((ptr)->mem) *)unaligned_member_ptr_result; \
|
154
|
+
})
|
155
|
+
#endif
|
156
|
+
|
157
|
+
#ifndef UNALIGNED_MEMBER_PTR
|
158
|
+
# define UNALIGNED_MEMBER_PTR(ptr, mem) UNALIGNED_MEMBER_ACCESS(&(ptr)->mem)
|
159
|
+
#endif
|
160
|
+
|
161
|
+
#define RB_OBJ_WRITE_UNALIGNED(old, slot, young) do { \
|
162
|
+
VALUE *_slot = UNALIGNED_MEMBER_ACCESS(slot); \
|
163
|
+
RB_OBJ_WRITE(old, _slot, young); \
|
164
|
+
} while (0)
|
165
|
+
|
166
|
+
// We use SIZE_POOL_COUNT number of shape IDs for transitions out of different size pools
|
167
|
+
// The next available shape ID will be the SPECIAL_CONST_SHAPE_ID
|
168
|
+
#ifndef SIZE_POOL_COUNT
|
169
|
+
# define SIZE_POOL_COUNT 5
|
170
|
+
#endif
|
171
|
+
|
172
|
+
/* Used in places that could malloc during, which can cause the GC to run. We
|
173
|
+
* need to temporarily disable the GC to allow the malloc to happen.
|
174
|
+
* Allocating memory during GC is a bad idea, so use this only when absolutely
|
175
|
+
* necessary. */
|
176
|
+
#define DURING_GC_COULD_MALLOC_REGION_START() \
|
177
|
+
assert(rb_during_gc()); \
|
178
|
+
VALUE _already_disabled = rb_gc_disable_no_rest()
|
179
|
+
|
180
|
+
#define DURING_GC_COULD_MALLOC_REGION_END() \
|
181
|
+
if (_already_disabled == Qfalse) rb_gc_enable()
|
182
|
+
|
183
|
+
typedef struct ractor_newobj_size_pool_cache {
|
184
|
+
struct RVALUE *freelist;
|
185
|
+
struct heap_page *using_page;
|
186
|
+
} rb_ractor_newobj_size_pool_cache_t;
|
187
|
+
|
188
|
+
typedef struct ractor_newobj_cache {
|
189
|
+
size_t incremental_mark_step_allocated_slots;
|
190
|
+
rb_ractor_newobj_size_pool_cache_t size_pool_caches[SIZE_POOL_COUNT];
|
191
|
+
} rb_ractor_newobj_cache_t;
|
192
|
+
|
193
|
+
/* gc.c */
|
194
|
+
extern int ruby_disable_gc;
|
195
|
+
RUBY_ATTR_MALLOC void *ruby_mimmalloc(size_t size);
|
196
|
+
RUBY_ATTR_MALLOC void *ruby_mimcalloc(size_t num, size_t size);
|
197
|
+
void ruby_mimfree(void *ptr);
|
198
|
+
void rb_gc_prepare_heap(void);
|
199
|
+
void rb_objspace_set_event_hook(const rb_event_flag_t event);
|
200
|
+
VALUE rb_objspace_gc_enable(struct rb_objspace *);
|
201
|
+
VALUE rb_objspace_gc_disable(struct rb_objspace *);
|
202
|
+
void ruby_gc_set_params(void);
|
203
|
+
void rb_gc_copy_attributes(VALUE dest, VALUE obj);
|
204
|
+
size_t rb_size_mul_or_raise(size_t, size_t, VALUE); /* used in compile.c */
|
205
|
+
size_t rb_size_mul_add_or_raise(size_t, size_t, size_t, VALUE); /* used in iseq.h */
|
206
|
+
size_t rb_malloc_grow_capa(size_t current_capacity, size_t type_size);
|
207
|
+
RUBY_ATTR_MALLOC void *rb_xmalloc_mul_add(size_t, size_t, size_t);
|
208
|
+
RUBY_ATTR_MALLOC void *rb_xcalloc_mul_add(size_t, size_t, size_t);
|
209
|
+
void *rb_xrealloc_mul_add(const void *, size_t, size_t, size_t);
|
210
|
+
RUBY_ATTR_MALLOC void *rb_xmalloc_mul_add_mul(size_t, size_t, size_t, size_t);
|
211
|
+
RUBY_ATTR_MALLOC void *rb_xcalloc_mul_add_mul(size_t, size_t, size_t, size_t);
|
212
|
+
static inline void *ruby_sized_xrealloc_inlined(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2));
|
213
|
+
static inline void *ruby_sized_xrealloc2_inlined(void *ptr, size_t new_count, size_t elemsiz, size_t old_count) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2, 3));
|
214
|
+
static inline void ruby_sized_xfree_inlined(void *ptr, size_t size);
|
215
|
+
void rb_gc_ractor_newobj_cache_clear(rb_ractor_newobj_cache_t *newobj_cache);
|
216
|
+
bool rb_gc_size_allocatable_p(size_t size);
|
217
|
+
size_t *rb_gc_size_pool_sizes(void);
|
218
|
+
size_t rb_gc_size_pool_id_for_size(size_t size);
|
219
|
+
int rb_objspace_garbage_object_p(VALUE obj);
|
220
|
+
bool rb_gc_is_ptr_to_obj(const void *ptr);
|
221
|
+
|
222
|
+
void rb_gc_mark_and_move(VALUE *ptr);
|
223
|
+
|
224
|
+
void rb_gc_mark_weak(VALUE *ptr);
|
225
|
+
void rb_gc_remove_weak(VALUE parent_obj, VALUE *ptr);
|
226
|
+
|
227
|
+
void rb_gc_ref_update_table_values_only(st_table *tbl);
|
228
|
+
|
229
|
+
void rb_gc_initial_stress_set(VALUE flag);
|
230
|
+
|
231
|
+
#define rb_gc_mark_and_move_ptr(ptr) do { \
|
232
|
+
VALUE _obj = (VALUE)*(ptr); \
|
233
|
+
rb_gc_mark_and_move(&_obj); \
|
234
|
+
if (_obj != (VALUE)*(ptr)) *(ptr) = (void *)_obj; \
|
235
|
+
} while (0)
|
236
|
+
|
237
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
238
|
+
/* exports for objspace module */
|
239
|
+
void rb_objspace_reachable_objects_from(VALUE obj, void (func)(VALUE, void *), void *data);
|
240
|
+
void rb_objspace_reachable_objects_from_root(void (func)(const char *category, VALUE, void *), void *data);
|
241
|
+
int rb_objspace_markable_object_p(VALUE obj);
|
242
|
+
int rb_objspace_internal_object_p(VALUE obj);
|
243
|
+
|
244
|
+
void rb_objspace_each_objects(
|
245
|
+
int (*callback)(void *start, void *end, size_t stride, void *data),
|
246
|
+
void *data);
|
247
|
+
|
248
|
+
size_t rb_gc_obj_slot_size(VALUE obj);
|
249
|
+
|
250
|
+
VALUE rb_gc_disable_no_rest(void);
|
251
|
+
|
252
|
+
|
253
|
+
/* gc.c (export) */
|
254
|
+
const char *rb_objspace_data_type_name(VALUE obj);
|
255
|
+
VALUE rb_wb_protected_newobj_of(struct rb_execution_context_struct *, VALUE, VALUE, size_t);
|
256
|
+
VALUE rb_wb_unprotected_newobj_of(VALUE, VALUE, size_t);
|
257
|
+
size_t rb_obj_memsize_of(VALUE);
|
258
|
+
void rb_gc_verify_internal_consistency(void);
|
259
|
+
size_t rb_obj_gc_flags(VALUE, ID[], size_t);
|
260
|
+
void rb_gc_mark_values(long n, const VALUE *values);
|
261
|
+
void rb_gc_mark_vm_stack_values(long n, const VALUE *values);
|
262
|
+
void rb_gc_update_values(long n, VALUE *values);
|
263
|
+
void *ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2));
|
264
|
+
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));
|
265
|
+
void ruby_sized_xfree(void *x, size_t size);
|
266
|
+
RUBY_SYMBOL_EXPORT_END
|
267
|
+
|
268
|
+
int rb_ec_stack_check(struct rb_execution_context_struct *ec);
|
269
|
+
void rb_gc_writebarrier_remember(VALUE obj);
|
270
|
+
const char *rb_obj_info(VALUE obj);
|
271
|
+
|
272
|
+
#if defined(HAVE_MALLOC_USABLE_SIZE) || defined(HAVE_MALLOC_SIZE) || defined(_WIN32)
|
273
|
+
|
274
|
+
static inline void *
|
275
|
+
ruby_sized_xrealloc_inlined(void *ptr, size_t new_size, size_t old_size)
|
276
|
+
{
|
277
|
+
return ruby_xrealloc(ptr, new_size);
|
278
|
+
}
|
279
|
+
|
280
|
+
static inline void *
|
281
|
+
ruby_sized_xrealloc2_inlined(void *ptr, size_t new_count, size_t elemsiz, size_t old_count)
|
282
|
+
{
|
283
|
+
return ruby_xrealloc2(ptr, new_count, elemsiz);
|
284
|
+
}
|
285
|
+
|
286
|
+
static inline void
|
287
|
+
ruby_sized_xfree_inlined(void *ptr, size_t size)
|
288
|
+
{
|
289
|
+
ruby_xfree(ptr);
|
290
|
+
}
|
291
|
+
|
292
|
+
# define SIZED_REALLOC_N(x, y, z, w) REALLOC_N(x, y, z)
|
293
|
+
|
294
|
+
static inline void *
|
295
|
+
ruby_sized_realloc_n(void *ptr, size_t new_count, size_t element_size, size_t old_count)
|
296
|
+
{
|
297
|
+
return ruby_xrealloc2(ptr, new_count, element_size);
|
298
|
+
}
|
299
|
+
|
300
|
+
#else
|
301
|
+
|
302
|
+
static inline void *
|
303
|
+
ruby_sized_xrealloc_inlined(void *ptr, size_t new_size, size_t old_size)
|
304
|
+
{
|
305
|
+
return ruby_sized_xrealloc(ptr, new_size, old_size);
|
306
|
+
}
|
307
|
+
|
308
|
+
static inline void *
|
309
|
+
ruby_sized_xrealloc2_inlined(void *ptr, size_t new_count, size_t elemsiz, size_t old_count)
|
310
|
+
{
|
311
|
+
return ruby_sized_xrealloc2(ptr, new_count, elemsiz, old_count);
|
312
|
+
}
|
313
|
+
|
314
|
+
static inline void
|
315
|
+
ruby_sized_xfree_inlined(void *ptr, size_t size)
|
316
|
+
{
|
317
|
+
ruby_sized_xfree(ptr, size);
|
318
|
+
}
|
319
|
+
|
320
|
+
# define SIZED_REALLOC_N(v, T, m, n) \
|
321
|
+
((v) = (T *)ruby_sized_xrealloc2((void *)(v), (m), sizeof(T), (n)))
|
322
|
+
|
323
|
+
static inline void *
|
324
|
+
ruby_sized_realloc_n(void *ptr, size_t new_count, size_t element_size, size_t old_count)
|
325
|
+
{
|
326
|
+
return ruby_sized_xrealloc2(ptr, new_count, element_size, old_count);
|
327
|
+
}
|
328
|
+
|
329
|
+
#endif /* HAVE_MALLOC_USABLE_SIZE */
|
330
|
+
|
331
|
+
#define ruby_sized_xrealloc ruby_sized_xrealloc_inlined
|
332
|
+
#define ruby_sized_xrealloc2 ruby_sized_xrealloc2_inlined
|
333
|
+
#define ruby_sized_xfree ruby_sized_xfree_inlined
|
334
|
+
#endif /* INTERNAL_GC_H */
|
@@ -0,0 +1,191 @@
|
|
1
|
+
#ifndef INTERNAL_HASH_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_HASH_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 Hash.
|
10
|
+
*/
|
11
|
+
#include "ruby/internal/config.h"
|
12
|
+
#include <stddef.h> /* for size_t */
|
13
|
+
#include "ruby/internal/stdbool.h" /* for bool */
|
14
|
+
#include "ruby/ruby.h" /* for struct RBasic */
|
15
|
+
#include "ruby/st.h" /* for struct st_table */
|
16
|
+
|
17
|
+
#define RHASH_AR_TABLE_MAX_SIZE SIZEOF_VALUE
|
18
|
+
|
19
|
+
struct ar_table_struct;
|
20
|
+
typedef unsigned char ar_hint_t;
|
21
|
+
|
22
|
+
enum ruby_rhash_flags {
|
23
|
+
RHASH_PASS_AS_KEYWORDS = FL_USER1, /* FL 1 */
|
24
|
+
RHASH_PROC_DEFAULT = FL_USER2, /* FL 2 */
|
25
|
+
RHASH_ST_TABLE_FLAG = FL_USER3, /* FL 3 */
|
26
|
+
RHASH_AR_TABLE_SIZE_MASK = (FL_USER4|FL_USER5|FL_USER6|FL_USER7), /* FL 4..7 */
|
27
|
+
RHASH_AR_TABLE_SIZE_SHIFT = (FL_USHIFT+4),
|
28
|
+
RHASH_AR_TABLE_BOUND_MASK = (FL_USER8|FL_USER9|FL_USER10|FL_USER11), /* FL 8..11 */
|
29
|
+
RHASH_AR_TABLE_BOUND_SHIFT = (FL_USHIFT+8),
|
30
|
+
|
31
|
+
// we can not put it in "enum" because it can exceed "int" range.
|
32
|
+
#define RHASH_LEV_MASK (FL_USER13 | FL_USER14 | FL_USER15 | /* FL 13..19 */ \
|
33
|
+
FL_USER16 | FL_USER17 | FL_USER18 | FL_USER19)
|
34
|
+
|
35
|
+
RHASH_LEV_SHIFT = (FL_USHIFT + 13),
|
36
|
+
RHASH_LEV_MAX = 127, /* 7 bits */
|
37
|
+
};
|
38
|
+
|
39
|
+
typedef struct ar_table_pair_struct {
|
40
|
+
VALUE key;
|
41
|
+
VALUE val;
|
42
|
+
} ar_table_pair;
|
43
|
+
|
44
|
+
typedef struct ar_table_struct {
|
45
|
+
union {
|
46
|
+
ar_hint_t ary[RHASH_AR_TABLE_MAX_SIZE];
|
47
|
+
VALUE word;
|
48
|
+
} ar_hint;
|
49
|
+
/* 64bit CPU: 8B * 2 * 8 = 128B */
|
50
|
+
ar_table_pair pairs[RHASH_AR_TABLE_MAX_SIZE];
|
51
|
+
} ar_table;
|
52
|
+
|
53
|
+
struct RHash {
|
54
|
+
struct RBasic basic;
|
55
|
+
const VALUE ifnone;
|
56
|
+
};
|
57
|
+
|
58
|
+
#define RHASH(obj) ((struct RHash *)(obj))
|
59
|
+
|
60
|
+
#ifdef RHASH_IFNONE
|
61
|
+
# undef RHASH_IFNONE
|
62
|
+
#endif
|
63
|
+
|
64
|
+
#ifdef RHASH_SIZE
|
65
|
+
# undef RHASH_SIZE
|
66
|
+
#endif
|
67
|
+
|
68
|
+
#ifdef RHASH_EMPTY_P
|
69
|
+
# undef RHASH_EMPTY_P
|
70
|
+
#endif
|
71
|
+
|
72
|
+
/* hash.c */
|
73
|
+
void rb_hash_st_table_set(VALUE hash, st_table *st);
|
74
|
+
VALUE rb_hash_default_value(VALUE hash, VALUE key);
|
75
|
+
VALUE rb_hash_set_default_proc(VALUE hash, VALUE proc);
|
76
|
+
long rb_dbl_long_hash(double d);
|
77
|
+
st_table *rb_init_identtable(void);
|
78
|
+
st_index_t rb_any_hash(VALUE a);
|
79
|
+
int rb_any_cmp(VALUE a, VALUE b);
|
80
|
+
VALUE rb_to_hash_type(VALUE obj);
|
81
|
+
VALUE rb_hash_key_str(VALUE);
|
82
|
+
VALUE rb_hash_values(VALUE hash);
|
83
|
+
VALUE rb_hash_rehash(VALUE hash);
|
84
|
+
int rb_hash_add_new_element(VALUE hash, VALUE key, VALUE val);
|
85
|
+
VALUE rb_hash_set_pair(VALUE hash, VALUE pair);
|
86
|
+
int rb_hash_stlike_delete(VALUE hash, st_data_t *pkey, st_data_t *pval);
|
87
|
+
int rb_hash_stlike_foreach_with_replace(VALUE hash, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg);
|
88
|
+
int rb_hash_stlike_update(VALUE hash, st_data_t key, st_update_callback_func *func, st_data_t arg);
|
89
|
+
VALUE rb_ident_hash_new_with_size(st_index_t size);
|
90
|
+
void rb_hash_free(VALUE hash);
|
91
|
+
|
92
|
+
static inline unsigned RHASH_AR_TABLE_SIZE_RAW(VALUE h);
|
93
|
+
static inline VALUE RHASH_IFNONE(VALUE h);
|
94
|
+
static inline size_t RHASH_SIZE(VALUE h);
|
95
|
+
static inline bool RHASH_EMPTY_P(VALUE h);
|
96
|
+
static inline bool RHASH_AR_TABLE_P(VALUE h);
|
97
|
+
static inline bool RHASH_ST_TABLE_P(VALUE h);
|
98
|
+
static inline struct ar_table_struct *RHASH_AR_TABLE(VALUE h);
|
99
|
+
static inline st_table *RHASH_ST_TABLE(VALUE h);
|
100
|
+
static inline size_t RHASH_ST_SIZE(VALUE h);
|
101
|
+
static inline void RHASH_ST_CLEAR(VALUE h);
|
102
|
+
|
103
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
104
|
+
/* hash.c (export) */
|
105
|
+
VALUE rb_hash_delete_entry(VALUE hash, VALUE key);
|
106
|
+
VALUE rb_ident_hash_new(void);
|
107
|
+
int rb_hash_stlike_foreach(VALUE hash, st_foreach_callback_func *func, st_data_t arg);
|
108
|
+
RUBY_SYMBOL_EXPORT_END
|
109
|
+
|
110
|
+
VALUE rb_hash_new_with_size(st_index_t size);
|
111
|
+
VALUE rb_hash_resurrect(VALUE hash);
|
112
|
+
int rb_hash_stlike_lookup(VALUE hash, st_data_t key, st_data_t *pval);
|
113
|
+
VALUE rb_hash_keys(VALUE hash);
|
114
|
+
VALUE rb_hash_has_key(VALUE hash, VALUE key);
|
115
|
+
VALUE rb_hash_compare_by_id_p(VALUE hash);
|
116
|
+
|
117
|
+
st_table *rb_hash_tbl_raw(VALUE hash, const char *file, int line);
|
118
|
+
#define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h, __FILE__, __LINE__)
|
119
|
+
|
120
|
+
VALUE rb_hash_compare_by_id(VALUE hash);
|
121
|
+
|
122
|
+
static inline bool
|
123
|
+
RHASH_AR_TABLE_P(VALUE h)
|
124
|
+
{
|
125
|
+
return ! FL_TEST_RAW(h, RHASH_ST_TABLE_FLAG);
|
126
|
+
}
|
127
|
+
|
128
|
+
RBIMPL_ATTR_RETURNS_NONNULL()
|
129
|
+
static inline struct ar_table_struct *
|
130
|
+
RHASH_AR_TABLE(VALUE h)
|
131
|
+
{
|
132
|
+
return (struct ar_table_struct *)((uintptr_t)h + sizeof(struct RHash));
|
133
|
+
}
|
134
|
+
|
135
|
+
RBIMPL_ATTR_RETURNS_NONNULL()
|
136
|
+
static inline st_table *
|
137
|
+
RHASH_ST_TABLE(VALUE h)
|
138
|
+
{
|
139
|
+
return (st_table *)((uintptr_t)h + sizeof(struct RHash));
|
140
|
+
}
|
141
|
+
|
142
|
+
static inline VALUE
|
143
|
+
RHASH_IFNONE(VALUE h)
|
144
|
+
{
|
145
|
+
return RHASH(h)->ifnone;
|
146
|
+
}
|
147
|
+
|
148
|
+
static inline size_t
|
149
|
+
RHASH_SIZE(VALUE h)
|
150
|
+
{
|
151
|
+
if (RHASH_AR_TABLE_P(h)) {
|
152
|
+
return RHASH_AR_TABLE_SIZE_RAW(h);
|
153
|
+
}
|
154
|
+
else {
|
155
|
+
return RHASH_ST_SIZE(h);
|
156
|
+
}
|
157
|
+
}
|
158
|
+
|
159
|
+
static inline bool
|
160
|
+
RHASH_EMPTY_P(VALUE h)
|
161
|
+
{
|
162
|
+
return RHASH_SIZE(h) == 0;
|
163
|
+
}
|
164
|
+
|
165
|
+
static inline bool
|
166
|
+
RHASH_ST_TABLE_P(VALUE h)
|
167
|
+
{
|
168
|
+
return ! RHASH_AR_TABLE_P(h);
|
169
|
+
}
|
170
|
+
|
171
|
+
static inline size_t
|
172
|
+
RHASH_ST_SIZE(VALUE h)
|
173
|
+
{
|
174
|
+
return RHASH_ST_TABLE(h)->num_entries;
|
175
|
+
}
|
176
|
+
|
177
|
+
static inline void
|
178
|
+
RHASH_ST_CLEAR(VALUE h)
|
179
|
+
{
|
180
|
+
memset(RHASH_ST_TABLE(h), 0, sizeof(st_table));
|
181
|
+
}
|
182
|
+
|
183
|
+
static inline unsigned
|
184
|
+
RHASH_AR_TABLE_SIZE_RAW(VALUE h)
|
185
|
+
{
|
186
|
+
VALUE ret = FL_TEST_RAW(h, RHASH_AR_TABLE_SIZE_MASK);
|
187
|
+
ret >>= RHASH_AR_TABLE_SIZE_SHIFT;
|
188
|
+
return (unsigned)ret;
|
189
|
+
}
|
190
|
+
|
191
|
+
#endif /* INTERNAL_HASH_H */
|