debase-ruby_core_source 0.10.9 → 0.10.13
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/README.md +1 -1
- data/Rakefile +6 -3
- data/debase-ruby_core_source.gemspec +2 -1
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/addr2line.h +2 -3
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/builtin.h +17 -2
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/ccan/build_assert/build_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/ccan/check_type/check_type.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/ccan/container_of/container_of.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/ccan/list/list.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/ccan/str/str.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/constant.h +10 -5
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/debug_counter.h +127 -48
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/dln.h +3 -18
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/encindex.h +3 -2
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/eval_intern.h +16 -7
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/gc.h +13 -2
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/hrtime.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/id.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/id_table.h +2 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/insns.inc +0 -4
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/insns_info.inc +323 -536
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/array.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/bignum.h +246 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/bits.h +566 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/class.h +174 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compar.h +50 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compile.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compilers.h +108 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/cont.h +25 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/dir.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enc.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/encoding.h +28 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enum.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enumerator.h +22 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/error.h +124 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/eval.h +33 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/file.h +39 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/fixnum.h +185 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/gc.h +161 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/hash.h +241 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/imemo.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/inits.h +51 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/io.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/load.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/loadpath.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/math.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/missing.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/numeric.h +255 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/object.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/parse.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/proc.h +33 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/process.h +136 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/random.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/range.h +41 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/rational.h +71 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/re.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/sanitizers.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/scheduler.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/serial.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/signal.h +22 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/static_assert.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/string.h +140 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/struct.h +154 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/symbol.h +41 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/thread.h +54 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/time.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/transcode.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/util.h +31 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/variable.h +84 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/vm.h +136 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/warnings.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal.h +107 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/iseq.h +11 -18
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/known_errors.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/method.h +21 -8
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/mjit.h +89 -48
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/mjit_compile.inc +2746 -2288
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/node.h +32 -24
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/node_name.inc +2 -2
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/opt_sc.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/optinsn.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/optunifs.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/parse.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/probes_helper.h +2 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ractor_core.h +343 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/regenc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/regint.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/regparse.h +0 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/revision.h +2 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ruby_assert.h +15 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ruby_atomic.h +23 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/siphash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/symbol.h +4 -4
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/thread_pthread.h +45 -5
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/thread_win32.h +28 -3
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/timev.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/transcode_data.h +2 -3
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/transient_heap.h +6 -3
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/variable.h +22 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/version.h +23 -11
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/vm.inc +707 -671
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/vm_call_iseq_optimized.inc +93 -86
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_callinfo.h +456 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/vm_core.h +262 -194
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_debug.h +116 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/vm_exec.h +9 -6
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/vm_insnhelper.h +28 -26
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/vm_opts.h +6 -5
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_sync.h +136 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/vmtc.inc +0 -4
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/addr2line.h +2 -3
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/builtin.h +83 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/ccan/build_assert/build_assert.h +13 -13
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/ccan/check_type/check_type.h +17 -17
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/ccan/container_of/container_of.h +63 -63
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/ccan/list/list.h +262 -262
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/ccan/str/str.h +4 -4
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/constant.h +10 -9
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/darray.h +198 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/debug_counter.h +137 -48
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/dln.h +3 -23
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/encindex.h +3 -2
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/eval_intern.h +34 -41
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/gc.h +24 -11
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/hrtime.h +9 -9
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/id.h +4 -3
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/id_table.h +3 -1
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/insns.inc +6 -8
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/insns_info.inc +1907 -2543
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/array.h +113 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/bignum.h +246 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/bits.h +565 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/class.h +188 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/compar.h +49 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/compile.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/compilers.h +107 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/cont.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/dir.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/enc.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/encoding.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/enum.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/enumerator.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/error.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/eval.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/file.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/fixnum.h +184 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/gc.h +175 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/hash.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/imemo.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/inits.h +50 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/io.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/load.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/loadpath.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/math.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/missing.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/numeric.h +271 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/object.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/parse.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/proc.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/process.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/random.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/range.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/rational.h +72 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/re.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/sanitizers.h +190 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/serial.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/signal.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/static_assert.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/string.h +141 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/struct.h +153 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/symbol.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/thread.h +53 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/time.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/transcode.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/util.h +27 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/variable.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/vm.h +132 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/warnings.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal.h +109 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/iseq.h +44 -35
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/known_errors.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/method.h +21 -4
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/mjit.h +231 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/mjit_compile.inc +3322 -2940
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/node.h +39 -23
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/node_name.inc +210 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/opt_sc.inc +0 -2
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/optinsn.inc +7 -7
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/optunifs.inc +1 -1
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/parse.h +9 -5
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/probes_helper.h +9 -7
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/ractor_core.h +346 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/regenc.h +8 -8
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/regint.h +16 -12
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/regparse.h +2 -2
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/revision.h +2 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/ruby_assert.h +14 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/ruby_atomic.h +23 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/siphash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/symbol.h +14 -14
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/thread_pthread.h +45 -5
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/thread_win32.h +30 -5
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/timev.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/transcode_data.h +49 -50
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/transient_heap.h +6 -3
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/variable.h +21 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/version.h +15 -4
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/vm.inc +1033 -887
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_call_iseq_optimized.inc +244 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_callinfo.h +454 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/vm_core.h +508 -362
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_debug.h +119 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/vm_exec.h +22 -18
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/vm_insnhelper.h +42 -32
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/vm_opts.h +8 -5
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_sync.h +137 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/vmtc.inc +6 -8
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit_asm.h +392 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit_codegen.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit_core.h +302 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit_iface.h +38 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- data/lib/debase/ruby_core_source.rb +0 -2
- metadata +240 -110
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/internal.h +0 -2682
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/revision.h +0 -2
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/ruby_assert.h +0 -15
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/ruby_atomic.h +0 -244
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/vm_call_iseq_optimized.inc +0 -237
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/vm_debug.h +0 -34
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/internal.h +0 -2657
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/mjit.h +0 -175
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/node_name.inc +0 -208
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/revision.h +0 -2
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/ruby_assert.h +0 -15
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/ruby_atomic.h +0 -244
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/vm_debug.h +0 -34
data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/ccan/list/list.h
RENAMED
@@ -13,15 +13,15 @@
|
|
13
13
|
*
|
14
14
|
* This is used as an entry in a linked list.
|
15
15
|
* Example:
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
16
|
+
* struct child {
|
17
|
+
* const char *name;
|
18
|
+
* // Linked list of all us children.
|
19
|
+
* struct list_node list;
|
20
|
+
* };
|
21
21
|
*/
|
22
22
|
struct list_node
|
23
23
|
{
|
24
|
-
|
24
|
+
struct list_node *next, *prev;
|
25
25
|
};
|
26
26
|
|
27
27
|
/**
|
@@ -30,15 +30,15 @@ struct list_node
|
|
30
30
|
*
|
31
31
|
* This is used as the head of a linked list.
|
32
32
|
* Example:
|
33
|
-
*
|
34
|
-
*
|
35
|
-
*
|
36
|
-
*
|
37
|
-
*
|
33
|
+
* struct parent {
|
34
|
+
* const char *name;
|
35
|
+
* struct list_head children;
|
36
|
+
* unsigned int num_children;
|
37
|
+
* };
|
38
38
|
*/
|
39
39
|
struct list_head
|
40
40
|
{
|
41
|
-
|
41
|
+
struct list_node n;
|
42
42
|
};
|
43
43
|
|
44
44
|
#define LIST_LOC __FILE__ ":" stringify(__LINE__)
|
@@ -52,10 +52,10 @@ struct list_head
|
|
52
52
|
* Explicit initializer for an empty list.
|
53
53
|
*
|
54
54
|
* See also:
|
55
|
-
*
|
55
|
+
* LIST_HEAD, list_head_init()
|
56
56
|
*
|
57
57
|
* Example:
|
58
|
-
*
|
58
|
+
* static struct list_head my_list = LIST_HEAD_INIT(my_list);
|
59
59
|
*/
|
60
60
|
#define LIST_HEAD_INIT(name) { { &(name).n, &(name).n } }
|
61
61
|
|
@@ -67,28 +67,28 @@ struct list_head
|
|
67
67
|
* list. It can be prepended by "static" to define a static list_head.
|
68
68
|
*
|
69
69
|
* See also:
|
70
|
-
*
|
70
|
+
* LIST_HEAD_INIT, list_head_init()
|
71
71
|
*
|
72
72
|
* Example:
|
73
|
-
*
|
73
|
+
* static LIST_HEAD(my_global_list);
|
74
74
|
*/
|
75
75
|
#define LIST_HEAD(name) \
|
76
|
-
|
76
|
+
struct list_head name = LIST_HEAD_INIT(name)
|
77
77
|
|
78
78
|
/**
|
79
79
|
* list_head_init - initialize a list_head
|
80
80
|
* @h: the list_head to set to the empty list
|
81
81
|
*
|
82
82
|
* Example:
|
83
|
-
*
|
84
|
-
*
|
83
|
+
* ...
|
84
|
+
* struct parent *parent = malloc(sizeof(*parent));
|
85
85
|
*
|
86
|
-
*
|
87
|
-
*
|
86
|
+
* list_head_init(&parent->children);
|
87
|
+
* parent->num_children = 0;
|
88
88
|
*/
|
89
89
|
static inline void list_head_init(struct list_head *h)
|
90
90
|
{
|
91
|
-
|
91
|
+
h->n.next = h->n.prev = &h->n;
|
92
92
|
}
|
93
93
|
|
94
94
|
/**
|
@@ -100,7 +100,7 @@ static inline void list_head_init(struct list_head *h)
|
|
100
100
|
*/
|
101
101
|
static inline void list_node_init(struct list_node *n)
|
102
102
|
{
|
103
|
-
|
103
|
+
n->next = n->prev = n;
|
104
104
|
}
|
105
105
|
|
106
106
|
/**
|
@@ -113,24 +113,24 @@ static inline void list_node_init(struct list_node *n)
|
|
113
113
|
* The new list_node does not need to be initialized; it will be overwritten.
|
114
114
|
*
|
115
115
|
* Example:
|
116
|
-
*
|
117
|
-
*
|
116
|
+
* struct child c1, c2, c3;
|
117
|
+
* LIST_HEAD(h);
|
118
118
|
*
|
119
|
-
*
|
120
|
-
*
|
121
|
-
*
|
119
|
+
* list_add_tail(&h, &c1.list);
|
120
|
+
* list_add_tail(&h, &c3.list);
|
121
|
+
* list_add_after(&h, &c1.list, &c2.list);
|
122
122
|
*/
|
123
123
|
#define list_add_after(h, p, n) list_add_after_(h, p, n, LIST_LOC)
|
124
124
|
static inline void list_add_after_(struct list_head *h,
|
125
|
-
|
126
|
-
|
127
|
-
|
125
|
+
struct list_node *p,
|
126
|
+
struct list_node *n,
|
127
|
+
const char *abortstr)
|
128
128
|
{
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
129
|
+
n->next = p->next;
|
130
|
+
n->prev = p;
|
131
|
+
p->next->prev = n;
|
132
|
+
p->next = n;
|
133
|
+
(void)list_debug(h, abortstr);
|
134
134
|
}
|
135
135
|
|
136
136
|
/**
|
@@ -140,18 +140,18 @@ static inline void list_add_after_(struct list_head *h,
|
|
140
140
|
*
|
141
141
|
* The list_node does not need to be initialized; it will be overwritten.
|
142
142
|
* Example:
|
143
|
-
*
|
143
|
+
* struct child *child = malloc(sizeof(*child));
|
144
144
|
*
|
145
|
-
*
|
146
|
-
*
|
147
|
-
*
|
145
|
+
* child->name = "marvin";
|
146
|
+
* list_add(&parent->children, &child->list);
|
147
|
+
* parent->num_children++;
|
148
148
|
*/
|
149
149
|
#define list_add(h, n) list_add_(h, n, LIST_LOC)
|
150
150
|
static inline void list_add_(struct list_head *h,
|
151
|
-
|
152
|
-
|
151
|
+
struct list_node *n,
|
152
|
+
const char *abortstr)
|
153
153
|
{
|
154
|
-
|
154
|
+
list_add_after_(h, &h->n, n, abortstr);
|
155
155
|
}
|
156
156
|
|
157
157
|
/**
|
@@ -164,22 +164,22 @@ static inline void list_add_(struct list_head *h,
|
|
164
164
|
* The new list_node does not need to be initialized; it will be overwritten.
|
165
165
|
*
|
166
166
|
* Example:
|
167
|
-
*
|
168
|
-
*
|
169
|
-
*
|
170
|
-
*
|
167
|
+
* list_head_init(&h);
|
168
|
+
* list_add_tail(&h, &c1.list);
|
169
|
+
* list_add_tail(&h, &c3.list);
|
170
|
+
* list_add_before(&h, &c3.list, &c2.list);
|
171
171
|
*/
|
172
172
|
#define list_add_before(h, p, n) list_add_before_(h, p, n, LIST_LOC)
|
173
173
|
static inline void list_add_before_(struct list_head *h,
|
174
|
-
|
175
|
-
|
176
|
-
|
174
|
+
struct list_node *p,
|
175
|
+
struct list_node *n,
|
176
|
+
const char *abortstr)
|
177
177
|
{
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
178
|
+
n->next = p;
|
179
|
+
n->prev = p->prev;
|
180
|
+
p->prev->next = n;
|
181
|
+
p->prev = n;
|
182
|
+
(void)list_debug(h, abortstr);
|
183
183
|
}
|
184
184
|
|
185
185
|
/**
|
@@ -189,15 +189,15 @@ static inline void list_add_before_(struct list_head *h,
|
|
189
189
|
*
|
190
190
|
* The list_node does not need to be initialized; it will be overwritten.
|
191
191
|
* Example:
|
192
|
-
*
|
193
|
-
*
|
192
|
+
* list_add_tail(&parent->children, &child->list);
|
193
|
+
* parent->num_children++;
|
194
194
|
*/
|
195
195
|
#define list_add_tail(h, n) list_add_tail_(h, n, LIST_LOC)
|
196
196
|
static inline void list_add_tail_(struct list_head *h,
|
197
|
-
|
198
|
-
|
197
|
+
struct list_node *n,
|
198
|
+
const char *abortstr)
|
199
199
|
{
|
200
|
-
|
200
|
+
list_add_before_(h, &h->n, n, abortstr);
|
201
201
|
}
|
202
202
|
|
203
203
|
/**
|
@@ -207,13 +207,13 @@ static inline void list_add_tail_(struct list_head *h,
|
|
207
207
|
* If the list is empty, returns true.
|
208
208
|
*
|
209
209
|
* Example:
|
210
|
-
*
|
210
|
+
* assert(list_empty(&parent->children) == (parent->num_children == 0));
|
211
211
|
*/
|
212
212
|
#define list_empty(h) list_empty_(h, LIST_LOC)
|
213
213
|
static inline int list_empty_(const struct list_head *h, const char* abortstr)
|
214
214
|
{
|
215
|
-
|
216
|
-
|
215
|
+
(void)list_debug(h, abortstr);
|
216
|
+
return h->n.next == &h->n;
|
217
217
|
}
|
218
218
|
|
219
219
|
/**
|
@@ -226,14 +226,14 @@ static inline int list_empty_(const struct list_head *h, const char* abortstr)
|
|
226
226
|
* know what you're doing.
|
227
227
|
*
|
228
228
|
* Example:
|
229
|
-
*
|
229
|
+
* assert(list_empty_nodebug(&parent->children) == (parent->num_children == 0));
|
230
230
|
*/
|
231
231
|
#ifndef CCAN_LIST_DEBUG
|
232
232
|
#define list_empty_nodebug(h) list_empty(h)
|
233
233
|
#else
|
234
234
|
static inline int list_empty_nodebug(const struct list_head *h)
|
235
235
|
{
|
236
|
-
|
236
|
+
return h->n.next == &h->n;
|
237
237
|
}
|
238
238
|
#endif
|
239
239
|
|
@@ -249,7 +249,7 @@ static inline int list_empty_nodebug(const struct list_head *h)
|
|
249
249
|
*/
|
250
250
|
static inline bool list_empty_nocheck(const struct list_head *h)
|
251
251
|
{
|
252
|
-
|
252
|
+
return h->n.next == &h->n;
|
253
253
|
}
|
254
254
|
|
255
255
|
/**
|
@@ -260,21 +260,21 @@ static inline bool list_empty_nocheck(const struct list_head *h)
|
|
260
260
|
* another list, but not deleted again.
|
261
261
|
*
|
262
262
|
* See also:
|
263
|
-
*
|
263
|
+
* list_del_from(), list_del_init()
|
264
264
|
*
|
265
265
|
* Example:
|
266
|
-
*
|
267
|
-
*
|
266
|
+
* list_del(&child->list);
|
267
|
+
* parent->num_children--;
|
268
268
|
*/
|
269
269
|
#define list_del(n) list_del_(n, LIST_LOC)
|
270
270
|
static inline void list_del_(struct list_node *n, const char* abortstr)
|
271
271
|
{
|
272
|
-
|
273
|
-
|
274
|
-
|
272
|
+
(void)list_debug_node(n, abortstr);
|
273
|
+
n->next->prev = n->prev;
|
274
|
+
n->prev->next = n->next;
|
275
275
|
#ifdef CCAN_LIST_DEBUG
|
276
|
-
|
277
|
-
|
276
|
+
/* Catch use-after-del. */
|
277
|
+
n->next = n->prev = NULL;
|
278
278
|
#endif
|
279
279
|
}
|
280
280
|
|
@@ -286,17 +286,17 @@ static inline void list_del_(struct list_node *n, const char* abortstr)
|
|
286
286
|
* which can be useful in some cases.
|
287
287
|
*
|
288
288
|
* See also:
|
289
|
-
*
|
289
|
+
* list_del_from(), list_del()
|
290
290
|
*
|
291
291
|
* Example:
|
292
|
-
*
|
293
|
-
*
|
292
|
+
* list_del_init(&child->list);
|
293
|
+
* parent->num_children--;
|
294
294
|
*/
|
295
295
|
#define list_del_init(n) list_del_init_(n, LIST_LOC)
|
296
296
|
static inline void list_del_init_(struct list_node *n, const char *abortstr)
|
297
297
|
{
|
298
|
-
|
299
|
-
|
298
|
+
list_del_(n, abortstr);
|
299
|
+
list_node_init(n);
|
300
300
|
}
|
301
301
|
|
302
302
|
/**
|
@@ -310,23 +310,23 @@ static inline void list_del_init_(struct list_node *n, const char *abortstr)
|
|
310
310
|
* See also: list_del()
|
311
311
|
*
|
312
312
|
* Example:
|
313
|
-
*
|
314
|
-
*
|
313
|
+
* list_del_from(&parent->children, &child->list);
|
314
|
+
* parent->num_children--;
|
315
315
|
*/
|
316
316
|
static inline void list_del_from(struct list_head *h, struct list_node *n)
|
317
317
|
{
|
318
318
|
#ifdef CCAN_LIST_DEBUG
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
319
|
+
{
|
320
|
+
/* Thorough check: make sure it was in list! */
|
321
|
+
struct list_node *i;
|
322
|
+
for (i = h->n.next; i != n; i = i->next)
|
323
|
+
assert(i != &h->n);
|
324
|
+
}
|
325
325
|
#endif /* CCAN_LIST_DEBUG */
|
326
326
|
|
327
|
-
|
328
|
-
|
329
|
-
|
327
|
+
/* Quick test that catches a surprising number of bugs. */
|
328
|
+
assert(!list_empty(h));
|
329
|
+
list_del(n);
|
330
330
|
}
|
331
331
|
|
332
332
|
/**
|
@@ -338,27 +338,27 @@ static inline void list_del_from(struct list_head *h, struct list_node *n)
|
|
338
338
|
* another list, but not deleted/swapped again.
|
339
339
|
*
|
340
340
|
* See also:
|
341
|
-
*
|
341
|
+
* list_del()
|
342
342
|
*
|
343
343
|
* Example:
|
344
|
-
*
|
345
|
-
*
|
344
|
+
* struct child x1, x2;
|
345
|
+
* LIST_HEAD(xh);
|
346
346
|
*
|
347
|
-
*
|
348
|
-
*
|
347
|
+
* list_add(&xh, &x1.list);
|
348
|
+
* list_swap(&x1.list, &x2.list);
|
349
349
|
*/
|
350
350
|
#define list_swap(o, n) list_swap_(o, n, LIST_LOC)
|
351
351
|
static inline void list_swap_(struct list_node *o,
|
352
|
-
|
353
|
-
|
352
|
+
struct list_node *n,
|
353
|
+
const char* abortstr)
|
354
354
|
{
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
355
|
+
(void)list_debug_node(o, abortstr);
|
356
|
+
*n = *o;
|
357
|
+
n->next->prev = n;
|
358
|
+
n->prev->next = n;
|
359
359
|
#ifdef CCAN_LIST_DEBUG
|
360
|
-
|
361
|
-
|
360
|
+
/* Catch use-after-del. */
|
361
|
+
o->next = o->prev = NULL;
|
362
362
|
#endif
|
363
363
|
}
|
364
364
|
|
@@ -369,11 +369,11 @@ static inline void list_swap_(struct list_node *o,
|
|
369
369
|
* @member: the list_node member of the type
|
370
370
|
*
|
371
371
|
* Example:
|
372
|
-
*
|
373
|
-
*
|
372
|
+
* // First list entry is children.next; convert back to child.
|
373
|
+
* child = list_entry(parent->children.n.next, struct child, list);
|
374
374
|
*
|
375
375
|
* See Also:
|
376
|
-
*
|
376
|
+
* list_top(), list_for_each()
|
377
377
|
*/
|
378
378
|
#define list_entry(n, type, member) container_of(n, type, member)
|
379
379
|
|
@@ -386,19 +386,19 @@ static inline void list_swap_(struct list_node *o,
|
|
386
386
|
* If the list is empty, returns NULL.
|
387
387
|
*
|
388
388
|
* Example:
|
389
|
-
*
|
390
|
-
*
|
391
|
-
*
|
392
|
-
*
|
389
|
+
* struct child *first;
|
390
|
+
* first = list_top(&parent->children, struct child, list);
|
391
|
+
* if (!first)
|
392
|
+
* printf("Empty list!\n");
|
393
393
|
*/
|
394
|
-
#define list_top(h, type, member)
|
395
|
-
|
394
|
+
#define list_top(h, type, member) \
|
395
|
+
((type *)list_top_((h), list_off_(type, member)))
|
396
396
|
|
397
397
|
static inline const void *list_top_(const struct list_head *h, size_t off)
|
398
398
|
{
|
399
|
-
|
400
|
-
|
401
|
-
|
399
|
+
if (list_empty(h))
|
400
|
+
return NULL;
|
401
|
+
return (const char *)h->n.next - off;
|
402
402
|
}
|
403
403
|
|
404
404
|
/**
|
@@ -410,23 +410,23 @@ static inline const void *list_top_(const struct list_head *h, size_t off)
|
|
410
410
|
* If the list is empty, returns NULL.
|
411
411
|
*
|
412
412
|
* Example:
|
413
|
-
*
|
414
|
-
*
|
415
|
-
*
|
416
|
-
*
|
413
|
+
* struct child *one;
|
414
|
+
* one = list_pop(&parent->children, struct child, list);
|
415
|
+
* if (!one)
|
416
|
+
* printf("Empty list!\n");
|
417
417
|
*/
|
418
|
-
#define list_pop(h, type, member)
|
419
|
-
|
418
|
+
#define list_pop(h, type, member) \
|
419
|
+
((type *)list_pop_((h), list_off_(type, member)))
|
420
420
|
|
421
421
|
static inline const void *list_pop_(const struct list_head *h, size_t off)
|
422
422
|
{
|
423
|
-
|
423
|
+
struct list_node *n;
|
424
424
|
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
425
|
+
if (list_empty(h))
|
426
|
+
return NULL;
|
427
|
+
n = h->n.next;
|
428
|
+
list_del(n);
|
429
|
+
return (const char *)n - off;
|
430
430
|
}
|
431
431
|
|
432
432
|
/**
|
@@ -438,19 +438,19 @@ static inline const void *list_pop_(const struct list_head *h, size_t off)
|
|
438
438
|
* If the list is empty, returns NULL.
|
439
439
|
*
|
440
440
|
* Example:
|
441
|
-
*
|
442
|
-
*
|
443
|
-
*
|
444
|
-
*
|
441
|
+
* struct child *last;
|
442
|
+
* last = list_tail(&parent->children, struct child, list);
|
443
|
+
* if (!last)
|
444
|
+
* printf("Empty list!\n");
|
445
445
|
*/
|
446
446
|
#define list_tail(h, type, member) \
|
447
|
-
|
447
|
+
((type *)list_tail_((h), list_off_(type, member)))
|
448
448
|
|
449
449
|
static inline const void *list_tail_(const struct list_head *h, size_t off)
|
450
450
|
{
|
451
|
-
|
452
|
-
|
453
|
-
|
451
|
+
if (list_empty(h))
|
452
|
+
return NULL;
|
453
|
+
return (const char *)h->n.prev - off;
|
454
454
|
}
|
455
455
|
|
456
456
|
/**
|
@@ -463,11 +463,11 @@ static inline const void *list_tail_(const struct list_head *h, size_t off)
|
|
463
463
|
* a for loop, so you can break and continue as normal.
|
464
464
|
*
|
465
465
|
* Example:
|
466
|
-
*
|
467
|
-
*
|
466
|
+
* list_for_each(&parent->children, child, list)
|
467
|
+
* printf("Name: %s\n", child->name);
|
468
468
|
*/
|
469
|
-
#define list_for_each(h, i, member)
|
470
|
-
|
469
|
+
#define list_for_each(h, i, member) \
|
470
|
+
list_for_each_off(h, i, list_off_var_(i, member))
|
471
471
|
|
472
472
|
/**
|
473
473
|
* list_for_each_rev - iterate through a list backwards.
|
@@ -479,11 +479,11 @@ static inline const void *list_tail_(const struct list_head *h, size_t off)
|
|
479
479
|
* a for loop, so you can break and continue as normal.
|
480
480
|
*
|
481
481
|
* Example:
|
482
|
-
*
|
483
|
-
*
|
482
|
+
* list_for_each_rev(&parent->children, child, list)
|
483
|
+
* printf("Name: %s\n", child->name);
|
484
484
|
*/
|
485
|
-
#define list_for_each_rev(h, i, member)
|
486
|
-
|
485
|
+
#define list_for_each_rev(h, i, member) \
|
486
|
+
list_for_each_rev_off(h, i, list_off_var_(i, member))
|
487
487
|
|
488
488
|
/**
|
489
489
|
* list_for_each_rev_safe - iterate through a list backwards,
|
@@ -499,13 +499,13 @@ static inline const void *list_tail_(const struct list_head *h, size_t off)
|
|
499
499
|
* from the list.
|
500
500
|
*
|
501
501
|
* Example:
|
502
|
-
*
|
503
|
-
*
|
504
|
-
*
|
505
|
-
*
|
502
|
+
* struct child *next;
|
503
|
+
* list_for_each_rev_safe(&parent->children, child, next, list) {
|
504
|
+
* printf("Name: %s\n", child->name);
|
505
|
+
* }
|
506
506
|
*/
|
507
|
-
#define list_for_each_rev_safe(h, i, nxt, member)
|
508
|
-
|
507
|
+
#define list_for_each_rev_safe(h, i, nxt, member) \
|
508
|
+
list_for_each_rev_safe_off(h, i, nxt, list_off_var_(i, member))
|
509
509
|
|
510
510
|
/**
|
511
511
|
* list_for_each_safe - iterate through a list, maybe during deletion
|
@@ -519,13 +519,13 @@ static inline const void *list_tail_(const struct list_head *h, size_t off)
|
|
519
519
|
* @nxt is used to hold the next element, so you can delete @i from the list.
|
520
520
|
*
|
521
521
|
* Example:
|
522
|
-
*
|
523
|
-
*
|
524
|
-
*
|
525
|
-
*
|
522
|
+
* list_for_each_safe(&parent->children, child, next, list) {
|
523
|
+
* list_del(&child->list);
|
524
|
+
* parent->num_children--;
|
525
|
+
* }
|
526
526
|
*/
|
527
|
-
#define list_for_each_safe(h, i, nxt, member)
|
528
|
-
|
527
|
+
#define list_for_each_safe(h, i, nxt, member) \
|
528
|
+
list_for_each_safe_off(h, i, nxt, list_off_var_(i, member))
|
529
529
|
|
530
530
|
/**
|
531
531
|
* list_next - get the next entry in a list
|
@@ -536,16 +536,16 @@ static inline const void *list_tail_(const struct list_head *h, size_t off)
|
|
536
536
|
* If @i was the last entry in the list, returns NULL.
|
537
537
|
*
|
538
538
|
* Example:
|
539
|
-
*
|
540
|
-
*
|
541
|
-
*
|
542
|
-
*
|
539
|
+
* struct child *second;
|
540
|
+
* second = list_next(&parent->children, first, list);
|
541
|
+
* if (!second)
|
542
|
+
* printf("No second child!\n");
|
543
543
|
*/
|
544
|
-
#define list_next(h, i, member)
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
544
|
+
#define list_next(h, i, member) \
|
545
|
+
((list_typeof(i))list_entry_or_null(list_debug(h, \
|
546
|
+
__FILE__ ":" stringify(__LINE__)), \
|
547
|
+
(i)->member.next, \
|
548
|
+
list_off_var_((i), member)))
|
549
549
|
|
550
550
|
/**
|
551
551
|
* list_prev - get the previous entry in a list
|
@@ -556,15 +556,15 @@ static inline const void *list_tail_(const struct list_head *h, size_t off)
|
|
556
556
|
* If @i was the first entry in the list, returns NULL.
|
557
557
|
*
|
558
558
|
* Example:
|
559
|
-
*
|
560
|
-
*
|
561
|
-
*
|
559
|
+
* first = list_prev(&parent->children, second, list);
|
560
|
+
* if (!first)
|
561
|
+
* printf("Can't go back to first child?!\n");
|
562
562
|
*/
|
563
|
-
#define list_prev(h, i, member)
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
563
|
+
#define list_prev(h, i, member) \
|
564
|
+
((list_typeof(i))list_entry_or_null(list_debug(h, \
|
565
|
+
__FILE__ ":" stringify(__LINE__)), \
|
566
|
+
(i)->member.prev, \
|
567
|
+
list_off_var_((i), member)))
|
568
568
|
|
569
569
|
/**
|
570
570
|
* list_append_list - empty one list onto the end of another.
|
@@ -575,30 +575,30 @@ static inline const void *list_tail_(const struct list_head *h, size_t off)
|
|
575
575
|
* @to. After this @from will be empty.
|
576
576
|
*
|
577
577
|
* Example:
|
578
|
-
*
|
578
|
+
* struct list_head adopter;
|
579
579
|
*
|
580
|
-
*
|
581
|
-
*
|
582
|
-
*
|
580
|
+
* list_append_list(&adopter, &parent->children);
|
581
|
+
* assert(list_empty(&parent->children));
|
582
|
+
* parent->num_children = 0;
|
583
583
|
*/
|
584
|
-
#define list_append_list(t, f) list_append_list_(t, f,
|
585
|
-
|
584
|
+
#define list_append_list(t, f) list_append_list_(t, f, \
|
585
|
+
__FILE__ ":" stringify(__LINE__))
|
586
586
|
static inline void list_append_list_(struct list_head *to,
|
587
|
-
|
588
|
-
|
587
|
+
struct list_head *from,
|
588
|
+
const char *abortstr)
|
589
589
|
{
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
590
|
+
struct list_node *from_tail = list_debug(from, abortstr)->n.prev;
|
591
|
+
struct list_node *to_tail = list_debug(to, abortstr)->n.prev;
|
592
|
+
|
593
|
+
/* Sew in head and entire list. */
|
594
|
+
to->n.prev = from_tail;
|
595
|
+
from_tail->next = &to->n;
|
596
|
+
to_tail->next = &from->n;
|
597
|
+
from->n.prev = to_tail;
|
598
|
+
|
599
|
+
/* Now remove head. */
|
600
|
+
list_del(&from->n);
|
601
|
+
list_head_init(from);
|
602
602
|
}
|
603
603
|
|
604
604
|
/**
|
@@ -610,46 +610,46 @@ static inline void list_append_list_(struct list_head *to,
|
|
610
610
|
* of @to. After this @from will be empty.
|
611
611
|
*
|
612
612
|
* Example:
|
613
|
-
*
|
614
|
-
*
|
615
|
-
*
|
613
|
+
* list_prepend_list(&adopter, &parent->children);
|
614
|
+
* assert(list_empty(&parent->children));
|
615
|
+
* parent->num_children = 0;
|
616
616
|
*/
|
617
617
|
#define list_prepend_list(t, f) list_prepend_list_(t, f, LIST_LOC)
|
618
618
|
static inline void list_prepend_list_(struct list_head *to,
|
619
|
-
|
620
|
-
|
619
|
+
struct list_head *from,
|
620
|
+
const char *abortstr)
|
621
621
|
{
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
622
|
+
struct list_node *from_tail = list_debug(from, abortstr)->n.prev;
|
623
|
+
struct list_node *to_head = list_debug(to, abortstr)->n.next;
|
624
|
+
|
625
|
+
/* Sew in head and entire list. */
|
626
|
+
to->n.next = &from->n;
|
627
|
+
from->n.prev = &to->n;
|
628
|
+
to_head->prev = from_tail;
|
629
|
+
from_tail->next = to_head;
|
630
|
+
|
631
|
+
/* Now remove head. */
|
632
|
+
list_del(&from->n);
|
633
|
+
list_head_init(from);
|
634
634
|
}
|
635
635
|
|
636
636
|
/* internal macros, do not use directly */
|
637
|
-
#define list_for_each_off_dir_(h, i, off, dir)
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
#define list_for_each_safe_off_dir_(h, i, nxt, off, dir)
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
637
|
+
#define list_for_each_off_dir_(h, i, off, dir) \
|
638
|
+
for (i = list_node_to_off_(list_debug(h, LIST_LOC)->n.dir, \
|
639
|
+
(off)); \
|
640
|
+
list_node_from_off_((void *)i, (off)) != &(h)->n; \
|
641
|
+
i = list_node_to_off_(list_node_from_off_((void *)i, (off))->dir, \
|
642
|
+
(off)))
|
643
|
+
|
644
|
+
#define list_for_each_safe_off_dir_(h, i, nxt, off, dir) \
|
645
|
+
for (i = list_node_to_off_(list_debug(h, LIST_LOC)->n.dir, \
|
646
|
+
(off)), \
|
647
|
+
nxt = list_node_to_off_(list_node_from_off_(i, (off))->dir, \
|
648
|
+
(off)); \
|
649
|
+
list_node_from_off_(i, (off)) != &(h)->n; \
|
650
|
+
i = nxt, \
|
651
|
+
nxt = list_node_to_off_(list_node_from_off_(i, (off))->dir, \
|
652
|
+
(off)))
|
653
653
|
|
654
654
|
/**
|
655
655
|
* list_for_each_off - iterate through a list of memory regions.
|
@@ -658,7 +658,7 @@ static inline void list_prepend_list_(struct list_head *to,
|
|
658
658
|
* @off: offset(relative to @i) at which list node data resides.
|
659
659
|
*
|
660
660
|
* This is a low-level wrapper to iterate @i over the entire list, used to
|
661
|
-
* implement all
|
661
|
+
* implement all other, more high-level, for-each constructs. It's a for loop,
|
662
662
|
* so you can break and continue as normal.
|
663
663
|
*
|
664
664
|
* WARNING! Being the low-level macro that it is, this wrapper doesn't know
|
@@ -676,12 +676,12 @@ static inline void list_prepend_list_(struct list_head *to,
|
|
676
676
|
* @i.
|
677
677
|
*
|
678
678
|
* Example:
|
679
|
-
*
|
680
|
-
*
|
681
|
-
*
|
679
|
+
* list_for_each_off(&parent->children, child,
|
680
|
+
* offsetof(struct child, list))
|
681
|
+
* printf("Name: %s\n", child->name);
|
682
682
|
*/
|
683
683
|
#define list_for_each_off(h, i, off) \
|
684
|
-
|
684
|
+
list_for_each_off_dir_((h),(i),(off),next)
|
685
685
|
|
686
686
|
/**
|
687
687
|
* list_for_each_rev_off - iterate through a list of memory regions backwards
|
@@ -692,7 +692,7 @@ static inline void list_prepend_list_(struct list_head *to,
|
|
692
692
|
* See list_for_each_off for details
|
693
693
|
*/
|
694
694
|
#define list_for_each_rev_off(h, i, off) \
|
695
|
-
|
695
|
+
list_for_each_off_dir_((h),(i),(off),prev)
|
696
696
|
|
697
697
|
/**
|
698
698
|
* list_for_each_safe_off - iterate through a list of memory regions, maybe
|
@@ -706,12 +706,12 @@ static inline void list_prepend_list_(struct list_head *to,
|
|
706
706
|
* descriptions.
|
707
707
|
*
|
708
708
|
* Example:
|
709
|
-
*
|
710
|
-
*
|
711
|
-
*
|
709
|
+
* list_for_each_safe_off(&parent->children, child,
|
710
|
+
* next, offsetof(struct child, list))
|
711
|
+
* printf("Name: %s\n", child->name);
|
712
712
|
*/
|
713
713
|
#define list_for_each_safe_off(h, i, nxt, off) \
|
714
|
-
|
714
|
+
list_for_each_safe_off_dir_((h),(i),(nxt),(off),next)
|
715
715
|
|
716
716
|
/**
|
717
717
|
* list_for_each_rev_safe_off - iterate backwards through a list of
|
@@ -725,50 +725,50 @@ static inline void list_prepend_list_(struct list_head *to,
|
|
725
725
|
* descriptions.
|
726
726
|
*
|
727
727
|
* Example:
|
728
|
-
*
|
729
|
-
*
|
730
|
-
*
|
728
|
+
* list_for_each_rev_safe_off(&parent->children, child,
|
729
|
+
* next, offsetof(struct child, list))
|
730
|
+
* printf("Name: %s\n", child->name);
|
731
731
|
*/
|
732
732
|
#define list_for_each_rev_safe_off(h, i, nxt, off) \
|
733
|
-
|
733
|
+
list_for_each_safe_off_dir_((h),(i),(nxt),(off),prev)
|
734
734
|
|
735
735
|
/* Other -off variants. */
|
736
|
-
#define list_entry_off(n, type, off)
|
737
|
-
|
736
|
+
#define list_entry_off(n, type, off) \
|
737
|
+
((type *)list_node_from_off_((n), (off)))
|
738
738
|
|
739
|
-
#define list_head_off(h, type, off)
|
740
|
-
|
739
|
+
#define list_head_off(h, type, off) \
|
740
|
+
((type *)list_head_off((h), (off)))
|
741
741
|
|
742
|
-
#define list_tail_off(h, type, off)
|
743
|
-
|
742
|
+
#define list_tail_off(h, type, off) \
|
743
|
+
((type *)list_tail_((h), (off)))
|
744
744
|
|
745
745
|
#define list_add_off(h, n, off) \
|
746
|
-
|
746
|
+
list_add((h), list_node_from_off_((n), (off)))
|
747
747
|
|
748
748
|
#define list_del_off(n, off) \
|
749
|
-
|
749
|
+
list_del(list_node_from_off_((n), (off)))
|
750
750
|
|
751
|
-
#define list_del_from_off(h, n, off)
|
752
|
-
|
751
|
+
#define list_del_from_off(h, n, off) \
|
752
|
+
list_del_from(h, list_node_from_off_((n), (off)))
|
753
753
|
|
754
754
|
/* Offset helper functions so we only single-evaluate. */
|
755
755
|
static inline void *list_node_to_off_(struct list_node *node, size_t off)
|
756
756
|
{
|
757
|
-
|
757
|
+
return (void *)((char *)node - off);
|
758
758
|
}
|
759
759
|
static inline struct list_node *list_node_from_off_(void *ptr, size_t off)
|
760
760
|
{
|
761
|
-
|
761
|
+
return (struct list_node *)((char *)ptr + off);
|
762
762
|
}
|
763
763
|
|
764
764
|
/* Get the offset of the member, but make sure it's a list_node. */
|
765
|
-
#define list_off_(type, member)
|
766
|
-
|
767
|
-
|
765
|
+
#define list_off_(type, member) \
|
766
|
+
(container_off(type, member) + \
|
767
|
+
check_type(((type *)0)->member, struct list_node))
|
768
768
|
|
769
|
-
#define list_off_var_(var, member)
|
770
|
-
|
771
|
-
|
769
|
+
#define list_off_var_(var, member) \
|
770
|
+
(container_off_var(var, member) + \
|
771
|
+
check_type(var->member, struct list_node))
|
772
772
|
|
773
773
|
#if HAVE_TYPEOF
|
774
774
|
#define list_typeof(var) typeof(var)
|
@@ -778,11 +778,11 @@ static inline struct list_node *list_node_from_off_(void *ptr, size_t off)
|
|
778
778
|
|
779
779
|
/* Returns member, or NULL if at end of list. */
|
780
780
|
static inline void *list_entry_or_null(const struct list_head *h,
|
781
|
-
|
782
|
-
|
781
|
+
const struct list_node *n,
|
782
|
+
size_t off)
|
783
783
|
{
|
784
|
-
|
785
|
-
|
786
|
-
|
784
|
+
if (n == &h->n)
|
785
|
+
return NULL;
|
786
|
+
return (char *)n - off;
|
787
787
|
}
|
788
788
|
#endif /* CCAN_LIST_H */
|