debase-ruby_core_source 3.3.6 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/CHANGELOG.md +6 -0
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/builtin.h +7 -1
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/darray.h +1 -3
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/id.h +5 -0
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/insns.inc +2 -0
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/insns_info.inc +310 -175
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/basic_operators.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/bits.h +82 -0
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/encoding.h +2 -0
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/error.h +26 -0
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/fixnum.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/gc.h +14 -6
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/imemo.h +6 -1
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/io.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/parse.h +2 -1
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/proc.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/ractor.h +4 -0
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/sanitizers.h +31 -39
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/string.h +22 -10
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/thread.h +23 -0
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/vm.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/method.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/optunifs.inc +1 -1
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/parse.h +2 -2
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/ast.h +427 -3
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/defines.h +8 -7
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/diagnostic.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/extension.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/prism/prism.h +47 -11
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/version.h +2 -2
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism_compile.h +5 -5
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/ractor_core.h +6 -6
- data/lib/debase/ruby_core_source/ruby-3.4.0/revision.h +5 -0
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/rubyparser.h +3 -2
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/thread_pthread.h +0 -1
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/version.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/vm.inc +151 -88
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/vm_core.h +40 -12
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/vm_sync.h +3 -3
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/vmtc.inc +2 -0
- data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/yjit.h +1 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +147 -293
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/darray.h +0 -191
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/debug_counter.h +0 -423
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/dln.h +0 -34
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/id.h +0 -343
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/insns.inc +0 -259
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/insns_info.inc +0 -9530
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/array.h +0 -151
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/basic_operators.h +0 -63
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/bits.h +0 -568
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/class.h +0 -283
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/error.h +0 -216
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/fixnum.h +0 -184
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/gc.h +0 -334
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/hash.h +0 -191
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/imemo.h +0 -260
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/io.h +0 -140
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/parse.h +0 -117
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/ractor.h +0 -6
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/sanitizers.h +0 -297
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/string.h +0 -182
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/thread.h +0 -79
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/vm.h +0 -137
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/known_errors.inc +0 -1419
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/method.h +0 -255
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/optunifs.inc +0 -43
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parse.h +0 -243
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/ast.h +0 -6245
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/defines.h +0 -206
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/diagnostic.h +0 -433
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/extension.h +0 -19
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/node.h +0 -150
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/options.h +0 -305
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/parser.h +0 -891
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/regexp.h +0 -33
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/static_literals.h +0 -120
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_char.h +0 -205
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_constant_pool.h +0 -226
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_integer.h +0 -119
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_newline_list.h +0 -102
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_string.h +0 -174
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_string_list.h +0 -44
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/version.h +0 -29
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism_compile.h +0 -88
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ractor_core.h +0 -393
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/regint.h +0 -1010
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/revision.h +0 -5
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/rubyparser.h +0 -1430
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/shape.h +0 -233
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/symbol.h +0 -118
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/thread_pthread.h +0 -166
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/version.h +0 -69
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm.inc +0 -5643
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_callinfo.h +0 -605
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_core.h +0 -2236
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_insnhelper.h +0 -272
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_sync.h +0 -137
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vmtc.inc +0 -253
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/addr2line.h +0 -22
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/builtin.h +0 -119
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ccan/build_assert/build_assert.h +0 -40
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ccan/check_type/check_type.h +0 -63
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ccan/container_of/container_of.h +0 -142
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ccan/list/list.h +0 -791
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ccan/str/str.h +0 -17
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/constant.h +0 -53
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/encindex.h +0 -70
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/eval_intern.h +0 -324
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/hrtime.h +0 -237
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/id_table.h +0 -39
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/bignum.h +0 -244
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/cmdlineopt.h +0 -65
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/compar.h +0 -29
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/compile.h +0 -34
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/compilers.h +0 -107
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/complex.h +0 -29
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/cont.h +0 -35
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/dir.h +0 -16
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/enc.h +0 -19
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/encoding.h +0 -36
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/enum.h +0 -18
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/enumerator.h +0 -21
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/eval.h +0 -33
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/file.h +0 -38
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/inits.h +0 -47
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/load.h +0 -18
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/loadpath.h +0 -16
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/math.h +0 -23
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/missing.h +0 -19
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/numeric.h +0 -274
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/object.h +0 -63
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/proc.h +0 -30
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/process.h +0 -124
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/random.h +0 -17
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/range.h +0 -40
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/rational.h +0 -71
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/re.h +0 -28
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/ruby_parser.h +0 -102
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/serial.h +0 -23
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/signal.h +0 -24
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/st.h +0 -11
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/static_assert.h +0 -16
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/struct.h +0 -127
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/symbol.h +0 -45
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/time.h +0 -34
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/transcode.h +0 -23
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/util.h +0 -27
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/variable.h +0 -72
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/warnings.h +0 -16
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal.h +0 -108
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/iseq.h +0 -340
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/node.h +0 -111
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/node_name.inc +0 -224
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/optinsn.inc +0 -128
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/parser_bits.h +0 -564
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/parser_node.h +0 -32
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/parser_st.h +0 -162
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/parser_value.h +0 -106
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/encoding.h +0 -283
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/pack.h +0 -163
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/prettyprint.h +0 -34
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/prism.h +0 -336
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_buffer.h +0 -218
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_list.h +0 -97
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_memchr.h +0 -29
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_strncasecmp.h +0 -32
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_strpbrk.h +0 -46
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/probes_helper.h +0 -42
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/regenc.h +0 -254
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/regparse.h +0 -371
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/revision.h +0 -5
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/rjit.h +0 -101
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/rjit_c.h +0 -165
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ruby_assert.h +0 -14
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ruby_atomic.h +0 -23
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/siphash.h +0 -48
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/thread_none.h +0 -21
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/thread_win32.h +0 -58
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/timev.h +0 -58
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/transcode_data.h +0 -138
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/variable.h +0 -39
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/vm_call_iseq_optimized.inc +0 -244
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/vm_debug.h +0 -124
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/vm_exec.h +0 -199
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/vm_opts.h +0 -67
- data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/yjit.h +0 -79
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/addr2line.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/ccan/build_assert/build_assert.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/ccan/check_type/check_type.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/ccan/container_of/container_of.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/ccan/list/list.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/ccan/str/str.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/constant.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/debug_counter.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/dln.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/encindex.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/eval_intern.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/hrtime.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/id_table.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/array.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/bignum.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/class.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/cmdlineopt.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/compar.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/compile.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/compilers.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/complex.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/cont.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/dir.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/enc.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/enum.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/enumerator.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/eval.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/file.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/hash.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/inits.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/load.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/loadpath.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/math.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/missing.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/numeric.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/object.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/process.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/random.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/range.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/rational.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/re.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/ruby_parser.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/serial.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/signal.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/st.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/static_assert.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/struct.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/symbol.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/time.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/transcode.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/util.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/variable.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/warnings.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/iseq.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/known_errors.inc +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/node.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/node_name.inc +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/optinsn.inc +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/parser_bits.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/parser_node.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/parser_st.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/parser_value.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/prism/encoding.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/node.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/options.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/prism/pack.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/parser.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/prism/prettyprint.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/regexp.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/static_literals.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/prism/util/pm_buffer.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/util/pm_char.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/util/pm_constant_pool.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/util/pm_integer.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/prism/util/pm_list.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/prism/util/pm_memchr.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/util/pm_newline_list.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/util/pm_string.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/prism/util/pm_strncasecmp.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/prism/util/pm_strpbrk.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/probes_helper.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/regenc.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/regint.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/regparse.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/rjit.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/rjit_c.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/ruby_assert.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/ruby_atomic.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/shape.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/siphash.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/symbol.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/thread_none.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/thread_win32.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/timev.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/transcode_data.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/variable.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/vm_call_iseq_optimized.inc +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/vm_callinfo.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/vm_debug.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/vm_exec.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/vm_insnhelper.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/vm_opts.h +0 -0
@@ -1,33 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @file regexp.h
|
3
|
-
*
|
4
|
-
* A regular expression parser.
|
5
|
-
*/
|
6
|
-
#ifndef PRISM_REGEXP_H
|
7
|
-
#define PRISM_REGEXP_H
|
8
|
-
|
9
|
-
#include "prism/defines.h"
|
10
|
-
#include "prism/parser.h"
|
11
|
-
#include "prism/encoding.h"
|
12
|
-
#include "prism/util/pm_memchr.h"
|
13
|
-
#include "prism/util/pm_string_list.h"
|
14
|
-
#include "prism/util/pm_string.h"
|
15
|
-
|
16
|
-
#include <stdbool.h>
|
17
|
-
#include <stddef.h>
|
18
|
-
#include <string.h>
|
19
|
-
|
20
|
-
/**
|
21
|
-
* Parse a regular expression and extract the names of all of the named capture
|
22
|
-
* groups.
|
23
|
-
*
|
24
|
-
* @param source The source code to parse.
|
25
|
-
* @param size The size of the source code.
|
26
|
-
* @param named_captures The list to add the names of the named capture groups.
|
27
|
-
* @param encoding_changed Whether or not the encoding changed from the default.
|
28
|
-
* @param encoding The encoding of the source code.
|
29
|
-
* @return Whether or not the parsing was successful.
|
30
|
-
*/
|
31
|
-
PRISM_EXPORTED_FUNCTION bool pm_regexp_named_capture_group_names(const uint8_t *source, size_t size, pm_string_list_t *named_captures, bool encoding_changed, const pm_encoding_t *encoding);
|
32
|
-
|
33
|
-
#endif
|
@@ -1,120 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @file static_literals.h
|
3
|
-
*
|
4
|
-
* A set of static literal nodes that can be checked for duplicates.
|
5
|
-
*/
|
6
|
-
#ifndef PRISM_STATIC_LITERALS_H
|
7
|
-
#define PRISM_STATIC_LITERALS_H
|
8
|
-
|
9
|
-
#include "prism/defines.h"
|
10
|
-
#include "prism/ast.h"
|
11
|
-
#include "prism/util/pm_newline_list.h"
|
12
|
-
|
13
|
-
#include <assert.h>
|
14
|
-
#include <stdbool.h>
|
15
|
-
|
16
|
-
/**
|
17
|
-
* An internal hash table for a set of nodes.
|
18
|
-
*/
|
19
|
-
typedef struct {
|
20
|
-
/** The array of nodes in the hash table. */
|
21
|
-
pm_node_t **nodes;
|
22
|
-
|
23
|
-
/** The size of the hash table. */
|
24
|
-
uint32_t size;
|
25
|
-
|
26
|
-
/** The space that has been allocated in the hash table. */
|
27
|
-
uint32_t capacity;
|
28
|
-
} pm_node_hash_t;
|
29
|
-
|
30
|
-
/**
|
31
|
-
* Certain sets of nodes (hash keys and when clauses) check for duplicate nodes
|
32
|
-
* to alert the user of potential issues. To do this, we keep a set of the nodes
|
33
|
-
* that have been seen so far, and compare whenever we find a new node.
|
34
|
-
*
|
35
|
-
* We bucket the nodes based on their type to minimize the number of comparisons
|
36
|
-
* that need to be performed.
|
37
|
-
*/
|
38
|
-
typedef struct {
|
39
|
-
/**
|
40
|
-
* This is the set of IntegerNode and SourceLineNode instances.
|
41
|
-
*/
|
42
|
-
pm_node_hash_t integer_nodes;
|
43
|
-
|
44
|
-
/**
|
45
|
-
* This is the set of FloatNode instances.
|
46
|
-
*/
|
47
|
-
pm_node_hash_t float_nodes;
|
48
|
-
|
49
|
-
/**
|
50
|
-
* This is the set of RationalNode and ImaginaryNode instances.
|
51
|
-
*/
|
52
|
-
pm_node_hash_t number_nodes;
|
53
|
-
|
54
|
-
/**
|
55
|
-
* This is the set of StringNode and SourceFileNode instances.
|
56
|
-
*/
|
57
|
-
pm_node_hash_t string_nodes;
|
58
|
-
|
59
|
-
/**
|
60
|
-
* This is the set of RegularExpressionNode instances.
|
61
|
-
*/
|
62
|
-
pm_node_hash_t regexp_nodes;
|
63
|
-
|
64
|
-
/**
|
65
|
-
* This is the set of SymbolNode instances.
|
66
|
-
*/
|
67
|
-
pm_node_hash_t symbol_nodes;
|
68
|
-
|
69
|
-
/**
|
70
|
-
* A pointer to the last TrueNode instance that was inserted, or NULL.
|
71
|
-
*/
|
72
|
-
pm_node_t *true_node;
|
73
|
-
|
74
|
-
/**
|
75
|
-
* A pointer to the last FalseNode instance that was inserted, or NULL.
|
76
|
-
*/
|
77
|
-
pm_node_t *false_node;
|
78
|
-
|
79
|
-
/**
|
80
|
-
* A pointer to the last NilNode instance that was inserted, or NULL.
|
81
|
-
*/
|
82
|
-
pm_node_t *nil_node;
|
83
|
-
|
84
|
-
/**
|
85
|
-
* A pointer to the last SourceEncodingNode instance that was inserted, or
|
86
|
-
* NULL.
|
87
|
-
*/
|
88
|
-
pm_node_t *source_encoding_node;
|
89
|
-
} pm_static_literals_t;
|
90
|
-
|
91
|
-
/**
|
92
|
-
* Add a node to the set of static literals.
|
93
|
-
*
|
94
|
-
* @param newline_list The list of newline offsets to use to calculate lines.
|
95
|
-
* @param start_line The line number that the parser starts on.
|
96
|
-
* @param literals The set of static literals to add the node to.
|
97
|
-
* @param node The node to add to the set.
|
98
|
-
* @return A pointer to the node that is being overwritten, if there is one.
|
99
|
-
*/
|
100
|
-
pm_node_t * pm_static_literals_add(const pm_newline_list_t *newline_list, int32_t start_line, pm_static_literals_t *literals, pm_node_t *node);
|
101
|
-
|
102
|
-
/**
|
103
|
-
* Free the internal memory associated with the given static literals set.
|
104
|
-
*
|
105
|
-
* @param literals The set of static literals to free.
|
106
|
-
*/
|
107
|
-
void pm_static_literals_free(pm_static_literals_t *literals);
|
108
|
-
|
109
|
-
/**
|
110
|
-
* Create a string-based representation of the given static literal.
|
111
|
-
*
|
112
|
-
* @param buffer The buffer to write the string to.
|
113
|
-
* @param newline_list The list of newline offsets to use to calculate lines.
|
114
|
-
* @param start_line The line number that the parser starts on.
|
115
|
-
* @param encoding_name The name of the encoding of the source being parsed.
|
116
|
-
* @param node The node to create a string representation of.
|
117
|
-
*/
|
118
|
-
PRISM_EXPORTED_FUNCTION void pm_static_literal_inspect(pm_buffer_t *buffer, const pm_newline_list_t *newline_list, int32_t start_line, const char *encoding_name, const pm_node_t *node);
|
119
|
-
|
120
|
-
#endif
|
@@ -1,205 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @file pm_char.h
|
3
|
-
*
|
4
|
-
* Functions for working with characters and strings.
|
5
|
-
*/
|
6
|
-
#ifndef PRISM_CHAR_H
|
7
|
-
#define PRISM_CHAR_H
|
8
|
-
|
9
|
-
#include "prism/defines.h"
|
10
|
-
#include "prism/util/pm_newline_list.h"
|
11
|
-
|
12
|
-
#include <stdbool.h>
|
13
|
-
#include <stddef.h>
|
14
|
-
|
15
|
-
/**
|
16
|
-
* Returns the number of characters at the start of the string that are
|
17
|
-
* whitespace. Disallows searching past the given maximum number of characters.
|
18
|
-
*
|
19
|
-
* @param string The string to search.
|
20
|
-
* @param length The maximum number of characters to search.
|
21
|
-
* @return The number of characters at the start of the string that are
|
22
|
-
* whitespace.
|
23
|
-
*/
|
24
|
-
size_t pm_strspn_whitespace(const uint8_t *string, ptrdiff_t length);
|
25
|
-
|
26
|
-
/**
|
27
|
-
* Returns the number of characters at the start of the string that are
|
28
|
-
* whitespace while also tracking the location of each newline. Disallows
|
29
|
-
* searching past the given maximum number of characters.
|
30
|
-
*
|
31
|
-
* @param string The string to search.
|
32
|
-
* @param length The maximum number of characters to search.
|
33
|
-
* @param newline_list The list of newlines to populate.
|
34
|
-
* @return The number of characters at the start of the string that are
|
35
|
-
* whitespace.
|
36
|
-
*/
|
37
|
-
size_t
|
38
|
-
pm_strspn_whitespace_newlines(const uint8_t *string, ptrdiff_t length, pm_newline_list_t *newline_list);
|
39
|
-
|
40
|
-
/**
|
41
|
-
* Returns the number of characters at the start of the string that are inline
|
42
|
-
* whitespace. Disallows searching past the given maximum number of characters.
|
43
|
-
*
|
44
|
-
* @param string The string to search.
|
45
|
-
* @param length The maximum number of characters to search.
|
46
|
-
* @return The number of characters at the start of the string that are inline
|
47
|
-
* whitespace.
|
48
|
-
*/
|
49
|
-
size_t pm_strspn_inline_whitespace(const uint8_t *string, ptrdiff_t length);
|
50
|
-
|
51
|
-
/**
|
52
|
-
* Returns the number of characters at the start of the string that are decimal
|
53
|
-
* digits. Disallows searching past the given maximum number of characters.
|
54
|
-
*
|
55
|
-
* @param string The string to search.
|
56
|
-
* @param length The maximum number of characters to search.
|
57
|
-
* @return The number of characters at the start of the string that are decimal
|
58
|
-
* digits.
|
59
|
-
*/
|
60
|
-
size_t pm_strspn_decimal_digit(const uint8_t *string, ptrdiff_t length);
|
61
|
-
|
62
|
-
/**
|
63
|
-
* Returns the number of characters at the start of the string that are
|
64
|
-
* hexadecimal digits. Disallows searching past the given maximum number of
|
65
|
-
* characters.
|
66
|
-
*
|
67
|
-
* @param string The string to search.
|
68
|
-
* @param length The maximum number of characters to search.
|
69
|
-
* @return The number of characters at the start of the string that are
|
70
|
-
* hexadecimal digits.
|
71
|
-
*/
|
72
|
-
size_t pm_strspn_hexadecimal_digit(const uint8_t *string, ptrdiff_t length);
|
73
|
-
|
74
|
-
/**
|
75
|
-
* Returns the number of characters at the start of the string that are octal
|
76
|
-
* digits or underscores. Disallows searching past the given maximum number of
|
77
|
-
* characters.
|
78
|
-
*
|
79
|
-
* If multiple underscores are found in a row or if an underscore is
|
80
|
-
* found at the end of the number, then the invalid pointer is set to the index
|
81
|
-
* of the first invalid underscore.
|
82
|
-
*
|
83
|
-
* @param string The string to search.
|
84
|
-
* @param length The maximum number of characters to search.
|
85
|
-
* @param invalid The pointer to set to the index of the first invalid
|
86
|
-
* underscore.
|
87
|
-
* @return The number of characters at the start of the string that are octal
|
88
|
-
* digits or underscores.
|
89
|
-
*/
|
90
|
-
size_t pm_strspn_octal_number(const uint8_t *string, ptrdiff_t length, const uint8_t **invalid);
|
91
|
-
|
92
|
-
/**
|
93
|
-
* Returns the number of characters at the start of the string that are decimal
|
94
|
-
* digits or underscores. Disallows searching past the given maximum number of
|
95
|
-
* characters.
|
96
|
-
*
|
97
|
-
* If multiple underscores are found in a row or if an underscore is
|
98
|
-
* found at the end of the number, then the invalid pointer is set to the index
|
99
|
-
* of the first invalid underscore.
|
100
|
-
*
|
101
|
-
* @param string The string to search.
|
102
|
-
* @param length The maximum number of characters to search.
|
103
|
-
* @param invalid The pointer to set to the index of the first invalid
|
104
|
-
* underscore.
|
105
|
-
* @return The number of characters at the start of the string that are decimal
|
106
|
-
* digits or underscores.
|
107
|
-
*/
|
108
|
-
size_t pm_strspn_decimal_number(const uint8_t *string, ptrdiff_t length, const uint8_t **invalid);
|
109
|
-
|
110
|
-
/**
|
111
|
-
* Returns the number of characters at the start of the string that are
|
112
|
-
* hexadecimal digits or underscores. Disallows searching past the given maximum
|
113
|
-
* number of characters.
|
114
|
-
*
|
115
|
-
* If multiple underscores are found in a row or if an underscore is
|
116
|
-
* found at the end of the number, then the invalid pointer is set to the index
|
117
|
-
* of the first invalid underscore.
|
118
|
-
*
|
119
|
-
* @param string The string to search.
|
120
|
-
* @param length The maximum number of characters to search.
|
121
|
-
* @param invalid The pointer to set to the index of the first invalid
|
122
|
-
* underscore.
|
123
|
-
* @return The number of characters at the start of the string that are
|
124
|
-
* hexadecimal digits or underscores.
|
125
|
-
*/
|
126
|
-
size_t pm_strspn_hexadecimal_number(const uint8_t *string, ptrdiff_t length, const uint8_t **invalid);
|
127
|
-
|
128
|
-
/**
|
129
|
-
* Returns the number of characters at the start of the string that are regexp
|
130
|
-
* options. Disallows searching past the given maximum number of characters.
|
131
|
-
*
|
132
|
-
* @param string The string to search.
|
133
|
-
* @param length The maximum number of characters to search.
|
134
|
-
* @return The number of characters at the start of the string that are regexp
|
135
|
-
* options.
|
136
|
-
*/
|
137
|
-
size_t pm_strspn_regexp_option(const uint8_t *string, ptrdiff_t length);
|
138
|
-
|
139
|
-
/**
|
140
|
-
* Returns the number of characters at the start of the string that are binary
|
141
|
-
* digits or underscores. Disallows searching past the given maximum number of
|
142
|
-
* characters.
|
143
|
-
*
|
144
|
-
* If multiple underscores are found in a row or if an underscore is
|
145
|
-
* found at the end of the number, then the invalid pointer is set to the index
|
146
|
-
* of the first invalid underscore.
|
147
|
-
*
|
148
|
-
* @param string The string to search.
|
149
|
-
* @param length The maximum number of characters to search.
|
150
|
-
* @param invalid The pointer to set to the index of the first invalid
|
151
|
-
* underscore.
|
152
|
-
* @return The number of characters at the start of the string that are binary
|
153
|
-
* digits or underscores.
|
154
|
-
*/
|
155
|
-
size_t pm_strspn_binary_number(const uint8_t *string, ptrdiff_t length, const uint8_t **invalid);
|
156
|
-
|
157
|
-
/**
|
158
|
-
* Returns true if the given character is a whitespace character.
|
159
|
-
*
|
160
|
-
* @param b The character to check.
|
161
|
-
* @return True if the given character is a whitespace character.
|
162
|
-
*/
|
163
|
-
bool pm_char_is_whitespace(const uint8_t b);
|
164
|
-
|
165
|
-
/**
|
166
|
-
* Returns true if the given character is an inline whitespace character.
|
167
|
-
*
|
168
|
-
* @param b The character to check.
|
169
|
-
* @return True if the given character is an inline whitespace character.
|
170
|
-
*/
|
171
|
-
bool pm_char_is_inline_whitespace(const uint8_t b);
|
172
|
-
|
173
|
-
/**
|
174
|
-
* Returns true if the given character is a binary digit.
|
175
|
-
*
|
176
|
-
* @param b The character to check.
|
177
|
-
* @return True if the given character is a binary digit.
|
178
|
-
*/
|
179
|
-
bool pm_char_is_binary_digit(const uint8_t b);
|
180
|
-
|
181
|
-
/**
|
182
|
-
* Returns true if the given character is an octal digit.
|
183
|
-
*
|
184
|
-
* @param b The character to check.
|
185
|
-
* @return True if the given character is an octal digit.
|
186
|
-
*/
|
187
|
-
bool pm_char_is_octal_digit(const uint8_t b);
|
188
|
-
|
189
|
-
/**
|
190
|
-
* Returns true if the given character is a decimal digit.
|
191
|
-
*
|
192
|
-
* @param b The character to check.
|
193
|
-
* @return True if the given character is a decimal digit.
|
194
|
-
*/
|
195
|
-
bool pm_char_is_decimal_digit(const uint8_t b);
|
196
|
-
|
197
|
-
/**
|
198
|
-
* Returns true if the given character is a hexadecimal digit.
|
199
|
-
*
|
200
|
-
* @param b The character to check.
|
201
|
-
* @return True if the given character is a hexadecimal digit.
|
202
|
-
*/
|
203
|
-
bool pm_char_is_hexadecimal_digit(const uint8_t b);
|
204
|
-
|
205
|
-
#endif
|
@@ -1,226 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @file pm_constant_pool.h
|
3
|
-
*
|
4
|
-
* A data structure that stores a set of strings.
|
5
|
-
*
|
6
|
-
* Each string is assigned a unique id, which can be used to compare strings for
|
7
|
-
* equality. This comparison ends up being much faster than strcmp, since it
|
8
|
-
* only requires a single integer comparison.
|
9
|
-
*/
|
10
|
-
#ifndef PRISM_CONSTANT_POOL_H
|
11
|
-
#define PRISM_CONSTANT_POOL_H
|
12
|
-
|
13
|
-
#include "prism/defines.h"
|
14
|
-
|
15
|
-
#include <assert.h>
|
16
|
-
#include <stdbool.h>
|
17
|
-
#include <stdint.h>
|
18
|
-
#include <stdlib.h>
|
19
|
-
#include <string.h>
|
20
|
-
|
21
|
-
/**
|
22
|
-
* When we allocate constants into the pool, we reserve 0 to mean that the slot
|
23
|
-
* is not yet filled. This constant is reused in other places to indicate the
|
24
|
-
* lack of a constant id.
|
25
|
-
*/
|
26
|
-
#define PM_CONSTANT_ID_UNSET 0
|
27
|
-
|
28
|
-
/**
|
29
|
-
* A constant id is a unique identifier for a constant in the constant pool.
|
30
|
-
*/
|
31
|
-
typedef uint32_t pm_constant_id_t;
|
32
|
-
|
33
|
-
/**
|
34
|
-
* A list of constant IDs. Usually used to represent a set of locals.
|
35
|
-
*/
|
36
|
-
typedef struct {
|
37
|
-
/** The number of constant ids in the list. */
|
38
|
-
size_t size;
|
39
|
-
|
40
|
-
/** The number of constant ids that have been allocated in the list. */
|
41
|
-
size_t capacity;
|
42
|
-
|
43
|
-
/** The constant ids in the list. */
|
44
|
-
pm_constant_id_t *ids;
|
45
|
-
} pm_constant_id_list_t;
|
46
|
-
|
47
|
-
/**
|
48
|
-
* Initialize a list of constant ids.
|
49
|
-
*
|
50
|
-
* @param list The list to initialize.
|
51
|
-
*/
|
52
|
-
void pm_constant_id_list_init(pm_constant_id_list_t *list);
|
53
|
-
|
54
|
-
/**
|
55
|
-
* Initialize a list of constant ids with a given capacity.
|
56
|
-
*
|
57
|
-
* @param list The list to initialize.
|
58
|
-
* @param capacity The initial capacity of the list.
|
59
|
-
*/
|
60
|
-
void pm_constant_id_list_init_capacity(pm_constant_id_list_t *list, size_t capacity);
|
61
|
-
|
62
|
-
/**
|
63
|
-
* Append a constant id to a list of constant ids. Returns false if any
|
64
|
-
* potential reallocations fail.
|
65
|
-
*
|
66
|
-
* @param list The list to append to.
|
67
|
-
* @param id The id to append.
|
68
|
-
* @return Whether the append succeeded.
|
69
|
-
*/
|
70
|
-
bool pm_constant_id_list_append(pm_constant_id_list_t *list, pm_constant_id_t id);
|
71
|
-
|
72
|
-
/**
|
73
|
-
* Insert a constant id into a list of constant ids at the specified index.
|
74
|
-
*
|
75
|
-
* @param list The list to insert into.
|
76
|
-
* @param index The index at which to insert.
|
77
|
-
* @param id The id to insert.
|
78
|
-
*/
|
79
|
-
void pm_constant_id_list_insert(pm_constant_id_list_t *list, size_t index, pm_constant_id_t id);
|
80
|
-
|
81
|
-
/**
|
82
|
-
* Checks if the current constant id list includes the given constant id.
|
83
|
-
*
|
84
|
-
* @param list The list to check.
|
85
|
-
* @param id The id to check for.
|
86
|
-
* @return Whether the list includes the given id.
|
87
|
-
*/
|
88
|
-
bool pm_constant_id_list_includes(pm_constant_id_list_t *list, pm_constant_id_t id);
|
89
|
-
|
90
|
-
/**
|
91
|
-
* Get the memory size of a list of constant ids.
|
92
|
-
*
|
93
|
-
* @param list The list to get the memory size of.
|
94
|
-
* @return The memory size of the list.
|
95
|
-
*/
|
96
|
-
size_t pm_constant_id_list_memsize(pm_constant_id_list_t *list);
|
97
|
-
|
98
|
-
/**
|
99
|
-
* Free the memory associated with a list of constant ids.
|
100
|
-
*
|
101
|
-
* @param list The list to free.
|
102
|
-
*/
|
103
|
-
void pm_constant_id_list_free(pm_constant_id_list_t *list);
|
104
|
-
|
105
|
-
/**
|
106
|
-
* The type of bucket in the constant pool hash map. This determines how the
|
107
|
-
* bucket should be freed.
|
108
|
-
*/
|
109
|
-
typedef unsigned int pm_constant_pool_bucket_type_t;
|
110
|
-
|
111
|
-
/** By default, each constant is a slice of the source. */
|
112
|
-
static const pm_constant_pool_bucket_type_t PM_CONSTANT_POOL_BUCKET_DEFAULT = 0;
|
113
|
-
|
114
|
-
/** An owned constant is one for which memory has been allocated. */
|
115
|
-
static const pm_constant_pool_bucket_type_t PM_CONSTANT_POOL_BUCKET_OWNED = 1;
|
116
|
-
|
117
|
-
/** A constant constant is known at compile time. */
|
118
|
-
static const pm_constant_pool_bucket_type_t PM_CONSTANT_POOL_BUCKET_CONSTANT = 2;
|
119
|
-
|
120
|
-
/** A bucket in the hash map. */
|
121
|
-
typedef struct {
|
122
|
-
/** The incremental ID used for indexing back into the pool. */
|
123
|
-
unsigned int id: 30;
|
124
|
-
|
125
|
-
/** The type of the bucket, which determines how to free it. */
|
126
|
-
pm_constant_pool_bucket_type_t type: 2;
|
127
|
-
|
128
|
-
/** The hash of the bucket. */
|
129
|
-
uint32_t hash;
|
130
|
-
} pm_constant_pool_bucket_t;
|
131
|
-
|
132
|
-
/** A constant in the pool which effectively stores a string. */
|
133
|
-
typedef struct {
|
134
|
-
/** A pointer to the start of the string. */
|
135
|
-
const uint8_t *start;
|
136
|
-
|
137
|
-
/** The length of the string. */
|
138
|
-
size_t length;
|
139
|
-
} pm_constant_t;
|
140
|
-
|
141
|
-
/** The overall constant pool, which stores constants found while parsing. */
|
142
|
-
typedef struct {
|
143
|
-
/** The buckets in the hash map. */
|
144
|
-
pm_constant_pool_bucket_t *buckets;
|
145
|
-
|
146
|
-
/** The constants that are stored in the buckets. */
|
147
|
-
pm_constant_t *constants;
|
148
|
-
|
149
|
-
/** The number of buckets in the hash map. */
|
150
|
-
uint32_t size;
|
151
|
-
|
152
|
-
/** The number of buckets that have been allocated in the hash map. */
|
153
|
-
uint32_t capacity;
|
154
|
-
} pm_constant_pool_t;
|
155
|
-
|
156
|
-
/**
|
157
|
-
* Initialize a new constant pool with a given capacity.
|
158
|
-
*
|
159
|
-
* @param pool The pool to initialize.
|
160
|
-
* @param capacity The initial capacity of the pool.
|
161
|
-
* @return Whether the initialization succeeded.
|
162
|
-
*/
|
163
|
-
bool pm_constant_pool_init(pm_constant_pool_t *pool, uint32_t capacity);
|
164
|
-
|
165
|
-
/**
|
166
|
-
* Return a pointer to the constant indicated by the given constant id.
|
167
|
-
*
|
168
|
-
* @param pool The pool to get the constant from.
|
169
|
-
* @param constant_id The id of the constant to get.
|
170
|
-
* @return A pointer to the constant.
|
171
|
-
*/
|
172
|
-
pm_constant_t * pm_constant_pool_id_to_constant(const pm_constant_pool_t *pool, pm_constant_id_t constant_id);
|
173
|
-
|
174
|
-
/**
|
175
|
-
* Find a constant in a constant pool. Returns the id of the constant, or 0 if
|
176
|
-
* the constant is not found.
|
177
|
-
*
|
178
|
-
* @param pool The pool to find the constant in.
|
179
|
-
* @param start A pointer to the start of the constant.
|
180
|
-
* @param length The length of the constant.
|
181
|
-
* @return The id of the constant.
|
182
|
-
*/
|
183
|
-
pm_constant_id_t pm_constant_pool_find(const pm_constant_pool_t *pool, const uint8_t *start, size_t length);
|
184
|
-
|
185
|
-
/**
|
186
|
-
* Insert a constant into a constant pool that is a slice of a source string.
|
187
|
-
* Returns the id of the constant, or 0 if any potential calls to resize fail.
|
188
|
-
*
|
189
|
-
* @param pool The pool to insert the constant into.
|
190
|
-
* @param start A pointer to the start of the constant.
|
191
|
-
* @param length The length of the constant.
|
192
|
-
* @return The id of the constant.
|
193
|
-
*/
|
194
|
-
pm_constant_id_t pm_constant_pool_insert_shared(pm_constant_pool_t *pool, const uint8_t *start, size_t length);
|
195
|
-
|
196
|
-
/**
|
197
|
-
* Insert a constant into a constant pool from memory that is now owned by the
|
198
|
-
* constant pool. Returns the id of the constant, or 0 if any potential calls to
|
199
|
-
* resize fail.
|
200
|
-
*
|
201
|
-
* @param pool The pool to insert the constant into.
|
202
|
-
* @param start A pointer to the start of the constant.
|
203
|
-
* @param length The length of the constant.
|
204
|
-
* @return The id of the constant.
|
205
|
-
*/
|
206
|
-
pm_constant_id_t pm_constant_pool_insert_owned(pm_constant_pool_t *pool, uint8_t *start, size_t length);
|
207
|
-
|
208
|
-
/**
|
209
|
-
* Insert a constant into a constant pool from memory that is constant. Returns
|
210
|
-
* the id of the constant, or 0 if any potential calls to resize fail.
|
211
|
-
*
|
212
|
-
* @param pool The pool to insert the constant into.
|
213
|
-
* @param start A pointer to the start of the constant.
|
214
|
-
* @param length The length of the constant.
|
215
|
-
* @return The id of the constant.
|
216
|
-
*/
|
217
|
-
pm_constant_id_t pm_constant_pool_insert_constant(pm_constant_pool_t *pool, const uint8_t *start, size_t length);
|
218
|
-
|
219
|
-
/**
|
220
|
-
* Free the memory associated with a constant pool.
|
221
|
-
*
|
222
|
-
* @param pool The pool to free.
|
223
|
-
*/
|
224
|
-
void pm_constant_pool_free(pm_constant_pool_t *pool);
|
225
|
-
|
226
|
-
#endif
|
@@ -1,119 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @file pm_integer.h
|
3
|
-
*
|
4
|
-
* This module provides functions for working with arbitrary-sized integers.
|
5
|
-
*/
|
6
|
-
#ifndef PRISM_NUMBER_H
|
7
|
-
#define PRISM_NUMBER_H
|
8
|
-
|
9
|
-
#include "prism/defines.h"
|
10
|
-
#include "prism/util/pm_buffer.h"
|
11
|
-
|
12
|
-
#include <assert.h>
|
13
|
-
#include <stdbool.h>
|
14
|
-
#include <stdint.h>
|
15
|
-
#include <stdlib.h>
|
16
|
-
|
17
|
-
/**
|
18
|
-
* A structure represents an arbitrary-sized integer.
|
19
|
-
*/
|
20
|
-
typedef struct {
|
21
|
-
/**
|
22
|
-
* Embedded value for small integer. This value is set to 0 if the value
|
23
|
-
* does not fit into uint32_t.
|
24
|
-
*/
|
25
|
-
uint32_t value;
|
26
|
-
|
27
|
-
/**
|
28
|
-
* The number of allocated values. length is set to 0 if the integer fits
|
29
|
-
* into uint32_t.
|
30
|
-
*/
|
31
|
-
size_t length;
|
32
|
-
|
33
|
-
/**
|
34
|
-
* List of 32-bit integers. Set to NULL if the integer fits into uint32_t.
|
35
|
-
*/
|
36
|
-
uint32_t *values;
|
37
|
-
|
38
|
-
/**
|
39
|
-
* Whether or not the integer is negative. It is stored this way so that a
|
40
|
-
* zeroed pm_integer_t is always positive zero.
|
41
|
-
*/
|
42
|
-
bool negative;
|
43
|
-
} pm_integer_t;
|
44
|
-
|
45
|
-
/**
|
46
|
-
* An enum controlling the base of an integer. It is expected that the base is
|
47
|
-
* already known before parsing the integer, even though it could be derived
|
48
|
-
* from the string itself.
|
49
|
-
*/
|
50
|
-
typedef enum {
|
51
|
-
/** The binary base, indicated by a 0b or 0B prefix. */
|
52
|
-
PM_INTEGER_BASE_BINARY,
|
53
|
-
|
54
|
-
/** The octal base, indicated by a 0, 0o, or 0O prefix. */
|
55
|
-
PM_INTEGER_BASE_OCTAL,
|
56
|
-
|
57
|
-
/** The decimal base, indicated by a 0d, 0D, or empty prefix. */
|
58
|
-
PM_INTEGER_BASE_DECIMAL,
|
59
|
-
|
60
|
-
/** The hexadecimal base, indicated by a 0x or 0X prefix. */
|
61
|
-
PM_INTEGER_BASE_HEXADECIMAL,
|
62
|
-
|
63
|
-
/**
|
64
|
-
* An unknown base, in which case pm_integer_parse will derive it based on
|
65
|
-
* the content of the string. This is less efficient and does more
|
66
|
-
* comparisons, so if callers know the base ahead of time, they should use
|
67
|
-
* that instead.
|
68
|
-
*/
|
69
|
-
PM_INTEGER_BASE_UNKNOWN
|
70
|
-
} pm_integer_base_t;
|
71
|
-
|
72
|
-
/**
|
73
|
-
* Parse an integer from a string. This assumes that the format of the integer
|
74
|
-
* has already been validated, as internal validation checks are not performed
|
75
|
-
* here.
|
76
|
-
*
|
77
|
-
* @param integer The integer to parse into.
|
78
|
-
* @param base The base of the integer.
|
79
|
-
* @param start The start of the string.
|
80
|
-
* @param end The end of the string.
|
81
|
-
*/
|
82
|
-
PRISM_EXPORTED_FUNCTION void pm_integer_parse(pm_integer_t *integer, pm_integer_base_t base, const uint8_t *start, const uint8_t *end);
|
83
|
-
|
84
|
-
/**
|
85
|
-
* Return the memory size of the integer.
|
86
|
-
*
|
87
|
-
* @param integer The integer to get the memory size of.
|
88
|
-
* @return The size of the memory associated with the integer.
|
89
|
-
*/
|
90
|
-
size_t pm_integer_memsize(const pm_integer_t *integer);
|
91
|
-
|
92
|
-
/**
|
93
|
-
* Compare two integers. This function returns -1 if the left integer is less
|
94
|
-
* than the right integer, 0 if they are equal, and 1 if the left integer is
|
95
|
-
* greater than the right integer.
|
96
|
-
*
|
97
|
-
* @param left The left integer to compare.
|
98
|
-
* @param right The right integer to compare.
|
99
|
-
* @return The result of the comparison.
|
100
|
-
*/
|
101
|
-
int pm_integer_compare(const pm_integer_t *left, const pm_integer_t *right);
|
102
|
-
|
103
|
-
/**
|
104
|
-
* Convert an integer to a decimal string.
|
105
|
-
*
|
106
|
-
* @param buffer The buffer to append the string to.
|
107
|
-
* @param integer The integer to convert to a string.
|
108
|
-
*/
|
109
|
-
PRISM_EXPORTED_FUNCTION void pm_integer_string(pm_buffer_t *buffer, const pm_integer_t *integer);
|
110
|
-
|
111
|
-
/**
|
112
|
-
* Free the internal memory of an integer. This memory will only be allocated if
|
113
|
-
* the integer exceeds the size of a single node in the linked list.
|
114
|
-
*
|
115
|
-
* @param integer The integer to free.
|
116
|
-
*/
|
117
|
-
PRISM_EXPORTED_FUNCTION void pm_integer_free(pm_integer_t *integer);
|
118
|
-
|
119
|
-
#endif
|