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,273 @@
|
|
1
|
+
#ifndef INTERNAL_NUMERIC_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_NUMERIC_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 Numeric.
|
10
|
+
*/
|
11
|
+
#include "internal/bignum.h" /* for BIGNUM_POSITIVE_P */
|
12
|
+
#include "internal/bits.h" /* for RUBY_BIT_ROTL */
|
13
|
+
#include "internal/fixnum.h" /* for FIXNUM_POSITIVE_P */
|
14
|
+
#include "internal/vm.h" /* for rb_method_basic_definition_p */
|
15
|
+
#include "ruby/intern.h" /* for rb_cmperr */
|
16
|
+
#include "ruby/ruby.h" /* for USE_FLONUM */
|
17
|
+
|
18
|
+
#define ROUND_TO(mode, even, up, down) \
|
19
|
+
((mode) == RUBY_NUM_ROUND_HALF_EVEN ? even : \
|
20
|
+
(mode) == RUBY_NUM_ROUND_HALF_UP ? up : down)
|
21
|
+
#define ROUND_FUNC(mode, name) \
|
22
|
+
ROUND_TO(mode, name##_half_even, name##_half_up, name##_half_down)
|
23
|
+
#define ROUND_CALL(mode, name, args) \
|
24
|
+
ROUND_TO(mode, name##_half_even args, \
|
25
|
+
name##_half_up args, name##_half_down args)
|
26
|
+
|
27
|
+
#ifndef ROUND_DEFAULT
|
28
|
+
# define ROUND_DEFAULT RUBY_NUM_ROUND_HALF_UP
|
29
|
+
#endif
|
30
|
+
|
31
|
+
enum ruby_num_rounding_mode {
|
32
|
+
RUBY_NUM_ROUND_HALF_UP,
|
33
|
+
RUBY_NUM_ROUND_HALF_EVEN,
|
34
|
+
RUBY_NUM_ROUND_HALF_DOWN,
|
35
|
+
RUBY_NUM_ROUND_DEFAULT = ROUND_DEFAULT,
|
36
|
+
};
|
37
|
+
|
38
|
+
/* same as internal.h */
|
39
|
+
#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
|
40
|
+
#define roomof(x, y) (((x) + (y) - 1) / (y))
|
41
|
+
#define type_roomof(x, y) roomof(sizeof(x), sizeof(y))
|
42
|
+
|
43
|
+
#if SIZEOF_DOUBLE <= SIZEOF_VALUE
|
44
|
+
typedef double rb_float_value_type;
|
45
|
+
#else
|
46
|
+
typedef struct {
|
47
|
+
VALUE values[roomof(SIZEOF_DOUBLE, SIZEOF_VALUE)];
|
48
|
+
} rb_float_value_type;
|
49
|
+
#endif
|
50
|
+
|
51
|
+
struct RFloat {
|
52
|
+
struct RBasic basic;
|
53
|
+
rb_float_value_type float_value;
|
54
|
+
};
|
55
|
+
|
56
|
+
#define RFLOAT(obj) ((struct RFloat *)(obj))
|
57
|
+
|
58
|
+
/* numeric.c */
|
59
|
+
int rb_num_to_uint(VALUE val, unsigned int *ret);
|
60
|
+
VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl);
|
61
|
+
double ruby_float_step_size(double beg, double end, double unit, int excl);
|
62
|
+
int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl, int allow_endless);
|
63
|
+
int rb_num_negative_p(VALUE);
|
64
|
+
VALUE rb_int_succ(VALUE num);
|
65
|
+
VALUE rb_float_uminus(VALUE num);
|
66
|
+
VALUE rb_int_plus(VALUE x, VALUE y);
|
67
|
+
VALUE rb_float_plus(VALUE x, VALUE y);
|
68
|
+
VALUE rb_int_minus(VALUE x, VALUE y);
|
69
|
+
VALUE rb_float_minus(VALUE x, VALUE y);
|
70
|
+
VALUE rb_int_mul(VALUE x, VALUE y);
|
71
|
+
VALUE rb_float_mul(VALUE x, VALUE y);
|
72
|
+
VALUE rb_float_div(VALUE x, VALUE y);
|
73
|
+
VALUE rb_int_idiv(VALUE x, VALUE y);
|
74
|
+
VALUE rb_int_modulo(VALUE x, VALUE y);
|
75
|
+
VALUE rb_int2str(VALUE num, int base);
|
76
|
+
VALUE rb_fix_plus(VALUE x, VALUE y);
|
77
|
+
VALUE rb_int_gt(VALUE x, VALUE y);
|
78
|
+
VALUE rb_float_gt(VALUE x, VALUE y);
|
79
|
+
VALUE rb_int_ge(VALUE x, VALUE y);
|
80
|
+
enum ruby_num_rounding_mode rb_num_get_rounding_option(VALUE opts);
|
81
|
+
double rb_int_fdiv_double(VALUE x, VALUE y);
|
82
|
+
VALUE rb_int_pow(VALUE x, VALUE y);
|
83
|
+
VALUE rb_float_pow(VALUE x, VALUE y);
|
84
|
+
VALUE rb_int_cmp(VALUE x, VALUE y);
|
85
|
+
VALUE rb_int_equal(VALUE x, VALUE y);
|
86
|
+
VALUE rb_int_divmod(VALUE x, VALUE y);
|
87
|
+
VALUE rb_int_and(VALUE x, VALUE y);
|
88
|
+
VALUE rb_int_lshift(VALUE x, VALUE y);
|
89
|
+
VALUE rb_int_div(VALUE x, VALUE y);
|
90
|
+
int rb_int_positive_p(VALUE num);
|
91
|
+
int rb_int_negative_p(VALUE num);
|
92
|
+
VALUE rb_check_integer_type(VALUE);
|
93
|
+
VALUE rb_num_pow(VALUE x, VALUE y);
|
94
|
+
VALUE rb_float_ceil(VALUE num, int ndigits);
|
95
|
+
VALUE rb_float_floor(VALUE x, int ndigits);
|
96
|
+
VALUE rb_float_abs(VALUE flt);
|
97
|
+
static inline VALUE rb_num_compare_with_zero(VALUE num, ID mid);
|
98
|
+
static inline int rb_num_positive_int_p(VALUE num);
|
99
|
+
static inline int rb_num_negative_int_p(VALUE num);
|
100
|
+
static inline double rb_float_flonum_value(VALUE v);
|
101
|
+
static inline double rb_float_noflonum_value(VALUE v);
|
102
|
+
static inline double rb_float_value_inline(VALUE v);
|
103
|
+
static inline VALUE rb_float_new_inline(double d);
|
104
|
+
static inline bool INT_POSITIVE_P(VALUE num);
|
105
|
+
static inline bool INT_NEGATIVE_P(VALUE num);
|
106
|
+
static inline bool FLOAT_ZERO_P(VALUE num);
|
107
|
+
#define rb_float_value rb_float_value_inline
|
108
|
+
#define rb_float_new rb_float_new_inline
|
109
|
+
|
110
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
111
|
+
/* numeric.c (export) */
|
112
|
+
RUBY_SYMBOL_EXPORT_END
|
113
|
+
|
114
|
+
VALUE rb_flo_div_flo(VALUE x, VALUE y);
|
115
|
+
double ruby_float_mod(double x, double y);
|
116
|
+
VALUE rb_float_equal(VALUE x, VALUE y);
|
117
|
+
int rb_float_cmp(VALUE x, VALUE y);
|
118
|
+
VALUE rb_float_eql(VALUE x, VALUE y);
|
119
|
+
VALUE rb_fix_aref(VALUE fix, VALUE idx);
|
120
|
+
VALUE rb_int_zero_p(VALUE num);
|
121
|
+
VALUE rb_int_even_p(VALUE num);
|
122
|
+
VALUE rb_int_odd_p(VALUE num);
|
123
|
+
VALUE rb_int_abs(VALUE num);
|
124
|
+
VALUE rb_int_bit_length(VALUE num);
|
125
|
+
VALUE rb_int_uminus(VALUE num);
|
126
|
+
VALUE rb_int_comp(VALUE num);
|
127
|
+
|
128
|
+
static inline bool
|
129
|
+
INT_POSITIVE_P(VALUE num)
|
130
|
+
{
|
131
|
+
if (FIXNUM_P(num)) {
|
132
|
+
return FIXNUM_POSITIVE_P(num);
|
133
|
+
}
|
134
|
+
else {
|
135
|
+
return BIGNUM_POSITIVE_P(num);
|
136
|
+
}
|
137
|
+
}
|
138
|
+
|
139
|
+
static inline bool
|
140
|
+
INT_NEGATIVE_P(VALUE num)
|
141
|
+
{
|
142
|
+
if (FIXNUM_P(num)) {
|
143
|
+
return FIXNUM_NEGATIVE_P(num);
|
144
|
+
}
|
145
|
+
else {
|
146
|
+
return BIGNUM_NEGATIVE_P(num);
|
147
|
+
}
|
148
|
+
}
|
149
|
+
|
150
|
+
static inline bool
|
151
|
+
FLOAT_ZERO_P(VALUE num)
|
152
|
+
{
|
153
|
+
return RFLOAT_VALUE(num) == 0.0;
|
154
|
+
}
|
155
|
+
|
156
|
+
static inline VALUE
|
157
|
+
rb_num_compare_with_zero(VALUE num, ID mid)
|
158
|
+
{
|
159
|
+
VALUE zero = INT2FIX(0);
|
160
|
+
VALUE r = rb_check_funcall(num, mid, 1, &zero);
|
161
|
+
if (r == Qundef) {
|
162
|
+
rb_cmperr(num, zero);
|
163
|
+
}
|
164
|
+
return r;
|
165
|
+
}
|
166
|
+
|
167
|
+
static inline int
|
168
|
+
rb_num_positive_int_p(VALUE num)
|
169
|
+
{
|
170
|
+
const ID mid = '>';
|
171
|
+
|
172
|
+
if (FIXNUM_P(num)) {
|
173
|
+
if (rb_method_basic_definition_p(rb_cInteger, mid))
|
174
|
+
return FIXNUM_POSITIVE_P(num);
|
175
|
+
}
|
176
|
+
else if (RB_TYPE_P(num, T_BIGNUM)) {
|
177
|
+
if (rb_method_basic_definition_p(rb_cInteger, mid))
|
178
|
+
return BIGNUM_POSITIVE_P(num);
|
179
|
+
}
|
180
|
+
return RTEST(rb_num_compare_with_zero(num, mid));
|
181
|
+
}
|
182
|
+
|
183
|
+
static inline int
|
184
|
+
rb_num_negative_int_p(VALUE num)
|
185
|
+
{
|
186
|
+
const ID mid = '<';
|
187
|
+
|
188
|
+
if (FIXNUM_P(num)) {
|
189
|
+
if (rb_method_basic_definition_p(rb_cInteger, mid))
|
190
|
+
return FIXNUM_NEGATIVE_P(num);
|
191
|
+
}
|
192
|
+
else if (RB_TYPE_P(num, T_BIGNUM)) {
|
193
|
+
if (rb_method_basic_definition_p(rb_cInteger, mid))
|
194
|
+
return BIGNUM_NEGATIVE_P(num);
|
195
|
+
}
|
196
|
+
return RTEST(rb_num_compare_with_zero(num, mid));
|
197
|
+
}
|
198
|
+
|
199
|
+
static inline double
|
200
|
+
rb_float_flonum_value(VALUE v)
|
201
|
+
{
|
202
|
+
#if USE_FLONUM
|
203
|
+
if (v != (VALUE)0x8000000000000002) { /* LIKELY */
|
204
|
+
union {
|
205
|
+
double d;
|
206
|
+
VALUE v;
|
207
|
+
} t;
|
208
|
+
|
209
|
+
VALUE b63 = (v >> 63);
|
210
|
+
/* e: xx1... -> 011... */
|
211
|
+
/* xx0... -> 100... */
|
212
|
+
/* ^b63 */
|
213
|
+
t.v = RUBY_BIT_ROTR((2 - b63) | (v & ~(VALUE)0x03), 3);
|
214
|
+
return t.d;
|
215
|
+
}
|
216
|
+
#endif
|
217
|
+
return 0.0;
|
218
|
+
}
|
219
|
+
|
220
|
+
static inline double
|
221
|
+
rb_float_noflonum_value(VALUE v)
|
222
|
+
{
|
223
|
+
#if SIZEOF_DOUBLE <= SIZEOF_VALUE
|
224
|
+
return RFLOAT(v)->float_value;
|
225
|
+
#else
|
226
|
+
union {
|
227
|
+
rb_float_value_type v;
|
228
|
+
double d;
|
229
|
+
} u = {RFLOAT(v)->float_value};
|
230
|
+
return u.d;
|
231
|
+
#endif
|
232
|
+
}
|
233
|
+
|
234
|
+
static inline double
|
235
|
+
rb_float_value_inline(VALUE v)
|
236
|
+
{
|
237
|
+
if (FLONUM_P(v)) {
|
238
|
+
return rb_float_flonum_value(v);
|
239
|
+
}
|
240
|
+
return rb_float_noflonum_value(v);
|
241
|
+
}
|
242
|
+
|
243
|
+
static inline VALUE
|
244
|
+
rb_float_new_inline(double d)
|
245
|
+
{
|
246
|
+
#if USE_FLONUM
|
247
|
+
union {
|
248
|
+
double d;
|
249
|
+
VALUE v;
|
250
|
+
} t;
|
251
|
+
int bits;
|
252
|
+
|
253
|
+
t.d = d;
|
254
|
+
bits = (int)((VALUE)(t.v >> 60) & 0x7);
|
255
|
+
/* bits contains 3 bits of b62..b60. */
|
256
|
+
/* bits - 3 = */
|
257
|
+
/* b011 -> b000 */
|
258
|
+
/* b100 -> b001 */
|
259
|
+
|
260
|
+
if (t.v != 0x3000000000000000 /* 1.72723e-77 */ &&
|
261
|
+
!((bits-3) & ~0x01)) {
|
262
|
+
return (RUBY_BIT_ROTL(t.v, 3) & ~(VALUE)0x01) | 0x02;
|
263
|
+
}
|
264
|
+
else if (t.v == (VALUE)0) {
|
265
|
+
/* +0.0 */
|
266
|
+
return 0x8000000000000002;
|
267
|
+
}
|
268
|
+
/* out of range */
|
269
|
+
#endif
|
270
|
+
return rb_float_new_in_heap(d);
|
271
|
+
}
|
272
|
+
|
273
|
+
#endif /* INTERNAL_NUMERIC_H */
|
@@ -0,0 +1,62 @@
|
|
1
|
+
#ifndef INTERNAL_OBJECT_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_OBJECT_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 Object.
|
10
|
+
*/
|
11
|
+
#include "ruby/ruby.h" /* for VALUE */
|
12
|
+
|
13
|
+
/* object.c */
|
14
|
+
size_t rb_obj_embedded_size(uint32_t numiv);
|
15
|
+
VALUE rb_class_search_ancestor(VALUE klass, VALUE super);
|
16
|
+
NORETURN(void rb_undefined_alloc(VALUE klass));
|
17
|
+
double rb_num_to_dbl(VALUE val);
|
18
|
+
VALUE rb_obj_dig(int argc, VALUE *argv, VALUE self, VALUE notfound);
|
19
|
+
VALUE rb_obj_clone_setup(VALUE obj, VALUE clone, VALUE kwfreeze);
|
20
|
+
VALUE rb_obj_dup_setup(VALUE obj, VALUE dup);
|
21
|
+
VALUE rb_immutable_obj_clone(int, VALUE *, VALUE);
|
22
|
+
VALUE rb_check_convert_type_with_id(VALUE,int,const char*,ID);
|
23
|
+
int rb_bool_expected(VALUE, const char *, int raise);
|
24
|
+
static inline void RBASIC_CLEAR_CLASS(VALUE obj);
|
25
|
+
static inline void RBASIC_SET_CLASS_RAW(VALUE obj, VALUE klass);
|
26
|
+
static inline void RBASIC_SET_CLASS(VALUE obj, VALUE klass);
|
27
|
+
|
28
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
29
|
+
/* object.c (export) */
|
30
|
+
int rb_opts_exception_p(VALUE opts, int default_value);
|
31
|
+
RUBY_SYMBOL_EXPORT_END
|
32
|
+
|
33
|
+
CONSTFUNC(VALUE rb_obj_equal(VALUE obj1, VALUE obj2));
|
34
|
+
CONSTFUNC(VALUE rb_obj_not(VALUE obj));
|
35
|
+
VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2);
|
36
|
+
void rb_obj_copy_ivar(VALUE dest, VALUE obj);
|
37
|
+
VALUE rb_false(VALUE obj);
|
38
|
+
VALUE rb_convert_type_with_id(VALUE v, int t, const char* nam, ID mid);
|
39
|
+
VALUE rb_obj_size(VALUE self, VALUE args, VALUE obj);
|
40
|
+
VALUE rb_get_freeze_opt(int argc, VALUE *argv);
|
41
|
+
|
42
|
+
static inline void
|
43
|
+
RBASIC_SET_CLASS_RAW(VALUE obj, VALUE klass)
|
44
|
+
{
|
45
|
+
const VALUE *ptr = &RBASIC(obj)->klass;
|
46
|
+
*(VALUE *)ptr = klass;
|
47
|
+
}
|
48
|
+
|
49
|
+
static inline void
|
50
|
+
RBASIC_CLEAR_CLASS(VALUE obj)
|
51
|
+
{
|
52
|
+
RBASIC_SET_CLASS_RAW(obj, 0);
|
53
|
+
}
|
54
|
+
|
55
|
+
static inline void
|
56
|
+
RBASIC_SET_CLASS(VALUE obj, VALUE klass)
|
57
|
+
{
|
58
|
+
VALUE oldv = RBASIC_CLASS(obj);
|
59
|
+
RBASIC_SET_CLASS_RAW(obj, klass);
|
60
|
+
RB_OBJ_WRITTEN(obj, oldv, klass);
|
61
|
+
}
|
62
|
+
#endif /* INTERNAL_OBJECT_H */
|
@@ -0,0 +1,108 @@
|
|
1
|
+
#ifndef INTERNAL_PARSE_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_PARSE_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 the parser.
|
10
|
+
*/
|
11
|
+
#include <limits.h>
|
12
|
+
#include "rubyparser.h"
|
13
|
+
#include "internal/static_assert.h"
|
14
|
+
|
15
|
+
#ifdef UNIVERSAL_PARSER
|
16
|
+
#define rb_encoding void
|
17
|
+
#endif
|
18
|
+
|
19
|
+
struct rb_iseq_struct; /* in vm_core.h */
|
20
|
+
|
21
|
+
#define STRTERM_HEREDOC IMEMO_FL_USER0
|
22
|
+
|
23
|
+
/* structs for managing terminator of string literal and heredocment */
|
24
|
+
typedef struct rb_strterm_literal_struct {
|
25
|
+
long nest;
|
26
|
+
int func; /* STR_FUNC_* (e.g., STR_FUNC_ESCAPE and STR_FUNC_EXPAND) */
|
27
|
+
int paren; /* '(' of `%q(...)` */
|
28
|
+
int term; /* ')' of `%q(...)` */
|
29
|
+
} rb_strterm_literal_t;
|
30
|
+
|
31
|
+
typedef struct rb_strterm_heredoc_struct {
|
32
|
+
VALUE lastline; /* the string of line that contains `<<"END"` */
|
33
|
+
long offset; /* the column of END in `<<"END"` */
|
34
|
+
int sourceline; /* lineno of the line that contains `<<"END"` */
|
35
|
+
unsigned length; /* the length of END in `<<"END"` */
|
36
|
+
uint8_t quote;
|
37
|
+
uint8_t func;
|
38
|
+
} rb_strterm_heredoc_t;
|
39
|
+
|
40
|
+
#define HERETERM_LENGTH_MAX UINT_MAX
|
41
|
+
|
42
|
+
typedef struct rb_strterm_struct {
|
43
|
+
VALUE flags;
|
44
|
+
union {
|
45
|
+
rb_strterm_literal_t literal;
|
46
|
+
rb_strterm_heredoc_t heredoc;
|
47
|
+
} u;
|
48
|
+
} rb_strterm_t;
|
49
|
+
|
50
|
+
/* parse.y */
|
51
|
+
void rb_ruby_parser_mark(void *ptr);
|
52
|
+
size_t rb_ruby_parser_memsize(const void *ptr);
|
53
|
+
|
54
|
+
void rb_ruby_parser_set_options(rb_parser_t *p, int print, int loop, int chomp, int split);
|
55
|
+
rb_parser_t *rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main);
|
56
|
+
void rb_ruby_parser_set_script_lines(rb_parser_t *p, VALUE lines_array);
|
57
|
+
void rb_ruby_parser_error_tolerant(rb_parser_t *p);
|
58
|
+
rb_ast_t* rb_ruby_parser_compile_file_path(rb_parser_t *p, VALUE fname, VALUE file, int start);
|
59
|
+
void rb_ruby_parser_keep_tokens(rb_parser_t *p);
|
60
|
+
rb_ast_t* rb_ruby_parser_compile_generic(rb_parser_t *p, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int start);
|
61
|
+
rb_ast_t* rb_ruby_parser_compile_string_path(rb_parser_t *p, VALUE f, VALUE s, int line);
|
62
|
+
|
63
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
64
|
+
|
65
|
+
VALUE rb_ruby_parser_encoding(rb_parser_t *p);
|
66
|
+
int rb_ruby_parser_end_seen_p(rb_parser_t *p);
|
67
|
+
int rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag);
|
68
|
+
|
69
|
+
RUBY_SYMBOL_EXPORT_END
|
70
|
+
|
71
|
+
int rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len, rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc);
|
72
|
+
|
73
|
+
#ifdef RIPPER
|
74
|
+
void ripper_parser_mark(void *ptr);
|
75
|
+
void ripper_parser_free(void *ptr);
|
76
|
+
size_t ripper_parser_memsize(const void *ptr);
|
77
|
+
void ripper_error(struct parser_params *p);
|
78
|
+
VALUE ripper_value(struct parser_params *p);
|
79
|
+
int rb_ruby_parser_get_yydebug(rb_parser_t *p);
|
80
|
+
void rb_ruby_parser_set_value(rb_parser_t *p, VALUE value);
|
81
|
+
int rb_ruby_parser_error_p(rb_parser_t *p);
|
82
|
+
VALUE rb_ruby_parser_debug_output(rb_parser_t *p);
|
83
|
+
void rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output);
|
84
|
+
VALUE rb_ruby_parser_parsing_thread(rb_parser_t *p);
|
85
|
+
void rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread);
|
86
|
+
void rb_ruby_parser_ripper_initialize(rb_parser_t *p, VALUE (*gets)(struct parser_params*,VALUE), VALUE input, VALUE sourcefile_string, const char *sourcefile, int sourceline);
|
87
|
+
VALUE rb_ruby_parser_result(rb_parser_t *p);
|
88
|
+
rb_encoding *rb_ruby_parser_enc(rb_parser_t *p);
|
89
|
+
VALUE rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p);
|
90
|
+
int rb_ruby_parser_ruby_sourceline(rb_parser_t *p);
|
91
|
+
int rb_ruby_parser_lex_state(rb_parser_t *p);
|
92
|
+
void rb_ruby_ripper_parse0(rb_parser_t *p);
|
93
|
+
int rb_ruby_ripper_dedent_string(rb_parser_t *p, VALUE string, int width);
|
94
|
+
VALUE rb_ruby_ripper_lex_get_str(rb_parser_t *p, VALUE s);
|
95
|
+
int rb_ruby_ripper_initialized_p(rb_parser_t *p);
|
96
|
+
void rb_ruby_ripper_parser_initialize(rb_parser_t *p);
|
97
|
+
long rb_ruby_ripper_column(rb_parser_t *p);
|
98
|
+
long rb_ruby_ripper_token_len(rb_parser_t *p);
|
99
|
+
VALUE rb_ruby_ripper_lex_lastline(rb_parser_t *p);
|
100
|
+
VALUE rb_ruby_ripper_lex_state_name(struct parser_params *p, int state);
|
101
|
+
struct parser_params *rb_ruby_ripper_parser_allocate(void);
|
102
|
+
#endif
|
103
|
+
|
104
|
+
#ifdef UNIVERSAL_PARSER
|
105
|
+
#undef rb_encoding
|
106
|
+
#endif
|
107
|
+
|
108
|
+
#endif /* INTERNAL_PARSE_H */
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#ifndef INTERNAL_PROC_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_PROC_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 Proc.
|
10
|
+
*/
|
11
|
+
#include "ruby/ruby.h" /* for rb_block_call_func_t */
|
12
|
+
#include "ruby/st.h" /* for st_index_t */
|
13
|
+
struct rb_block; /* in vm_core.h */
|
14
|
+
struct rb_iseq_struct; /* in vm_core.h */
|
15
|
+
|
16
|
+
/* proc.c */
|
17
|
+
VALUE rb_proc_location(VALUE self);
|
18
|
+
st_index_t rb_hash_proc(st_index_t hash, VALUE proc);
|
19
|
+
int rb_block_pair_yield_optimizable(void);
|
20
|
+
int rb_block_arity(void);
|
21
|
+
int rb_block_min_max_arity(int *max);
|
22
|
+
VALUE rb_block_to_s(VALUE self, const struct rb_block *block, const char *additional_info);
|
23
|
+
VALUE rb_callable_receiver(VALUE);
|
24
|
+
|
25
|
+
VALUE rb_func_proc_new(rb_block_call_func_t func, VALUE val);
|
26
|
+
VALUE rb_func_lambda_new(rb_block_call_func_t func, VALUE val, int min_argc, int max_argc);
|
27
|
+
VALUE rb_iseq_location(const struct rb_iseq_struct *iseq);
|
28
|
+
VALUE rb_sym_to_proc(VALUE sym);
|
29
|
+
|
30
|
+
#endif /* INTERNAL_PROC_H */
|
@@ -0,0 +1,124 @@
|
|
1
|
+
#ifndef INTERNAL_PROCESS_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_PROCESS_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 Process.
|
10
|
+
*/
|
11
|
+
#include "ruby/internal/config.h" /* for rb_pid_t */
|
12
|
+
#include <stddef.h> /* for size_t */
|
13
|
+
|
14
|
+
#ifdef HAVE_SYS_TYPES_H
|
15
|
+
# include <sys/types.h> /* for mode_t */
|
16
|
+
#endif
|
17
|
+
|
18
|
+
#ifdef _WIN32
|
19
|
+
# include "ruby/win32.h" /* for mode_t */
|
20
|
+
#endif
|
21
|
+
|
22
|
+
#include "ruby/ruby.h" /* for VALUE */
|
23
|
+
#include "internal/compilers.h" /* for __has_warning */
|
24
|
+
#include "internal/imemo.h" /* for RB_IMEMO_TMPBUF_PTR */
|
25
|
+
|
26
|
+
#define RB_MAX_GROUPS (65536)
|
27
|
+
|
28
|
+
struct waitpid_state;
|
29
|
+
struct rb_process_status;
|
30
|
+
struct rb_execarg {
|
31
|
+
union {
|
32
|
+
struct {
|
33
|
+
VALUE shell_script;
|
34
|
+
} sh;
|
35
|
+
struct {
|
36
|
+
VALUE command_name;
|
37
|
+
VALUE command_abspath; /* full path string or nil */
|
38
|
+
VALUE argv_str;
|
39
|
+
VALUE argv_buf;
|
40
|
+
} cmd;
|
41
|
+
} invoke;
|
42
|
+
VALUE redirect_fds;
|
43
|
+
VALUE envp_str;
|
44
|
+
VALUE envp_buf;
|
45
|
+
VALUE dup2_tmpbuf;
|
46
|
+
unsigned use_shell : 1;
|
47
|
+
unsigned pgroup_given : 1;
|
48
|
+
unsigned umask_given : 1;
|
49
|
+
unsigned unsetenv_others_given : 1;
|
50
|
+
unsigned unsetenv_others_do : 1;
|
51
|
+
unsigned close_others_given : 1;
|
52
|
+
unsigned close_others_do : 1;
|
53
|
+
unsigned chdir_given : 1;
|
54
|
+
unsigned new_pgroup_given : 1;
|
55
|
+
unsigned new_pgroup_flag : 1;
|
56
|
+
unsigned uid_given : 1;
|
57
|
+
unsigned gid_given : 1;
|
58
|
+
unsigned exception : 1;
|
59
|
+
unsigned exception_given : 1;
|
60
|
+
struct rb_process_status *status;
|
61
|
+
struct waitpid_state *waitpid_state; /* for async process management */
|
62
|
+
rb_pid_t pgroup_pgid; /* asis(-1), new pgroup(0), specified pgroup (0<V). */
|
63
|
+
VALUE rlimit_limits; /* Qfalse or [[rtype, softlim, hardlim], ...] */
|
64
|
+
mode_t umask_mask;
|
65
|
+
rb_uid_t uid;
|
66
|
+
rb_gid_t gid;
|
67
|
+
int close_others_maxhint;
|
68
|
+
VALUE fd_dup2;
|
69
|
+
VALUE fd_close;
|
70
|
+
VALUE fd_open;
|
71
|
+
VALUE fd_dup2_child;
|
72
|
+
VALUE env_modification; /* Qfalse or [[k1,v1], ...] */
|
73
|
+
VALUE path_env;
|
74
|
+
VALUE chdir_dir;
|
75
|
+
};
|
76
|
+
|
77
|
+
/* process.c */
|
78
|
+
rb_pid_t rb_call_proc__fork(void);
|
79
|
+
void rb_last_status_clear(void);
|
80
|
+
static inline char **ARGVSTR2ARGV(VALUE argv_str);
|
81
|
+
static inline size_t ARGVSTR2ARGC(VALUE argv_str);
|
82
|
+
|
83
|
+
#ifdef HAVE_PWD_H
|
84
|
+
VALUE rb_getlogin(void);
|
85
|
+
VALUE rb_getpwdirnam_for_login(VALUE login); /* read as: "get pwd db home dir by username for login" */
|
86
|
+
VALUE rb_getpwdiruid(void); /* read as: "get pwd db home dir for getuid()" */
|
87
|
+
#endif
|
88
|
+
|
89
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
90
|
+
/* process.c (export) */
|
91
|
+
int rb_exec_async_signal_safe(const struct rb_execarg *e, char *errmsg, size_t errmsg_buflen);
|
92
|
+
rb_pid_t rb_fork_async_signal_safe(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALUE fds, char *errmsg, size_t errmsg_buflen);
|
93
|
+
VALUE rb_execarg_new(int argc, const VALUE *argv, int accept_shell, int allow_exc_opt);
|
94
|
+
struct rb_execarg *rb_execarg_get(VALUE execarg_obj); /* dangerous. needs GC guard. */
|
95
|
+
int rb_execarg_addopt(VALUE execarg_obj, VALUE key, VALUE val);
|
96
|
+
void rb_execarg_parent_start(VALUE execarg_obj);
|
97
|
+
void rb_execarg_parent_end(VALUE execarg_obj);
|
98
|
+
int rb_execarg_run_options(const struct rb_execarg *e, struct rb_execarg *s, char* errmsg, size_t errmsg_buflen);
|
99
|
+
VALUE rb_execarg_extract_options(VALUE execarg_obj, VALUE opthash);
|
100
|
+
void rb_execarg_setenv(VALUE execarg_obj, VALUE env);
|
101
|
+
RUBY_SYMBOL_EXPORT_END
|
102
|
+
|
103
|
+
/* argv_str contains extra two elements.
|
104
|
+
* The beginning one is for /bin/sh used by exec_with_sh.
|
105
|
+
* The last one for terminating NULL used by execve.
|
106
|
+
* See rb_exec_fillarg() in process.c. */
|
107
|
+
static inline char **
|
108
|
+
ARGVSTR2ARGV(VALUE argv_str)
|
109
|
+
{
|
110
|
+
char **buf = RB_IMEMO_TMPBUF_PTR(argv_str);
|
111
|
+
return &buf[1];
|
112
|
+
}
|
113
|
+
|
114
|
+
static inline size_t
|
115
|
+
ARGVSTR2ARGC(VALUE argv_str)
|
116
|
+
{
|
117
|
+
size_t i = 0;
|
118
|
+
char *const *p = ARGVSTR2ARGV(argv_str);
|
119
|
+
while (p[i++])
|
120
|
+
;
|
121
|
+
return i - 1;
|
122
|
+
}
|
123
|
+
|
124
|
+
#endif /* INTERNAL_PROCESS_H */
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#ifndef INTERNAL_RANDOM_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_RANDOM_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 Random.
|
10
|
+
*/
|
11
|
+
#include <stddef.h> /* for size_t */
|
12
|
+
|
13
|
+
/* random.c */
|
14
|
+
int ruby_fill_random_bytes(void *, size_t, int);
|
15
|
+
void rb_free_default_rand_key(void);
|
16
|
+
|
17
|
+
#endif /* INTERNAL_RANDOM_H */
|
@@ -0,0 +1,40 @@
|
|
1
|
+
#ifndef INTERNAL_RANGE_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define INTERNAL_RANGE_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 Range.
|
10
|
+
*/
|
11
|
+
#include "internal/struct.h" /* for RSTRUCT */
|
12
|
+
|
13
|
+
/* range.c */
|
14
|
+
static inline VALUE RANGE_BEG(VALUE r);
|
15
|
+
static inline VALUE RANGE_END(VALUE r);
|
16
|
+
static inline VALUE RANGE_EXCL(VALUE r);
|
17
|
+
|
18
|
+
static inline VALUE
|
19
|
+
RANGE_BEG(VALUE r)
|
20
|
+
{
|
21
|
+
return RSTRUCT(r)->as.ary[0];
|
22
|
+
}
|
23
|
+
|
24
|
+
static inline VALUE
|
25
|
+
RANGE_END(VALUE r)
|
26
|
+
{
|
27
|
+
return RSTRUCT_GET(r, 1);
|
28
|
+
}
|
29
|
+
|
30
|
+
static inline VALUE
|
31
|
+
RANGE_EXCL(VALUE r)
|
32
|
+
{
|
33
|
+
return RSTRUCT_GET(r, 2);
|
34
|
+
}
|
35
|
+
|
36
|
+
VALUE
|
37
|
+
rb_range_component_beg_len(VALUE b, VALUE e, int excl,
|
38
|
+
long *begp, long *lenp, long len, int err);
|
39
|
+
|
40
|
+
#endif /* INTERNAL_RANGE_H */
|