debase-ruby_core_source 3.3.0 → 3.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Rakefile +2 -1
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/ast.h +4612 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/defines.h +94 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/diagnostic.h +297 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/encoding.h +248 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/extension.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/node.h +57 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/options.h +204 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/pack.h +152 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/parser.h +716 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/prettyprint.h +26 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/prism.h +272 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/regexp.h +33 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_buffer.h +146 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_char.h +205 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_constant_pool.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_list.h +97 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_memchr.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_newline_list.h +104 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_state_stack.h +42 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_string.h +150 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_string_list.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_strncasecmp.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_strpbrk.h +43 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/version.h +29 -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/version.rb +1 -1
- metadata +316 -6
@@ -0,0 +1,233 @@
|
|
1
|
+
#ifndef RUBY_SHAPE_H
|
2
|
+
#define RUBY_SHAPE_H
|
3
|
+
|
4
|
+
#include "internal/gc.h"
|
5
|
+
|
6
|
+
#if (SIZEOF_UINT64_T <= SIZEOF_VALUE)
|
7
|
+
|
8
|
+
#define SIZEOF_SHAPE_T 4
|
9
|
+
#define SHAPE_IN_BASIC_FLAGS 1
|
10
|
+
typedef uint32_t attr_index_t;
|
11
|
+
typedef uint32_t shape_id_t;
|
12
|
+
# define SHAPE_ID_NUM_BITS 32
|
13
|
+
|
14
|
+
#else
|
15
|
+
|
16
|
+
#define SIZEOF_SHAPE_T 2
|
17
|
+
#define SHAPE_IN_BASIC_FLAGS 0
|
18
|
+
typedef uint16_t attr_index_t;
|
19
|
+
typedef uint16_t shape_id_t;
|
20
|
+
# define SHAPE_ID_NUM_BITS 16
|
21
|
+
|
22
|
+
#endif
|
23
|
+
|
24
|
+
typedef uint32_t redblack_id_t;
|
25
|
+
|
26
|
+
#define MAX_IVARS (attr_index_t)(-1)
|
27
|
+
|
28
|
+
# define SHAPE_MASK (((uintptr_t)1 << SHAPE_ID_NUM_BITS) - 1)
|
29
|
+
# define SHAPE_FLAG_MASK (((VALUE)-1) >> SHAPE_ID_NUM_BITS)
|
30
|
+
|
31
|
+
# define SHAPE_FLAG_SHIFT ((SIZEOF_VALUE * 8) - SHAPE_ID_NUM_BITS)
|
32
|
+
|
33
|
+
# define SHAPE_MAX_VARIATIONS 8
|
34
|
+
|
35
|
+
# define INVALID_SHAPE_ID SHAPE_MASK
|
36
|
+
# define ROOT_SHAPE_ID 0x0
|
37
|
+
|
38
|
+
# define SPECIAL_CONST_SHAPE_ID (SIZE_POOL_COUNT * 2)
|
39
|
+
# define OBJ_TOO_COMPLEX_SHAPE_ID (SPECIAL_CONST_SHAPE_ID + 1)
|
40
|
+
|
41
|
+
typedef struct redblack_node redblack_node_t;
|
42
|
+
|
43
|
+
struct rb_shape {
|
44
|
+
struct rb_id_table * edges; // id_table from ID (ivar) to next shape
|
45
|
+
ID edge_name; // ID (ivar) for transition from parent to rb_shape
|
46
|
+
attr_index_t next_iv_index;
|
47
|
+
uint32_t capacity; // Total capacity of the object with this shape
|
48
|
+
uint8_t type;
|
49
|
+
uint8_t size_pool_index;
|
50
|
+
shape_id_t parent_id;
|
51
|
+
redblack_node_t * ancestor_index;
|
52
|
+
};
|
53
|
+
|
54
|
+
typedef struct rb_shape rb_shape_t;
|
55
|
+
|
56
|
+
struct redblack_node {
|
57
|
+
ID key;
|
58
|
+
rb_shape_t * value;
|
59
|
+
redblack_id_t l;
|
60
|
+
redblack_id_t r;
|
61
|
+
};
|
62
|
+
|
63
|
+
enum shape_type {
|
64
|
+
SHAPE_ROOT,
|
65
|
+
SHAPE_IVAR,
|
66
|
+
SHAPE_FROZEN,
|
67
|
+
SHAPE_T_OBJECT,
|
68
|
+
SHAPE_OBJ_TOO_COMPLEX,
|
69
|
+
};
|
70
|
+
|
71
|
+
typedef struct {
|
72
|
+
/* object shapes */
|
73
|
+
rb_shape_t *shape_list;
|
74
|
+
rb_shape_t *root_shape;
|
75
|
+
shape_id_t next_shape_id;
|
76
|
+
|
77
|
+
redblack_node_t *shape_cache;
|
78
|
+
unsigned int cache_size;
|
79
|
+
} rb_shape_tree_t;
|
80
|
+
RUBY_EXTERN rb_shape_tree_t *rb_shape_tree_ptr;
|
81
|
+
|
82
|
+
static inline rb_shape_tree_t *
|
83
|
+
rb_current_shape_tree(void)
|
84
|
+
{
|
85
|
+
return rb_shape_tree_ptr;
|
86
|
+
}
|
87
|
+
#define GET_SHAPE_TREE() rb_current_shape_tree()
|
88
|
+
|
89
|
+
static inline shape_id_t
|
90
|
+
get_shape_id_from_flags(VALUE obj)
|
91
|
+
{
|
92
|
+
RUBY_ASSERT(!RB_SPECIAL_CONST_P(obj));
|
93
|
+
return (shape_id_t)(SHAPE_MASK & ((RBASIC(obj)->flags) >> SHAPE_FLAG_SHIFT));
|
94
|
+
}
|
95
|
+
|
96
|
+
static inline void
|
97
|
+
set_shape_id_in_flags(VALUE obj, shape_id_t shape_id)
|
98
|
+
{
|
99
|
+
// Ractors are occupying the upper 32 bits of flags, but only in debug mode
|
100
|
+
// Object shapes are occupying top bits
|
101
|
+
RBASIC(obj)->flags &= SHAPE_FLAG_MASK;
|
102
|
+
RBASIC(obj)->flags |= ((VALUE)(shape_id) << SHAPE_FLAG_SHIFT);
|
103
|
+
}
|
104
|
+
|
105
|
+
|
106
|
+
#if SHAPE_IN_BASIC_FLAGS
|
107
|
+
static inline shape_id_t
|
108
|
+
RBASIC_SHAPE_ID(VALUE obj)
|
109
|
+
{
|
110
|
+
return get_shape_id_from_flags(obj);
|
111
|
+
}
|
112
|
+
|
113
|
+
static inline void
|
114
|
+
RBASIC_SET_SHAPE_ID(VALUE obj, shape_id_t shape_id)
|
115
|
+
{
|
116
|
+
set_shape_id_in_flags(obj, shape_id);
|
117
|
+
}
|
118
|
+
#endif
|
119
|
+
|
120
|
+
static inline shape_id_t
|
121
|
+
ROBJECT_SHAPE_ID(VALUE obj)
|
122
|
+
{
|
123
|
+
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
124
|
+
return get_shape_id_from_flags(obj);
|
125
|
+
}
|
126
|
+
|
127
|
+
static inline void
|
128
|
+
ROBJECT_SET_SHAPE_ID(VALUE obj, shape_id_t shape_id)
|
129
|
+
{
|
130
|
+
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
131
|
+
set_shape_id_in_flags(obj, shape_id);
|
132
|
+
}
|
133
|
+
|
134
|
+
static inline shape_id_t
|
135
|
+
RCLASS_SHAPE_ID(VALUE obj)
|
136
|
+
{
|
137
|
+
RUBY_ASSERT(RB_TYPE_P(obj, T_CLASS) || RB_TYPE_P(obj, T_MODULE));
|
138
|
+
return get_shape_id_from_flags(obj);
|
139
|
+
}
|
140
|
+
|
141
|
+
static inline void
|
142
|
+
RCLASS_SET_SHAPE_ID(VALUE obj, shape_id_t shape_id)
|
143
|
+
{
|
144
|
+
RUBY_ASSERT(RB_TYPE_P(obj, T_CLASS) || RB_TYPE_P(obj, T_MODULE));
|
145
|
+
set_shape_id_in_flags(obj, shape_id);
|
146
|
+
}
|
147
|
+
|
148
|
+
rb_shape_t * rb_shape_get_root_shape(void);
|
149
|
+
int32_t rb_shape_id_offset(void);
|
150
|
+
|
151
|
+
rb_shape_t * rb_shape_get_parent(rb_shape_t * shape);
|
152
|
+
|
153
|
+
rb_shape_t* rb_shape_get_shape_by_id(shape_id_t shape_id);
|
154
|
+
shape_id_t rb_shape_get_shape_id(VALUE obj);
|
155
|
+
rb_shape_t * rb_shape_get_next_iv_shape(rb_shape_t * shape, ID id);
|
156
|
+
bool rb_shape_get_iv_index(rb_shape_t * shape, ID id, attr_index_t * value);
|
157
|
+
bool rb_shape_get_iv_index_with_hint(shape_id_t shape_id, ID id, attr_index_t * value, shape_id_t *shape_id_hint);
|
158
|
+
bool rb_shape_obj_too_complex(VALUE obj);
|
159
|
+
|
160
|
+
void rb_shape_set_shape(VALUE obj, rb_shape_t* shape);
|
161
|
+
rb_shape_t* rb_shape_get_shape(VALUE obj);
|
162
|
+
int rb_shape_frozen_shape_p(rb_shape_t* shape);
|
163
|
+
rb_shape_t* rb_shape_transition_shape_frozen(VALUE obj);
|
164
|
+
bool rb_shape_transition_shape_remove_ivar(VALUE obj, ID id, rb_shape_t *shape, VALUE * removed);
|
165
|
+
rb_shape_t* rb_shape_get_next(rb_shape_t* shape, VALUE obj, ID id);
|
166
|
+
rb_shape_t* rb_shape_get_next_no_warnings(rb_shape_t* shape, VALUE obj, ID id);
|
167
|
+
|
168
|
+
rb_shape_t * rb_shape_rebuild_shape(rb_shape_t * initial_shape, rb_shape_t * dest_shape);
|
169
|
+
|
170
|
+
static inline uint32_t
|
171
|
+
ROBJECT_IV_CAPACITY(VALUE obj)
|
172
|
+
{
|
173
|
+
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
174
|
+
// Asking for capacity doesn't make sense when the object is using
|
175
|
+
// a hash table for storing instance variables
|
176
|
+
RUBY_ASSERT(!rb_shape_obj_too_complex(obj));
|
177
|
+
return rb_shape_get_shape_by_id(ROBJECT_SHAPE_ID(obj))->capacity;
|
178
|
+
}
|
179
|
+
|
180
|
+
static inline st_table *
|
181
|
+
ROBJECT_IV_HASH(VALUE obj)
|
182
|
+
{
|
183
|
+
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
184
|
+
RUBY_ASSERT(rb_shape_obj_too_complex(obj));
|
185
|
+
return (st_table *)ROBJECT(obj)->as.heap.ivptr;
|
186
|
+
}
|
187
|
+
|
188
|
+
static inline void
|
189
|
+
ROBJECT_SET_IV_HASH(VALUE obj, const st_table *tbl)
|
190
|
+
{
|
191
|
+
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
192
|
+
RUBY_ASSERT(rb_shape_obj_too_complex(obj));
|
193
|
+
ROBJECT(obj)->as.heap.ivptr = (VALUE *)tbl;
|
194
|
+
}
|
195
|
+
|
196
|
+
size_t rb_id_table_size(const struct rb_id_table *tbl);
|
197
|
+
|
198
|
+
static inline uint32_t
|
199
|
+
ROBJECT_IV_COUNT(VALUE obj)
|
200
|
+
{
|
201
|
+
if (rb_shape_obj_too_complex(obj)) {
|
202
|
+
return (uint32_t)rb_st_table_size(ROBJECT_IV_HASH(obj));
|
203
|
+
}
|
204
|
+
else {
|
205
|
+
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
206
|
+
RUBY_ASSERT(!rb_shape_obj_too_complex(obj));
|
207
|
+
return rb_shape_get_shape_by_id(ROBJECT_SHAPE_ID(obj))->next_iv_index;
|
208
|
+
}
|
209
|
+
}
|
210
|
+
|
211
|
+
static inline uint32_t
|
212
|
+
RBASIC_IV_COUNT(VALUE obj)
|
213
|
+
{
|
214
|
+
return rb_shape_get_shape_by_id(rb_shape_get_shape_id(obj))->next_iv_index;
|
215
|
+
}
|
216
|
+
|
217
|
+
rb_shape_t *rb_shape_traverse_from_new_root(rb_shape_t *initial_shape, rb_shape_t *orig_shape);
|
218
|
+
|
219
|
+
bool rb_shape_set_shape_id(VALUE obj, shape_id_t shape_id);
|
220
|
+
|
221
|
+
VALUE rb_obj_debug_shape(VALUE self, VALUE obj);
|
222
|
+
|
223
|
+
// For ext/objspace
|
224
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
225
|
+
typedef void each_shape_callback(rb_shape_t * shape, void *data);
|
226
|
+
void rb_shape_each_shape(each_shape_callback callback, void *data);
|
227
|
+
size_t rb_shape_memsize(rb_shape_t *shape);
|
228
|
+
size_t rb_shape_edges_count(rb_shape_t *shape);
|
229
|
+
size_t rb_shape_depth(rb_shape_t *shape);
|
230
|
+
shape_id_t rb_shape_id(rb_shape_t * shape);
|
231
|
+
RUBY_SYMBOL_EXPORT_END
|
232
|
+
|
233
|
+
#endif
|
@@ -0,0 +1,48 @@
|
|
1
|
+
#ifndef SIPHASH_H
|
2
|
+
#define SIPHASH_H 1
|
3
|
+
#include <stdlib.h>
|
4
|
+
#ifdef HAVE_STDINT_H
|
5
|
+
#include <stdint.h>
|
6
|
+
#endif
|
7
|
+
#ifdef HAVE_INTTYPES_H
|
8
|
+
#include <inttypes.h>
|
9
|
+
#endif
|
10
|
+
|
11
|
+
#ifndef HAVE_UINT64_T
|
12
|
+
typedef struct {
|
13
|
+
uint32_t u32[2];
|
14
|
+
} sip_uint64_t;
|
15
|
+
#define uint64_t sip_uint64_t
|
16
|
+
#else
|
17
|
+
typedef uint64_t sip_uint64_t;
|
18
|
+
#endif
|
19
|
+
|
20
|
+
typedef struct {
|
21
|
+
int c;
|
22
|
+
int d;
|
23
|
+
uint64_t v[4];
|
24
|
+
uint8_t buf[sizeof(uint64_t)];
|
25
|
+
uint8_t buflen;
|
26
|
+
uint8_t msglen_byte;
|
27
|
+
} sip_state;
|
28
|
+
|
29
|
+
typedef struct sip_interface_st sip_interface;
|
30
|
+
|
31
|
+
typedef struct {
|
32
|
+
sip_state state[1];
|
33
|
+
const sip_interface *methods;
|
34
|
+
} sip_hash;
|
35
|
+
|
36
|
+
sip_hash *sip_hash_new(const uint8_t key[16], int c, int d);
|
37
|
+
sip_hash *sip_hash_init(sip_hash *h, const uint8_t key[16], int c, int d);
|
38
|
+
int sip_hash_update(sip_hash *h, const uint8_t *data, size_t len);
|
39
|
+
int sip_hash_final(sip_hash *h, uint8_t **digest, size_t *len);
|
40
|
+
int sip_hash_final_integer(sip_hash *h, uint64_t *digest);
|
41
|
+
int sip_hash_digest(sip_hash *h, const uint8_t *data, size_t data_len, uint8_t **digest, size_t *digest_len);
|
42
|
+
int sip_hash_digest_integer(sip_hash *h, const uint8_t *data, size_t data_len, uint64_t *digest);
|
43
|
+
void sip_hash_free(sip_hash *h);
|
44
|
+
void sip_hash_dump(sip_hash *h);
|
45
|
+
|
46
|
+
NO_SANITIZE("unsigned-integer-overflow", uint64_t sip_hash13(const uint8_t key[16], const uint8_t *data, size_t len));
|
47
|
+
|
48
|
+
#endif
|
@@ -0,0 +1,118 @@
|
|
1
|
+
#ifndef RUBY_SYMBOL_H
|
2
|
+
#define RUBY_SYMBOL_H 1
|
3
|
+
/**********************************************************************
|
4
|
+
|
5
|
+
symbol.h -
|
6
|
+
|
7
|
+
$Author$
|
8
|
+
created at: Tue Jul 8 15:49:54 JST 2014
|
9
|
+
|
10
|
+
Copyright (C) 2014 Yukihiro Matsumoto
|
11
|
+
|
12
|
+
**********************************************************************/
|
13
|
+
|
14
|
+
#include "id.h"
|
15
|
+
#include "ruby/encoding.h"
|
16
|
+
|
17
|
+
#define DYNAMIC_ID_P(id) (!(id&ID_STATIC_SYM)&&id>tLAST_OP_ID)
|
18
|
+
#define STATIC_ID2SYM(id) (((VALUE)(id)<<RUBY_SPECIAL_SHIFT)|SYMBOL_FLAG)
|
19
|
+
|
20
|
+
#ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P
|
21
|
+
#define rb_id2sym(id) \
|
22
|
+
RB_GNUC_EXTENSION_BLOCK(__builtin_constant_p(id) && !DYNAMIC_ID_P(id) ? \
|
23
|
+
STATIC_ID2SYM(id) : rb_id2sym(id))
|
24
|
+
#endif
|
25
|
+
|
26
|
+
struct RSymbol {
|
27
|
+
struct RBasic basic;
|
28
|
+
st_index_t hashval;
|
29
|
+
VALUE fstr;
|
30
|
+
ID id;
|
31
|
+
};
|
32
|
+
|
33
|
+
#define RSYMBOL(obj) ((struct RSymbol *)(obj))
|
34
|
+
|
35
|
+
#define is_notop_id(id) ((id)>tLAST_OP_ID)
|
36
|
+
#define is_local_id(id) (id_type(id)==ID_LOCAL)
|
37
|
+
#define is_global_id(id) (id_type(id)==ID_GLOBAL)
|
38
|
+
#define is_instance_id(id) (id_type(id)==ID_INSTANCE)
|
39
|
+
#define is_attrset_id(id) ((id)==idASET||id_type(id)==ID_ATTRSET)
|
40
|
+
#define is_const_id(id) (id_type(id)==ID_CONST)
|
41
|
+
#define is_class_id(id) (id_type(id)==ID_CLASS)
|
42
|
+
#define is_junk_id(id) (id_type(id)==ID_JUNK)
|
43
|
+
|
44
|
+
static inline int
|
45
|
+
id_type(ID id)
|
46
|
+
{
|
47
|
+
if (is_notop_id(id)) {
|
48
|
+
return (int)(id&ID_SCOPE_MASK);
|
49
|
+
}
|
50
|
+
else {
|
51
|
+
return -1;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
typedef uint32_t rb_id_serial_t;
|
56
|
+
static const uint32_t RB_ID_SERIAL_MAX = /* 256M on LP32 */
|
57
|
+
UINT32_MAX >>
|
58
|
+
((sizeof(ID)-sizeof(rb_id_serial_t))*CHAR_BIT < RUBY_ID_SCOPE_SHIFT ?
|
59
|
+
RUBY_ID_SCOPE_SHIFT : 0);
|
60
|
+
|
61
|
+
typedef struct {
|
62
|
+
rb_id_serial_t last_id;
|
63
|
+
st_table *str_sym;
|
64
|
+
VALUE ids;
|
65
|
+
VALUE dsymbol_fstr_hash;
|
66
|
+
} rb_symbols_t;
|
67
|
+
|
68
|
+
static inline rb_id_serial_t
|
69
|
+
rb_id_to_serial(ID id)
|
70
|
+
{
|
71
|
+
if (is_notop_id(id)) {
|
72
|
+
return (rb_id_serial_t)(id >> ID_SCOPE_SHIFT);
|
73
|
+
}
|
74
|
+
else {
|
75
|
+
return (rb_id_serial_t)id;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
static inline int
|
80
|
+
sym_type(VALUE sym)
|
81
|
+
{
|
82
|
+
ID id;
|
83
|
+
if (STATIC_SYM_P(sym)) {
|
84
|
+
id = RSHIFT(sym, RUBY_SPECIAL_SHIFT);
|
85
|
+
if (id<=tLAST_OP_ID) {
|
86
|
+
return -1;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
else {
|
90
|
+
id = RSYMBOL(sym)->id;
|
91
|
+
}
|
92
|
+
return (int)(id&ID_SCOPE_MASK);
|
93
|
+
}
|
94
|
+
|
95
|
+
#define is_local_sym(sym) (sym_type(sym)==ID_LOCAL)
|
96
|
+
#define is_global_sym(sym) (sym_type(sym)==ID_GLOBAL)
|
97
|
+
#define is_instance_sym(sym) (sym_type(sym)==ID_INSTANCE)
|
98
|
+
#define is_attrset_sym(sym) (sym_type(sym)==ID_ATTRSET)
|
99
|
+
#define is_const_sym(sym) (sym_type(sym)==ID_CONST)
|
100
|
+
#define is_class_sym(sym) (sym_type(sym)==ID_CLASS)
|
101
|
+
#define is_junk_sym(sym) (sym_type(sym)==ID_JUNK)
|
102
|
+
|
103
|
+
RUBY_FUNC_EXPORTED const uint_least32_t ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
|
104
|
+
|
105
|
+
static inline int
|
106
|
+
is_global_name_punct(const int c)
|
107
|
+
{
|
108
|
+
if (c <= 0x20 || 0x7e < c) return 0;
|
109
|
+
return (ruby_global_name_punct_bits[(c - 0x20) / 32] >> (c % 32)) & 1;
|
110
|
+
}
|
111
|
+
|
112
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
113
|
+
|
114
|
+
int rb_enc_symname_type(const char *name, long len, rb_encoding *enc, unsigned int allowed_attrset);
|
115
|
+
size_t rb_sym_immortal_count(void);
|
116
|
+
|
117
|
+
RUBY_SYMBOL_EXPORT_END
|
118
|
+
#endif
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#ifndef RUBY_THREAD_NONE_H
|
2
|
+
#define RUBY_THREAD_NONE_H
|
3
|
+
|
4
|
+
#define RB_NATIVETHREAD_LOCK_INIT (void)(0)
|
5
|
+
#define RB_NATIVETHREAD_COND_INIT (void)(0)
|
6
|
+
|
7
|
+
// no-thread impl doesn't use TLS but define this to avoid using tls key
|
8
|
+
// based implementation in vm.c
|
9
|
+
#define RB_THREAD_LOCAL_SPECIFIER
|
10
|
+
|
11
|
+
struct rb_native_thread {
|
12
|
+
void *thread_id; // NULL
|
13
|
+
};
|
14
|
+
|
15
|
+
struct rb_thread_sched_item {};
|
16
|
+
struct rb_thread_sched {};
|
17
|
+
|
18
|
+
RUBY_EXTERN struct rb_execution_context_struct *ruby_current_ec;
|
19
|
+
NOINLINE(struct rb_execution_context_struct *rb_current_ec_noinline(void)); // for assertions
|
20
|
+
|
21
|
+
#endif /* RUBY_THREAD_NONE_H */
|
@@ -0,0 +1,166 @@
|
|
1
|
+
#ifndef RUBY_THREAD_PTHREAD_H
|
2
|
+
#define RUBY_THREAD_PTHREAD_H
|
3
|
+
/**********************************************************************
|
4
|
+
|
5
|
+
thread_pthread.h -
|
6
|
+
|
7
|
+
$Author$
|
8
|
+
|
9
|
+
Copyright (C) 2004-2007 Koichi Sasada
|
10
|
+
|
11
|
+
**********************************************************************/
|
12
|
+
|
13
|
+
#ifdef HAVE_PTHREAD_NP_H
|
14
|
+
#include <pthread_np.h>
|
15
|
+
#endif
|
16
|
+
|
17
|
+
#define RB_NATIVETHREAD_LOCK_INIT PTHREAD_MUTEX_INITIALIZER
|
18
|
+
#define RB_NATIVETHREAD_COND_INIT PTHREAD_COND_INITIALIZER
|
19
|
+
|
20
|
+
// per-Thead scheduler helper data
|
21
|
+
struct rb_thread_sched_item {
|
22
|
+
struct {
|
23
|
+
struct ccan_list_node ubf;
|
24
|
+
|
25
|
+
// connected to ractor->threads.sched.reqdyq
|
26
|
+
// locked by ractor->threads.sched.lock
|
27
|
+
struct ccan_list_node readyq;
|
28
|
+
|
29
|
+
// connected to vm->ractor.sched.timeslice_threads
|
30
|
+
// locked by vm->ractor.sched.lock
|
31
|
+
struct ccan_list_node timeslice_threads;
|
32
|
+
|
33
|
+
// connected to vm->ractor.sched.running_threads
|
34
|
+
// locked by vm->ractor.sched.lock
|
35
|
+
struct ccan_list_node running_threads;
|
36
|
+
|
37
|
+
// connected to vm->ractor.sched.zombie_threads
|
38
|
+
struct ccan_list_node zombie_threads;
|
39
|
+
} node;
|
40
|
+
|
41
|
+
// this data should be protected by timer_th.waiting_lock
|
42
|
+
struct {
|
43
|
+
enum thread_sched_waiting_flag {
|
44
|
+
thread_sched_waiting_none = 0x00,
|
45
|
+
thread_sched_waiting_timeout = 0x01,
|
46
|
+
thread_sched_waiting_io_read = 0x02,
|
47
|
+
thread_sched_waiting_io_write = 0x08,
|
48
|
+
thread_sched_waiting_io_force = 0x40, // ignore readable
|
49
|
+
} flags;
|
50
|
+
|
51
|
+
struct {
|
52
|
+
// should be compat with hrtime.h
|
53
|
+
#ifdef MY_RUBY_BUILD_MAY_TIME_TRAVEL
|
54
|
+
int128_t timeout;
|
55
|
+
#else
|
56
|
+
uint64_t timeout;
|
57
|
+
#endif
|
58
|
+
int fd; // -1 for timeout only
|
59
|
+
int result;
|
60
|
+
} data;
|
61
|
+
|
62
|
+
// connected to timer_th.waiting
|
63
|
+
struct ccan_list_node node;
|
64
|
+
} waiting_reason;
|
65
|
+
|
66
|
+
bool finished;
|
67
|
+
bool malloc_stack;
|
68
|
+
void *context_stack;
|
69
|
+
struct coroutine_context *context;
|
70
|
+
};
|
71
|
+
|
72
|
+
struct rb_native_thread {
|
73
|
+
rb_atomic_t serial;
|
74
|
+
struct rb_vm_struct *vm;
|
75
|
+
|
76
|
+
rb_nativethread_id_t thread_id;
|
77
|
+
|
78
|
+
#ifdef RB_THREAD_T_HAS_NATIVE_ID
|
79
|
+
int tid;
|
80
|
+
#endif
|
81
|
+
|
82
|
+
struct rb_thread_struct *running_thread;
|
83
|
+
|
84
|
+
// to control native thread
|
85
|
+
#if defined(__GLIBC__) || defined(__FreeBSD__)
|
86
|
+
union
|
87
|
+
#else
|
88
|
+
/*
|
89
|
+
* assume the platform condvars are badly implemented and have a
|
90
|
+
* "memory" of which mutex they're associated with
|
91
|
+
*/
|
92
|
+
struct
|
93
|
+
#endif
|
94
|
+
{
|
95
|
+
rb_nativethread_cond_t intr; /* th->interrupt_lock */
|
96
|
+
rb_nativethread_cond_t readyq; /* use sched->lock */
|
97
|
+
} cond;
|
98
|
+
|
99
|
+
#ifdef USE_SIGALTSTACK
|
100
|
+
void *altstack;
|
101
|
+
#endif
|
102
|
+
|
103
|
+
struct coroutine_context *nt_context;
|
104
|
+
int dedicated;
|
105
|
+
|
106
|
+
size_t machine_stack_maxsize;
|
107
|
+
};
|
108
|
+
|
109
|
+
#undef except
|
110
|
+
#undef try
|
111
|
+
#undef leave
|
112
|
+
#undef finally
|
113
|
+
|
114
|
+
// per-Ractor
|
115
|
+
struct rb_thread_sched {
|
116
|
+
rb_nativethread_lock_t lock_;
|
117
|
+
#if VM_CHECK_MODE
|
118
|
+
struct rb_thread_struct *lock_owner;
|
119
|
+
#endif
|
120
|
+
struct rb_thread_struct *running; // running thread or NULL
|
121
|
+
bool is_running;
|
122
|
+
bool is_running_timeslice;
|
123
|
+
bool enable_mn_threads;
|
124
|
+
|
125
|
+
struct ccan_list_head readyq;
|
126
|
+
int readyq_cnt;
|
127
|
+
// ractor scheduling
|
128
|
+
struct ccan_list_node grq_node;
|
129
|
+
};
|
130
|
+
|
131
|
+
#ifdef RB_THREAD_LOCAL_SPECIFIER
|
132
|
+
NOINLINE(void rb_current_ec_set(struct rb_execution_context_struct *));
|
133
|
+
NOINLINE(struct rb_execution_context_struct *rb_current_ec_noinline(void));
|
134
|
+
|
135
|
+
# ifdef __APPLE__
|
136
|
+
// on Darwin, TLS can not be accessed across .so
|
137
|
+
NOINLINE(struct rb_execution_context_struct *rb_current_ec(void));
|
138
|
+
# else
|
139
|
+
RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
|
140
|
+
|
141
|
+
// for RUBY_DEBUG_LOG()
|
142
|
+
RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER rb_atomic_t ruby_nt_serial;
|
143
|
+
#define RUBY_NT_SERIAL 1
|
144
|
+
# endif
|
145
|
+
#else
|
146
|
+
typedef pthread_key_t native_tls_key_t;
|
147
|
+
|
148
|
+
static inline void *
|
149
|
+
native_tls_get(native_tls_key_t key)
|
150
|
+
{
|
151
|
+
// return value should be checked by caller
|
152
|
+
return pthread_getspecific(key);
|
153
|
+
}
|
154
|
+
|
155
|
+
static inline void
|
156
|
+
native_tls_set(native_tls_key_t key, void *ptr)
|
157
|
+
{
|
158
|
+
if (UNLIKELY(pthread_setspecific(key, ptr) != 0)) {
|
159
|
+
rb_bug("pthread_setspecific error");
|
160
|
+
}
|
161
|
+
}
|
162
|
+
|
163
|
+
RUBY_EXTERN native_tls_key_t ruby_current_ec_key;
|
164
|
+
#endif
|
165
|
+
|
166
|
+
#endif /* RUBY_THREAD_PTHREAD_H */
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#ifndef RUBY_THREAD_WIN32_H
|
2
|
+
#define RUBY_THREAD_WIN32_H
|
3
|
+
/**********************************************************************
|
4
|
+
|
5
|
+
thread_win32.h -
|
6
|
+
|
7
|
+
$Author$
|
8
|
+
|
9
|
+
Copyright (C) 2004-2007 Koichi Sasada
|
10
|
+
|
11
|
+
**********************************************************************/
|
12
|
+
|
13
|
+
/* interface */
|
14
|
+
|
15
|
+
# ifdef __CYGWIN__
|
16
|
+
# undef _WIN32
|
17
|
+
# endif
|
18
|
+
|
19
|
+
#define USE_VM_CLOCK 1
|
20
|
+
|
21
|
+
WINBASEAPI BOOL WINAPI
|
22
|
+
TryEnterCriticalSection(IN OUT LPCRITICAL_SECTION lpCriticalSection);
|
23
|
+
|
24
|
+
struct rb_native_thread {
|
25
|
+
HANDLE thread_id;
|
26
|
+
HANDLE interrupt_event;
|
27
|
+
};
|
28
|
+
|
29
|
+
struct rb_thread_sched_item {
|
30
|
+
void *vm_stack;
|
31
|
+
};
|
32
|
+
|
33
|
+
struct rb_thread_sched {
|
34
|
+
HANDLE lock;
|
35
|
+
};
|
36
|
+
|
37
|
+
typedef DWORD native_tls_key_t; // TLS index
|
38
|
+
|
39
|
+
static inline void *
|
40
|
+
native_tls_get(native_tls_key_t key)
|
41
|
+
{
|
42
|
+
// return value should be checked by caller.
|
43
|
+
return TlsGetValue(key);
|
44
|
+
}
|
45
|
+
|
46
|
+
static inline void
|
47
|
+
native_tls_set(native_tls_key_t key, void *ptr)
|
48
|
+
{
|
49
|
+
if (UNLIKELY(TlsSetValue(key, ptr) == 0)) {
|
50
|
+
rb_bug("TlsSetValue() error");
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
55
|
+
RUBY_EXTERN native_tls_key_t ruby_current_ec_key;
|
56
|
+
RUBY_SYMBOL_EXPORT_END
|
57
|
+
|
58
|
+
#endif /* RUBY_THREAD_WIN32_H */
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#ifndef RUBY_TIMEV_H
|
2
|
+
#define RUBY_TIMEV_H
|
3
|
+
#include "ruby/ruby.h"
|
4
|
+
|
5
|
+
struct vtm {
|
6
|
+
VALUE year; /* 2000 for example. Integer. */
|
7
|
+
VALUE subsecx; /* 0 <= subsecx < TIME_SCALE. possibly Rational. */
|
8
|
+
VALUE utc_offset; /* -3600 as -01:00 for example. possibly Rational. */
|
9
|
+
VALUE zone; /* "JST", "EST", "EDT", etc. as String */
|
10
|
+
unsigned int yday:9; /* 1..366 */
|
11
|
+
unsigned int mon:4; /* 1..12 */
|
12
|
+
unsigned int mday:5; /* 1..31 */
|
13
|
+
unsigned int hour:5; /* 0..23 */
|
14
|
+
unsigned int min:6; /* 0..59 */
|
15
|
+
unsigned int sec:6; /* 0..60 */
|
16
|
+
unsigned int wday:3; /* 0:Sunday, 1:Monday, ..., 6:Saturday 7:init */
|
17
|
+
unsigned int isdst:2; /* 0:StandardTime 1:DayLightSavingTime 3:init */
|
18
|
+
|
19
|
+
/* Flags for struct time_object */
|
20
|
+
unsigned int tzmode:3; /* 0:localtime 1:utc 2:fixoff 3:uninitialized */
|
21
|
+
unsigned int tm_got:1;
|
22
|
+
};
|
23
|
+
|
24
|
+
#define TIME_SCALE 1000000000
|
25
|
+
|
26
|
+
#ifndef TYPEOF_TIMEVAL_TV_SEC
|
27
|
+
# define TYPEOF_TIMEVAL_TV_SEC time_t
|
28
|
+
#endif
|
29
|
+
#ifndef TYPEOF_TIMEVAL_TV_USEC
|
30
|
+
# if INT_MAX >= 1000000
|
31
|
+
# define TYPEOF_TIMEVAL_TV_USEC int
|
32
|
+
# else
|
33
|
+
# define TYPEOF_TIMEVAL_TV_USEC long
|
34
|
+
# endif
|
35
|
+
#endif
|
36
|
+
|
37
|
+
#if SIZEOF_TIME_T == SIZEOF_LONG
|
38
|
+
typedef unsigned long unsigned_time_t;
|
39
|
+
#elif SIZEOF_TIME_T == SIZEOF_INT
|
40
|
+
typedef unsigned int unsigned_time_t;
|
41
|
+
#elif SIZEOF_TIME_T == SIZEOF_LONG_LONG
|
42
|
+
typedef unsigned LONG_LONG unsigned_time_t;
|
43
|
+
#else
|
44
|
+
# error cannot find integer type which size is same as time_t.
|
45
|
+
#endif
|
46
|
+
|
47
|
+
/* strftime.c */
|
48
|
+
#ifdef RUBY_ENCODING_H
|
49
|
+
VALUE rb_strftime_timespec(const char *format, size_t format_len, rb_encoding *enc,
|
50
|
+
VALUE time, const struct vtm *vtm, struct timespec *ts, int gmt);
|
51
|
+
VALUE rb_strftime(const char *format, size_t format_len, rb_encoding *enc,
|
52
|
+
VALUE time, const struct vtm *vtm, VALUE timev, int gmt);
|
53
|
+
#endif
|
54
|
+
|
55
|
+
/* time.c */
|
56
|
+
VALUE rb_time_zone_abbreviation(VALUE zone, VALUE time);
|
57
|
+
|
58
|
+
#endif
|